CONNECTIVITY_CHANGE deprecated in target of Android N : <p>I am getting warning of deprecated declaration of Broadcast Receiver.</p>

<pre><code>&lt;!-- NETWORK RECEIVER... --&gt;
&lt;receiver android:name=".utils.NetworkUtils" &gt;
    &lt;intent-filter&gt;
        &lt;action android:name="android.net.conn.CONNECTIVITY_CHANGE" /&gt;
    &lt;/intent-filter&gt;
&lt;/receiver&gt;
</code></pre>

<p><strong>WARNING:</strong></p>

<blockquote>
  <p>Declaring a broadcastreceiver for android.net.conn.CONNECTIVITY_CHANGE
  is deprecated for apps targeting N and higher. In general, apps should
  not rely on this broadcast and instead use JobScheduler or
  GCMNetworkManager.</p>
</blockquote>

<p>Is there any other way to use it without deprecated methods?</p>
