public override void OnReceive(Context context, Intent intent) { if (intent.Action == Intent.ActionBootCompleted) { if (Build.VERSION.SdkInt >= BuildVersionCodes.O) { JobService.EnqueueWork(context, new Intent()); } else { context.StartService(BtService.GetServiceIntent(context)); } } }
protected override void OnHandleWork(Intent intent) => BaseContext.StartForegroundService(BtService.GetServiceIntent(BaseContext));