send Local Broadcast - Android Intent

Android examples for Intent:Broadcast

Description

send Local Broadcast

Demo Code


//package com.java2s;

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

import android.support.v4.content.LocalBroadcastManager;

public class Main {
    public static void sendLocalBroadcast(Context context, Intent intent) {
        if (context == null) {
            return;
        }/*from   www  .j  av  a  2s  . c  o m*/

        LocalBroadcastManager manager = LocalBroadcastManager
                .getInstance(context);
        manager.sendBroadcast(intent);
    }
}

Related Tutorials