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;
import android.os.Bundle;

public class Main {
    private static void sendActionCommand(Context ctx, String action) {
        sendActionCommand(ctx, action, null);
    }

    private static void sendActionCommand(Context ctx, String action, Bundle extras) {
        Intent intent = new Intent();
        intent.setAction(action);
        if (extras != null) {
            intent.putExtras(extras);
        }
        ctx.sendBroadcast(intent);
    }
}