capacitor-background-runner icon indicating copy to clipboard operation
capacitor-background-runner copied to clipboard

Unable to dispatchEvent on android

Open martinglover opened this issue 1 year ago • 2 comments

I am trying to dispatch an event on receiving a notification while the app is closed.

On iOS this is demonstrated by adding BackgroundRunnerPlugin.dispatchEvent(event: "remoteNotification", eventArgs: userInfo) to the AppDelegate on didReceiveRemoteNotification

How is this achieved on android?

martinglover avatar Mar 18 '24 16:03 martinglover

Same problem. I believe steps is extend FirebaseMessagingService, then override onMessageReceived, and then....what? May be need to call BackgroundRunnerPlugin.dispatchEvent somehow but it does not provide any static methods

orioncx avatar Mar 20 '24 10:03 orioncx