Wallpaper Example In Android Programming

Wallpaper Example in Android Programming

This example explains how to set wallpaper programmatically for home screen in android.

Algorithm:

1.) Create a new project by File-> New -> Android Project name it WallpaperExample.

2.) Write following into main.xml:

 

 

 

3.) Set following permission to you manifest file:

[code lang=”xml”]

[/code]

4.) Run for output.

Steps:

1.) Create a project named WallpaperExample and set the information as stated in the image.

Build Target: Android 4.0
Application Name: WallpaperExample
Package Name: com. example. WallpaperExample
Activity Name: WallpaperExample
Min SDK Version: 14

2.) Open WallpaperExample.java file and write following code there:

 

 

 

3.) Compile and build the project.

Output

Comments 2

  1. hi can u explain d above code with each step i an not unable to understand ,,if i build target in android 2.3.3 it will work or not,,help me out?

Leave a Reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">