2

As per google, in Nougat, we can not rely on

 <receiver
              android:name=".ConnectivityReceiver"
              android:enabled="true"
              android:exported="false">
              <intent-filter android:priority="900">
                  <action android:name="android.net.conn.CONNECTIVITY_CHANGE" />
              </intent-filter>

          </receiver>

to perform internet based task. Google is recommending JobScheduler for same. As per explanation by

http://www.vogella.com/tutorials/AndroidTaskScheduling/article.html#schedulingtasks

we are registering boot completed as one of broadcaster to trigger jobscheduler to further run our job as defined in jobservice class when defined parameters are met. This is as equivalent to calling normal service with specific broadcast except connectivity.

Is my understanding correct, do I have to reply on other intent filters except connectivity. if yes then why I need job scheduler, I can put those checks in any receiver and call my target service.

pls share if u have other way to running task as soon as internet is available and valid for latest android API

Panache
  • 1,701
  • 3
  • 19
  • 33
  • Have a look [here](https://stackoverflow.com/questions/46163131/android-o-detect-connectivity-change-in-background/46182910#46182910). I asked a highly similar question and documented what I've tried and what works. – Ch4t4r Oct 05 '17 at 10:43

0 Answers0