jwisniewski / android-developer-assistant

A tool for Android developers, testers and designers. Allows to inspect elements, layout, style, even translations directly on mobile devices.
http://appsisle.com/project/developer-assistant/
71 stars 32 forks source link

Add 'Accessibility Service' Mode #17

Open nbetcher opened 1 year ago

nbetcher commented 1 year ago

(While you're very likely already aware of this option, I think it's good to throw out there in case it sparks any further ideas...)

Ideally the app should have a mode where you can enable it as an Accessibility Service. This would solve these issues on Github.

While it is true, that yes, Google will squawk at Yet Another Accessibility Service-consuming app, and definitely reject it from publishing to the Play Store without some white lies, it is certainly possible. As a developer/power user myself, I definitely need this functionality as much of the inspection I do revolves around the System UI / Quick Access / Notification panels.

Separate Whole Play Store / Github App: One idea is to "simply" isolate the Accessibility Service module and relevant associated linked code (for the UI / backend) from the Play Store version's code, then publish the Accessibility Service-enabled version here, on Github.

Plugin App: Another would be to allow the main application to be "extended" via a plugin application APK (again, available from here, on Github). Exactly like what PCAPDroid does with its PCAPDroid MITM extension. Note: Providing in-app links/advice to users on bypassing Google's policies (such as installing an external APK that uses android.permission.BIND_ACCESSIBILITY_SERVICE) can result in warnings/bans.

White Lie (tm): The final option would be to request a Play Store justification for needing android.permission.BIND_ACCESSIBILITY_SERVICE by saying something along the lines of:

Developer Assistant allows people with disabilities to inspect the user interface for further details that will aid them in disseminating the information on the screen when it is otherwise unclear to them.

None of them are ideal, but -- in my own opinion -- they are more ideal than being plagued with bug reports for the rest of the app's existence. :-)

P.S. The trigger to start discovery could be using the volume buttons, like Tasker does. P.P.S. Bonus feature: If package is granted android.permission.WRITE_SECURE_SETTINGS, you can toggle the Accessibility Service on/off dynamically based on need in order to cut down on CPU usage when the app isn't in use and honor user's possible privacy concerns.

Intellectual777 commented 1 year ago

(While you're very likely already aware of this option, I think it's good to throw out there in case it sparks any further ideas...)

Ideally the app should have a mode where you can enable it as an Accessibility Service. This would solve these issues on Github.

While it is true, that yes, Google will squawk at Yet Another Accessibility Service-consuming app, and definitely reject it from publishing to the Play Store without some white lies, it is certainly possible. As a developer/power user myself, I definitely need this functionality as much of the inspection I do revolves around the System UI / Quick Access / Notification panels.

Separate Whole Play Store / Github App: One idea is to "simply" isolate the Accessibility Service module and relevant associated linked code (for the UI / backend) from the Play Store version's code, then publish the Accessibility Service-enabled version here, on Github.

Plugin App: Another would be to allow the main application to be "extended" via a plugin application APK (again, available from here, on Github). Exactly like what PCAPDroid does with its PCAPDroid MITM extension. Note: Providing in-app links/advice to users on bypassing Google's policies (such as installing an external APK that uses android.permission.BIND_ACCESSIBILITY_SERVICE) can result in warnings/bans.

White Lie (tm): The final option would be to request a Play Store justification for needing android.permission.BIND_ACCESSIBILITY_SERVICE by saying something along the lines of:

Developer Assistant allows people with disabilities to inspect the user interface for further details that will aid them in disseminating the information on the screen when it is otherwise unclear to them.

None of them are ideal, but -- in my own opinion -- they are more ideal than being plagued with bug reports for the rest of the app's existence. :-)

P.S. The trigger to start discovery could be using the volume buttons, like Tasker does. P.P.S. Bonus feature: If package is granted android.permission.WRITE_SECURE_SETTINGS, you can toggle the Accessibility Service on/off dynamically based on need in order to cut down on CPU usage when the app isn't in use and honor user's possible privacy concerns.

Intellectual777 commented 1 year ago

/https://github.com/jwisniewski/android-developer-assistant/issues/17#issue-1741737076 #15