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;
}
現在,當我 「清單當然」 活動中的更新,就根據服務沒有變化。 有什麼想法?