[Local Notifications Plugin] Notifications not showing on Android

Forge Component
(6)
Published on 6 May by OutSystems R&D
6 votes
Published on 6 May by OutSystems R&D

Hello.

I tried to use this plugin but, although notifications are showing as expected on iOS, they don't show on Android (8.1.0)? Anyone with this problem?

I'm having the same issue on Android, if the app is in foreground the notifications are never showed.

I've attached a sample for testing.

João Inácio wrote:

I'm having the same issue on Android, if the app is in foreground the notifications are never showed.

I've attached a sample for testing.

Hi João.

The behaviour is exactly the one you described. On iOS all works fine but on Android, if the app triggers a local notification when in foreground, no notification is shown. if the app triggers a notification when in background the notification is shown.

It's a strange behaviour that I can't understand. Maybe some Android feature is blocking the notifications from beeing dispached when the sender app is in foreground.


Hi,

Right from Android 8 i.e Oreo (API level 26), When the app is in the foreground, notifications are not generated themselves. you need to write some additional code to manually Invoke it.. as of restrictions & behavior change has been imposed on Android-8.

If Plugin doesn't support Android-8 & further then:

Thus the Plugin Team needs to update the Implementation for Android to handle the Android-8 behavior. 

Also, Implementation of Notifications-Channel needs to be handled with Android-9 i.e Pie (API level 28).

Thanks,

Assif




assif_tiger wrote:

Hi,

Right from Android 8 i.e Oreo (API level 26), When the app is in the foreground, notifications are not generated themselves. you need to write some additional code to manually Invoke it.. as of restrictions & behavior change has been imposed on Android-8.

If Plugin doesn't support Android-8 & further then:

Thus the Plugin Team needs to update the Implementation for Android to handle the Android-8 behavior. 

Also, Implementation of Notifications-Channel needs to be handled with Android-9 i.e Pie (API level 28).

Thanks,

Assif




Hi Assif, thanks for your reply.

Do you have any ideia of what additional code I must write to manually invoke the notifications?

Regards


Grupo Istas wrote:

assif_tiger wrote:

Hi,

Right from Android 8 i.e Oreo (API level 26), When the app is in the foreground, notifications are not generated themselves. you need to write some additional code to manually Invoke it.. as of restrictions & behavior change has been imposed on Android-8.

If Plugin doesn't support Android-8 & further then:

Thus the Plugin Team needs to update the Implementation for Android to handle the Android-8 behavior. 

Also, Implementation of Notifications-Channel needs to be handled with Android-9 i.e Pie (API level 28).

Thanks,

Assif




Hi Assif, thanks for your reply.

Do you have any ideia of what additional code I must write to manually invoke the notifications?

Regards


Hello Grupo Istas,

You need to update the Core Git Repo used for the same Forge Component... If the Owner allows !!!

Otherwise, 

You can clone the Repo on Git & Implement respective Permission & Build Settings for Android that are required for the new API support. And then generate the Cordova Plugin i.e a Repo on Git & Just Consume it like every Forge Component Normally does.


Hopefully, If I found some slot free will possibly try to attempt this one.

WIll be glad to Help you :)

Thanks

Assif