Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not work in release mode - does not trigger when device is 'off' #348

Open
stevenixxdc opened this issue Aug 10, 2021 · 8 comments
Open

Comments

@stevenixxdc
Copy link

stevenixxdc commented Aug 10, 2021

Any ideas on a fix? works fine when connected and debugging but as soon as I publish a release build it fails to do what it should.

This is on android.

@risafj
Copy link

risafj commented Aug 24, 2021

I have the same issue, on both iOS and Android 🙁
I looked at other similar libraries like react-native-background-fetch, and then saw that a very similar issue has been reported there too:

transistorsoft/react-native-background-fetch#353

Background task is not triggered on real devices or deployments. Only on debugging mode.

Since it's happening on multiple libraries, now I'm concerned that it could be an underlying React Native issue...

@Kaz-z
Copy link

Kaz-z commented Aug 28, 2021

@risafj Did you manage to find a solution to this? I've found that bringing the app to the foreground triggers the timer...which is not good given its a 'background' process :)

@risafj
Copy link

risafj commented Aug 29, 2021

@Kaz-z

I've found that bringing the app to the foreground triggers the timer...which is not good given its a 'background' process :)

Agreed, this is not ideal 😕

I haven't found a solution. I think I'll try to work around the issue by not using background timer (e.g. Use AsyncStorage to save a timestamp, periodically check whether to execute my function based on that timestamp).

@Kaz-z
Copy link

Kaz-z commented Aug 29, 2021

I'm trying to find a solution. If I crack it then i'll share :).

Equally if you manage to get something working it would be great to see your progress.

@ZanaNabaz
Copy link

Did you guys find a solution ?

@sssembler
Copy link

sssembler commented Dec 3, 2021

I actually did get a working solution - we basically made sure to disable power saving on the app in Android and it then worked as I wanted. App stays active in the background - connects to my BLE device every X and does its thing uploading data from the device to my web api.

@erickalvesduobox
Copy link

Did anyone find a good solution for this?

@DeveloperEstiven
Copy link

I am facing the same issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants