2013-08-02 28 views
2

如何從您的應用打開Google Settings,以便用戶可以啓用Notifications for Google Play Services接收多人網絡遊戲的邀請? Google Settings -> Play Games -> Notifications(允許遊戲發送請求和通知)如何從Android應用代碼啓動「Google設置」?

+0

謝謝你的回答。不幸的是,默認設置不包括Play遊戲至少Android 2.2的選項:( –

回答

0

我找到答案:

Intent settings = new Intent(); 
    settings.setPackage("com.google.android.gms"); 
    settings.addCategory(Intent.CATEGORY_LAUNCHER); 
    starrtActivity(settings); 
1

答:

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。

魔術。 :)

相關問題