Automatic on gps in mobile and getting lat,long

Hi all,
I need to automatically on gps in device when it is switched off and at the same time it retrieves current lat,long in ionic…

Give me the solution

Could you rephrase this please?
What should happen when what happens first?

yes when i open the app it automatically on the device gps and also get lat,long from device current location

I still don’t understand what you want to happen when you open the app.

when i open my app in mobile it automatically on the mobile gps in background and fetch lat ,long from current mobile location

Third time you post the same sentence. There is a verb missing in here.

@muthukumar_8844 just a hint for you but not a proper answer, add a cordova permission for device locaiton if yes, it will automatically turn ON your device gps [ cordova permission](http://cordova plugin add cordova-plugin-android-permissions) then in run function simply fetch your current location’s lat and lng

He means the GPS should get switched on automatically…

cordova-plugin-request-location-accuracy enables you to request high accuracy (GPS) location from within an app. On Android, if location mode is off or low accuracy, the user will be presented with a system dialog to confirm enabling high accuracy (GPS) location.

Note: it is not possible to directly enable high accuracy (GPS) location mode on Android without showing the dialog. This is built-in Android OS functionality leveraged via the Google Play Services Location API.

thank you MdShuaib.I will add and let you know

thank you dpa99c1 .will it automatically turn on the gps in device?

Yes it will automatically turn on GPS if the user agrees in the dialog

ok Dpa99c.thank you very much