From be92539d61d620e5ad4685b0fe1d33f647197462 Mon Sep 17 00:00:00 2001 From: awineshkumar Date: Fri, 13 Sep 2024 14:43:53 +0530 Subject: [PATCH 1/2] Add forgroundservice subtype permission remove .netstandard support because Android binding doesnot support --- Laerdal.Dfu/Laerdal.Dfu.csproj | 4 ++-- Laerdal.Dfu/Platforms/Android/Specific/DfuService.cs | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Laerdal.Dfu/Laerdal.Dfu.csproj b/Laerdal.Dfu/Laerdal.Dfu.csproj index 065c9b5..8621a12 100644 --- a/Laerdal.Dfu/Laerdal.Dfu.csproj +++ b/Laerdal.Dfu/Laerdal.Dfu.csproj @@ -2,7 +2,7 @@ - net8.0-ios;net8.0-android;netstandard2.1; + net8.0-ios;net8.0-android; true true @@ -50,7 +50,7 @@ - + diff --git a/Laerdal.Dfu/Platforms/Android/Specific/DfuService.cs b/Laerdal.Dfu/Platforms/Android/Specific/DfuService.cs index c63be27..8905378 100644 --- a/Laerdal.Dfu/Platforms/Android/Specific/DfuService.cs +++ b/Laerdal.Dfu/Platforms/Android/Specific/DfuService.cs @@ -1,11 +1,12 @@ using Android.App; +using Android.Content.PM; using Java.Lang; namespace Laerdal.Dfu.Specific -{ - - [Service] +{ + + [Service(ForegroundServiceType = ForegroundService.TypeConnectedDevice)] public class DfuService : Laerdal.Dfu.Bindings.Android.DfuBaseService { public DfuService() From b8a2c048af8fd20f698088655fb02b411a6a32b8 Mon Sep 17 00:00:00 2001 From: awineshkumar Date: Fri, 13 Sep 2024 14:56:47 +0530 Subject: [PATCH 2/2] Revert code of removal of netstandard2.1 --- Laerdal.Dfu/Laerdal.Dfu.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Laerdal.Dfu/Laerdal.Dfu.csproj b/Laerdal.Dfu/Laerdal.Dfu.csproj index 8621a12..2543011 100644 --- a/Laerdal.Dfu/Laerdal.Dfu.csproj +++ b/Laerdal.Dfu/Laerdal.Dfu.csproj @@ -2,7 +2,7 @@ - net8.0-ios;net8.0-android; + net8.0-ios;net8.0-android;netstandard2.1; true true