I want to detect whether the user is using the default keyboard or a custom keyboard. I've found this code on how to get the default keyboard, and the list of keyboards: Know default keyboard on android.
The problem is, there's no good way to detect if the keyboard chosen was the system default or not.
We're doing this as a security to prevent key logging. Is there any better approach to detect and prevent key logging?
It seems there's no direct way in doing this. The easiest one (not that easy actually) is by collecting all of the list of default keyboard in each model/brand of phones, and validate within it. This was also the solution of one of the private security SDK that I've known.
The other solution (thanks to @Garren Fitzenreiter) is by creating a custom keyboard in the app and use that instead.
And lastly, the easiest one (this is really easy, because this is not an actual solution haha) is just by putting it inside your app's terms and conditions indicating that the user should avoid any custom keyboards.