accessibilityservice

Accessibility Dialog/DialogFragment reads text instead of content description

人盡茶涼 提交于 2019-12-11 01:57:14
问题 I have a dialog, that has few textviews. For each textview I have set different content description and text. For eg. <TextView android:id="@+id/tv_3" android:layout_width="wrap_content" android:layout_height="wrap_content" android:contentDescription="TV 3" android:text="Text Number 3" /> When I show the dialog to the user, Talkback reads the text (ie. Text Number 3) of each textview and not the content description (ie. TV 3). However if I hover on any textview, Talkback reads the content

AccessibilityService - performGlobalAction not working in own app

a 夏天 提交于 2019-12-11 01:36:35
问题 I'm trying to send a system back press event via the AccessibilityService and this works fine, but only if I'm not in my own app. I'm always getting true from performGlobalAction no matter if I'm in my own app or not, but I only see that the event really is executed if I'm not in my own app but in any other one (in the sense of that the previous activity is shown or similar) Any ideas why this happens? My app is a sidebar app with an overlay drawn on top in the WindowManager and everything is

Android accessibilityservice whan screen off

独自空忆成欢 提交于 2019-12-10 16:34:37
问题 I have a problem with accessibility service in android. I want to retrive result of USSD command. What I try to do: I made an AccessibilityService from gist.github.com/qihnus/1909616 Deal USSD: Intent i = new Intent(Intent.ACTION_CALL); i.setData(Uri.parse("tel:*110*10" + Uri.encode("#"))); i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); i.addFlags(Intent.FLAG_FROM_BACKGROUND); startActivity(i); Popup window with USSD result opens In AccessibilityService onAccessibilityEvent fired, and I get USSD

Detect if notification has been deleted

给你一囗甜甜゛ 提交于 2019-12-09 19:02:47
问题 I have the following problem. I want to detect when a notification has been removed from the notification bar. I can scan notifications with an AccessbilityService and casting its ParcelableData to a notification Notification notif = (Notification) event.getParcelableData(); One thought of mine was, utilizing if the PendingIntent of the notification has been clicked, but I can't find anything on how to detect that. Any ideas? I am kind of desperate... trying it for hours now. 回答1: A very

how to get webview from AccessibilityNodeInfo

陌路散爱 提交于 2019-12-07 23:18:49
问题 I am creating an application in which i need to use AccessibilityService. And there is no problem to get get the window content of other applications. I have detected all available child from the window content and the child are showing in AccessibilityNodeInfo. Now I have a webview in AccessibilityNodeInfo And i need to get the URL of that WebView but there is no way to convert the AccessibilityNodeInfo into the relevant View. Is there any way to get the webview from AccessibilityNodeInfo ?

How to send a custom event to AccessibilityService?

最后都变了- 提交于 2019-12-06 15:31:57
My program purpose: trigger the BACK button in a service I tried many ways, no one can achieve this purpose, finally I discovered AccessibilityService, it may be the most possible ways to implement this function. I created this AccessibilityService, and tested it is work package com.accessibilityservice; public class MyAccessibilityService extends AccessibilityService { public MyAccessibilityService() { } @Override public void onAccessibilityEvent(AccessibilityEvent event) { performGlobalAction(AccessibilityService.GLOBAL_ACTION_BACK); } @Override public void onInterrupt() { } } <?xml version=

How to perform Other app list item click using accessibility service like Voice Access app?

岁酱吖の 提交于 2019-12-06 14:54:45
问题 I am developing an application like VoiceAccess app. Using accessibility service I am able to perform all clicks which are on top activity(3rd party applications). But I am facing issue with ListItem clicks. I am trying this code for FaceBook app. below is my code. Can any one help me on this. public class MyService extends AccessibilityService { /**/ private SharedPreferences S_PREF; private SharedPreferences.Editor editor; private static final String TAG = MyService.class .getSimpleName();

android Accessibility-service suddenly stopped triggering events

会有一股神秘感。 提交于 2019-12-06 11:27:53
I have an AccessibilityService which was working fine but for some reason during development it stopped working. I can't seem to find that reason. Please have a look at my code and tell why it isn't working. public class MyServicee extends AccessibilityService { public static final String TAG = "volumeMaster"; @TargetApi(Build.VERSION_CODES.KITKAT) @RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN) @Override public void onAccessibilityEvent(AccessibilityEvent event) { List<CharSequence> eventText; Log.v(TAG, "***** onAccessibilityEvent"); final int eventType = event.getEventType(); switch

AccessibilityNodeInfo nodeInfo = event.getSource() always returns null

拟墨画扇 提交于 2019-12-06 11:13:11
I'm trying to use AccessibilityNodeInfo but when I use event.getSource() it always returns null, I try to read the editbox of the browsers here is my codes: public class MainActivity extends Activity { static final String TAG = "RecorderService"; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); Intent i = new Intent(this, RecorderService.class); startService(i); }} accessibilityServicecode which acts as a service: public class RecorderService extends AccessibilityService { static final String TAG =

how to get webview from AccessibilityNodeInfo

好久不见. 提交于 2019-12-06 11:11:34
I am creating an application in which i need to use AccessibilityService. And there is no problem to get get the window content of other applications. I have detected all available child from the window content and the child are showing in AccessibilityNodeInfo. Now I have a webview in AccessibilityNodeInfo And i need to get the URL of that WebView but there is no way to convert the AccessibilityNodeInfo into the relevant View. Is there any way to get the webview from AccessibilityNodeInfo ? No, because the WebView is in another process, not yours. There is not a way to access all of the