How to find out, if GPS already has been enabled?

Hello,
when I enter the app, I use the following command to set the location: “android.settings.LOCATION_SOURCE_SETTINGS”, the question is that it is setting whenever I enter the app, what is the test for not setting again?

I’m not sure, if I understand the question…
but what about using TinyDB?
Taifun

I also tested it with TinyDB, when I first enter the application it tests if I already have the permission, if it doesn’t have the permission it is granted in TINYDB.
The point is that I disabled the location for testing, and as it was already recorded in TINY, it does not enable it again. I need to test whether localization is enabled.

to find out, if GPS already has been enabled, check the LocationSensor.ProviderName property, see the example “Get Available SSIDs” here App Inventor Extensions: WiFi | Pura Vida Apps

Taifun

1 Like

Thank you, your help was very helpful.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.