Getting battery status even when the application is closed
问题 Hey I am trying to make an application that tells me when the battery is full when the phone is connected to power. I made a service and used a broadcast receiver in that to check the battery status. Whenever i connect or disconnect the phone from the power, my app crashes. The service still runs and i get the notification when battery is full. I dont know why is the app crashing again and again. Here is my code public class Srvc extends Service{ @Override public int onStartCommand(Intent