While binding the MediaPlaybackService in android 4.0.3 throws an exception as follows :
03-09 09:51:08.399: ERROR/AndroidRuntime(664): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.sudarmuthu.android.adjustvolume/com.sudarmuthu.android.adjustvolume.AdjustVolume}: java.lang.SecurityException: Not allowed to bind to service Intent { cmp=com.android.music/.MediaPlaybackService }
03-09 09:51:08.399: ERROR/AndroidRuntime(664): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1956)
03-09 09:51:08.399: ERROR/AndroidRuntime(664): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981)
03-09 09:51:08.399: ERROR/AndroidRuntime(664): at android.app.ActivityThread.access$600(ActivityThread.java:123)
03-09 09:51:08.399: ERROR/AndroidRuntime(664): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147)
03-09 09:51:08.399: ERROR/AndroidRuntime(664): at android.os.Handler.dispatchMessage(Handler.java:99)
03-09 09:51:08.399: ERROR/AndroidRuntime(664): at android.os.Looper.loop(Looper.java:137)
03-09 09:51:08.399: ERROR/AndroidRuntime(664): at android.app.ActivityThread.main(ActivityThread.java:4424)
03-09 09:51:08.399: ERROR/AndroidRuntime(664): at java.lang.reflect.Method.invokeNative(Native Method)
03-09 09:51:08.399: ERROR/AndroidRuntime(664): at java.lang.reflect.Method.invoke(Method.java:511)
03-09 09:51:08.399: ERROR/AndroidRuntime(664): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
03-09 09:51:08.399: ERROR/AndroidRuntime(664): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
03-09 09:51:08.399: ERROR/AndroidRuntime(664): at dalvik.system.NativeStart.main(Native Method)
03-09 09:51:08.399: ERROR/AndroidRuntime(664): Caused by: java.lang.SecurityException: Not allowed to bind to service Intent { cmp=com.android.music/.MediaPlaybackService }
03-09 09:51:08.399: ERROR/AndroidRuntime(664): at android.app.ContextImpl.bindService(ContextImpl.java:1135)
03-09 09:51:08.399: ERROR/AndroidRuntime(664): at android.content.ContextWrapper.bindService(ContextWrapper.java:370)
03-09 09:51:08.399: ERROR/AndroidRuntime(664): at com.sudarmuthu.android.adjustvolume.AdjustVolume.onStart(AdjustVolume.java:153)
03-09 09:51:08.399: ERROR/AndroidRuntime(664): at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1133)
03-09 09:51:08.399: ERROR/AndroidRuntime(664): at android.app.Activity.performStart(Activity.java:4475)
03-09 09:51:08.399: ERROR/AndroidRuntime(664): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1929)
This application is smoothly running in android 2.1 versions.
Any Help!!
Please refer this link http://groups.google.com/group/android-developers/browse_thread/thread/a03ea845989a49ba , I think this will help you…