Red-Folder / bgs-core

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

Where to put MyService.java in IONIC? Android is unable to find/bind. #108

Open kashifsulaiman opened 4 years ago

kashifsulaiman commented 4 years ago

I've tried at following places: platforms/android/app/src/main/aidl/com/red_folder/phonegap/plugin/backgroundservice/sample/MyService.java platforms/android/app/src/main/MyService.java plugins/com.red_folder.phonegap.plugin.backgroundservice/src/android/MyService.java

AndroidManifest.xml is at platforms/android/app/src/main/AndroidManifest.xml

kashifsulaiman commented 4 years ago

@Red-Folder I found that there is already MyService.java in plugins/com.red_folder.phonegap.plugin.backgroundservice.sample/src/android/MyService.java and the service is also working even after kill. But when I edit it or add some more logs in this file, there is no effect. Am I editing wrong file?

Red-Folder commented 4 years ago

I'm afraid I couldn't tell you. I've no experience of IONIC and haven;t touched this project from many years.

I'd advise you take a look at Service Workers/ Progressive Web Apps rather than using this plugin.

I'll leave the question open in case someone else has a response.