[英]How to change Play Store update settings from inside of an Android app
I would like to change the way Play Store updates my application. 我想更改Play商店更新我的应用程序的方式。 That is, I want to allow users to choose whether to download updates via WiFi or / and mobile network, without having to leave my app. 也就是说,我想允许用户选择是否通过WiFi或/和移动网络下载更新,而不必离开我的应用程序。
Is it possible to change the settings of the Play Store from within my application? 是否可以在我的应用程序中更改Play商店的设置? And if so, how? 如果是这样,怎么办? Is there any type of Intent, that allows me to check and change these settings? 是否有任何类型的Intent,可以让我检查和更改这些设置?
Thanks for the answers! 感谢您的回答!
No, it is not possible to change playstore settings from your application, instead you can send user to playstore settings whenever he wants to change the update settings. 不可以,无法从您的应用程序更改Playstore设置,而是可以在用户想要更改更新设置时将用户发送到Playstore设置。
you can do this by using below code 您可以通过使用以下代码来做到这一点
try {
Intent intent = new Intent("com.google.android.finsky.activities.SettingsActivity");
intent.setClassName("com.android.vending", "com.google.android.finsky.activities.SettingsActivity");
startActivity(intent);
}
catch(Exception e) {
e.printStackTrace();
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.