Google Play服务和Google Play Services Froyo在一个应用程序中
-
21-12-2019 - |
题
我知道这个主题有很多问题,但我找不到一个回答我的问题的问题,我没有运行Android froyo的设备进行测试,所以我会问...
我的应用支持Android froyo及以上。最近我需要在我的应用程序中拥有Google Aid,因此Froyo的Google Play服务并不适合我。所以我已经更新了播放服务,并使用此代码获取Google Aid:
try {
Info adInfo = AdvertisingIdClient.getAdvertisingIdInfo(context.getApplicationContext());
xxx.setGoogleAdvertisingId(adInfo.getId(), adInfo.isLimitAdTrackingEnabled());
} catch (IOException e) {
// Unrecoverable error connecting to Google Play services (e.g.,
// the old version of the service doesn't support getting AdvertisingId).
}
.
在Android清单中我有以下几个:
<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
.
所以我的应用程序不会粉碎froyo它只是我理解的援助。但其他服务会发生什么?例如GCM?它会在froyo工作吗?或者用户是否需要更新其播放服务的对话框?
正如我理解谷歌播放服务lib未包装在APK中,它正在从设备使用。那么如果我在我的项目中使用了较新的播放服务,Froyo设备将发生什么?有没有人有这样的经历?
如果它通过这种方式将在Froyo失败,我该怎么办?如何在一个项目中集成这两个库?或者我不能,必须释放两个独立的氧化股?
此主题的任何类型的信息都将是有用的。
解决方案
您将不得不发布单独的APK,因为您将无法将Froyo版本和新版本的Google Play服务在同一项目中,您将获得冲突的错误。
更好的解决方案是为了删除Froyo的支持,因为根据最新数字只是市场的生成古代码码
https://developer.android.com/about/dashboards/index。html#平台
不隶属于 StackOverflow