Tuesday, August 27, 2013

[android-developers] Re: AccessibilityEvent.TYPE_ANNOUNCEMENT a replacement for TTS?

Also, tried...

    mView.announceForAccessibility("Hello World");



On Tuesday, August 27, 2013 4:46:07 PM UTC-7, brianl wrote:
Instead of using TTS to voice an utterance I'm wondering if this will do the job...
       
        if (Build.VERSION.SDK_INT > Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
            AccessibilityEvent event = AccessibilityEvent.obtain(AccessibilityEvent.TYPE_ANNOUNCEMENT);
            AccessibilityRecord record = AccessibilityRecord.obtain();
            record.setContentDescription("Hello World");
            event.appendRecord(record);
            mView.sendAccessibilityEventUnchecked(event);
        }

Tried this on a Nexus 4.1.2 with Accessibility TalkBack enabled and 'Hello World' was NOT spoken.   



--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
---
You received this message because you are subscribed to the Google Groups "Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate