Android examples for android.os:Bundle
Format value in Bundle to String
import android.os.Bundle; public class Main { public static String toString(Bundle b) { if (b == null) { return ""; }/*from w ww . ja v a2 s .c o m*/ StringBuffer buff = new StringBuffer(); for (String key : b.keySet()) { final Object value = b.get(key); final String s = String.format("%s %s (%s)\n", key, value.toString(), value.getClass().getName()); buff.append(s); } return buff.toString(); } }