当前位置: 首页>>代码示例>>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;未经允许,请勿转载。