Red-Folder / bgs-core

Core code for the Cordova Background Service
Other
236 stars 105 forks source link

ideas to make a service to continue receiving push notifications #92

Open paredesivan opened 6 years ago

paredesivan commented 6 years ago

Hi. I have an application to which push notifications arrive, but when I put in force to close or restart the cell phone, they stop coming, I had planned to add a service so that push notifications always arrive. I consult if the plugin could work and more or less as the steps or ideas to follow to do it.

Red-Folder commented 6 years ago

Have a look at Android Broadcast. You should be able to run code on device restart

efkan commented 6 years ago

@paredesivan : Also notifications, broadcasts and background services have changed Android 8.0 (API 26) and later.

To discover changes you might check this out.

BootReceiver.java and else others' code might be needing update.

I try to implement changes to my code according to API 27. If I can manage it, I can make a PR. However my code is huge. So, I can postpone this mission and continue with API 25 for a while. (AVD is buggy on API 27 and Genymotion is on preview version without GPS, Wifi and etc. functionalities and unfortunate I don't have any real device on Android 8.0 Oreo)