Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Open Source License 

import android.content.Context;
import android.content.Intent;

public class Main {
    /**
     * Notifies UI to display a message.
     * 
     * This method is defined in the common helper because it's used both by the
     * UI and the background service.
     * 
     * @param context
     *            application's context.
     * @param message
     *            message to be displayed.
     */
    static public void displayMessage(Context context, String message) {
        Intent intent = new Intent("at.sprinternet.odm.DISPLAY_MESSAGE");
        intent.putExtra("message", message);
        context.sendBroadcast(intent);
    }
}