Demo App Usecases - novoda/merlin GitHub Wiki

onConnect() Description
When the network state changes from disconnected to connected and a successful host ping has completed.

Because you have just acquired a valid network connection, time to update stale data!


onDisconnect() Description
When the network state changes from connected to disconnected and a host ping was unsuccessful.

Because you probably want to tell the user they're now offline! or disable certain functionality until a reliable connection is available again.


onBind() Description
When you want to know the current network status, without performing a host ping.

Because you need to know if a network connection is available quickly.


Get Current Status Description
When you want to know the current network status, without performing a host ping.

Because you need to know if a network connection is available quickly.


Is connected to Wifi Description
When you want to know the whether you are connected to Wifi, without performing a host ping.

Because you need to know if you are connected to Wifi.


Is connected to mobile network Description
When you want to know whether you are connected to a mobile network without performing a host ping.

Because you need to know if you are connected to a mobile network.


Get network subtype Description
When you want to know the mobile network subtype.

Because you need to know the subtype to which your mobile network belongs.

⚠️ **GitHub.com Fallback** ⚠️