react-native-background-timer icon indicating copy to clipboard operation
react-native-background-timer copied to clipboard

description of underlying android system used

Open funkyeah opened this issue 8 years ago • 2 comments

Hey @ocetnik I'm trying to get a better understanding of how this package works.

The README mentions that it can fire a timer when the app is in the background.

Looking through the codebase it looks like to me you are scheduling stuff with import android.os.Handler;

My understanding is that Handlers will only fire when the app is in the background and the phone is on. If the phone screen has been turned off and no app has a WakeLock then I believe the handler will no longer fire.

If this is needed then an AlarmManager is needed... does that sound right to you?

funkyeah avatar Jul 19 '16 22:07 funkyeah

I'm wresting with this same question. I need to do periodic tasks whether or not the app is running.

I was wondering if this module can do that, but it seems not.

I'm looking at AlarmManager. However, I don't see a react-native component that uses that. Also, the docs for AlarmManager say, "Keep your alarm frequency to a minimum." I don't know what that means. Is once every 10 minutes too frequent? Once a minute?

timscott avatar Sep 29 '16 16:09 timscott

@funkyeah How did you solve this problem ?

Udbhav12 avatar May 03 '19 08:05 Udbhav12