Android examples for Activity:Activity Feature
Returns an intent for launching the application settings for the app with the specified activity.
import android.content.Context; import android.content.Intent; import android.net.Uri; import android.support.annotation.NonNull; public class Main { /**/* www. j a v a 2 s . c o m*/ * Returns an intent for launching the application settings for the app with * the specified activity. * * @param context * Context instance * @return Intent object. */ public static Intent getApplicationSettingsIntent(@NonNull Context context) { Intent intent = new Intent( android.provider.Settings.ACTION_APPLICATION_DETAILS_SETTINGS); intent.setData(Uri.parse("package:" + context.getPackageName())); return intent; } }