java - How to check if user disable Google text to speech from Application manager -
i working on text speech, in device not work because users have disable google text speech application manager, there way can check user disable app or not before making text speech request
i solve problem, not best solution know, me work
texttospeech = new texttospeech(context.getapplicationcontext(), new texttospeech.oninitlistener() { @override public void oninit(int status) { if (status == texttospeech.success) { // speak code goes here } else { toast.maketext(context, "tts_failed error code "+status, toast.length_long).show(); if(status == -1) // { // open play store if use have not install or disable google text speach try { context.startactivity(new intent(intent.action_view, uri.parse("market://details?id=com.google.android.tts"))); } catch (android.content.activitynotfoundexception anfe) { context. startactivity(new intent(intent.action_view, uri.parse("https://play.google.com/store/apps/details?id=com.google.android.tts" ))); } } }
Comments
Post a Comment