Q:

Android - Intent to start an activity outside my application

I have this code
Intent intent = new Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS);
PackageManager packageManager = getPackageManager();
List<ResolveInfo> activities = packageManager.queryIntentActivities(intent, 0);
boolean isIntentSafe = activities.size() > 0;
    if (isIntentSafe) {
       startActivity(intent);
    }

It works fine an open an activity to configure location settings.
But it opens the location settings activity inside my Application. I want it to start the Settings Application and it should show location settings inside Settings application. i.e Start its own Application

A:

try
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);

