Hi,

Why should only the Home application send commands to the wallpaper? Shouldn't 
any application that displays the wallpaper as background be able to send 
commands?

Also, the documentation for WallpaperManager.sendWallpaperCommand() is a bit 
unclear. The documentation for the parameter windowToken says "he window who 
these offsets should be associated with, as returned by 
View.getWindowToken().". What offsets are referred to here? I can understand 
the same documentation in setWallpaperOfffsets() or clearWallpaperOffsets, but 
not in sendWallpapperCommand().

/Anders Ericson

-----Original Message-----
From: android-developers@googlegroups.com 
[mailto:android-develop...@googlegroups.com] On Behalf Of Romain Guy
Sent: den 1 juni 2010 11:49
To: android-developers@googlegroups.com
Subject: Re: [android-developers] sendWallpaperCommand() behavior changed in 2.2

Hi,

>From where are you sending a command? Commands are supposed to be sent
by the Home application. In which case you have views and you can get
the window token from any of these views.

On Tue, Jun 1, 2010 at 2:44 AM, String <sterling.ud...@googlemail.com> wrote:
> I'm seeing a bothersome change in behavior of the live wallpaper SDK
> in Android 2.2. Specifically, it's the windowToken parameter to
> WallpaperManager.sendWallpaperCommand(); in the docs it's described as
> "The window who these offsets should be associated with, as returned
> by View.getWindowToken()." Which sounds fine, but if the live
> wallpaper I'm trying to send a command to is the "main" one - on the
> home screen - what view should this be?
>
> In 2.1, I could send a null for this parameter, and it worked fine -
> my live wallpaper got the command. In 2.2, the null produces a crash
> by the system. Here's a logcat trace, FWIW:
>
> E/WindowManager(   85): Window Session Crash
> E/WindowManager(   85): java.lang.IllegalArgumentException: Requested
> window null does not exist
> E/WindowManager(   85):         at
> com.android.server.WindowManagerService.windowForClientLocked(WindowManagerService.java:
> 9244)
> E/WindowManager(   85):         at
> com.android.server.WindowManagerService
> $Session.sendWallpaperCommand(WindowManagerService.java:6827)
> E/WindowManager(   85):         at android.view.IWindowSession
> $Stub.onTransact(IWindowSession.java:345)
> E/WindowManager(   85):         at
> com.android.server.WindowManagerService
> $Session.onTransact(WindowManagerService.java:6694)
> E/WindowManager(   85):         at
> android.os.Binder.execTransact(Binder.java:288)
> E/WindowManager(   85):         at
> dalvik.system.NativeStart.run(Native Method)
>
> Fortunately, this crash is invisible to the user, but that's small
> consolation as the command never reaches my wallpaper.
>
> Has anyone worked out how to get a window token for the home screen?
> Or any other way around this? Or any other way to send a message to
> the currently running live wallpaper?
>
> Thanks,
>
> String
>
> --
> 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
>



-- 
Romain Guy
Android framework engineer
romain...@android.com

Note: please don't send private questions to me, as I don't have time
to provide private support.  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

-- 
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