當前位置: 首頁>>代碼示例>>Java>>正文


Java Settings.ACTION_APPLICATION_DETAILS_SETTINGS屬性代碼示例

本文整理匯總了Java中android.provider.Settings.ACTION_APPLICATION_DETAILS_SETTINGS屬性的典型用法代碼示例。如果您正苦於以下問題:Java Settings.ACTION_APPLICATION_DETAILS_SETTINGS屬性的具體用法?Java Settings.ACTION_APPLICATION_DETAILS_SETTINGS怎麽用?Java Settings.ACTION_APPLICATION_DETAILS_SETTINGS使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在android.provider.Settings的用法示例。


在下文中一共展示了Settings.ACTION_APPLICATION_DETAILS_SETTINGS屬性的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: onClick

@Override
public void onClick(View view) {
    switch (currentState) {
        case -4:
            Intent intent = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
            Uri uri = Uri.fromParts("package", context.getPackageName(), null);
            intent.setData(uri);
            context.startActivity(intent);
            break;
        case -3:
            break;
        case -2:
            break;
        case -1:
            break;
        case 0:
            break;
        case 1:
            break;
        case 2:
            break;
        default:
            break;
    }
}
 
開發者ID:hushengjun,項目名稱:FastAndroid,代碼行數:25,代碼來源:UIStateView.java

示例2: getAppInfoIntent

/**
 * Returns an Intent to show the App Info page for the current app.
 */
private Intent getAppInfoIntent(Context context) {
    Intent intent = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
    intent.setData(
            new Uri.Builder().scheme("package").opaquePart(context.getPackageName()).build());
    return intent;
}
 
開發者ID:rkshuai,項目名稱:chromium-for-android-56-debug-video,代碼行數:9,代碼來源:SiteSettingsCategory.java

示例3: showAppDetailsForProfile

public void showAppDetailsForProfile(ComponentName component, UserHandleCompat user) {
    String packageName = component.getPackageName();
    Intent intent = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS,
            Uri.fromParts("package", packageName, null));
    intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK |
            Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS);
    mContext.startActivity(intent, null);
}
 
開發者ID:michelelacorte,項目名稱:FlickLauncher,代碼行數:8,代碼來源:LauncherAppsCompatV16.java

示例4: startAppSettings

/**
 *  啟動應用的設置
 * 
 * @since 2.5.0
 *
 */
private void startAppSettings() {
	Intent intent = new Intent(
			Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
	intent.setData(Uri.parse("package:" + getPackageName()));
	startActivity(intent);
}
 
開發者ID:dreamfish797,項目名稱:LocationProvider,代碼行數:12,代碼來源:CheckPermissionsActivity.java

示例5: goToAppSettings

public static void goToAppSettings(Activity activity) {
    Intent intent = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS,
            Uri.fromParts("package", activity.getPackageName(), null));
    intent.addCategory(Intent.CATEGORY_DEFAULT);
    intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
    activity.startActivity(intent);
}
 
開發者ID:marcoscgdev,項目名稱:EasyPermissions,代碼行數:7,代碼來源:EasyPermissions.java

示例6: goToSettings

private void goToSettings() {

        Intent myAppSettings = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS,
                Uri.parse("package:" + getPackageName()));
        myAppSettings.addCategory(Intent.CATEGORY_DEFAULT);
        myAppSettings.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
        startActivityForResult(myAppSettings, REQUEST_APP_SETTINGS);

    }
 
開發者ID:HitRoxxx,項目名稱:FloatingNew,代碼行數:9,代碼來源:FeedbackActivity.java

示例7: openAppDetailsSettings

/**
 * 打開設置
 *
 * @param context 上下文
 * @param packageName 包名
 */
public static void openAppDetailsSettings(Context context, final String packageName) {
    if (StringUtil.isSpace(packageName)) return;
    Intent intent = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
    intent.setData(Uri.parse("package:" + packageName));
    intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
    context.startActivity(intent);
}
 
開發者ID:senierr,項目名稱:ModuleFrame,代碼行數:13,代碼來源:AppUtil.java

示例8: startActivity

private boolean startActivity(int id, String packageName) {
    String action;
    if (id == R.string.app_info) {
        action = Settings.ACTION_APPLICATION_DETAILS_SETTINGS;
    } else if (id == R.string.uninstall) {
        action = Intent.ACTION_DELETE;
    } else {
        return false;
    }
    mActivity.startActivity(new Intent(action, Uri.fromParts("package", packageName, null)));
    return true;
}
 
開發者ID:brevent,項目名稱:prevent,代碼行數:12,代碼來源:PreventFragment.java

示例9: openSettings

public static void openSettings(Context context) {
    //步驟:應用信息->權限->'勾選對應權限'
    Uri uri = Uri.parse("package:" + context.getPackageName());
    Intent intent = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS, uri);
    intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
    context.startActivity(intent);
}
 
開發者ID:SmartCodeLab,項目名稱:SmartPermission,代碼行數:7,代碼來源:BasePermission.java

