これが私のAIDLPlayerHandleService.aidlです。
interface PlayerHandleService {
void changeTextView();
}
私のアクティビティのoncreate():Player_Activity:
@Override
protected void onCreate(Bundle savedInstanceState) {
this.bindService(new Intent(this,PlayerService.class), mConnection, Context.BIND_AUTO_CREATE);
}
mConnection:
private ServiceConnection mConnection = new ServiceConnection() {
@Override
public void onServiceDisconnected(ComponentName name) {
// TODO Auto-generated method stub
mpInterface=null;
}
@Override
public void onServiceConnected(ComponentName name, IBinder service) {
// TODO Auto-generated method stub
mpInterface = PlayerHandleService.Stub.asInterface(service);
}
};
さて、私のアクティビティ(Player_Activity)にTextViewがあり、AIDLでメソッドchangeTextView()を使用してそのTextViewのコンテンツを変更したいのですが、どうすればよいですか?