Other [solved] FCM + Android 10 (delayed message delivery): Update to Android sdk platform 29

KMatle

Expert
Licensed User
Longtime User
Today I mentioned a delay (about 5 mins) of receiving FCM messages on my phone with Android 10 when the device was sleeping (just data messages without setting any other option like priority). Only when the phone was active, the messages were received at once. After some research I updated to sdk platform 29 and recompiled my app. Now it's working again (no delays anymore when the phone sleeps). Perhaps this helps someone...
 

Alexander Stolte

Expert
Licensed User
Longtime User
But the most annoying thing is, after I restarted the phone, before android 10 it was so, that all notifications came directly, now I usually have to wait 5 minutes or more until they come...

Some apps only after they have been opened.
Tinder is one of those apps...
 
Upvote 0

Alexander Stolte

Expert
Licensed User
Longtime User
I needed for the development... ;) ;) ;)
 
Upvote 0

KMatle

Expert
Licensed User
Longtime User
Right now I test 2 devices (Android 10 and 8) parallel (via subscription to the same topic):

Android 8: All good
Android 10: All good, too (but more options)

It seems that the messages ARE delivered on time, but after this it is important to set the notification importance to "HIGH":

B4X:
n.Initialize("default", Application.LabelName, [B]"HIGH"[/B]).AutoCancel(True).SmallIcon(icon)

otherwise the notification is created but it is handled less agressive and the phone decides to inform "later".

On Android 10 go to the Notification options -> your app -> there are different profiles created automatically for each importance. Good to know.
 
Upvote 0

amorosik

Expert
Licensed User
Right now I test 2 devices (Android 10 and 8) parallel (via subscription to the same topic):

Android 8: All good
Android 10: All good, too (but more options)

It seems that the messages ARE delivered on time, but after this it is important to set the notification importance to "HIGH":

B4X:
n.Initialize("default", Application.LabelName, [B]"HIGH"[/B]).AutoCancel(True).SmallIcon(icon)

otherwise the notification is created but it is handled less agressive and the phone decides to inform "later".

On Android 10 go to the Notification options -> your app -> there are different profiles created automatically for each importance. Good to know.

Hi KMatle, "n.Initialize("default", .... " is not a standard notification object, like Erel example Push Notification
What is exactly ?
 
Upvote 0

KMatle

Expert
Licensed User
Longtime User
Hi KMatle, "n.Initialize("default", .... " is not a standard notification object, like Erel example Push Notification
What is exactly ?

As far as I know it is just a string which can be defined like you want. In the settings menue of your phone you can define by the channel id how this "channel" is handled by your phone (sound, light, etc.). I have no idea why I've chosen "default".

See also: https://www.b4x.com/android/forum/t...oreground-background-data-notification.73356/
 
Last edited:
Upvote 0
Top