java.lang.IllegalArgumentException: Receiver not registered:

Problem: the radio receiver is not registered;

Recurrence: register the broadcast in oncreate() and de register in onstop(). In this activity, the device enters the screen saver state and executes onstop(). At this time, the broadcast has been de registered. Click the screen to return to the interface and no longer execute oncreate(). If you enter the screen saver interface again, an exception will be generated.

Solution: if receiver registration and de registration are placed in onresume and onpause, these two processes will definitely appear in pairs, which can avoid this exception.

Read More: