summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
11896d2)
Signed-off-by: Mike Beattie <mike@ethernal.org>
import android.os.Message;
import android.os.Messenger;
import android.os.RemoteException;
import android.os.Message;
import android.os.Messenger;
import android.os.RemoteException;
+import android.speech.tts.TextToSpeech;
+import android.speech.tts.TextToSpeech.OnInitListener;
import android.text.method.ScrollingMovementMethod;
import android.util.Log;
//import android.view.KeyEvent;
import android.text.method.ScrollingMovementMethod;
import android.util.Log;
//import android.view.KeyEvent;
// Local Bluetooth adapter
private BluetoothAdapter mBluetoothAdapter = null;
// Local Bluetooth adapter
private BluetoothAdapter mBluetoothAdapter = null;
+ private TextToSpeech tts;
+ private boolean tts_enabled = false;
// The Handler that gets information back from the Telemetry Service
static class IncomingHandler extends Handler {
// The Handler that gets information back from the Telemetry Service
static class IncomingHandler extends Handler {
+ // Enable Text to Speech
+ tts = new TextToSpeech(this, new OnInitListener() {
+ public void onInit(int status) {
+ if (status == TextToSpeech.SUCCESS) tts_enabled = true;
+ if (tts_enabled) tts.speak("AltosDroid ready", TextToSpeech.QUEUE_ADD, null );
+ }
+ });
+
// Start Telemetry Service
startService(new Intent(AltosDroid.this, TelemetryService.class));
// Start Telemetry Service
startService(new Intent(AltosDroid.this, TelemetryService.class));
+ if (tts != null) tts.shutdown();
+
if(D) Log.e(TAG, "--- ON DESTROY ---");
}
if(D) Log.e(TAG, "--- ON DESTROY ---");
}