Android service for Statistics touch counter on softkeyboard

  android, android-accessibility, service

I need these statistics for my users (this is a private app for company internal use):

  1. how many times user open an app
  2. tap’s counter on softkeyboard when user uses it for example to write a message, a mail and more

I have found:
AccessibilityService to check when user open an app

<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
to draw a view on top to try to check the touch but I am not sure.

Are there any other methods, services to fetch / store this information?

Source: Android Questions