I have seen few password manager apps in android like lastpass. I am also trying to build this kind of app.
How this apps are working?
How they get access to EditText & PasswordField of third party app?
How they detect login screen?
Is there any Android system api this apps using?
Please give me hint. How this things are working?
UPDATE
I found one useful resource on web. But it didn't say anything about which api to use!
After searching lot I got the solution. It's possible to get access of EditText & PasswordField of third party app using accessibility api we can set & get values of edittext & password field using AccessibilityNodeInfo
& AccessibilityNodeInfo.ACTION_SET_TEXT
. I done this thing by using this api. To detect which app is running on screen. You have to place this line android:packageNames="com.example"
in your accessibility.xml
file.
Where com.example
is package name of application for which you want to trigger your accessibility service.
Please read Docs related to accessibility service from android.developer site.
Sample accessibility.xml
<?xml version="1.0" encoding="utf-8"?>
<accessibility-service xmlns:android="http://schemas.android.com/apk/res/android"
android:accessibilityEventTypes="typeViewFocused|typeViewClicked"
android:packageNames="com.example"
android:accessibilityFeedbackType="feedbackAllMask"
android:notificationTimeout="100"
android:canRetrieveWindowContent="true"
android:canRequestEnhancedWebAccessibility="true"/>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With