Reputation: 14449
How do I use Android TTS API's from the web page?
Upvotes: 4
Views: 5456
Reputation: 29745
You can't in the Android Browser, but you can in a WebView
packaged in your app (as fiXedd alluded to).
Look into WebView#addJavascriptInterface for details on how you can expose a shim between a WebView
and a Java class (which could expose TTS functions).
Upvotes: 5