2
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

AndroidのFirebaseはGoogle Play 開発者サービスに依存しているので注意

Last updated at Posted at 2017-10-12

Firebase Remote Configを使用してアプリを開発していたのですが、特定の端末でFirebaseRemoteConfig.getInstance().fetch()に設定したOnCompleteListeneが呼ばれないエラーに遭遇しました。

ログには以下のメッセージが表示されていました。

W/GooglePlayServicesUtil: Google Play services out of date.  Requires 11400000 but found 10932448

この時点でGoogle Play Servicesが何者か理解していませんでしたし、Firebaseとどのような関係があるのか把握できていませんでした。

Google Play Servicesとは何か

日本語ではGoogle Play 開発者サービスです。
Google Play 開発者サービスは端末にインストールされているアプリです。
個別のアプリからバージョンを更新することはできません。

ドキュメントは下記にあります。
https://developers.google.com/android/guides/overview

FirebaseとGoogle Play 開発者サービスの関係

ドキュメントの事前準備のところに本日時点(2017/10/11)で以下の記載があります。

事前準備
•Android 4.0(Ice Cream Sandwich)以降、および Google Play 開発者サービス 11.0.4 以降が搭載された端末

Google Play 開発者サービスのリリースノートを確認すると 11.0.4 がリリースされたのは、2017年6月で、最近だということがわかります。
https://developers.google.com/android/guides/releases

Google Play 開発者サービスはいつ更新されるか

ドキュメントにはこのような記載があります。

The Google Play services APK is delivered through the Google Play Store, so updates to the services are not dependent on carrier or OEM system image updates. In general, devices running Android 2.3 (API level 9) or later and have the Google Play services app installed receive updates within a few days. This allows you to use the newest APIs in Google Play services and reach most of the devices in the Android ecosystem. Devices older than Android 2.3 or devices without the Google Play services app are not supported.

ただし、私が開発用に使っている端末の中に更新されてない端末がいくつかあり、本当に全ての端末で更新されているとは言えない気がしています。

まとめ

ドキュメントに記載されているとおり、AndroidのFirebaseはGoogle Play 開発者サービスに依存しています。
Google Play 開発者サービスは基本的に自動で更新されます。
しかし、そうならない端末も存在しているので、可能であればFirebaseを使わないとアプリが使えないような作りは避けたほうが良いと思います。

2
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?