Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Apache License 

import android.app.Activity;

import android.os.Bundle;

public class Main {
    /**
     * Used to get the parameter values passed into Activity via a Bundle.
     *
     * @return param Parameter value
     */
    public static String getExtraString(Activity context, String key) {
        String param = "";
        Bundle bundle = context.getIntent().getExtras();
        if (bundle != null) {
            param = bundle.getString(key);
        }
        return param;
    }
}