Giter Club home page Giter Club logo

Comments (8)

chevett avatar chevett commented on May 31, 2024

You have to call enable from your app, so the app has to be open.

https://github.com/katzer/cordova-plugin-background-mode#prevent-the-app-from-going-to-sleep-in-background

from cordova-plugin-background-mode.

ghominejad avatar ghominejad commented on May 31, 2024

You mean after restarting the phone, the app exits from background mode and we have to run the app manually again?

from cordova-plugin-background-mode.

christocracy avatar christocracy commented on May 31, 2024

Do you realize what this plugin does? It prevents the OS from going to
sleep.

For the sake of your poor users, I would hope they could at least stop the
madness of your app sleep-depriving their phone, consuming their battery,
by restarting their phone.

On Thursday, February 5, 2015, ghominejad [email protected] wrote:

You mean after restarting the phone, the app exits from background mode
and we have to run the app manually again?


Reply to this email directly or view it on GitHub
#54 (comment)
.

Snet from Gmail Mobile

from cordova-plugin-background-mode.

ghominejad avatar ghominejad commented on May 31, 2024

Is it possible that the plugin lets the device to go sleep and resume the app after waking up?

from cordova-plugin-background-mode.

christocracy avatar christocracy commented on May 31, 2024

What is your use-case? What exactly is your app doing that requires
constant bg-running?

On Friday, February 6, 2015, ghominejad [email protected] wrote:

Do you know a codova plugin that lets the device goes sleep and resume the
app after waking up?


Reply to this email directly or view it on GitHub
#54 (comment)
.

Snet from Gmail Mobile

from cordova-plugin-background-mode.

ghominejad avatar ghominejad commented on May 31, 2024

No. A news app that should show some important news from the internet in the device notification area even when the app is closed by the user. I don't like to prevent the phone going to sleep but after waking up again the background service should continue running. I like your plugin lets the device goes sleep.

from cordova-plugin-background-mode.

christocracy avatar christocracy commented on May 31, 2024

Once again, background-mode plugin sucks naive developers in, wasting
their time and money.
, Walk away from this plugin and never come back. Apple will deny you.
You don't need this plugin.

ios created the "background-fetch" system in ios 7 for precisely your
use-case. Background-fetch, when enabled, will awake your app, at
roughly 15min intervals, and provide your app exactly 30s of background
running, just enough time to do an HTTP request to your server to fetch
some info, perhaps send a local-notification to the user and/or update your
UI, before going back to sleep again.

I made a cordova plugin that will allow you to easily take advantage of
this system. It's ios-only, since Android doesn't have this system yet,
but it'll get you safely started.

https://github.com/christocracy/cordova-plugin-background-fetch

On Friday, February 6, 2015, ghominejad [email protected] wrote:

No. A news app that should show some important news from the internet in
the device notification area even when the app is closed by the user. I
don't like to prevent the phone going to sleep but after waking up again
the background service should continue running. I like your plugin lets the
device goes sleep.


Reply to this email directly or view it on GitHub
#54 (comment)
.

Snet from Gmail Mobile

from cordova-plugin-background-mode.

ghominejad avatar ghominejad commented on May 31, 2024

Thats great,
I really need it in android devices even with running always in background. probably i have to write a plugin for android and WP.
Thank you for your suggestion

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.