0

Currently I am going to do an authentication app by using keystroke. I wonder how can I get the keystroke from the Android soft keyboard? What I want in final is the time to press a soft keyboard button.

For example,

what I press : abcd

time press : 0.3 0.4 0.6 0.8

time release : 0.5 0.7 0.2 0.6

later on, store this figure into a text file and process using Matlab.

Jin Sheng
  • 27
  • 1
  • 7
  • Does your authentication app include the text input field? – dazza5000 Feb 23 '18 at 03:08
  • yup, actually I want to get the keystroke during user input the email and password during login session and registration session. – Jin Sheng Feb 23 '18 at 03:35
  • Can you use a textwatcher and keep track between each update / change of character? You will need to account for mistakes during entry. – dazza5000 Feb 23 '18 at 03:45
  • You can use a map to keep track of the timestamp between each character and then calculate the differences once the password is submitted: https://stackoverflow.com/questions/8543449/how-to-use-the-textwatcher-class-in-android – dazza5000 Feb 23 '18 at 03:46
  • I didn't use textwatcher and map before. I will try it out and see how this can record the timestamp. By the way, thanks for your help – Jin Sheng Feb 23 '18 at 12:30
  • you got it - let me know if you need anything else? – dazza5000 Feb 23 '18 at 14:30
  • I will update here in case I need anything from you. Thanks ya! – Jin Sheng Feb 23 '18 at 14:46
  • @dazza5000 is this map function that you mentioned earlier [link](https://developer.android.com/reference/java/util/Map.html)? Can you give me some example on how to get the timestamp of each character as I only found this reference from Internet – Jin Sheng Mar 09 '18 at 02:05
  • @dazza5000 could I have the reply from you? thank you – Jin Sheng Apr 04 '18 at 15:00
  • Do you care about the keys specifically being a, b, c, and d or just the time of each key and sequence of the timing? – dazza5000 Apr 05 '18 at 01:48
  • ya, I do care for the keys at priority. If it was too complicated, I will consider to non-keys specific – Jin Sheng Apr 05 '18 at 17:38

0 Answers0