public static void startForegroundService(@NonNull Context context, @NonNull Intent intent) {
        if (Build.VERSION.SDK_INT >= 26) {
            context.startForegroundService(intent);
        } else {
            // Pre-O behavior.
            context.startService(intent);
        }
    }
startForegroundService() was introduced in O, just call startService
for before O.

@param context Context to start Service from.
@param intent  The description of the Service to start.
@see Context#startForegroundService(Intent)
@see Context#startService(Intent)
android/android_framework/base/src/main/java/github/tornaco/android/thanos/core/compat/ContextCompat.java