Open GPS from APP?

61 views
Skip to first unread message

Stefano Ferruccio

unread,
Apr 25, 2019, 3:37:27 AM4/25/19
to MIT App Inventor Forum
MIT AI2 

It's possible open the GPS from APP?

Thanks
Stefano

SteveJG

unread,
Apr 25, 2019, 8:23:59 AM4/25/19
to MIT App Inventor Forum
The GPS receiver cannot be turned on or off with App Inventor 2 with code Blocks nor can it be turned on or off with any other compiler like Android Studio.  Google does not allow this.

You can bring up this screen (or a similar one depending on the Android operating system) using an ActivityStarter in the app..  

LocationSettings.png

ActivityStarterLocations.PNG



 Once the screen displays from the device's Settings, the USER can manually turn on and off the GPS receiver from that screen.

You can also set the LocationSensor1.Enabled to true or false to 'turn on or off' (that is prevent) the Location sensor from displaying current location information.  However that does not turn on or off the GPS receiver.


Is this what you wanted to know Stefano?

Regards,
Steve
Reply all
Reply to author
Forward
0 new messages