GCM 8.4.0 messages not received anymore in background after rebuild in 2.1.2

9 views
Skip to first unread message

Alain Bonnefoy

unread,
Jul 1, 2016, 11:20:47 AM7/1/16
to android-gcm
I  released an application in April for which GCM messages where correctly received in foreground and background.

After few modifications in this application, I realized that background notifications were not received anymore whereas it still working in foreground.

After few hours to investigate I didn't see any reason which could explain it so I started back from the project of April.

But after rebuild it, I face the same problem; GCM messages are not received when the application is in background.

I compared both projects with WinMerge and manifest, build.gradle, source files, libs, google-service.json are exactly the same.

The only difference I see is the project level build.gradle because Studio asked me to update it.

Before:

    buildscript {
        repositories {
            jcenter()
        }
        dependencies {
            classpath 'com.android.tools.build:gradle:1.5.0'
            classpath 'com.google.gms:google-services:2.0.0-alpha6'
        }
    }

After:

    buildscript {
        repositories {
            jcenter()
        }
        dependencies {
            classpath 'com.android.tools.build:gradle:2.1.2'
            classpath 'com.google.gms:google-services:2.0.0-alpha6'
        }
    }

And of course, builds are different, so obviously, something in my build environment cause Studio to create a different application code and this one doesn't work well with GCM messages.

Do you have any idea?

app.iml files are different would it be interesting to guess what's wrong?

**Edit** 

For the published app, if I receive a message in foreground and then put it in background then swipe it out of the recent apps list, the notification created by the received messages remains in notification center.

For the newly builded project, when I do the same, the notification is immediately removed from the notification center.

Diego Giorgini

unread,
Jul 6, 2016, 2:38:28 PM7/6/16
to andro...@googlegroups.com
Hi Alain,

I doubt that the difference between:
old: classpath 'com.android.tools.build:gradle:1.5.0'
new: classpath 'com.android.tools.build:gradle:2.1.2'
could impact the app in the way you described.

Few more things to check:
- did the targetSdkVersion changed?
- did you change device / android-version / mod / or launcher ?
- which device and launcher are you using?

--
You received this message because you are subscribed to the Google Groups "android-gcm" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-gcm...@googlegroups.com.
To post to this group, send email to andro...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-gcm/347c6c3a-9263-444b-9e24-e0cd1a8f3131%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages