Java tutorial
//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 what, Map<String, String> params) { Intent intent = new Intent(what); if (params != null) { Set<String> keys = params.keySet(); for (String string : keys) { intent.putExtra(string, params.get(string)); } } context.sendBroadcast(intent); } }