Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import android.content.BroadcastReceiver;
import android.content.Context;

import android.support.annotation.NonNull;
import android.support.v4.content.LocalBroadcastManager;

public class Main {
    /**
     * Unregister the {@link BroadcastReceiver} with the {@link LocalBroadcastManager}.
     *
     * @param context  used to get the instance of the {@link LocalBroadcastManager}.
     * @param receiver to register with the {@link LocalBroadcastManager}.
     */
    public static void unregisterReceiver(@NonNull Context context, @NonNull BroadcastReceiver receiver) {
        LocalBroadcastManager.getInstance(context).unregisterReceiver(receiver);
    }
}