I'm developed an app. Its working fine in all versions except 2.3.x versions. I've tested in samsung galaxy y phones with version 2.3.6 and 2.3.3, Its not working in it
Here is the permissions i've used in Manifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="me.radhakrishna.buddyreader"
android:versionCode="1"
android:versionName="1.0" >
<uses-permission android:name="android.permission.RECEIVE_SMS" />
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="17" />
<supports-screens android:smallScreens="true"
android:normalScreens="true"
android:largeScreens="true"/>
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name="me.radhakrishna.buddyreader.MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<receiver android:name=".TextMessageReceiver">
<intent-filter>
<action android:name="android.provider.Telephony.SMS_RECEIVED" />
</intent-filter>
</receiver>
</application>
</manifest>
How can i resolve this issue, even its working fine in the simulator in all level of APIs that i mentioned above in Manifest.xml
Error log
02-18 18:44:16.920: I/TextToSpeech.java(345): initTts() successfully bound to service
02-18 18:44:40.639: V/(345): 9866235007
02-18 18:44:40.639: I/TextToSpeech.java - speak(345): speak text of length 64
02-18 18:45:04.080: W/KeyCharacterMap(345): No keyboard for id 0
02-18 18:45:04.080: W/KeyCharacterMap(345): Using default keymap: /system/usr/keychars/qwerty.kcm.bin
02-18 18:45:05.189: E/ActivityThread(345): Activity me.radhakrishna.buddyreader.MainActivity has leaked ServiceConnection android.speech.tts.TextToSpeech$1@40520cf0 that was originally bound here
02-18 18:45:05.189: E/ActivityThread(345): android.app.ServiceConnectionLeaked: Activity me.radhakrishna.buddyreader.MainActivity has leaked ServiceConnection android.speech.tts.TextToSpeech$1@40520cf0 that was originally bound here
02-18 18:45:05.189: E/ActivityThread(345): at android.app.LoadedApk$ServiceDispatcher.<init>(LoadedApk.java:938)
02-18 18:45:05.189: E/ActivityThread(345): at android.app.LoadedApk.getServiceDispatcher(LoadedApk.java:833)
02-18 18:45:05.189: E/ActivityThread(345): at android.app.ContextImpl.bindService(ContextImpl.java:867)
02-18 18:45:05.189: E/ActivityThread(345): at android.content.ContextWrapper.bindService(ContextWrapper.java:347)
02-18 18:45:05.189: E/ActivityThread(345): at android.speech.tts.TextToSpeech.initTts(TextToSpeech.java:467)
02-18 18:45:05.189: E/ActivityThread(345): at android.speech.tts.TextToSpeech.<init>(TextToSpeech.java:433)
02-18 18:45:05.189: E/ActivityThread(345): at me.radhakrishna.buddyreader.MainActivity.onActivityResult(MainActivity.java:59)
02-18 18:45:05.189: E/ActivityThread(345): at android.app.Activity.dispatchActivityResult(Activity.java:3908)
02-18 18:45:05.189: E/ActivityThread(345): at android.app.ActivityThread.deliverResults(ActivityThread.java:2528)
02-18 18:45:05.189: E/ActivityThread(345): at android.app.ActivityThread.handleSendResult(ActivityThread.java:2574)
02-18 18:45:05.189: E/ActivityThread(345): at android.app.ActivityThread.access$2000(ActivityThread.java:117)
02-18 18:45:05.189: E/ActivityThread(345): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:961)
02-18 18:45:05.189: E/ActivityThread(345): at android.os.Handler.dispatchMessage(Handler.java:99)
02-18 18:45:05.189: E/ActivityThread(345): at android.os.Looper.loop(Looper.java:123)
02-18 18:45:05.189: E/ActivityThread(345): at android.app.ActivityThread.main(ActivityThread.java:3683)
02-18 18:45:05.189: E/ActivityThread(345): at java.lang.reflect.Method.invokeNative(Native Method)
02-18 18:45:05.189: E/ActivityThread(345): at java.lang.reflect.Method.invoke(Method.java:507)
02-18 18:45:05.189: E/ActivityThread(345): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
02-18 18:45:05.189: E/ActivityThread(345): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
02-18 18:45:05.189: E/ActivityThread(345): at dalvik.system.NativeStart.main(Native Method)
Please help me.
This lines are the cause of the problem:
02-18 18:45:05.189: E/ActivityThread(345): Activity me.radhakrishna.buddyreader.MainActivity has leaked ServiceConnection android.speech.tts.TextToSpeech$1@40520cf0 that was originally bound here
02-18 18:45:05.189: E/ActivityThread(345): android.app.ServiceConnectionLeaked: Activity me.radhakrishna.buddyreader.MainActivity has leaked ServiceConnection android.speech.tts.TextToSpeech$1@40520cf0 that was originally bound
at android.app.LoadedApk$ServiceDispatcher.<init>(LoadedApk.java:938)
check your MainActivity, this error can be caused by missuse of static-class variables.