transistorsoft / react-native-background-fetch

Periodic callbacks in the background for both IOS and Android
MIT License
1.47k stars 191 forks source link

Works while USB debugging, but not in the installed app through generated .apk file #509

Closed mdzakir closed 2 weeks ago

mdzakir commented 2 months ago

The background task (setting the wallpaper on the user's mobile device) works while debugging, but not in the installed app through .apk file While I connect the mobile device to the laptop through USB and debug, the background task works. but if I generate a .apk file and install it in the mobile device, the background task does not work.

Your Environment

Expected Behavior

The background task should work at all times & scenarios (debugging, .apk or bundle)

Actual Behavior

It works while debugging, but not in the installed app through .apk or .aab bundle. While I connect the mobile device to laptop through USB and debug, the background task works. but if I generate a .apk file and install it in the mobile device, the background task does not work.

Steps to Reproduce

1. 2. 3. 4.

Context

I am trying to set the wallpaper in the lock screen of the user's mobile device through this package (react-native-background-fetch).

Debug logs

christocracy commented 2 months ago

I only care about simulated events. Do simulated events work?

mdzakir commented 2 months ago

Yes. Simulated events work. But I just wanted to know any particular reason why the background fetch event is not working in the app installed through the apk file? Is there any extra configuration needed for the apk or bundle file?

christocracy commented 2 months ago

If simulated events work, then you’ve done everything required. There’s nothing more to do.

the only thing you need is patience. Let it run for days. Periodically bring your app to foreground, like a normal user would, to feed the OS’s algorithm.

Everything is working fine. You just need to wait for several days.

mdzakir commented 2 months ago

Ok , I'll wait and see for a few days. Thanks

github-actions[bot] commented 1 month ago

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] commented 2 weeks ago

This issue was closed because it has been inactive for 14 days since being marked as stale.