Java tutorial
//package com.java2s; //License from project: Apache License import android.content.Context; import android.content.Intent; import android.support.annotation.NonNull; public class Main { private static final String PERM_COMMON_BROADCAST = ".permission.COMMON_BROADCAST"; /** * Send a broadcast to internal receivers. */ public static void sendToInternal(@NonNull Context cxt, @NonNull Intent intent) { String perm = cxt.getPackageName() + PERM_COMMON_BROADCAST; intent.setPackage(cxt.getPackageName()); // only works on Android 4.0 and higher versions cxt.sendBroadcast(intent, perm); } }