示例10: handlePermissions

private void handlePermissions() {

        SharedPreferences permissionStatus = this.getSharedPreferences("permissionStatus",
                this.MODE_PRIVATE);

        if (ActivityCompat.checkSelfPermission(this, permissionsRequired[0]) != PackageManager
                .PERMISSION_GRANTED
                || ActivityCompat.checkSelfPermission(this, permissionsRequired[1]) !=
                PackageManager.PERMISSION_GRANTED) {
            if (ActivityCompat.shouldShowRequestPermissionRationale(this, permissionsRequired[0])
                    || ActivityCompat.shouldShowRequestPermissionRationale(this,
                    permissionsRequired[1])) {
                //true means user not allowed the permission but may we can convince him/her
                //false have two meaning: 1-user not asked for permission 2-user denied and check
                // 'Don't Ask Again'
                //so we had to Show Information about why you need the permission

                ActivityCompat.requestPermissions(this, permissionsRequired,
                        PERMISSION_CALLBACK_CONSTANT);

            } else if (permissionStatus.getBoolean(permissionsRequired[0], false)) {
                //Previously Permission Request was cancelled with 'Dont Ask Again',
                // Redirect to Settings after showing Information about why you need the permission

                Intent intent = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
                Uri uri = Uri.fromParts("package", this.getPackageName(), null);
                intent.setData(uri);
                this.startActivityForResult(intent, REQUEST_PERMISSION_SETTING);
                Toast.makeText(this, "Go to Permissions to Grant Sms", Toast.LENGTH_LONG)
                        .show();

            } else {
                //just request the permission
                ActivityCompat.requestPermissions(this, permissionsRequired,
                        PERMISSION_CALLBACK_CONSTANT);
            }

            SharedPreferences.Editor editor = permissionStatus.edit();
            editor.putBoolean(permissionsRequired[0], true).apply();

        } else {

            proceedAfterPermission();

        }
    }
 
開發者ID:mahdit83,項目名稱:advancedSmsManager,代碼行數:46,代碼來源:MainActivity.java

示例11: startApplicationDetailsSettings

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);
}
 
開發者ID:kranthi0987,項目名稱:easyfilemanager,代碼行數:7,代碼來源:PackageManagerUtils.java

示例12: onClickSetting

/**
 * 點擊去設置
 */
public void onClickSetting() {
    Uri packageURI = Uri.parse("package:" + AppUtils.getAppPackageName());
    Intent intent = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS, packageURI);
    mContext.startActivity(intent);
    cancel();
}
 
開發者ID:jianesrq0724,項目名稱:UpdateLibrary,代碼行數:9,代碼來源:PermissionTipDialog.java

示例13: onRequestPermissionsResult

@Override
public void onRequestPermissionsResult(int requestCode, @android.support.annotation.NonNull String[] permissions, @android.support.annotation.NonNull int[] grantResults) {
    switch (requestCode) {
        case 1:
            for (int i = 0; i < grantResults.length; i++) {
                if (grantResults[i] != PackageManager.PERMISSION_GRANTED) {//權限未同意
                    boolean bannedPermission = ActivityCompat.shouldShowRequestPermissionRationale(X5WebViewBrowseActivity.this, permissions[i]);//是否未禁止權限
                    if (bannedPermission) {//用戶未禁止
                        ActivityCompat.requestPermissions(X5WebViewBrowseActivity.this, new String[]{Manifest.permission.CALL_PHONE}, 1);//重新申請權限
                        return;
                    } else {//禁止權限,標記
                        weatherBannedPermission = true;
                    }
                }
            }

            /**
             * 判斷是否禁用權限
             */
            if (weatherBannedPermission) {
                ToastUtils.showShort("請手動打開電話權限");
                Uri packageURI = Uri.parse("package:" + AppUtils.getAppPackageName());
                Intent intent = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS, packageURI);
                startActivity(intent);
            } else {
                startCallPhone();
            }
            break;
        default:
            break;
    }
}
 
開發者ID:jianesrq0724,項目名稱:UpdateLibrary,代碼行數:32,代碼來源:X5WebViewBrowseActivity.java

示例14: startAppSettings

private void startAppSettings() {
    Intent intent = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
    intent.setData(Uri.parse(PACKAGE_URL_SCHEME + getPackageName()));
    startActivity(intent);
}
 
開發者ID:NaOHAndroid,項目名稱:Logistics-guard,代碼行數:5,代碼來源:PermissionsActivity.java

示例15: toAppSystemSettings

public void toAppSystemSettings(String packageName) {
  Intent intent = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS,
      Uri.fromParts("package", packageName, null));
  intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
  activity.startActivity(intent);
}
 
開發者ID:philipphager,項目名稱:disclosure-android-app,代碼行數:6,代碼來源:Navigator.java


注:本文中的android.provider.Settings.ACTION_APPLICATION_DETAILS_SETTINGS屬性示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。