Notification action problem
Hi. There seems to be a problem with receiving background Notification response (onDidReceiveBackgroundNotificationResponse) when clicking on an action unless the showsUserInterface (for android) is true and I don't want it to be true. I defined a static method and annotated it with @ pragma('vm:entry-point') but still nothing. What is going wrong here?
Not sure what is going on with your scenario as I've not seen this happening with the example app. I've not seen others report this kind of issue either. Perhaps there a delay that made it look like it's not working?
I have the same issue that @ibraheemalani2 mentioned and as he said it only works when I set showsUserInterface to true which doesn't fit to my case either. For my case I updated from ^15.0.1 to ^17.2.1+2 without making any code change which caused the issue. My methods are also annotated with @ pragma('vm:entry-point').
Going to close this as I don't have much more advice on this. If you can provide a link a minimal repo that can reproduce the issue then feel free to re-open. Having taken another look at the conversation though, I spotted something that I should call out though. onDidReceiveBackgroundNotificationResponse is only intended for when showsUserInterface is false on Android. Note it's not to do with if the app is in the background but when actions are intended to run on background isolates where code can run without the app actually running. Perhaps this is the actual issue you're experiencing. If you set showsUserInterface to true then you should be using the other callback