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.
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