Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import android.content.Intent;

import android.os.Bundle;

import android.util.Log;

public class Main {
    public static void printExtras(Intent i) {
        if (i == null) {
            return;
        }
        Bundle bundle = i.getExtras();
        if (bundle == null) {
            return;
        }
        Log.d("INTENT_EXTRAS", "++++ Printing extras: +++");
        for (String key : bundle.keySet()) {
            Object value = bundle.get(key);
            Log.d("INTENT_EXTRAS", String.format("%s %s (%s)", key, value.toString(), value.getClass().getName()));
        }
    }
}