2
我想通过putExtra从活动更新值到服务,但值始终是旧值。使用putExtra更新bindservice中的值
活动:
ArrayList<String> listTODO = LoadSelections();
Intent i = new Intent();
i.putStringArrayListExtra("liste", listTODO);
i.setClassName("de.home.ku1fg", "de.home.ku1fg.RemoteService");
bindService(i, mConnection, BIND_AUTO_CREATE);
Remoteservice:
public IBinder onBind(Intent intent) {
listTODO = intent.getStringArrayListExtra("liste");
return myRemoteServiceStub;
}
现在,当我 “清单当然” 活动中的更新,就根据服务没有变化。 有什么想法?