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 java.util.Map;
import java.util.Set;
import android.content.Context;
import android.content.Intent;

public class Main {

    public static void broadcast(Context context, String action, Map<String, String> params) {
        Intent intent = new Intent(action);
        if (params != null) {
            Set<String> keys = params.keySet();
            for (String string : keys) {
                intent.putExtra(string, params.get(string));
            }
        }
        context.sendBroadcast(intent);
    }
}