7

Im trying to send notifications into an Android Emulator device using FCM Messages but I dont get no one notification. google app id is the same that inside google-services.json

this is what I get from console:

D/FA: Connected to remote service

V/FA: Processing queued up service tasks: 1

V/FA: Inactivity, disconnecting from AppMeasurementService

my build.gradle (Module:app):

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.1"
    defaultConfig {
        applicationId "com.example.cris.firebasenotificationexam"
        minSdkVersion 22
        targetSdkVersion 23

....

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:23.4.0'
    apply plugin: 'com.google.gms.google-services'
    compile 'com.google.firebase:firebase-messaging:9.0.2'
}

Anyone knows how to fix this problem?

AL.
  • 36,815
  • 10
  • 142
  • 281
Singorenko
  • 473
  • 2
  • 7
  • 19
  • Hard to determine what's causing this with the details you provided. Can you post your `onMessageReceived()` implementation and a sample payload? – AL. Nov 16 '16 at 13:17

1 Answers1

0

The log message: Inactivity, disconnecting from AppMeasurementService, is normal and not an indication if a problem.

Edit the dependencies block of your build.gradle file:

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:23.4.0'
    compile 'com.google.firebase:firebase-messaging:9.0.2'
}

// Moved the following statement.  Was in the dependencies block
apply plugin: 'com.google.gms.google-services'

More details in the Firebase Setup Guide.

Also, consider using the latest released versions of the libraries: 9.8.0 for firebase-messaging and 25.0.1 for appcompat-v7.

Bob Snyder
  • 37,759
  • 6
  • 111
  • 158