【发布时间】:2014-07-29 15:27:11
【问题描述】:
我知道关于这个主题有很多问题,但我找不到可以回答我的问题的问题,而且我没有运行 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,它只是不会得到我理解的 AID。但是其他服务会发生什么?例如与 GCM?它适用于 Froyo 吗?或者用户会得到他们的播放服务需要更新的对话框吗?
据我了解,Google Play 服务库并未打包在 APK 中,而是在设备上使用。那么,如果我在项目中使用了更新的播放服务,Froyo 设备上会发生什么?有没有人有这样的经历?
如果它会以这种方式在 Froyo 上失败,我该怎么办?如何将这两个库集成到一个项目中?或者我不能而且必须发布两个单独的 APK?
有关此主题的任何类型的信息都会很有用。
【问题讨论】:
标签: android google-play-services