dump Intent extra data - Android Intent

Android examples for Intent:Intent Bundle

Description

dump Intent extra data

Demo Code


import android.content.Intent;

public class Main{
    @SuppressWarnings("deprecation")
    public static String dump(Intent i) {
        StringBuilder builder = new StringBuilder();
        builder.append(i.toString());//from   w  w  w  . j  a va2  s. c o  m
        if (i.getExtras() != null) {
            for (String key : i.getExtras().keySet()) {
                builder.append("[").append(key).append(" , ")
                        .append(i.getExtra(key)).append("]");
            }
        }
        return builder.toString();
    }
}

Related Tutorials