I want to check gps on

I want to check if gps is on. If the user doesn’t turn on gps there will be a notification box. When pressed, it will navigate to the setting page, but I have a problem, if the user has already pressed open There will still be a notification box up.

First check if gps is on or off, if off then show pop up.

When ok clicked then first dismiss the pop up and then open settings.

So when user returns back to app pop up will not show again.

If you go to settings, the user still doesn’t turn on gps but just goes back to the app. Will the app notify again?

I think you can’t force users to turn on it.For google policy

Use app pause and resumed blocks from screen1, when pause dismiss popup and on resume check again if location on if not then show pop up again

I have tried this. But when returning to the app, it will bounce back to the setting page again.

It might take a few seconds until gps is available in property AvailableProviders…