-1

As mentioned in Android 7.0 changes, apps targeting Android API 24 or higher do not receive CONNECTIVITY_ACTION broadcasts if they declare their broadcast receiver in the manifest.

I implement a sync adapter to check and synchronized pending data with the server, but I am only able to set a periodic time to schedule the task.

How messaging apps, like whatsapp, can upload pending data as soon as connection is available again?

Are they using a JobService scheduled with RequiredNetworkTypeset as JobInfo.NETWORK_TYPE_ANY?

lukaspp
  • 1,059
  • 10
  • 15
  • Look at it [Detect connectivity change in Android 7 and above](https://stackoverflow.com/questions/48527171/detect-connectivity-change-in-android-7-and-above-when-app-is-killed-in-backgrou) – Krishna Sharma Jul 30 '18 at 16:40
  • 1
    thanks for your answer, but I think the best solution is the one provided by the Android documentation https://developer.android.com/topic/performance/background-optimization#connectivity-action – lukaspp Jul 30 '18 at 19:11

1 Answers1

0

After many research I found a solution provided by Android documentation. https://developer.android.com/topic/performance/background-optimization#connectivity-action

lukaspp
  • 1,059
  • 10
  • 15