Android USB update
@bettellam , hey there, nice to see you opening a pull request over here, hoping this will be one of more to come :)
If you are interested, I can guide you through adding the UI to select bault rate if this test turns out to fix your issue.
@nirvn Thanks All this comes from #5576 Here I am like "a fish out of water". As I already wrote to @m-kuhn , I would never be able to complete something like this, I am not a programmer, I barely read code... but it seemed like an interesting thing to investigate....
@bettellam as soon as the workflows finished, you should get apks in here https://github.com/opengisch/QField/actions/runs/10750024510?pr=5618 There will still be a failure indicated, but let's ignore that for now.
Let's see where we go with this after the first test results.
@m-kuhn Ok. I'm home this afternoon. I'll do a test right away. Thanks
@m-kuhn Test with the window version:
I reset the default setting of the COM1 port to 9600 baud rate, leaving the receiver set to 115200.
Started QField and it connects. !!!!!
This means that having changed
mSocket->setBaudRate( QSerialPort::Baud115200 );
is a correct choice.
It will be useful to create a combobox where the user chooses the connection baud rate to the USB port.
As for android I can't find the apr file.
I think that the android.hardware.usb alone is not enough because there are all the authorization problems for the use of the USB!
Here's what happens with SWMaps:
If you scroll down here https://github.com/opengisch/QField/actions/runs/10750305033 can you see the apk files?
I don't understand what the file is? It seems to me that it is not there......
You should be able to download the qfield_dev-android-arm64-android file and install it on your phone/tablet for testing. You might have to uninstall a potentially already installed beta version of qfield before (no conflict with the stable installed version)
Nothing... it doesn't install... I tried with 2 devices (android 8 and android10)
Do you have any error message?
Android 8
https://github.com/user-attachments/assets/c640e74d-c22f-4b3d-b1e9-97f699f3c8c4
@bettellam , do you have a previous QField 'beta' (i.e. an APK from a PR) installed on your phone?
@bettellam , do you have a previous QField 'beta' (i.e. an APK from a PR) installed on your phone?
@m-kuhn Qfield dev beta uninstalled! Standard Qfiled installed.
@bettellam , alright, new APKs have been generated in the latest Android workflow runs and you'll be able to install those. Let us know :)
@nirvn Installation OK There is nothing in the listbox that refers to my connected USB device. The USB port access permissions are missing! (a system form should open with which the user enables USB access)
https://github.com/user-attachments/assets/26f9c6dd-50c6-46fc-8427-d3b17f8e6a2e
I think you need to programmatically ask for these permissions (similar to here https://github.com/opengisch/QField/blob/5c5273e29b456bfe68df5a4418e499c3e240c8c4/src/core/platforms/android/androidplatformutilities.cpp#L678 )
@bettellam , have your been able to investigate this further?
@nirvn No, I haven't done anything anymore. Also because I changed phone... android14 .... a disaster ... it doesn't recognize my bluetooth devices anymore... it's no longer possible to write in the folder android/data/ch.opengis.qfield
Pravicy and Security are blocking everything!
@bettellam , that sounds dramatic.
it's no longer possible to write in the folder android/data/ch.opengis.qfield
You mean you can't copy files into that folder via USB cable?
@nirvn Exactly!
with this application you can copy files to the qfield folder: https://play.google.com/store/search?q=fv+file+manager&c=apps
@bettellam , I don't think Android 14 is the cause of USB cable transfer not working anymore. I have a pixel 6a with Android 14 and it copies files into that folder without a problem.
@nirvn my realme gt6 I did a test with USB cable from PC and it works. Thanks I was used to transfer files with android app in wifi I will investigate...
@nirvn Back to the USB issue you could try with android.hardware.usb.host You need approval to continue....
@bettellam , are you still interested in the baud rate control here? If so, I think we could guide you into coding it :)
@nirvn Thanks for the trust... but I don't have specific technical knowledge in programming to deal with this problem. If I find some solution I will not fail to report it!
@bettellam , is it still a need of yours or have you found a workaround?
@nirvn , The alternative solution to connect a GNSS receiver with USB port in Android is to use the TCPUART app https://play.google.com/store/apps/details?id=com.hardcodedjoy.tcpuart , I reported it in this: https://github.com/opengisch/QField/issues/4329