537
Views
5
Comments
[Local Notifications Plugin] Notifications not showing on Android
Question
local-notifications-plugin
Mobile icon
Forge asset by OutSystems

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?

2024-11-04 15-59-50
João Inácio

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.

Notificationlocal.oml
UserImage.jpg
Grupo Istas

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.


2021-04-09 11-42-43
assif_tiger
 
MVP

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




UserImage.jpg
Grupo Istas

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


2021-04-09 11-42-43
assif_tiger
 
MVP

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

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.