how to set image as wallpaper in android studio

Hello android developer. in this article, you will learn how to set an image as wallpaper in android studio using wallpaper manager in your android application. if you want to set  your image in your mobile wallpaper then develop this application. this application will help you to set image on the android screen. wallpaper manager helps you to set your favorite in your mobile wallpaper.

please follow the code given below to set image as wallpaper in android studio

  • First Create a new project in Android Studio
  • File ⇒ New Android ⇒ Application Project
  • Then Open src -> package -> MainActivity.java and then add following code :

JAVA (MainActivity.java)

  • Now Open res -> layout -> activity_main.xml and then add following code :

XML (activity_main.xml)

Screenshot of this application

 

Add a Comment

Your email address will not be published. Required fields are marked *