1

Is there any way to keep track of total keystroke in device while my application running in background? I tried to find any working solution but there is no luck.

Update : Background means my application is not showing to user. Now it may be running through a service or using a broadcast receiver or any other method but its not visible to user. It just have to detect keystroke without showing to user.

Vipul Purohit
  • 9,807
  • 6
  • 53
  • 76
  • Thin you need to expand on 'application is running in background' - is it a normal activity that is paused, or a service - if so listening to what? 'In Background' doesn't have the same clear cut meaning it has on a PC. – Elemental Jul 05 '12 at 09:48
  • I updated my question. Please check it. – Vipul Purohit Jul 05 '12 at 10:05

1 Answers1

2

Fortunately, no, for obvious privacy and security reasons.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
  • I also agree with you but in that case how this application works then? Its doing exactly the same thing which I want. https://play.google.com/store/apps/details?id=fi.rojekti.typemachine&hl=en – Bhavesh Patadiya Feb 26 '16 at 12:01
  • "Its doing exactly the same thing" -- not really. It uses accessibility services, which did not exist at the time my answer was written. Many users do not install these apps, for privacy and security reasons. Those that do have to additionally go into Settings and enable the accessibility service, where they are warned again about the security risks. Quoting the Play Store listing: "Collection must be enabled from the device settings: instructions will be provided. Other accessibility services enabled on your device may interfere with functionality." – CommonsWare Feb 26 '16 at 12:16