Panagiotis Triantafyllou

fixes in health service

package ly.warp.sdk.receivers;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.os.Build;
import ly.warp.sdk.services.WarplyHealthService;
public class RestartHealthServiceReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
if (Intent.ACTION_BOOT_COMPLETED.equals(intent.getAction()) ||
Intent.ACTION_MY_PACKAGE_REPLACED.equals(intent.getAction())) {
Intent stepsRestartServiceIntent = new Intent(context, WarplyHealthService.class);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
context.startForegroundService(stepsRestartServiceIntent);
} else {
context.startService(stepsRestartServiceIntent);
}
}
}
}
\ No newline at end of file