Java Code Examples for android.provider.Settings#ACTION_APPLICATION_DETAILS_SETTINGS
The following examples show how to use
android.provider.Settings#ACTION_APPLICATION_DETAILS_SETTINGS .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: PermissionHelper.java From MortgageCalculator with Apache License 2.0 | 6 votes |
/** * 打开应用设置界面 * * @param requestCode 请求码 * * @return */ private boolean openApplicationSettings(int requestCode) { try { Intent intent = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS, Uri.parse("package:" + mActivity.getPackageName())); intent.addCategory(Intent.CATEGORY_DEFAULT); // Android L 之后Activity的启动模式发生了一些变化 // 如果用了下面的 Intent.FLAG_ACTIVITY_NEW_TASK ,并且是 startActivityForResult // 那么会在打开新的activity的时候就会立即回调 onActivityResult // intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); mActivity.startActivityForResult(intent, requestCode); return true; } catch (Throwable e) { Log.e(TAG, "", e); } return false; }
Example 2
Source File: CheckPermissionsActivity.java From Android_Location_Demo with Apache License 2.0 | 5 votes |
/** * 启动应用的设置 * * @since 2.5.0 * */ private void startAppSettings() { Intent intent = new Intent( Settings.ACTION_APPLICATION_DETAILS_SETTINGS); intent.setData(Uri.parse("package:" + getPackageName())); startActivity(intent); }
Example 3
Source File: PermissionCheck.java From libcommon with Apache License 2.0 | 5 votes |
/** * アプリの詳細設定へ遷移させる(パーミッションを取得できなかった時など) * @param context */ public static void openSettings(@NonNull final Context context) { final Intent intent = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS); final Uri uri = Uri.fromParts("package", context.getPackageName(), null); intent.setData(uri); context.startActivity(intent); }
Example 4
Source File: ImagePickerActivity.java From SSForms with GNU General Public License v3.0 | 5 votes |
/** * Open app settings screen */ private void openAppSettings() { Intent intent = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS, Uri.fromParts("package", getPackageName(), null)); intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); startActivity(intent); }
Example 5
Source File: SearchActivity.java From HayaiLauncher with Apache License 2.0 | 5 votes |
@Override public boolean onContextItemSelected(MenuItem item) { final AdapterContextMenuInfo info = (AdapterContextMenuInfo) item .getMenuInfo(); final View itemView = info.targetView; final LaunchableActivity launchableActivity = (LaunchableActivity) itemView.findViewById(R.id.appIcon).getTag(); switch (item.getItemId()) { case R.id.appmenu_launch: launchActivity(launchableActivity); return true; case R.id.appmenu_info: final Intent intent = new Intent( Settings.ACTION_APPLICATION_DETAILS_SETTINGS); intent.setData(Uri.parse("package:" + launchableActivity.getComponent().getPackageName())); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); startActivity(intent); return true; case R.id.appmenu_onplaystore: final Intent intentPlayStore = new Intent(Intent.ACTION_VIEW); intentPlayStore.setData(Uri.parse("market://details?id=" + launchableActivity.getComponent().getPackageName())); startActivity(intentPlayStore); return true; case R.id.appmenu_pin_to_top: launchableActivity.setPriority(launchableActivity.getPriority() == 0 ? 1 : 0); mLaunchableActivityPrefs.writePreference(launchableActivity.getClassName(), launchableActivity.getLaunchTime(), launchableActivity.getPriority(), launchableActivity.getusagesQuantity()); sortApps(); mArrayAdapter.notifyDataSetChanged(); return true; default: return false; } }
Example 6
Source File: MainActivity.java From TraceByAmap with MIT License | 5 votes |
/** * 启动应用的设置 * * @since 2.5.0 */ private void startAppSettings() { try{ Intent intent = new Intent( Settings.ACTION_APPLICATION_DETAILS_SETTINGS); intent.setData(Uri.parse("package:" + getPackageName())); startActivity(intent); } catch (Throwable e) { e.printStackTrace(); } }
Example 7
Source File: PackageManagerUtils.java From FireFiles with Apache License 2.0 | 5 votes |
public static void startApplicationDetailsSettings(Context context, String packageName) { Intent intent = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS); Uri uri = Uri.fromParts("package", packageName, null); intent.setData(uri); intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP); context.startActivity(intent); }
Example 8
Source File: SettingsClickListener.java From Dexter with Apache License 2.0 | 5 votes |
@Override public void onClick(View view) { Context context = view.getContext(); Intent myAppSettings = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS, Uri.parse("package:" + context.getPackageName())); myAppSettings.addCategory(Intent.CATEGORY_DEFAULT); myAppSettings.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); context.startActivity(myAppSettings); }
Example 9
Source File: LoginActivity.java From RxEasyHttp with Apache License 2.0 | 4 votes |
public void startAppSettings() { Intent intent = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS); intent.setData(Uri.parse("package:" + getPackageName())); startActivity(intent); }
Example 10
Source File: PermissionSettingPage.java From MNVideoPlayer with GNU General Public License v3.0 | 4 votes |
private static Intent google(Context context) { Intent intent = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS); intent.setData(Uri.fromParts("package", context.getPackageName(), null)); return intent; }
Example 11
Source File: PermissionSettingPage.java From TikTok with Apache License 2.0 | 4 votes |
private static Intent google(Context context) { Intent intent = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS); intent.setData(Uri.fromParts("package", context.getPackageName(), null)); return intent; }
Example 12
Source File: SamLocationRequestService.java From SamLocationAndGeocoding with MIT License | 4 votes |
private void openSettings() { Intent intent = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS); Uri uri = Uri.fromParts("package", context.getPackageName(), null); intent.setData(uri); ((Activity) context).startActivityForResult(intent, 101); }
Example 13
Source File: MainActivity.java From permissive with Apache License 2.0 | 4 votes |
public void openSettings(View view) { Intent i = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS, Uri.fromParts("package", getPackageName(), null)); startActivity(i); }
Example 14
Source File: SpashActivity.java From OpenEyes with Apache License 2.0 | 4 votes |
/** * 启动当前应用设置页面 */ public void startAppSettings() { Intent intent = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS); intent.setData(Uri.parse("package:" + getPackageName())); startActivity(intent); }
Example 15
Source File: DirectoryFragment.java From FireFiles with Apache License 2.0 | 4 votes |
public boolean onPopupMenuItemClick(MenuItem item, int position) { final ArrayList<DocumentInfo> docs = new ArrayList<>(); final Cursor cursor = mAdapter.getItem(position); final DocumentInfo doc = DocumentInfo.fromDirectoryCursor(cursor); docs.add(doc); final int id = item.getItemId(); switch (id) { case R.id.menu_share: onShareDocuments(docs); return true; case R.id.menu_copy: moveDocument(docs, false); return true; case R.id.menu_cut: moveDocument(docs, true); return true; case R.id.menu_delete: deleteDocument(docs, id); return true; case R.id.menu_stop: stopDocument(docs, id); return true; case R.id.menu_save: case R.id.menu_uncompress: case R.id.menu_compress: new OperationTask(docs, id).execute(); return true; case R.id.menu_open: openDocument(docs.get(0)); return true; case R.id.menu_details: Intent intent2 = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS, Uri.parse("package:" + AppsProvider.getPackageForDocId(docs.get(0).documentId))); if(Utils.isIntentAvailable(getActivity(), intent2)) { getActivity().startActivity(intent2); } Bundle params = new Bundle(); String type = IconUtils.getTypeNameFromMimeType(docs.get(0).mimeType); params.putString(FILE_TYPE, type); AnalyticsManager.logEvent("details", params); return true; case R.id.menu_info: infoDocument(docs.get(0)); return true; case R.id.menu_rename: renameDocument(docs.get(0)); return true; case R.id.menu_bookmark: bookmarkDocument(docs.get(0)); return true; default: return false; } }
Example 16
Source File: PermissionUtil.java From Ticket-Analysis with MIT License | 4 votes |
public void startAppSettings(Activity activity) { Intent intent = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS); intent.setData(Uri.parse(PACKAGE_URL_SCHEME + activity.getPackageName())); activity.startActivityForResult(intent, REQUEST_CODE_REQUEST_SETTING); }
Example 17
Source File: ScannerActivity.java From Android-nRF-Blinky with BSD 3-Clause "New" or "Revised" License | 4 votes |
@OnClick(R.id.action_permission_settings) public void onPermissionSettingsClicked() { final Intent intent = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS); intent.setData(Uri.fromParts("package", getPackageName(), null)); startActivity(intent); }
Example 18
Source File: LSettingPage.java From AndPermission with Apache License 2.0 | 4 votes |
private static Intent defaultApi(Context context) { Intent intent = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS); intent.setData(Uri.fromParts("package", context.getPackageName(), null)); return intent; }
Example 19
Source File: SettingsUtils.java From EasyPhotos with Apache License 2.0 | 4 votes |
/** * 启动应用详情界面 * @param cxt 上下文 * @param packageName 应用包名 */ public static void startMyApplicationDetailsForResult(Activity cxt, String packageName) { Uri packageUri = Uri.parse("package:" + packageName); Intent intent = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS, packageUri); cxt.startActivityForResult(intent, Code.REQUEST_SETTING_APP_DETAILS); }
Example 20
Source File: Intents.java From Pioneer with Apache License 2.0 | 4 votes |
public static Intent appDetailsSettings(Context context) { Intent intent = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS); intent.setData(Uri.parse("package:" + context.getPackageName())); return intent; }