remove ShowTipKnownIssues & fix StartOrStopForegroundService

This commit is contained in:
Aigio Liu
2022-02-27 16:21:43 +08:00
parent 9932606be2
commit c86f28161f
3 changed files with 3 additions and 30 deletions
@@ -18,20 +18,13 @@ namespace System
{
Intent intent = new(context, typeof(TService));
intent.SetAction(startOrStop ? NativeService.START : NativeService.STOP);
if (startOrStop)
if (Build.VERSION.SdkInt >= BuildVersionCodes.O)
{
if (Build.VERSION.SdkInt >= BuildVersionCodes.O)
{
context.StartForegroundService(intent);
}
else
{
context.StartService(intent);
}
context.StartForegroundService(intent);
}
else
{
context.StopService(intent);
context.StartService(intent);
}
}
}