I searched and it turns out that
Broadcast Receiver
is not recommended for the target over N.I found out
GCMNetworkManager
. And it is also depreciated.- I also checked
JobScheduler
. However, its behaviour is not something that I want to implement.
The only way that I can implement among the three is checking the internet status periodically.
However, I don't want it. What I want is detecting the event when user turns them off or on. And then, I'd like to show a dialog to make sure the user turn it on again.
My college who makes iOS says, he uses Observer
for his iOS app. And said maybe Android is the same.
Is there any way to make it possible?