godotengine / godot-proposals

Godot Improvement Proposals (GIPs)
MIT License
1.13k stars 79 forks source link

Add "Pair by QR code" option for wireless debugging #8724

Open Nikitf777 opened 9 months ago

Nikitf777 commented 9 months ago

Describe the project you are working on

Android game

Describe the problem or limitation you are having in your project

If I want to use wireless debugging, I need to use console application called "adb" to pair and connect my device:

./adb pair 192.168.x.x:xxxxx
Enter pairing code: xxxxxx
./adb connect 192.168.x.x:xxxxx

This is too long and very unconvenient to do

Describe the feature / enhancement and how it helps to overcome the problem or limitation

Andriod Studio has an option to connect my Android device by scanning QR code. This feature also can be implemented in Godot

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

Just like in Android Studio: Screenshot from 2024-01-03 19-03-02

After clicking this button the following pop-up window will appear: (There should be QR code picture in the very center of the big rectangle, but for some reason my Android Studio sometimes fails to detect platform-tools of the SDK it installed itself, so I also have to connect by CLI) Screenshot from 2024-01-03 19-03-20

Also in the pop-up window there may be some guildelines about how to connect using QR:

  1. Enable developer options
  2. Enable wireless debugging in the developer options
  3. Go to the wireless debugging menu and choose the "Pair device with QR code" option

I think in Godot editor it can look something like this (sorry for my design skills): Connect-via-QR

If this enhancement will not be used often, can it be worked around with a few lines of script?

No

Is there a reason why this should be core and not an add-on in the asset library?

Because it is very usefull for Android development

Calinou commented 9 months ago

This feature also can be implemented in Godot

How would this feature be exposed in the Godot editor UI? Can you provide a mockup or example steps? I don't understand exactly what this is supposed to look like.

Also, remember that Godot currently doesn't embed a QR code generation library – this is likely required.

Nikitf777 commented 9 months ago

How would this feature be exposed in the Godot editor UI? Can you provide a mockup or example steps?

Added a picture with the concept.

AThousandShips commented 9 months ago

Would it show a popup? How would that window work? Would it disappear when pairing is done, what data should it send?

italomcs commented 2 months ago

This is a great idea! I thing developers has implemeted this in the future!