0
私は、異なるプロセスで実行され、起動時に起動するサービスが必要です。サービスの使い方
また、私のアプリケーションは
また、私は他のappliactionが私のサービスを利用できるようにする必要はありません、それと通信する必要があります。
はありますか?
private ServiceConnection mConnection = new ServiceConnection() {
public void onServiceConnected(ComponentName className, IBinder binder) {
service = ((BoxService.MyBinder) binder).getService();
Toast.makeText(mainActivity.this, "Connected", Toast.LENGTH_SHORT)
.show();
}
public void onServiceDisconnected(ComponentName className) {
service = null;
}
};
void doBindService() {
bindService(new Intent(this, BoxService.class), mConnection,
Context.BIND_AUTO_CREATE);
}
私は私のプロセスでサービスを使用するとき、これはうまく動作しますが、私は切り抜いたプロセスでそれを使用したいとき、私は結合でエラーを取得し、
私は何ができますか?