question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

won't work Ionic 5 - angular 9

See original GitHub issue

Hi i’m trying to make this work

this.backgroundMode.enable()

this.backgroundMode.on('activate').subscribe(() => { this.splashScreen.show() }) this.backgroundMode.on('deactivate').subscribe(() => { this.splashScreen.hide() })

but when I install this on the phone it doesn’t work, its like the code runs when the app comes on foreground so it shows the splash screen when gets back on foreground and disappears after a few seconds, but i need to show the splash screen when the app its on the background. Thanks i hope someone can help me 😃

Ionic:

Ionic CLI : 6.9.1 (/Users/juand.lopez/.nvm/versions/node/v10.16.0/lib/node_modules/@ionic/cli) Ionic Framework : @ionic/angular 5.0.0-rc.5 @angular-devkit/build-angular : 0.900.5 @angular-devkit/schematics : 9.0.5 @angular/cli : 9.0.5 @ionic/angular-toolkit : 2.0.0

Cordova:

Cordova CLI : 9.0.0 (cordova-lib@9.0.1) Cordova Platforms : android 8.1.0, ios 5.1.1 Cordova Plugins : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 4.2.1, (and 22 other plugins)

Utility:

cordova-res (update available: 0.15.1) : 0.6.0 native-run (update available: 1.0.0) : 0.2.8

System:

Android SDK Tools : 26.1.1 (/Users/juand.lopez/Library/Android/sdk) ios-deploy : 1.9.4 ios-sim : 8.0.2 NodeJS : v10.16.0 (/Users/juand.lopez/.nvm/versions/node/v10.16.0/bin/node) npm : 6.14.5 OS : macOS Catalina Xcode : Xcode 11.5 Build version 11E608c

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:10

github_iconTop GitHub Comments

0reactions
dobleM20commented, Jul 17, 2021

The problem with that plugin “https://bitbucket.org/TheBosZ/cordova-plugin-run-in-background/src/master/” is when I put “cordova.plugins.backgroundMode.enable ();” in the code I have an error of: “Property ‘backgroundMode’ does not exist on type ‘CordovaPlugins’.”

Thank you

Read more comments on GitHub >

github_iconTop Results From Across the Web

Will ionic 5 use angular 9 as default?
Will ionic 5 use angular 9 as default when creating new project?
Read more >
Ionic 5, Angular 9 application not getting loaded in Prod build ...
After lot of analysis, I got this resolved by making buildOptimizer flag as false. Make sure in angular.json setting -->
Read more >
The 9 Most Common Mistakes That Ionic Developers Make
Yes, you could commit the platforms and plugins folders, but it is not recommended. When using Ionic CLI to install platforms ionic platform...
Read more >
ionic framework 5 crash course for angular developers
IONIC 5 Crash Course for developersDonate to help the channel: https://paypal.me/tipawaisGithub: ...
Read more >
Add services - Angular
Open the HeroesComponent class file. Delete the HEROES import, because you won't need that anymore. Import the HeroService instead. src ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found