I am developing a app using google maps api, and it is suppose to be used by people that can't see, so the acessibility is important.
How can I make a TextView that already as a text and a contentDescription to be announced as soon as the activity starts and without the user having to touch it?
The other point of my question is that I have a bus route and I want to be notified in certain points with a description, and my problem is that the talkback works properly, but if I touch the googlemap or anywhere else in there activity, the talkback stops saying the description. (This description shows up in a Toast)
What you outline in your first point about reading text off as soon as your activity stars is undesired behavior. Let TalkBack users explore your app to find this information. If you must post an announcement, what you're looking for is Accessibility Announcement events, which allow you to send an arbitrary text announcement to the Assistive Technology layer.
if (AccessibilityManager.getInstance(context).isEnabled()) {
AccessibilityEvent event = AccessibilityEvent.obtain(
AccessibilityEvent.TYPE_ANNOUNCEMENT);
onInitializeAccessibilityEvent(event);
event.getText().add("some text");
event.setContentDescription(null);
yourContentView.requestSendAccessibilityEvent(this, event);
}
What you outline in your second point is desired behavior. Imagine if a TalkBack user could not interrupt various announcements, how long they could have to wait if they accidentally focused a few paragraphs of text in a row, to hear the simple name of something like a button? That would be a very frustrating user experience.