Я ищу проблему, информации очень мало, большинство из них не относятся к одному и тому же типу проблем. Понятия не имею, какая часть идет не так.
Я следую инструкциям:
http://mwiki.yotaphone.com/wiki/Building_First_App.
Функция onStart() в MainActivity:
Код: Выделить всё
@Override
protected void onStart() {
super.onStart();
Intent bsIntent = new Intent(this, MyBSActivity.class);
this.startService(bsIntent);
}
Код: Выделить всё
public class MyBSActivity extends BSActivity {
@Override
protected void onBSCreate() {
super.onBSCreate();
setBSContentView(R.layout.bs_activity);
}}
Код: Выделить всё
04-24 18:27:12.659 28763-28763/com.pli.yotaphone2 E/AndroidRuntime﹕ FATAL EXCEPTION: main
Process: com.pli.yotaphone2, PID: 28763
java.lang.RuntimeException: Unable to start service com.pli.yotaphone2.MyBSActivity@42624840 with Intent { cmp=com.pli.yotaphone2/.MyBSActivity }: java.lang.SecurityException: Not allowed to bind to service Intent { act=yotaphone.intent.action.GET_SDK_BINDER }
at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:2735)
at android.app.ActivityThread.access$2100(ActivityThread.java:138)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1296)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5061)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:787)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:603)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.SecurityException: Not allowed to bind to service Intent { act=yotaphone.intent.action.GET_SDK_BINDER }
at android.app.ContextImpl.bindServiceCommon(ContextImpl.java:1596)
at android.app.ContextImpl.bindService(ContextImpl.java:1560)
at android.content.ContextWrapper.bindService(ContextWrapper.java:517)
at com.yotadevices.sdk.BSActivity.doBindService(BSActivity.java:137)
at com.yotadevices.sdk.BSActivity.onStartCommand(BSActivity.java:173)
at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:2718)
Androidmanifest.xml:
Код: Выделить всё
Код: Выделить всё
Подробнее здесь: https://stackoverflow.com/questions/298 ... -a-service
Мобильная версия