user2051037
user2051037

Reputation: 1

Play touch sound whenever the user interacts with screen

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

Answers (2)

Raghav Sood
Raghav Sood

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

Yaroslav Mytkalyk
Yaroslav Mytkalyk

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

Related Questions