Android Question GNSS & API level 34

Sganga61

Member
Licensed User
Longtime User
Hi
testing a simple app using GNSS library they work better on device up to Andoird 13 but crash on devices (all devices I test) with Android 14.
There are some workaround?
 

Sganga61

Member
Licensed User
Longtime User
Hi Agraham...
There isn't a specific error also when testing with simulator.
The app just don't start and the toastmessage "Please enable the GNSS device." appear for a second before app close by itself.
I'm using the GNSS example from you and the toastmessage is in the Activity_Resume routine
Please note that I test with targetSdkVersion="30" up to targetSdkVersion="34" ...without differences
 
Upvote 0

agraham

Expert
Licensed User
Longtime User
What happens on a real device? The emulator behaviour is not always the same as real devices. What is happening if you look at the source code of the example is that it is trying to open the Location settings activity and apparently failing. What should happen is that on return from enabling GPS in the Location activity Activity_Resume will run again, detect that GPS is available and request permission to use it.
 
Upvote 0

Sganga61

Member
Licensed User
Longtime User
Hi Agrham
The Android page relating to generic settings opens on the real device.
I tried to individually authorize all the authorizations requested by the APP but nothing changes.
The app closes without generating any errors exactly what happen in emulation
 
Upvote 0

agraham

Expert
Licensed User
Longtime User
I only have Android 13 devices so I can't try it here.
Android page relating to generic settings
What do you mean by "generic"? It should open the Locations settings page and all you need is to enable Location Access then press the return arrow or back button to return to the app.
 
Last edited:
Upvote 0

drgottjr

Expert
Licensed User
Longtime User
1 have 2 devices running android 14. gnss lib works fine on both (b4a 13, sdk34). why is this a java question?
 

Attachments

  • gps.png
    gps.png
    87 KB · Views: 33
Upvote 0
Top