0

I have been searching for an answer to my problem, but cant seem to find a right answer.

I am trying to use tasker to set a background on my phone everytime a song changes. I got everything working, but setbitmap does not set wallpaper instantly. I have to interact with the phone in some way to get it to update ( open a folder, touch the screen etc). Is there a way to force an update after setbitmap has been called?

Edit: Im using setStream now. Here is a short video showing what im trying to explain in detail.

Wallpaper delay

Thanks!

Per Digesen
  • 99
  • 1
  • 5

1 Answers1

0

Is your permission in place ?

<uses-permission android:name="android.permission.SET_WALLPAPER" />


Alternatively you can use setStream instead of setBitmap as it takes time to decode a bitmap and it is directly proportional to the size of the bitmap.

CodeWalker
  • 2,281
  • 4
  • 23
  • 50
  • Im new here and commented in the wrong place! Thank you for your answer! Yes, everthing is working. Its just that the wallpaper isnt updated instanly after setbitmap is called. It seems something must happen like userinteraction for the wallpaper to update. – Per Digesen Sep 01 '16 at 12:05
  • You can use `AccessibilityService` to simulate user interaction. – CodeWalker Sep 01 '16 at 12:07
  • Thanks! I tried that, but with the same outcome. It works, but only updates the bg when i move the screen or interact with the phone in some way. – Per Digesen Sep 01 '16 at 12:32