开发者

How to set wallpaper in Android

开发者 https://www.devze.com 2022-12-30 11:53 出处:网络
I am using Android SDK 1.6. Could someone tell me how to set an image as the wallpaper in the homescreen.

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.


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

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

精彩评论

暂无评论...
验证码 换一张
取 消