please need your complete guidance/support on how to implement a daily wallpaper changer in react native ( run task even when the app is closed ).
zakirtest123 opened this issue · 7 comments
Your Environment
- Plugin version:
- Platform: Android
- OS version:
- Device manufacturer / model:
- React Native version (
react-native -v
): - Plugin config
Expected Behavior
Actual Behavior
Steps to Reproduce
Context
please need your complete guidance/support on how to implement a daily wallpaper changer in react native ( run task even when the app is closed ).
Debug logs
I don’t know what a “wallpaper changer” is (nor am I interested).
For Android, this plug-in implements the WorkManager
API, which can execute your provided callback function about every 15 minutes.
what you do in your callback is your business. The only thing I’m interested is seeing your callback execute (eg a console.log
showing up in your logs).
see the readme to learn how to simulate events.
For terminated state, see api docs in readme enableHeadless
and learn how to implement a “HeadlessTask”
Stop concentrating on “wallpaper change” and just focus on the simple task of logging a simple message in your callback.
you don’t need to “read Java”. All the api docs are linked in the readme
Ok, so you mean to say that if the stopOnTerminate: true and enableHeadless: true is set then no need of adding any Java code?
Why don’t you try it and see?
wow! that's awesome!!! It works. Able to simulate setting the wallpaper in all states (foreground, background and terminated) of the device. thanks a ton @christocracy 🎉