При связывании MediaPlaybackService в Android 4.0.3 выдает исключение следующим образом:
03-09 09: 51: 08.399: ERROR / AndroidRuntime (664): java.lang.RuntimeException: невозможно запустить действиеComponentInfo {com.sudarmuthu.android.adjustvolume / com.sudarmuthu.android.adjustvolume.AdjustVolume}: java.lang.SecurityException: запрещена привязка к службе Intent {cmp = com.android.music / .MediaPlaybackService} 03-09 09: 51: 08.399: ОШИБКА / AndroidRuntime (664): в android.app.ActivityThread.performLaunchActivity (ActivityThread.java:1956) 03-09 09: 51: 08.399: ОШИБКА / AndroidRuntime (664): в android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:1981) 03-09 09: 51: 08.399: ОШИБКА / AndroidRuntime (664): в android.app.ActivityThread.access $ 600 (ActivityThread.java:123) 03-09 09: 51: 08.399: ОШИБКА/ AndroidRuntime (664): в android.app.ActivityThread $ H.handleMessage (ActivityThread.java:1147) 03-09 09: 51: 08.399: ОШИБКА / AndroidRuntime (664): в android.os.Handler.dispatchMessage (Обработчик.явa: 99) 03-09 09: 51: 08.399: ОШИБКА / AndroidRuntime (664): на android.os.Looper.loop (Looper.java:137) 03-09 09: 51: 08.399: ОШИБКА / AndroidRuntime (664): at android.app.ActivityThread.main (ActivityThread.java:4424) 03-09 09: 51: 08.399: ОШИБКА / AndroidRuntime (664): at java.lang.reflect.Method.invokeNative (собственный метод) 03-09 09: 51: 08.399: ОШИБКА / AndroidRuntime (664): на java.lang.reflect.Method.invoke (Method.java:511) 03-09 09: 51: 08.399: ОШИБКА / AndroidRuntime (664): на com.android.internal.os.ZygoteInit $ MethodAndArgsCaller.run (ZygoteInit.java:784) 03-09 09: 51: 08.399: ОШИБКА / AndroidRuntime (664): в com.android.internal.os.ZygoteInit.main (ZygoteInit.java:551) 03-09 09: 51: 08.399: ОШИБКА / AndroidRuntime (664): at dalvik.system.NativeStart.main (собственный метод) 03-09 09: 51: 08.399: ОШИБКА / AndroidRuntime (664): вызвано: java.lang.SecurityException: не разрешено привязывать к службе. Intent {cmp = com.android.music / .MediaPlaybackService} 03-09 09: 51: 08.399: ОШИБКА / AndroidRuntime (664): в android.app.ContextImpl.bindService (ContextImpl.java:1135) 03-09 09: 51: 08.399: ОШИБКА / AndroidRuntime (664): в android.content.ContextWrapper.bindService (ContextWrapper.java:370) 03-09 09: 51: 08.399: ОШИБКА /AndroidRuntime (664): в com.sudarmuthu.android.adjustvolume.AdjustVolume.onStart (AdjustVolume.java:153) 03-09 09: 51: 08.399: ОШИБКА / AndroidRuntime (664): в android.app.Instrumentation.callActivityOnStart (Инструментарий.java: 1133) 03-09 09: 51: 08.399: ОШИБКА / AndroidRuntime (664): на android.app.Activity.performStart (Activity.java:4475) 03-09 09: 51: 08.399: ОШИБКА / AndroidRuntime (664): на android.app.ActivityThread.performLaunchActivity (ActivityThread.java:1929)
Это приложение работает нормально в версиях Android 2.1.
Любая справка !!