ConnectivityManager.CONNECTIVITY_ACTION deprecated
<p>In Android N, it is mentioned on the official website that "Apps targeting Android N do not receive CONNECTIVITY_ACTION broadcasts". And it is also mentioned that <code>JobScheduler</code> can be used as an alternative. But the <code>JobScheduler</code> doesn't provide exactly the same behavior as <code>CONNECTIVITY_ACTION</code> broadcast. </p>

<p>In my Android application, I was using this broadcast to know the network state of the device. I wanted to know if this state was <code>CONNECTING</code> or <code>CONNECTED</code> with the help of <code>CONNECTIVITY_ACTION</code> broadcast and it was best suited for my requirement. </p>

<p>Now that it is deprecated, can any one suggest me the alternative approach to get current network state?</p>