Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set wallpaper in Android

I am using Android SDK 1.6. Could someone tell me how to set an image as the wallpaper in the homescreen.

getApplicationContext().setWallpaper(); 

seems to be not working for me.

like image 931
XaB Avatar asked May 18 '10 12:05

XaB


1 Answers

You have to add the SET_WALLPAPER permission to your AndroidManifest.xml

<manifest xlmns:android...>
 ...
 <uses-permission android:name="android.permission.SET_WALLPAPER" />
</manifest>
like image 104
Cristian Avatar answered Oct 19 '22 03:10

Cristian