如何启动';谷歌设置';从你的Android应用程序代码?
如何从应用程序中打开如何启动';谷歌设置';从你的Android应用程序代码?,android,service,notifications,settings,Android,Service,Notifications,Settings,如何从应用程序中打开Google Settings,以便用户能够启用Google Play服务的通知以接收多人网络游戏的邀请? 谷歌设置->玩游戏->通知(允许游戏发送请求和通知)我找到了答案: Intent settings = new Intent(); settings.setPackage("com.google.android.gms"); settings.addCategory(Intent.CATEGORY_LAUNCHER); starrtActivit
Google Settings
,以便用户能够启用Google Play服务的通知
以接收多人网络游戏的邀请?
谷歌设置->玩游戏->通知
(允许游戏发送请求和通知)我找到了答案:
Intent settings = new Intent();
settings.setPackage("com.google.android.gms");
settings.addCategory(Intent.CATEGORY_LAUNCHER);
starrtActivity(settings);
答复:
String action = "com.google.android.gms.location.settings.GOOGLE_LOCATION_SETTINGS";
Intent settings = new Intent(action);
startActivity(settings);
研究:
不幸的是,此操作似乎没有在任何地方发布。但是,使用apktool从APK提取AndroidManifest.xml文件非常简单。我这样做了,并找到了活动声明,其中包括我们正在寻找的活动的意图过滤器:com.google.android.location.settings.GoogleLocationSettingsActivity
魔术。:) 谢谢你的回答。不幸的是,默认设置不包括至少适用于Android 2.2的游戏选项:(