How can I set the desktop pattern (background) in Android with my application (Java)? [closed]

StackOverflow https://stackoverflow.com/questions/23656321

  •  22-07-2023
  •  | 
  •  

Question

I want my application (written in Java) to change the desktop pattern (background) in Android, after e.g. click on "change background to cats.png" button (in my application).

And I want that change to be made constant. When somebody change the background with my application and then turn it off or un-install it, the cats.png will still be the background of the system (till user will change it manually).

Also, I want to make it automatically - user press button => background of desktop being set (without any additional confirmations, fields, windows etc.)

Was it helpful?

Solution

You need to set the appropriate permissions, then use wallpaper manager. Check this out for an example

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top