You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to call a Javascript function (which does not open any GUI) from the BOOT_COMPLETED broadcast receiver.
I could get the broadcast receiver working as expected.
But, I see that the Capacitor system is not initialized until the app is opened by the user. But, I want to run few things in Javascript even if the user does not open the app to the foreground.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I want to call a Javascript function (which does not open any GUI) from the BOOT_COMPLETED broadcast receiver.
I could get the broadcast receiver working as expected.
But, I see that the Capacitor system is not initialized until the app is opened by the user. But, I want to run few things in Javascript even if the user does not open the app to the foreground.
I tried to do something like the
staticBridge
implemented here: https://github.com/ionic-team/capacitor-plugins/blob/d97898662d0ba037e5f8448990a91de5ec6a4234/push-notifications/android/src/main/java/com/capacitorjs/plugins/pushnotifications/PushNotificationsPlugin.javaBut, I find that the
staticBridge
never gets set in my case, possibly because user has not opened the app to the foreground.Please point me to anything that could be of help here. Thanks.
Beta Was this translation helpful? Give feedback.
All reactions