2

Anyone have an idea how the Amazon mp3 app is displaying the player controls inside of the keyguard? I've been playing with some of the system alert and system overlay window parameters with now luck. The system alert will display over everything except the lock screen and the system overlay will display over the lock screen but in 4.0.3 and above you can not receive the touch events.

I have also seen options like WindowManager.LayoutParams.TYPE_KEYGUARD_DIALOG but it only seems to work for an activity; anything else I use it with gives me an exception that tells me that I can not use that flag with this type of window.

What I have noticed is that the player controls either replace or cover the keyguard clock and the player controls change size depending on the type of lock (like pattern lock or swipe lock). I've also noticed that the keyguard does not display my wallpaper anymore...

Any thoughts are welcome!

atomicbaum
  • 311
  • 1
  • 3
  • 6
  • What device are you using? I suspect that its lock screen was made in such a way that it is able to tie in with amazon mp3 specifically. I have used amazon mp3 and I get no controls from it on my lockscreen. If my suspicion is correct then I think it is not going to be possible for you to insert your own controls into the lock screen unless the lockscreen was built specifically to allow it, which is beyond your control on a stock device. – FoamyGuy Jun 21 '12 at 16:32
  • @Tim: ICS supports integration of stuff onto the stock lock screen, at least on phones -- the built-in Music app supports it as well. I haven't run into how it is being done. – CommonsWare Jun 21 '12 at 16:35
  • @commonsWare Whoa, I hadn't noticed that. I'm glad to hear that they've added a legit means to integrate with it from the application level. – FoamyGuy Jun 21 '12 at 17:54
  • That makes sense. I have a nexus S with 4.0.4 - I might have to go with a dual solution to support the older phones then... I guess the next question is where would I find documentation on the lock screen API so I can integrate it in 4.0+ platforms. Google only seems to show news articles on ICS. – atomicbaum Jun 21 '12 at 18:01
  • @Tim: Yup, and since third-party apps are doing it, I assume (and hope) that there is a documented and supported approach for it. I just haven't spent the time to find it, and now that they reorganized the whole Web site, I'm almost afraid to go look... :-) – CommonsWare Jun 21 '12 at 19:32

0 Answers0