Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import android.content.Context;
import android.content.Intent;

public class Main {
    public static final String EXTRA_MESSAGE = "message";

    /**
     * Notifies UI to display a message.
     * 
     * @param context
     *            - application's context
     * @param message
     *            - message to be displayed
     */
    static void displayMessage(Context context, String message) {
        Intent intent = new Intent();
        intent.putExtra(EXTRA_MESSAGE, message);
        context.sendBroadcast(intent);
    }
}