Set wallpaper as background

by AndroidNewbie » Thu, 03 Jun 2010 11:49:16 GMT

Sponsored Links
 Hi ,

I want to set current wallpaper as my application background . Any
ideas to do it through XML or Java code ?


Set wallpaper as background

by Ericson, Anders » Thu, 03 Jun 2010 14:17:36 GMT


In your "AndroidManifest.xml" you can add this to your activity:


-----Original Message-----
[] On Behalf Of AndroidNewbie
Sent: den 3 juni 2010 05:49
To: Android Developers
Subject: [android-developers] Set wallpaper as background

Hi ,

I want to set current wallpaper as my application background . Any
ideas to do it through XML or Java code ?


Sponsored Links

Set wallpaper as background

by Rajiv » Thu, 03 Jun 2010 14:52:37 GMT

 You can also do it as:

WallpaperManager wlp = WallpaperManager.getInstance(*this*);

Drawable d = wlp.getDrawable();


On Thu, Jun 3, 2010 at 11:47 AM, Ericson, Anders <


Other Threads

1. Application not installed - anyone have thoughts as to why?

Thanks, Mark.  Uninstalling first did the trick.


2. save (complex?) application state to bundle

Hello Android Developers!

This is a bit complicated to explain (and my first post), so bear with
me please:
I am currently trying to figure out the best way of saving my
application's state in a bundle on the onSaveInstanceState event
(working on a game). My application's state is based on a "world"
class which contains various objects.
Among these objects there is a creature object which contains bitmaps
(Bitmap object)(allowing me to draw the various sprites of the
creature when it's walking with more flexibility and accessibility).

Bit of creature constructor
          //load creature sprites
          for (int i = 1; i<= _spriteCount; i++){
               //walk left
                    bitmap = BitmapFactory.decodeResource(resources,
R.drawable.class.getDeclaredField("creature_" i).getInt(null));
               }catch(Exception e){
                    bitmap = null;

After looking around for a few hours I found that serializing the
world object (and all its sub-objects) was an acceptable way of saving
it in the bundle. Unfortunately it appears that we can't serialize
bitmaps and considering they're a part of my "creature" I can't seem
to see a workaround.

So here come my questions:
1- Am I doing something fundamentally wrong? (not supposed to save
bitmaps in objects? supposed to handle bitmaps in a separate class
which I don't pass on the bundle and reload my bitmaps when restoring
the application? ...)
2- Is there another way of passing my "world" object into my bundle
(would using Parcelable work?)

I'm not sure what my options are at this point. I hope I was clear
enough; don't hesitate to ask for any (probably needed)

In any case, thanks for reading, any help would be much appreciated.


3. AlertDialog and keyboard open configuration change

4. ADT Problem: Creating new Android Project

5. ProgressBar/thumb height

6. ERROR/Qcvdec adsp: cannot open '/dev/vdec'

7. Compiling and porting Open source android to Nexus One