Android examples for android.app:Activity
Returns an intent for launching the application settings for the app with the specified activity.
import android.annotation.NonNull; import android.content.Context; import android.content.Intent; import android.net.Uri; public class Main { /**/*from w w w .ja v a 2s. 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; } }