Open akashapps opened 2 years ago
If you don't have a high priority notification related to your app in the notification center, android system is going to kill you service to free memory and resources. Make sure this notification is shown all the time.
@mathias5r I already have foreground service in Application. Although, When application gets kill, foreground service getting re-created because of flag "START_STICKY". But JS engine can not be re-created. JS engine only start when I click on icon and open app again (when App.js) getting called.
@mathias5r I have updated sample log in first message.
As far as I can remember, the HeadlessJS bundles just the necessary logic when it is created. i. e., when your service is triggered it's going to run just that piece of logic and not your whole app.
I am working in similar application where we need to make sure the application stays alive in the background. We are using foreground service for it. (Already used START_STICKY). We also enabled Hermes engine in application.
Issue comes when Android OS kill our app due to any/random reason (Due to Doze mode), Application instance and Foreground service gets re-created as it is declared as START_STICKY. But React-native JS engine does not get re-created. We have some classes and manager declared in React-native which are not getting created due to this.
Any idea about it?