0

I develop a simple Android app, and I want to know how many fingers is touching the screen. It's simple with OnTouch event but this solution doesn't work if the user touch the keyboard software (for security and privacy issues)

I have tried to use a specific overlay like this : Creating a system overlay window

It work, the onTouch event is called everytime, everywhere, but the overlay block all the touch event and the app is unusable (touch button, write with the keyboard software, all interaction doesn't works) How can I receive touch events on my overlay and on my others view behind this overlay ?

Community
  • 1
  • 1
Dany Sousa
  • 229
  • 2
  • 16
  • As you say this sounds like it is not possible for security reasons. So, maybe you should explain your use case. – weston Mar 23 '16 at 16:52
  • I understand why android block touch listener on the keyboard software, for exemple block keylogger development. But i just want to know if the user touch the screen, on the keyboard or not, I don't care about position of this touch or other informations about it. My feature is : if the user stop to touch the screen during 2 second, the activity is killed, he can keep a finger everywhere on the screen for block it or write a message. I have try with TextWatch but if he use swype keyboard feature the keywatcher isn't sufficient, or if he touch emoji button for switch to choose a emoji to write – Dany Sousa Mar 23 '16 at 17:10

0 Answers0