Questions tagged [accessibilityservice]
An Android service which runs in the background and receives callbacks by the system when accessibility events are fired.
516
questions
0
votes
0
answers
18
views
(Android) How to detect the press of the virtual back button, home button and overview button
I wondered how to detect the press of Android's virtual back button, home button, and overview button. For "virtual", I mean the 3-button navigation on Android, which can be illustrated by ...
0
votes
1
answer
26
views
How Enable/Disable Accessibility Service When Lock/Unlock Screen in Android
I created an accessibility service and made a window (using WindowManager) in fun onServiceConnected(),
So i want to show a widget when the screen is locked and hide it when the screen is unlocked
I ...
0
votes
0
answers
11
views
Is there a way to calculate the distance of every scroll on the device from an Android AccessibilityService?
I'm attempting build an app with an included AccessibilityService that will track how far users have scrolled on their phone (the actual distance in pixels, inches, etc).
I was attempting to do this ...
0
votes
0
answers
14
views
Accessibility Service getRootWindow causing ANR
I am getting the following ANR from my crashlytics, but I don't fully understand what would cause this. According to this post it should not cause an ANR. I do have android:canRetrieveWindowContent=&...
0
votes
0
answers
11
views
Can i select item from spinner usimg accessbility service
Like this
I want to select an item from this spinner but i can't detect any item from it.
and i used AccessibilityNodeInfo.ACTION_SET_TEXT but it doesn't work
1
vote
1
answer
78
views
How to dispatch multi touch gestures using AccessibilityService (disptachGesture)
As we know that Android O.S. supports **multi finger gestures **. I want to develop an app that dispatches complex gesture for user. I am able to capture the motion events and dispatch gestures which ...
0
votes
1
answer
22
views
Restrict focus of talkback on notification bar in android
I have an android device in which I set the talkback turned on. Now whenever I restart/reboot the device at that time talkback directly gets focus on notification bar and starts speech out of "...
0
votes
0
answers
15
views
Question for android auto click with floatingWindow
I created a movable hover window and used its center point as the coordinate for clicking. Using AccessibilityService. DispatchGesture () to simulate click, click events are floating window, but it is ...
0
votes
0
answers
31
views
Some packages not visible even after adding <queries> tag to AndroidManifest.xml (Android 12 device)
I have implemented some code in my app in order to get a list of accessibility services installed on my device using AccessibilityManager.getInstalledAccessibilityServiceList. Since devices running ...
0
votes
0
answers
33
views
Why is android accessibility method "isVisibleToUser" not working?
I want to see whether some AccessibilityNodeInfo's are visible to a user or not. I found this suspiciously convenient method called isVisibleToUser() that should tell just that. I tried it on the ...
0
votes
0
answers
32
views
AccessibilityNodeInfo.ACTION_CLICK (or other actions) does not prevent inactivity as gestureBuilder.addStroke does
One of my application goal is to prevent another android application (not mine) from disconnecting due to inactivity and causing user to re-logon. I can use gestureBuilder.addStroke successfully to ...
0
votes
0
answers
15
views
Android Accessibility Event .getAction() always returns 0
I am trying to build an accessibility service for android and when I am trying to call this function, it always returns 0
class AccessibilityPerform extends Accessibility Service{
@Override
...
0
votes
0
answers
15
views
Android Accessibility Service event.getAction() always returns 0
I am trying to build an Accessibility Service in Android. In the onAccessibilityEvent() function I am doing this:
@Override
public void onAccessibilityEvent(AccessibilityEvent accessibilityEvent) {
...
1
vote
1
answer
77
views
Android accessibility: How to get the ID of the view that was touched?
I have been stuck on this for days. I want to identify the view that the user touches. Here is my accessibility service xml:
<?xml version="1.0" encoding="utf-8"?>
<...
0
votes
2
answers
61
views
How to use an android accessibility service to detect which view the user touched?
There's something that android TalkBack does that I want to do too. Specifically it's to identify the view that the user touched. I made this so far:
@Override
public void onAccessibilityEvent(...
1
vote
0
answers
58
views
Not able to edit the text in WhatsApp EditText using android Accessibility Service from another app
I am trying to edit the text in the edittext in whatsapp when we send a text along with an image. And then send it by clicking the send button through Android Accessibility Service. But the problem is ...
0
votes
1
answer
236
views
Android 13 - enable accessibility service for APK which installed not from Google Play
On the beta version of Android 13 user can't enable Accessibility from the Settings app. When the user try to do it there is an error:
Restricted Setting
For your security, this setting is currently ...
0
votes
0
answers
24
views
Android:Is there any way to make the click event of dispatchGesture go through a certain view
I have a fullscreen floating window that intercepts all events by default, but when I trigger a specific condition, I want to dispatch the event to the underlying window
1
vote
0
answers
67
views
Android - Request accessibility permission on Xiaomi
what is the proper way to request accessibility permission on xiaomi/miui devices programmatically?
The code snippet below on all other devices takes you to the screen with the option to enable ...
1
vote
0
answers
60
views
AccessibilityService on android studio doesn't work
I need to initialise an AccessibilityService with xml configuration, but the service doens't work.
I don't understand why.
code:
manifest:
<service android:name="....
0
votes
2
answers
103
views
AccessibilityService stops working after a while
I have a call recorder app.
As you know, for Android 10 and above, I have to use the AccessibilityService.
Everything is working just fine from the start but after a while onServiceConnected is no ...
1
vote
1
answer
170
views
Android AccessibilityService performAction() method not working
I am developing an accessibility service for Android. The service calls an app, and that app has a RecyclerView. Then I want to click on an element of the RecyclerView with performAction(...
0
votes
0
answers
35
views
Android AccessibilityService: AccessibilityNodeInfo.ACTION_SET_SELECTION not working properly with multiline fields in Browser apps
I'm working on an app with intense usage of AccessibilityService. The app works great with other Android apps, I can use text selection properly.
The problem comes with multiline fields in browsers: ...
0
votes
1
answer
91
views
Accessibility Overlay: Can't type in EditText field
I have an overlay with an EditText in it. The problem is I can't type any text in that overlay. If I use the FLAG_LOCAL_FOCUS_MODE flag, I can type into that field with my desktop keyboard when ...
0
votes
0
answers
25
views
Is there a way to customize the android accessibility service button?
I have created my own accessibility service that is overriding the accessibility button and wanted to see if there was a way to customize the button?
Thanks in advance
0
votes
1
answer
84
views
Is it possible to detect when a PIP is opened in android using accessibility service?
I could not find any information or documentation on this. Please help. Thank you.
0
votes
0
answers
34
views
AccessibilityService static instance sometimes is null and I can't understand why or how to fix it
This is my AccesibilityService class:
public class MyAS extends AccessibilityService {
public static MyAS myAS;
@Override
public void onServiceConnected() {
super....
0
votes
0
answers
28
views
How do I lock an accessibility service on mi phone
I want to lock the accessibility service of blockerx on my mi phone because I keep turning it off using ultra battery saver. Is there an adb command for that?
0
votes
0
answers
210
views
how to get instance of running accessibility service in android
I want to take a accessibility service instance and call there method in
Activity.
I tried taking
AccessibilityService as = new AccessibilityService ()
as.doSomething()
but this works for first time ...
0
votes
0
answers
196
views
Super battery saver is turning off accessibility service
I am using accessibility service in my android application and it is working flawlessly until I turn on Super Battery Saver(which is provided in Xiaomi phones).Even after turning super battery saver ...
0
votes
1
answer
181
views
UsageStatsManager is not working in android 11 with permission of PACKAGE_USAGE_STATS
my application is working perfectly for 10 and lower versions of android. I have checked the documentation they said something changed about usage stats functionality(i.e https://developer.android.com/...
0
votes
0
answers
26
views
Can I capture accessibility events in Fire OS?
I have a Java Android app that captures accessibility events by overriding the onAccessibilityEvent() method in a custom AccessibilityService class. It works well on phones and tablets. I was able to ...
1
vote
0
answers
176
views
How to keep accessibility service enabled after re-installing the app from Android Studio?
In my app I have to enable accessibility for my app each time I run the app, but I have to run the app many times and it is time consuming, enabling the service each time.
Is there a way that the ...
3
votes
0
answers
1k
views
Accessibility Service is malfunctioning
I've been using an Accessibility service for a while now on my app. It used to work fine, but there's this message on the phone at the screen where you enable the service in Settings that says This ...
0
votes
0
answers
71
views
Hide Accessibility node to user on android
I have a custom Accessibility Service on android in which I want to hide an accessibility node that I received through onAccessibilityEvent.
I tried using the method setVisibleToUser, but the object ...
1
vote
1
answer
107
views
AccessibilityService - Perform ACTION_CLICK on unclickable item
I have tried to perform ACTION_CLICK on clickable item successfully. But, It's not working with unclickable item. Here my code:
List<AccessibilityNodeInfo> nodeInfoList = rootNode....
0
votes
0
answers
29
views
Doing TTS from an Accesibility Service in Android Studio
I need to make an accessibility service that works only in one (3rd party) package and reads out loud certain content. However, it seems to be the case that to make text to speech you first have to ...
2
votes
0
answers
297
views
Android Soft Keyboard is not working properly with Accessibility Service and WindowManager
So, finally here I'm, after searching the Google and SO for this perticular problem which made me crasy from past 3 days. A lot of answers are out there but it seems that neither of them seems to ...
-1
votes
1
answer
316
views
How to do heavy processing in a background thread immediately?
I am developing an Android app which uses the accessibility service. It has some processing which needs to be executed immediately. But this process freezes the main thread and leads to the app not ...
0
votes
1
answer
54
views
Xamarin.Android AccessibilityServiceInfo does not load configs from xml
I need to retrieve the event source in accessibility service. To do that I have to add canRetrieveWindowContent="true" to the accessibilityServiceInfo xml. It works in java/android studio ...
0
votes
0
answers
31
views
Not getting the enable option for created sevice in device (android) settings
I think that we get enable option in setting because of AnroidManifest code and here it's looks correct but not getting that option
I am trying to install this service at android version 10 is it ...
0
votes
0
answers
76
views
GestureDescription multiple addStroke not working
How can I do some (more than one) strokes in gesture?
Code (Kotlin)
val gesture1 = GestureDescription.Builder().apply {
addStroke(GestureDescription.StrokeDescription(p1, 0, duration))
...
1
vote
2
answers
683
views
Declaring app as not an AccessibilityTool to comply with google play requirements
When targeting Android SDK (31), google play requires us to specify the isAccessibilityTool attribute in our app, if the app is not an accessibility tool then you have to declare that in your app, but ...
0
votes
0
answers
39
views
Using only 1 AccessibilityService reference (singleton) in other services or making each service extends AccessibilityService?
My app has multiple services. I need to use AccessibilityService in order to do some stuff. I am wondering if there is a preferable approach. By saying "preferable" I mean what's likely to ...
0
votes
0
answers
30
views
AccessibilityService Keep disabling
hey i am working with USSD response reader the code is working fine but. only issue is every time i need to enable AccessibilityService for my app. please guide me if i done any thing worng here is ...
0
votes
0
answers
107
views
How to reliably simulate click on Android TV?
I am trying to simulate click events on Android TV from an accessibility service. So far I have tried dispatchGesture and performAction. Both methods perform click but are not reliable. They fail to ...
2
votes
3
answers
603
views
Can AccessibilityService dispatch key events, including even Unicode characters?
Background
I want to try to send Unicode characters from the PC to the Android device via adb commands, as if they are being typed from a physical keyboard. Characters from various languages, for ...
0
votes
0
answers
217
views
How use XPath with Accessibility Service Android to interact with an element?
There are several articles/tutorials to use Accessibility service on Android to find elements by id/text but there is None (that I could find) which makes use if XPath.
As far as my understanding goes,...
0
votes
0
answers
40
views
Android UiAutomator testing - Giving Accessibility permission to the app
I'm building an accessibility service app and using UiAutomator to test the app. Is there a way to give the accessibility permission to the app programatically before start of testing?
2
votes
1
answer
140
views
AccessibilityService getting disable even after giving autostart permission in vivo and oppo devices
AccessibilityService getting disable automatically after some time every after granting autostart permission in vivo,oppo devices.
Manifest.xml
<service
android:name=".Service....