我要把一个对象从 activity 传递到 server 中。
Waveform waveform = new Waveform();
Intent intent = new Intent(this, StimulationService.class);
Bundle bundle = new Bundle();
bundle.putParcelable("test", (Parcelable) waveform);
intent.putExtras(bundle);
startService(intent);
Server 里的 onStart() 函数中的代码:
Bundle bundle = this.getIntent().getExtras();
if(bundle!=null)
mWaveform = bundle.getParcelable(waveform);
却获取 getParcelable() 中"getIntent" 和 "waveform" 的错误。怎么解决这个问题?