2

I am working on an app which checks device time and set a wallpaper based on the time of the device. To state the challenge :

It's 11'o clock and a wallpaper X is set by my app running in the background. At that very instance, user was playing a game and did not notice the change. Now, it's 11:15 and wallpaper changes again to Y. User did not saw X and this is what I want to record for analytics. I want to know if a user has actually seen a wallpaper.

I used WallpaperManager to set the wallpaper (With Correct Permissions) and AsyncTask to download the image and set it.

Making this app to work on devices with API level 19 or above. Any ideas?

Arjun saini
  • 4,223
  • 3
  • 23
  • 51
Shubham A.
  • 2,446
  • 4
  • 36
  • 68
  • You could react when the device awakes, because the user obviously sees the wallpaper : https://thinkandroid.wordpress.com/2010/01/24/handling-screen-off-and-screen-on-intents/ – Alexandre Martin Jun 23 '16 at 06:02
  • "user was playing a game" so you can use the same receiver or service to get a list of running activities. If the current one (on top) is the Home Activity, that means the user sees the wallpaper : http://qtcstation.com/2011/01/getting-info-about-your-currently-running-activities/ – Alexandre Martin Jun 23 '16 at 06:07
  • If the user is playing a game, device is already in Awake state. What do you mean by the current one (on top) or the Home Activity? Which activity are you referring to? – Shubham A. Jun 23 '16 at 06:21
  • I am refering to the Home Screen, where the user can choose an application and see their widgets – Alexandre Martin Jun 23 '16 at 10:20

0 Answers0