Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

For those finding this plugin not working, here's the alternative. #588

Open
panlina opened this issue Jan 20, 2024 · 5 comments
Open

For those finding this plugin not working, here's the alternative. #588

panlina opened this issue Jan 20, 2024 · 5 comments

Comments

@panlina
Copy link

panlina commented Jan 20, 2024

Spent half day and finally get this alternative from this issue:
https://bitbucket.org/TheBosZ/cordova-plugin-run-in-background

This project is outdated and no longer maintained. Don't waste time on it.

@Metalchocobo
Copy link

@panlina thankyou

@alanmilinovic
Copy link

Alternative also doesn't work with android 13.

@ArvyRogerio
Copy link

Ok on 14:
cordova plugin add https://github.com/brunochikuji/cordova-plugin-background-mode.git

@alanmilinovic
Copy link

Do I need to add some permissions or something for this plugin to work?

@gondp
Copy link

gondp commented Sep 23, 2024

Ok on 14: cordova plugin add https://github.com/brunochikuji/cordova-plugin-background-mode.git

This doesn't work java.lang.RuntimeException: Unable to create service de.appplant.cordova.plugin.background.ForegroundService: android.app.MissingForegroundServiceTypeException: Starting FGS without a type callerApp=ProcessRecor

targetSDK=34

Process: com.radiopopular.mobile, PID: 30344
java.lang.RuntimeException: Unable to create service de.appplant.cordova.plugin.background.ForegroundService: android.app.MissingForegroundServiceTypeException: Starting FGS without a type callerApp=ProcessRecord{f832a8 30344:} targetSDK=34
at android.app.ActivityThread.handleCreateService(ActivityThread.java:4664)
at android.app.ActivityThread.-$$Nest$mhandleCreateService(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2264)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:205)
at android.os.Looper.loop(Looper.java:294)
at android.app.ActivityThread.main(ActivityThread.java:8177)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:971)
Caused by: android.app.MissingForegroundServiceTypeException: Starting FGS without a type callerApp=ProcessRecord{f832a8 30344:com.radiopopular.mobile/u0a191} targetSDK=34
at android.app.MissingForegroundServiceTypeException$1.createFromParcel(MissingForegroundServiceTypeException.java:53)
at android.app.MissingForegroundServiceTypeException$1.createFromParcel(MissingForegroundServiceTypeException.java:49)
at android.os.Parcel.readParcelableInternal(Parcel.java:4870)
at android.os.Parcel.readParcelable(Parcel.java:4852)
at android.os.Parcel.createExceptionOrNull(Parcel.java:3052)
at android.os.Parcel.createException(Parcel.java:3041)
at android.os.Parcel.readException(Parcel.java:3024)
at android.os.Parcel.readException(Parcel.java:2966)
at android.app.IActivityManager$Stub$Proxy.setServiceForeground(IActivityManager.java:6761)
at android.app.Service.startForeground(Service.java:775)
at de.appplant.cordova.plugin.background.ForegroundService.keepAwake(ForegroundService.java:132)
at de.appplant.cordova.plugin.background.ForegroundService.onCreate(ForegroundService.java:100)
at android.app.ActivityThread.handleCreateService(ActivityThread.java:4651)
at android.app.ActivityThread.-$$Nest$mhandleCreateService(Unknown Source:0) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2264) 
at android.os.Handler.dispatchMessage(Handler.java:106) 
at android.os.Looper.loopOnce(Looper.java:205) 
at android.os.Looper.loop(Looper.java:294) 
at android.app.ActivityThread.main(ActivityThread.java:8177) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:971) 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants