Tag Archives: registerReceiver

Get Battery Percentage in Android – Different Methods

By | September 25, 2017

We will see the different ways to get the battery percentage in Android. Method 1 Register a Broadcast Receiver Receive like this Method 2 Method 3 Note : Make sure you unregister the receiver when you don’t need.

Local broadcast events with LocalBroadcastManager in Android

By | March 1, 2016

LocalBroadcastManager is Helper to register for and send broadcasts of Intents to local objects within your process. This is has a number of advantages over sending global broadcasts with sendBroadcast(Intent): You know that the data you are broadcasting won’t leave your app, so don’t need to worry about leaking private data. It is not possible… Read More »

Adding Notifications, Reading Notifications, Getting number of notifications in Android M.

By | February 20, 2016

This demo will show how to 1. Create and add a new Notification, 2. How many notifications are active in the current Application? 3. Delegate method for Notification Deletion. For Adding a Notification we can use the following snippet. For reading the number of currently Active notifications we can use To know when a Notification… Read More »