서비스를 포함하는 기본 앱과 해당 서비스를 사용하려는 두 번째 앱이 있습니다. 내가 바인딩하려고 두 번째 응용 프로그램에서Android의 다른 앱에서 내 보낸 서비스 사용하기
<service
android:name="com.example.foo.XMPPService"
android:exported="true"
android:process="xmppService" />
:
주요 응용 프로그램은 매니페스트 (안 활동 내부)이있다
Intent intent = new Intent();
intent.setClassName("com.example.foo", "com.example.foo.XMPPService");
bindService(intent, mConnection, Context.BIND_AUTO_CREATE);
을하지만 난 오류가 발생합니다 :
Unable to start activity ComponentInfo{com.example.app2/com.example.app2.MainActivity}: java.lang.SecurityException: Not allowed to bind to service Intent { cmp=com.example.foo/.XMPPService }
그래서 "내 보낸"을 true로 설정하는 동안 이것이 허용되지 않는 이유가 궁금합니다.
아, 그 텍스트를 잘못된 방식으로 해석합니다. 'android : process = "XMPPService"'를 시도하고 제거했지만 여전히 같은 문제가 있습니다. 그것을 올바르게하는 방법에 대한 제안? – vliedel