本文介绍了处理Google Play服务更新消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的应用程序中使用了googleservices,版本8.3。然而,当我在我的旧设备(LG II Optimus)上下载我的应用程序时,它向我显示了以下消息: $ b

我接受并更新了Google服务,然后才能够使用我的应用程序。但是,我想知道如果用户不愿意更新他的设备中的当前谷歌播放服务?我应该如何处理它?建议的处理方法是什么?



推荐的Google Play服务的最低版本是什么,或者有人知道Facebook的Google Play服务版本是什么,或者我怎么能找到它?

解决方案

由于您的代码可能不存在,因此您的应用程序应拒绝启动,如果没有必要的Google Play服务(从现在开始)使用目前安装的,过时的GPS版本,这在大多数情况下会导致应用程序崩溃。



导致升级对话框的原因是Google Play之间的版本不匹配安装在设备上的服务以及您构建应用时使用的GPS版本。此版本存储在您的Manifest文件中:

 <元数据
android:name =com.google .android.gms.version
android:value =@ integer / google_play_services_version/>

我的个人经验告诉我们在SDK Manager中升级后立即抵制升级GPS ,并且(除非你确定你想要这样),否则至少在几周内抵抗是明智的(或者甚至完全避免,除非你需要新的特征等)。

急速升级可能会遇到的主要问题是不好的用户体验。如果您的应用程序使用新的GPS SDK构建,并且只要您看到Google发布新的GPS SDK,就会立即发布,那么您的用户将会在Play商店(或自动升级)中提供升级。但是其中一些(有时候一些的比例很高)可能会遇到问题,无法启动更新的应用程序,因为仍然没有可用的Google Play服务升级(由于分发,区域等等)。所以每个开始都会告诉Hej,升级或GTFO。但没有升级。猜猜谁将受到用户的一星评级... ...

与您的应用程序相同,您可以从应用程序清单文件,如果你真的需要知道。


I am using googleservices in my application, the version 8.3. However when I downloaded my app on my old device (LG II Optimus), it showed me the following message

I accepted and updated google services and then I could able to use my application. However I wonder what if user is not willing to update his current google play services in his device? How should I handle it? What is the recommended approach to handle?

What is the lowest version of google play services recommended or does anybody knows what is the Facebook google play service version or how could I find it?

解决方案

Your app should simply refuse to start if no required Google Play Services (GPS from now on) is present, as your code may be using stuff not present in currently installed, outdated, version of GPS, which in most cases would result in app crashing.

What causes the upgrade dialog is version mismatch between Google Play Services installed on device and version of GPS you build your app against. This version is stored in your Manifest file:

<meta-data
    android:name="com.google.android.gms.version"
    android:value="@integer/google_play_services_version" />

My personal experience tells it's right approach to resist from upgrading GPS as soon as upgrade shows up in SDK Manager, and (unless you sure you want this) it's wise to resist for at least couple of weeks (or perhaps even completely avoid unless you need new features etc).

Major problem you can face with rushed upgrade is bad user experience. If you have your app built with new GPS SDK and released as soon as you see new GPS SDK is released by Google, then your users will be offered upgrade in Play Store (or auto upgraded). But then some of them (sometimes "some" is high percentage) may face problems not being able to launch your updated app because there's still no Google Play Service upgrade available for them (due to distribution, region, whatever). So each start would tell "Hej, upgrade or GTFO". But there's no upgrade. Guess who will be punished by user with one star ratings...

Same as with your app, you can get this from app's Manifest file if you really need to know.

这篇关于处理Google Play服务更新消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-30 12:39