Giter Club home page Giter Club logo

Comments (5)

datomnurdin avatar datomnurdin commented on May 30, 2024

No need background-mode plugin if you want to implement push notifications. It will run automatically.

from cordova-plugin-background-mode.

katzer avatar katzer commented on May 30, 2024

thats right ;)

from cordova-plugin-background-mode.

andreszs avatar andreszs commented on May 30, 2024

Am I the only one who does NOT get any push notifications whatsoever when the app is minimized? I'm using Android 4.1.2, the pushplugin, the local-notification and this background-mode plugin which I called with window.plugin.backgroundMode.enable(); at the onDeviceReady() event, yet when the app is minimized nothing keeps working. I even added the KeepRunning=true attribute to my config.xml, but everything is pointless. Any suggestions? Thanks...

from cordova-plugin-background-mode.

boltex avatar boltex commented on May 30, 2024

@andreszs

(WARNING: ANDROID ONLY)

The push notification plugin has no knowledge of the background-mode plugin. SO i modified the push-notification plugin to always send the notification to the app as if in foreground, see my fork : https://github.com/boltex/PushPlugin

Now you only need to set the background-mode active and react accordingly in your app when you receive push notifications. (Will always be treated without popups in the notification area, as "Foreground") Be aware that from now on, if you want something to appear in the notification bar, you need the local-notification plugin to make them appear yourself.

from cordova-plugin-background-mode.

andreszs avatar andreszs commented on May 30, 2024

Thanks, I'll try that. Anyway, I first have to fix a problem because after installing the background-mode plugin, the build fails due to a strange Java error (BackgroundMode.java:295: error: incompatible types). Since I didn't notice that, I was always re-running the older version without the plugin, since the compiler runs the app regardless of a successfull or failed compilation when the APK exists... I'm updating JDK to version 8 to see if that solves the problem, otherwise, I'll never be able to compile my APK with this plugin. I reverted to Cordova 3.6.3, yet the problem persists, JDK 8 is my last hope now.

from cordova-plugin-background-mode.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.