On Tue, Jul 19, 2011 at 3:04 PM, Hal Harrison
<closeenough.bac...@gmail.com>wrote:

> >You have at this point loaded a Drawable for the current static
> wallpaper...
> > but there is no up-to-date static wallpaper, because you have just
> replaced
> >it with your own wallpaper.  Your wallpaper should absolutely positively
> not
> >be trying to load the current static wallpaper here.  There are no
> >guarantees that this is up-to-date or even valid.
>
> The point at which I do this is early on in
> WallpaperService.onCreate(), before I instantiate
> WallpaperManager.Engine and well before my WallpaperManager.Engine's
> onSurfaceCreated(SurfaceHolder hldr) callback with
>    WPcan = hldr.lockCanvas();
>        WPcan.drawBitmap(...);
>
> Isn't it drawBitmap() that replaces the old with my new? And, I get
> the old Drawable early on by instantiating a WallpaperManager which,
> according to documentation will, "Retrieve a WallpaperManager
> associated with the given Context." On the emulators I've always
> received what I expect. When is this Drawable not up-to-date or not
> valid? Am I missing some emulator state I should be testing?
>

You are now the wallpaper.  You are supposed to be drawing the wallpaper;
whatever Drawable is returned by WallpaperService is out of date because
there is no longer a static wallpaper, *you* are the wallpaper.

The implementation of a wallpaper service simply should not be retrieving
the wallpaper drawable.


>
> >The current launcher can set the desired
> >wallpaper width to whatever it wants.
> I'm unclear about the launcher: Does it only handle the "application
> drawer", the wallpaper and icons on the home screen(s), or both? Can
> I, as an application programmer, replace the launcher with my own, or
> is this something phone vendors do? Phrased another way, normally who
> owns the placement and scrolling of shortcuts, widgets, and folders
> across the device screen--Android, the phone distributor, or someone
> else?
>

Launcher is just an app.  It is what is launched when you press home.  And
yes, you can find numerous apps on Market that implement different kinds of
launchers that people can use insteadl of the build-in one.


> >> (c) upon exit from preview mode, some way to set which home screen (of
> >> icons and widgets) will show next.
>  >No that is up to the application sitting on top of the home screen, and
> can
> >change as you move between such apps.
> I find no way in the emulators to invoke "Living wallpapers" and
> therefore get into my preview mode except from a home screen.
> Therefore exit from my app's preview mode always returns to a home
> screen. Maybe I'm missing something.
>

I can do it with an ADB shell command.  Someone else can invoke it.  Maybe
in the future the setting for the wallpaper will be in the settings app.

Just don't assume that you know such subtle details of UI flow like this.
 These kinds of things change.

-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to