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 android.content.BroadcastReceiver;
import android.content.Context;

public class Main {
    public static void tryUnregisterReceiver(Context context, BroadcastReceiver broadcastReceiver) {
        try {
            context.unregisterReceiver(broadcastReceiver);
        } catch (IllegalArgumentException e) {
            // TODO: Figure out why this exception is being thrown for receivers that _are_ registered
        }
    }
}