public static void showAppInfo ( @ NonNull final Context context , @ NonNull final String packageName ) { Condition . INSTANCE . ensureNotNull ( context , "The context may not be null" ) ; Condition . INSTANCE . ensureNotNull ( packageName , "The package name may not be null" ) ; Condition . INSTANCE . ensureNotEmpty ( packageName , "The package name may not be empty" ) ; Intent intent = new Intent ( ) ; intent . setAction ( Settings . ACTION_APPLICATION_DETAILS_SETTINGS ) ; Uri uri = Uri . fromParts ( "package" , packageName , null ) ; intent . setData ( uri ) ; if ( intent . resolveActivity ( context . getPackageManager ( ) ) == null ) { throw new ActivityNotFoundException ( "App info for package " + packageName + " not available" ) ; } context . startActivity ( intent ) ; }
Starts the settings app in order to show the information about a specific app .