0

There are some application that disables all the touch inputs, including the touch events that occur on the navigation bar. Examples are Touch Lock or UnTouch. How one can do that?

By analyzing the second linked app seems that there is a hidden layout that capture the touch events (like an empty onClickListener).

Initially I tried to draw a transparent foreground using the SYSTEM_ALERT_WINDOW permission and by assigning an empty touch listener. However in this way I cannot draw on the navigation bar, so the user can touch the home button and the back button. Another way that I tried is to launch an Activity with transparent background and in fullscreen mode. In this way I can capture all the events. This works, but obviously this causes other activities to go in pause state.

So my question is, how can one reach the goal? Alternatively is possible to use some root/system commands? Thanks!

Selvaline
  • 188
  • 13

1 Answers1

0

Try this link. If you want to do it on just 1 view then edit out the iteration in the methods given.

Community
  • 1
  • 1
Muhammad Ali
  • 3,478
  • 5
  • 19
  • 30
  • I think I need use a service to let other activities running... In the way you posted I can't reach my goal – Selvaline Oct 29 '15 at 14:58