我想将一个Object从Service传递给Activity。我应该使用Intents和具有Parcelable接口的对象吗?!如果是这样,我在Activity中有一个BroadcastReceiver吗?
//in the service class
qId = new QueueIdentifier(sensorUnits.get(sensorUnits.size()-1).getDeviceDescriptor(),
sensorUnits.get(sensorUnits.size()-1).getMasterID());
//send qId to DeviceListFragment --> DeviceListFragment is already exist
Intent intent = new Intent(this, DeviceListFragment.class);
intent.putExtra("qid",qId);