Reputation: 1
I want to play sound in android whenever user touches the screen irrespective of which app they are in. Like making it the UI touch sound. so that my app keeps running in the background and playing sound whenever user interacts with screen. where do i the code? what to write? pls help. This is for android. And i'm using eclipse.
Upvotes: 0
Views: 1563
Reputation: 82553
This is not possible.
Android does not allow you to intercept touch events on the screen when outside your own app as this would allow malicious apps to take over all other apps and render the phone useless.
Furthermore, it would very quickly get annoying for the users, particularly if they're playing a game or something that requires a lot of touch events taking place.
Upvotes: 1
Reputation: 17115
I'm afraid it's impossible. You can intercept touch events only in your Activity. Similar questions had been already asked https://groups.google.com/forum/?fromgroups=#!topic/android-beginners/H45Xwm43NGQ
Upvotes: 0