need reference page for how to write a png from res/drawable to background as wallpaper

by Spooky » Fri, 20 May 2011 09:53:23 GMT


Sponsored Links
 I've been trying to find a reference and/or example page
explaining how to write a png image file from res/drawable
to the background as wallpaper for about the last five days
now ... I give up...time to ask for help finding either or
both of the above....  I've seen all kinds of references to
unrelated sties, but I just can't find the right page.

Can someone please point me in the right direction?

Thanks,
   --jim

-- 



Re: need reference page for how to write a png from res/drawable to background as wallpaper

by Saurav » Fri, 20 May 2011 12:26:31 GMT


 You mean wallpaper for phone home screen?




Regards,
Saurav Mukherjee.






-- 


Sponsored Links


Re: need reference page for how to write a png from res/drawable to background as wallpaper

by Spooky » Fri, 20 May 2011 12:54:40 GMT


 


Ok, here's a chance for me to possibly clear up my own confusion.
I've
been under the impressions that A) the home screen is THE screen
that you get when you press the HOME button, and that the rest are
other screens, and B) that ALL of the phone's screens are Home
screens.......

I'm talking about wallpaper that you load on the backgrounds of the
seven screens.

I'm working on a photography app, and I want the user to be able,
if they want to do so, to load any of my photos (which, before the
app is built, are in res/drawable) on their Home screen/screens.

I've been looking every day until my eyes start screaming, and after
that, I've kept looking until my eyes go totally blurry for the rest
of
the day (and beyond, sometimes) for just under a week, and have
gotten lots and lots of unrelated pages, but nothing relevant so far.

Later,
   --jim

-- 



Re: Re: need reference page for how to write a png from res/drawable to background as wallpaper

by Saurav » Fri, 20 May 2011 14:05:32 GMT


 I am guessing this is what u want,

WallpaperManager manager = WallpaperManager.getInstance(this);
try {
manager.setResource(R.drawable.wallpaper);
 } catch (IOException e) {
e.printStackTrace();
}

U need to add SET_WALLPAPER permissions in ur manifest file.

Hope this helps.


Regards,
Saurav Mukherjee.








-- 



Re: need reference page for how to write a png from res/drawable to background as wallpaper

by Spooky » Fri, 20 May 2011 17:39:08 GMT


 



Looks like exactly what I need.  Thanks!   I also have something
far more likely to get better search results (for a reference page),
too---so thanks for that, as well!

Later,
   --jim

-- 



Other Threads

1. Weird Home button behavior

Hi all.
I'm experiencing kind of strange behavior of my application after hard
Home button is pressed.
When you press Home, everything is OK - my app goes to the background,
showing Home screen. But if you try to choose my app in the main menu
or in the list of last tasks it behaves like it was not started before
and does not show the last activity you were on - it just starts from
scratch, namely, shows the splash screen and . Moreover, old
activities of this app remain on the activities stack, and previous
instance of the app is not terminated - so if you press Back for a few
times you'll just run into those activities which were undoubtedly
started during the previous session of work with my app. Splash screen
is filtered by "android.intent.action.MAIN" filter and
"android.intent.category.LAUNCHER" category.
The strange thing is that all of that happens despite the fact that I
do not intercept any Back key hits, or override any onPause or
onResume methods. What's happening contradicts with my understanding
of Android app lifecycle - I was sure that when you hit Home an app
just goes to the background, and when you choose it in the menu later
- it just unwinds and does not start anew. (Of course, unless stuff
like that is stated in the app manifest or corresponding methods are
overridden or something else).
I hope you will be able to help me. Any advice on what to pay
attention to or where to search for solution would be really great.

Regards, Alex

--

2. Missing core applications in Emulator (API 4/5)

You can't...

----------------------------------------------------------------------
There are only 10 types of people in the world...
Those who know binary and those who don't.
----------------------------------------------------------------------





>

3. Floods

4. Need help on the "Service" concept

5. android source integrated into Eclipse

6. Android Hello World not working

7. Android phone on "Heroes"