talkback

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

How to make TalkBack read TextView error message automatically?

情到浓时终转凉″ 提交于 2019-12-06 04:32:48
问题 I'm currently making my app accessible and I'm having problem with my EditTexts: In every EditText, the user's input is being validated at some point (e.g. after pressing a button) and if the input is invalid, I show an error using editText.setError("message") . The problem is that if TalkBack is on, it will not automatically focus and read the error. Also, since I can't get the error's view, I can't ask TalkBack to focus it via sendAccessibilityEvent . I would appreciate any ideas on how to

Android - Override TalkBack gestures

折月煮酒 提交于 2019-12-05 22:16:44
I want to use TalkBack within my app, but still want some activities to behave differently. For example, when entering a specific activity I want to select a button (trigger a button click) when lifting finger up from that button. TalkBack enables only double-click to select a button. How can I "override" TalkBack gestures? Thanks! You can perform a click action on HOVER_EXIT, but you'll need to do some work to prevent TalkBack from expecting the normal double-click action. The phone dialer's DialPadImageButton provides a good example of this behavior. Here are some relevant portions of code

Is there any callback or anything (any parameter in event or nodeInfo) to know accessibility service (TalkBack) has finished reading?

懵懂的女人 提交于 2019-12-04 18:22:10
I have an application requirement to announce text in a list view. The list view item gets added at run time. I have to announce them one by one. I searched on google and in android docs, but I could not reach there. Please help me, how to know accessibility services finished reading the text? Thanks :) Simple answer... don't do it this way! This is silliness. Just use the accessibility features available to you and let TalkBack (or other potential screen reader) manage it for you. Just use this utility function. public static void announceForAccessibility(Context context, String message) {

Android accessibility talkback to say fragment's title

旧巷老猫 提交于 2019-12-04 11:51:58
问题 Is there a way to get the talkback function in Android accessibility to say something after a fragment transaction? I basically want the talkback to say the name/title of the fragment after switching. These titles are set as the titles of the action bar, can they be accessed there? A user can move their finger on top of the text in the action bar to know what screen they are on, but the user won't know that unless they were familiar with the app already. 回答1: You can force a WINDOW_STATE

How to make TalkBack read TextView error message automatically?

纵然是瞬间 提交于 2019-12-04 09:14:33
I'm currently making my app accessible and I'm having problem with my EditTexts: In every EditText, the user's input is being validated at some point (e.g. after pressing a button) and if the input is invalid, I show an error using editText.setError("message") . The problem is that if TalkBack is on, it will not automatically focus and read the error. Also, since I can't get the error's view, I can't ask TalkBack to focus it via sendAccessibilityEvent . I would appreciate any ideas on how to solve this issue while still using editText.setError() . Edit 1 Added code for @Abhishek V solution:

Android - Preventing TalkBack to read the application Name and current Orientation

夙愿已清 提交于 2019-12-04 05:27:10
Problem is I am using TTS to read a long string message when my activity is launched, but TalkBack automatically reads the application name in the middle of it and cuts the long string and is very annoying. I would like to disable the TalkBack read the Application name every time an activity is launched. Removing its android:label attribute is not a viable solution as the application is controlled by someone else and I have no control over it. So, Is there any API that I could call to prevent the TalkBack feature from reading the application name when an application is launched? Any Help would

How to create accessible focus groups in ConstraintLayout?

本小妞迷上赌 提交于 2019-12-03 09:53:58
Imagine you have a LinearLayout inside a RelativeLayout that contains 3 TextViews with artist, song and album : <RelativeLayout ... <LinearLayout android:id="@id/text_view_container" android:layout_width="warp_content" android:layout_height="wrap_content" android:orientation="vertical"> <TextView android:id="@id/artist" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Artist"/> <TextView android:id="@id/song" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Song"/> <TextView android:id="@id/album" android:layout_width=

Disable talkback with code

。_饼干妹妹 提交于 2019-12-02 23:47:11
问题 I built an application for blind people. It runs with text to speech. When I open talkback, my app does not run, lockes on logo screen. What I looking for is when my app runs talkback would stop. 回答1: It's not possible to turn TalkBack on or off from within your app unless you have been granted the system permission WRITE_SECURE_SETTINGS (via ADB) by the user. private static final String TALKBACK_SERVICE_NAME = "com.google.android.marvin.talkback/.TalkBackService"; private void

Accessibility - Android Talkback doesn't fire focus event on HTML content

戏子无情 提交于 2019-12-02 13:48:31
问题 I'm trying to execute/receive a onfocus HTML event using Talkback on an Android Device (Moto G Android 4.4.3) on an HTML page while selecting an input field. I created on single input text with an onfocus event : this event never get called when using "touch explorer" with talkback. When I select/hover it with Talkback there is a little outline over my field it but it's not the HTML :focus state : <input type="text" id="myInput" onfocus="focusFunction()" onblur="blurFunction()"> See this