Slide 26
Slide 26 text
Practical IPC
Service Λݺͼग़͢ଆͷ࣮2
public class MyActivity extends Activity {
private final ServiceConnection mConnection = // ……
private SampleAidl mService;
public void onClickStartConnection(View view) {
Intent intent = new Intent(“com.sample.SampleAidl.ACTION_CONNECT”);
bindService(intent, mConnection, BIND_AUTO_CREATE);
}
@Override
protected void onDestroy() {
unbindService(mConnection);
super.onDestroy();
}
}
26