cordova-plugin-background-mode
cordova-plugin-background-mode copied to clipboard
Can't install plugin on cordova 9
Hi!
I can't install this plugin on a cordova 9.0.0 project. I just can see the start of a warning:
E:\Cordova9>cordova -v 9.0.0
E:\Cordova9>cordova plugin add cordova-plugin-background-mode Installing "cordova-plugin-background-mode" for android warn
E:\Cordova9>
Best regards Michael
I was also having the same issue. The plugin does appear on the list when I do "cordova plugins". That is probably the reason why I'm having "Uncaught TypeError: Cannot read property 'backgroundMode' of undefined".
We are having the same problem...
C:\Projects\pp\test>ionic cordova plugin add cordova-plugin-background-mode
cordova plugin add cordova-plugin-background-mode --save Installing "cordova-plugin-background-mode" for android warn
C:\Projects\pp\test>
same problem for ios
I have some probem too.
Yeah got the same problem when trying to re-add the plugin - (the src etc doesn't get added). I had a copy of the plugin on my machine which works well - so a workaround could be to manually download the plugin off the git and add from your local machine?
Hey everyone! I'm too face this problem when trying to install this plugin in Cordova 9.0.0. However, I just found a way to make it work despite I don't know why doing this make this work.
Just delete the following line in plugin.xml
<engine name="windows-sdk" version=">=10.0.14393.0" />
Hey everyone! I'm too face this problem when trying to install this plugin in Cordova 9.0.0. However, I just found a way to make it work despite I don't know why doing this make this work.
Just delete the following line in plugin.xml
<engine name="windows-sdk" version=">=10.0.14393.0" />
But I have the same issue in Mac OS.
Installing "cordova-plugin-background-mode" for android warn CordovaError: warn at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:230:23 at Array.forEach (<anonymous>) at getEngines (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:208:13) at Function.runInstall (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:285:22) at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:76:35 at process._tickCallback (internal/process/next_tick.js:68:7) at Function.Module.runMain (internal/modules/cjs/loader.js:757:11) at startup (internal/bootstrap/node.js:283:19) at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)
Hey everyone! I'm too face this problem when trying to install this plugin in Cordova 9.0.0. However, I just found a way to make it work despite I don't know why doing this make this work.
Just delete the following line in plugin.xml
<engine name="windows-sdk" version=">=10.0.14393.0" />
Confirmed! For Android.
For me, I had to change the plugin.xml and change
<source-file src="src/android/BackgroundModeExt.java" target-dir="src/de/appplant/cordova/plugin/background" />
to
<source-file src="src/android/BackgroundExt.java" target-dir="src/de/appplant/cordova/plugin/background" />
Hey everyone! I'm too face this problem when trying to install this plugin in Cordova 9.0.0. However, I just found a way to make it work despite I don't know why doing this make this work.
Just delete the following line in plugin.xml
<engine name="windows-sdk" version=">=10.0.14393.0" />
aparently work here
Not working for me. ¿Can you fix that bug? Thank you very much.
Hey everyone! I'm too face this problem when trying to install this plugin in Cordova 9.0.0. However, I just found a way to make it work despite I don't know why doing this make this work.
Just delete the following line in plugin.xml
<engine name="windows-sdk" version=">=10.0.14393.0" />
Thanks Works!
I tried it but it does not work
Deleting the line below works, as others said. The rest of the windows code is commented out.
<engine name="windows-sdk" version=">=10.0.14393.0" />
For me, I had to change the plugin.xml and change
<source-file src="src/android/BackgroundModeExt.java" target-dir="src/de/appplant/cordova/plugin/background" />
to<source-file src="src/android/BackgroundExt.java" target-dir="src/de/appplant/cordova/plugin/background" />
this file "BackgroundExt.java" not exist in 0.7.2 version. any alternative fix?
For me, I had to change the plugin.xml and change
<source-file src="src/android/BackgroundModeExt.java" target-dir="src/de/appplant/cordova/plugin/background" />
to<source-file src="src/android/BackgroundExt.java" target-dir="src/de/appplant/cordova/plugin/background" />
this file "BackgroundExt.java" not exist in 0.7.2 version. any alternative fix?
my fork fix cordova 9
https://github.com/sercatven/cordova-plugin-background-mode
How can I install de plugin without de Cordova-CLI so I can delete the indicated windows line of code?
For me, IONIC 4
- run: cordova plugin add cordova-plugin-background-mode normal
- $root_dir/plugins/cordova-plugin-background-mode/plugin.xml delete line
<engine name="windows-sdk" version=">=10.0.14393.0" />
- run: ionic cordova platform rm android ; ionic cordova platform add android
- done
Same issue here, seems to be related to the windows-sdk line on plugin.xml.
Can someone fix it?
@sercatven : still facing same issue for Background Mode plugin not installed error
For me, IONIC 4
- run: cordova plugin add cordova-plugin-background-mode normal
- $root_dir/plugins/cordova-plugin-background-mode/plugin.xml delete line
<engine name="windows-sdk" version=">=10.0.14393.0" />
- run: ionic cordova platform rm android ; ionic cordova platform add android
- done
Does it work for ios too?
@Divyanshu30 : I am using ionic3. I also delete the line in plugin.xml but when I say this.backgroundMode.on('Activate') error showing for me Plugin not installed
@All : I uninstall cordova version 9.0 and tried to install cordova version 8 and installed plugin called Background Mode and no error shown and working fine
I have the same problem with Cordova 9 & iOS. I'm waiting for the solution. I hope it arrives early because I can't release the app.
It is going to be almost 2 months since this error appearded. Is there a way to fix it? I think the pull requests are still waiting there.
Hey everyone! I'm too face this problem when trying to install this plugin in Cordova 9.0.0. However, I just found a way to make it work despite I don't know why doing this make this work.
Just delete the following line in plugin.xml
<engine name="windows-sdk" version=">=10.0.14393.0" />
works for me! Thanks
It works but only on iphone simulator; not on real device!
It works but only on iphone simulator; not on real device!
that just happened to me. please help
For me, I had to change the plugin.xml and change
<source-file src="src/android/BackgroundModeExt.java" target-dir="src/de/appplant/cordova/plugin/background" />
to<source-file src="src/android/BackgroundExt.java" target-dir="src/de/appplant/cordova/plugin/background" />
this file "BackgroundExt.java" not exist in 0.7.2 version. any alternative fix?
my fork fix cordova 9
https://github.com/sercatven/cordova-plugin-background-mode
This fork worked for me. My environment is Ionic 4 and Android 9.0. Also note that you need to call disableWebviewOptmizations for your app to actually keep running on background. Thanks @sercatven . Also, please @katzer , accept the PR's to fix these bugs.
#452