我有一个userObject类(使其可以跟随实现),我在我的服务中编写了以下代码。只是想知道,有没有其他有效/简单的方法,然后Android Parcelable我不需要让我的类Parcelable?
public final static String PAR_KEY = "par_key";
userObject currentUser = new userObject(uid,uname,role,status,avatarUrl,profileUrl);
Intent Connect = new Intent("onChatConnect");//add action
Bundle mBundle = new Bundle();
mBundle.putParcelable(PAR_KEY, currentUser);
Connect.putExtras(mBundle);
LocalBroadcastManager.getInstance(getApplicationContext()).sendBroadcast(Connect);