143
Views
10
Comments
How to develop "to continue turn on device location" ?
Question

Hi All,

I'd like to develop a client action that when user clicks "Ok", turns ON automatically the GPS location as done by google maps. Here's below the pop up that i shall mimic. How to make it ? 

2026-01-14 17-10-14
Bruno Gonçalves

I think that if you trigger the "CheckLocationPlugin" the device should prompt the user to turn on the GPS. Or at least ask if he allows the app to do so. 



UserImage.jpg
Kata

Bruno Gonçalves wrote:

I think that if you trigger the "CheckLocationPlugin" the device should prompt the user to turn on the GPS. Or at least ask if he allows the app to do so. 




It's the CheckGPS that returns if location is enabled or not. CheckLocationPlugin has a different purpose. Anyway, my question is how to let the user enable it by himself from within the application like google maps do

2022-12-28 01-16-29
Samuel Neves

Hi, Kata

From my knowledge, upon any call of the plugin, if the user has not given permissions in the past for the app to use the service, there will be a native confirmation popup, like the one you want.

Regards,

Sam

2021-08-30 15-28-09
Leandro Correa

Hi Kata,


  As colleagues have said, when the user performs the action that is using a hardware feature through a Cordova plug-in for the first time, the Operating System will prompt the user for permission.  If the feature is not available, you will receive an error message, which you can manage and display a message to the user.  We cannot enable GPS functionality if the app did not receive user permission the first time it was run.


Best Regards,

Leandro. 

UserImage.jpg
Kata

Hi All,


It looks like i failed to explain it properly, hence i added what i'm looking for as GIF image. Hope it helps.


2026-01-14 17-10-14
Bruno Gonçalves

I don't know if this works for you since it has an additional step.


Click the button

Choose "High Accuracy"


GPS is on...


Works on Android


CEPO.oml
2025-11-19 06-14-01
Miguel Verdasca
Champion

I just tried it, I was easily able to. I am quite new to OutSystems too.


Here is a screenshot. Its quite easy actually.



Please share oml in case you need more help ( Also be sure your oml does not contain confidential logic you wrote ) . Community can help you out for most issues. we in community are quite active here.

Regards,
Nuno Verdasca

2025-11-19 06-14-01
Miguel Verdasca
Champion

Hi,

I'm using the Location Plugin

Maybe this suits your needs?


Thanks,

Nuno Verdasca

2021-08-30 15-28-09
Leandro Correa

Hi Kata,

OutSystems use the Cordova Framework to access hardware functions,  If the user has not allowed your app to use Geolocation or the GPS is not on all together. There is no way of changing that setting from Cordova. It is on the User to allow for the location service to be used. 

2021-08-30 15-28-09
Leandro Correa

Using the Location plugin, for example, you'll receive a Error Message, you can show a friendly message to user verify the GPS and turn it on.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.