相关疑难解决方法(0)

如何直接从我的Android应用程序打开Goog​​le Play商店?

我已使用以下代码打开Goog​​le Play商店

Intent i = new Intent(android.content.Intent.ACTION_VIEW);
i.setData(Uri.parse("https://play.google.com/store/apps/details?id=my packagename "));
startActivity(i);.
Run Code Online (Sandbox Code Playgroud)

但它显示了一个完整的动作视图,以选择选项(浏览器/播放商店).我需要直接在Play商店中打开应用程序.

android android-intent google-play

534
推荐指数
17
解决办法
70万
查看次数

是否可以询问用户是否要更新Google Play服务?

在他们为谷歌播放服务提供的示例中,他们处理可能的版本更新,如下所示:

int resultCode = GooglePlayServicesUtil.isGooglePlayServicesAvailable(from);
        if (resultCode != ConnectionResult.SUCCESS) {
            if (GooglePlayServicesUtil.isUserRecoverableError(resultCode)) {
                GooglePlayServicesUtil.getErrorDialog(resultCode, context,
                        PLAY_SERVICES_RESOLUTION_REQUEST).show();
            } else {
                error(TAG, "this device is not supported");
            }
Run Code Online (Sandbox Code Playgroud)

这会产生类似的消息

"如果您不更新Google服务,您的应用程序将无效".

对于我的应用程序,这个语句太强大,因为我只使用服务来提供一些oprional功能.

我能以某种方式GooglePlayServicesUtil.getErrorDialog()用我自己的对话替换对话吗?

理想情况下,我希望有类似的东西

"Google服务更新是可取的.是/否"

android google-cloud-messaging

3
推荐指数
1
解决办法
1882
查看次数