Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
/** 
 ** Copyright (C) SAS Institute, All rights reserved.
 ** General Public License: http://www.opensource.org/licenses/gpl-license.php
 **/

import android.os.Bundle;

import android.os.Parcelable;

public class Main {
    /** key used to extract generic String message from Bundle. */
    public static final String BUNDLE_MESSAGE = "message";

    /**
     * Create a Parcelable Bundle containing a String message for transport to the test package engine.
     * The String message is stored via Bundle.putString using {@link #BUNDLE_MESSAGE} as the key for the item. 
     * @param message to send across processes.
     * @return Parcelable Bundle
     * @see Bundle#putString(String, String)
     * @see Bundle#getString(String) 
     */
    public static Parcelable setParcelableMessage(String message) {
        Bundle bundle = new Bundle();
        bundle.putString(BUNDLE_MESSAGE, message);
        bundle.setClassLoader(Bundle.class.getClassLoader());
        return bundle;
    }
}