Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to redirect my app to location service in settings

Tags:

android

I am developing an application in that I need user current location so if there is no location service is enabled then I created one Alert to set location service but I am not getting to redirect to location settings

like image 697
Ashish Jani Avatar asked Feb 05 '13 06:02

Ashish Jani


People also ask

How do I redirect to another app?

You need to raise a intent, try like this: Uri mUri = Uri. parse("market://details?id=" + packageName); Intent mIntent = new Intent(Intent. ACTION_VIEW, mUri); startActivity(marketIntent);

How do I set up Location Services on my iPhone?

You can turn Location Services on or off at Settings > Privacy > Location Services. You can turn Location Services on either during the Setup Assistant process or later through the Location Services setting. You can individually control which apps and system services have access to Location Services data.


1 Answers

You can start an Activity using the Intent below to redirect the user to the settings screen :

startActivity(new Intent(android.provider.Settings.ACTION_LOCATION_SOURCE_SETTINGS));
like image 93
ddewaele Avatar answered Jan 04 '23 05:01

ddewaele