How does Lastpass autocomplete work in Android?

Apparently, starting with Android 4.3, Lastpass is able to automatically fill in password fields in browsers and other applications. How do they do it? I am curious because I want to implement a tool that detects images that are currently on the screen. If Lastpass is capable of detecting password fields, this might be possible for my requirement. However, I'm a complete newbie when it comes to Android.

+2
source share
1 answer

LastPass seems to be using an "accessibility service"

Special services can take action on behalf of users to more easily and productively interact with applications. 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 actions on behalf of users or watch ClockBackService or TaskBackService application examples. LastPass most likely uses something like AccessibilityNodeInfo.ACTION_PASTE to autocomplete editText screen fields.

+1
source

Source: https://habr.com/ru/post/1013578/


All Articles