首页 > 解决方案 > 使用 Firestore 的 Cordova 应用程序无法在某些设备上运行

问题描述

我开发了一个 Cordova 应用程序,可将文档插入到 Firestore。应用部署在 google play store 和 Apple app store。它适用于大多数设备。当设备具有旧版本的 google play 服务时,它无法将记录插入到 firestore。无论如何要创建对特定版本的播放服务的依赖关系,因此如果设备上没有所需的版本,应用程序甚至不会安装。或者,是否可以调用播放服务的更新。

请评论。

标签: cordovagoogle-cloud-firestoregoogle-play-services

解决方案


您可以使用 Google Play 上的过滤器来限制不符合条件的设备上的安装。在此处查看可用的过滤器:https ://developer.android.com/google/play/filters

对于您的具体情况,您可以限制使用<uses-library>过滤器。

<uses-library
  android:name="string"
  android:required=["true" | "false"] />

在此处查看完整的文档:https ://developer.android.com/guide/topics/manifest/uses-library-element.html

要提示用户更新播放服务,请查看:您如何提示用户更新 google play 服务?

希望这可以帮助。


推荐阅读