From e53f7c07ffe6ef0d7d0fae2fc9d058e0f75ed950 Mon Sep 17 00:00:00 2001 From: Zhou Chang Date: Sat, 3 Nov 2012 16:23:25 +0800 Subject: [PATCH] Fixed some exception issue on some phones. Signed-off-by: Zhou Chang --- AndroidManifest.xml | 4 ++-- res/values/strings.xml | 2 +- src/teaonly/droideye/MainActivity.java | 8 ++++++-- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 2d72147..734a939 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -1,8 +1,8 @@ + android:versionCode="5" + android:versionName="1.4"> Open at local: Open at internet: Detecting internet ... - Can not be opened at internet + Setup router manually to open at internet Error: Please enable wifi diff --git a/src/teaonly/droideye/MainActivity.java b/src/teaonly/droideye/MainActivity.java index d8b4df4..d5757fe 100644 --- a/src/teaonly/droideye/MainActivity.java +++ b/src/teaonly/droideye/MainActivity.java @@ -150,6 +150,7 @@ public void onPause(){ cameraView_.StopPreview(); //cameraView_.Release(); audioLoop.ReleaseLoop(); + audioCapture.release(); //System.exit(0); finish(); @@ -181,8 +182,11 @@ private void initAudio() { minTargetSize); } - if ( audioLoop == null) - audioLoop = new StreamingLoop("teaonly.droideye"); + if ( audioLoop == null) { + Random rnd = new Random(); + String etag = Integer.toHexString( rnd.nextInt() ); + audioLoop = new StreamingLoop("teaonly.droideye" + etag ); + } }