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.
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 »
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 »