I am trying to build an app for android, in which user can set time-slots and then according to those time-slots the wallpaper change throughout the day. One of the task would be to change the wallpaper in the background. For now, I have the following function that triggers on the click of the button. This function aims to set an image as the phones wallpaper after 15 seconds. It works completely fine, if the app is in foreground or is closed but available in recent apps.
However, if I completely close the app (remove it from recent apps), the function works just partially. The string Starting Background Service and Setting Wallpaper before and after the delay are logged successfully. After this the ManageWallpaper.setWallpaper tries to change the wallpaper (ManageWallpaper class comes from this library). But neither does the wallpaper change nor the Wallpaper set successfully is logged and just the following two strings are logged.
BUNDLE ./index.js
WARN No task registered for key Set Wallpaper1
I am trying to build an app for android, in which user can set time-slots and then according to those time-slots the wallpaper change throughout the day. One of the task would be to change the wallpaper in the background. For now, I have the following function that triggers on the click of the button. This function aims to set an image as the phones wallpaper after 15 seconds. It works completely fine, if the app is in foreground or is closed but available in recent apps.
However, if I completely close the app (remove it from recent apps), the function works just partially. The string
Starting Background Service
andSetting Wallpaper
before and after the delay are logged successfully. After this theManageWallpaper.setWallpaper
tries to change the wallpaper (ManageWallpaper class comes from this library). But neither does the wallpaper change nor theWallpaper set successfully
is logged and just the following two strings are logged.