Parcel words of Bundle, realize the conversion of byte[] and Bundle data

1. Ideas

1. Create the BundleMessage class to implement Parcelable

2. Implement CREATOR and describeContents(), writeToParcel() two interface methods

3. A method for data conversion between marshall() and unmarshall()

4. Define internal private variables Bundle and flags

5. Complete the get and put methods

6. Test

2. Concrete realization

package com.common.smartthank.util;

import android.os.Bundle;
import android.os.Parcel;
import android.os

Guess you like

Origin blog.csdn.net/yizhesong/article/details/111503727