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 <[email protected]> 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 [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
Romain Guy
Android framework engineer
[email protected]

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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to