How Do I Unsubscribe from Broadcastreceiver Android?
Contents

How do I unregister a receiver on my Android?

Use unregisterReceiver(BroadcastReceiver receiver) in your onPause() to unregister the Broadcast receiver. For a Service: Remove the receiver tag from the manifest file. You can then register your Broadcast receiver with the same method in the onCreate() and unregister in the onDestroy() .

What is BroadcastReceiver Android?

Definition. A broadcast receiver (receiver) is an Android component which allows you to register for system or application events. All registered receivers for an event are notified by the Android runtime once this event happens.

Robert Thorne

Robert Thorne

Automotive & Future Transportation Editor

Robert Thorne covers electric vehicle innovations, autonomous driving systems, global mobility trends, and automotive engineering developments.

Share this article
Twitter Facebook Pinterest