package com.weikou.beibeivideo.util;
|
|
import android.content.Context;
|
import android.os.Bundle;
|
import android.util.Log;
|
|
import org.json.JSONObject;
|
|
import java.util.Iterator;
|
|
/**
|
* Created by weikou2015 on 2016/9/8.
|
*/
|
public class UtilBundle {
|
|
public static Bundle pushBundle(Bundle bundle) {
|
Bundle bundle1 = new Bundle();
|
try {
|
JSONObject object = new JSONObject(bundle.getBundle("Bundle").getString("customContent"));
|
Iterator<String> str = object.keys();
|
while (str.hasNext()) {
|
String key = str.next();
|
bundle1.putString(key, object.optString(key));
|
}
|
return bundle1;
|
} catch (Exception e) {
|
e.printStackTrace();
|
}
|
return bundle;
|
}
|
|
}
|