Open aniciom opened 7 years ago
Have you been able to solve this issue?
@AniciusM @theoafactor I also spent long time to solve this problem. I solved this problem with below github (fork version).
try below command.
$ ionic cordova platform rm android
$ ionic cordova platform rm ios
$ ionic cordova plugin add https://github.com/tushe/cordova-plugin-background-mode.git
$ npm install --save @ionic-native/background-mode
$ ionic cordova platform add android
$ ionic cordova platform add ios
@writer0713 thank you so much, I've been struggling for a few hours with this issue.. your forked version is working fine
@cnmoro you're welcome :) have a nice day.
@writer0713 Thanks. After 1 day of research i resolve it with simply following your step.
@writer0713 you're my hero. Thank you so much!
@pc-perrycima @Genarito you are welcome :) Hope you enjoy developing. Have a nice day.
Works on Android 9, thanks a lot!
I'm having a problem, i installed the last version (0.7.2) and its working fine on IOS 11 but when i compile my app in ionic1 on android 7 (sdk 26 - cordova android 6.3.0), open the app and press the main button or back button in the main page (without previous navigation) the app doesn't go to background, the app gets killed and android tells me that the app crashed, anyone got this problem too?
I have this in the .run() app.run(function($ionicPlatform,$interval,$rootScope,$state) { $ionicPlatform.ready(function() { cordova.plugins.backgroundMode.enable(); }); });
I also tried adding cordova.plugins.backgroundMode.overrideBackButton() and cordova.plugins.backgroundMode.excludeFromTaskList() and different combinations but not luck I'm missing something ?
adb.txt I attach adb logcat's log, maybe this can help
I discovered its working when i put a button and call to cordova.plugins.backgroundMode.moveToBackground() but its not working not using cordova.plugins.backgroundMode.enable()
Thanks