Reputation: 1677
The need is something like this :
If there is Location Permission Enable, Have to check that GPS is enable or not,
If GPS is enable it's fine to continue for further flow - this working fine.
But, If GPS is not enable, Requesting to enable it from the settings.
Now, here when user comes back from Settings, onActivityResult() method will be called and further flow will be continue.
The Issue is as below :
The whole above process I need to do in onResume() because I have to autoconnect a hardware device even if the appuser comes back from the recent. (on pause - I have disconnected the hardware)
So, When I coming back from enabling GPS on, onResume() method calling again and the code is executing again.
Is there any better way to handle this?
Thanks.
Upvotes: 0
Views: 123