使用firebase检查Google Play服务

tyc*_*czj 8 android firebase google-play-services firebase-cloud-messaging

您打算如何检查Google Play服务的正确版本Firebase

文档说您应该检查以确保设备上的版本是应用程序中的正确版本,但他们没有显示示例.

没有firebase通常你会使用GoogleApiAvailability但不包含在firebase核心中

那么我需要从谷歌播放服务中包含哪些依赖项?

这些是我当前的依赖项

dependencies {

    compile 'com.android.support:appcompat-v7:24.2.1'
    compile 'com.android.support:recyclerview-v7:24.2.1'
    compile 'com.android.support:design:24.2.1'
    compile 'com.android.support:cardview-v7:24.2.1'
    compile 'com.google.firebase:firebase-messaging:9.6.1'
    compile 'com.google.firebase:firebase-core:9.6.1'
   }
Run Code Online (Sandbox Code Playgroud)