MindlessBarber
MindlessBarber

Reputation: 1596

TYPE_SYSTEM_OVERLAY detect touches in ICS

I've been using FLAG_WATCH_OUTSIDE_TOUCH to get touches from a system overlay in honeycomb, but this no longer works in ICS. I need the application underneath to receive touches too so TYPE_SYSTEM_ALERT didnt work. The application isnt going to be put on the play store so its ok if it needs root or to be put in the system directory to work. Any ideas?

Thanks, ng93

Upvotes: 1

Views: 2230

Answers (1)

Tom
Tom

Reputation: 7091

It seems this is just the case, as this post highlights. This is generally a bad idea, see the documentation:

These windows must not take input focus, or they will interfere with the keyguard.

I haven't actually tested those overlays on Android 4.0 ICS but other apps like SwipePad seem to do this just fine. The only concern I am aware of is related to performance, such overlays often take a hefty toll on the device. If you want to accurately detect touch input and the overlay does not have to be above the lock screen, try TYPE_SYSTEM_ALERT. Another post on SO seems to have chosen that type as well.

Upvotes: 1

Related Questions