Start an android background service on network connection? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Start an android background service on network connection?

I want a background service start after wifi or data internet is available, there are to do that for all phones before and after android 7, there are some changs for doing that since android 7, i've done it now, but it has some problems, I need a specific guide or tutorial for doing that on both older and later than android 7 devices, is there any? I want to be sure i'm doing it right, using JobScheduler on android 7 and later and Manifest things on androids older than 7.

24th Aug 2017, 12:48 PM
Ali Molaei molaei.org
1 Answer
0
Firstly, identify the android version of the running devices if (android.os.Build.VERSION.SDK_INT < android.os.Build.VERSION.NOUGAT{ // only for versions older than Nougat }else { //Nougat specific code } About how to do background tasks in Nougat, stackoverflow.com has definitely an answer
5th Sep 2017, 8:07 AM
Arsal Ali
Arsal Ali - avatar