android - 如何以编程方式在android中打开谷歌播放保护?
解决方案
按钮 btn_play_protectSetting = findViewById(R.id.btn_play_protectSetting);
btn_play_protectSetting.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent openPlayStoreProtectSetting = new Intent();
final String GOOGLE_PLAY_SETTINGS_COMPONENT = "com.google.android.gms";
final String GOOGLE_PLAY_SETTINGS_ACTIVITY = ".security.settings.VerifyAppsSettingsActivity";
openPlayStoreProtectSetting .setClassName( GOOGLE_PLAY_SETTINGS_COMPONENT, GOOGLE_PLAY_SETTINGS_COMPONENT + GOOGLE_PLAY_SETTINGS_ACTIVITY);
startActivity(openPlayStoreProtectSetting );
}
});
并在清单文件中添加这一行
推荐阅读
- flutter - Flutter:更新滚动视图物理而不重建
- iframe - iframe 为 Grafana 显示“拒绝连接”
- java - 如何在正则表达式 Jlex 中选择特定单词?
- mysql - 将字符串从 MySQL 转换为 JSON,意外的令牌 N
- reactjs - React.js:登录时如何获取并显示当前用户?
- python - 从 Cygwin 扫描 Windows 中的驱动器
- macos - 为什么 /usr/libexec/java_home 不打印任何内容?
- python - Python Pandas:使用 apply 方法从另一个数据框中更新多个列值
- c++ - 如何检测和处理算法中不受支持的语言环境?
- batch-file - 我正在尝试编写一个批处理命令以在工作区中自动运行 VSCode,但是当我关闭 CMD 时,VSCode 也会关闭