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

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

Closed
mdzakir opened this issue Jul 2, 2024 · 6 comments
Labels

Comments

@mdzakir
Copy link

mdzakir commented Jul 2, 2024

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

  • Plugin version: "react-native-background-fetch": "^4.2.1"
  • Platform: Android
  • OS version: 13+
  • Device manufacturer/model: Oneplus Nord2
  • React Native version (react-native -v): "react-native": "0.71.3"
  • Plugin config

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

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
Copy link
Member

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

@mdzakir
Copy link
Author

mdzakir commented Jul 3, 2024

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
Copy link
Member

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
Copy link
Author

mdzakir commented Jul 3, 2024

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

Copy link

github-actions bot commented Aug 2, 2024

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

@github-actions github-actions bot added the stale label Aug 2, 2024
Copy link

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

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

No branches or pull requests

2 participants