Apparently since Android 4.3, Lastpass is able to autofill in password fields in browsers and other apps. How are they doing this? I am curious because I want to implement a tool that detects images that are currently on the screen. If Lastpass is able to detect password fields, then it might be possible for my requirement. However, I am a complete novice when it comes to Android.
Asked
Active
Viewed 479 times
1 Answers
1
LastPass appears to be using an "Accessibility Service"
Accessibility services can take action on behalf of users to make interacting with applications simpler and more productive. The ability of accessibility services to perform actions was added in Android 4.0 (API Level 14) and significantly expanded with Android 4.1 (API Level 16).
https://developer.android.com/guide/topics/ui/accessibility/services.html#act-for-users
You can follow the documentation for acting on behalf of users or look at the ClockBackService or TaskBackService sample apps. LastPass is most likely using something like AccessibilityNodeInfo.ACTION_PASTE
to autofill onscreen editText fields.

gMale
- 17,147
- 17
- 91
- 116