On Friday 04 June 2010 17:44:19 ubuntu_user wrote:
> I am looking for a method to get the current screen lock status. I
> would like to know if it is locked or not. I have a live wall paper
> that only need to work if the screen is unlock (i.e. full display is
> on), otherwise, it should be just blank.

You should just reimplement 
WallpaperService::Engine::onVisibilityChanged(bool) inside your live 
wallpaper's engine - this will tell you when wallpaper gets shown/hidden.

It's better to use this method, because you don't need to do anything not only 
if screen is locked, but e.g. when some other app starts and wallpaper isn't 
visible.

onVisibilityChanged is exactly what you need  in this case :)

See 
http://developer.android.com/reference/android/service/wallpaper/WallpaperService.Engine.html#onVisibilityChanged(boolean)

Cheers,
Dmitry.

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