From 210a20d489969f518eba02a741d233c50dc4117a Mon Sep 17 00:00:00 2001 From: Lars Werner Date: Wed, 13 Mar 2019 23:08:46 +0100 Subject: [PATCH] Changed android manifest to use Android 9 SDK and usesCleartextTraffic for http download enabling. Changes the default(string) to string.Empty since default(string) made them null and not "" --- DownloadManager.sln | 6 +++++- .../DownloadManagerImplementation.cs | 6 +++--- .../Plugin.DownloadManager.Android.csproj | 5 +++-- Sample/Droid/DownloadExample.Droid.csproj | 7 ++++--- Sample/Droid/Properties/AndroidManifest.xml | 8 +++++--- Sample/iOS/DownloadExample.iOS.csproj | 14 ++++++++++---- 6 files changed, 30 insertions(+), 16 deletions(-) diff --git a/DownloadManager.sln b/DownloadManager.sln index 6f87101..47536d7 100644 --- a/DownloadManager.sln +++ b/DownloadManager.sln @@ -21,7 +21,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DownloadExample.Droid", "Sa EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DownloadExample.iOS", "Sample\iOS\DownloadExample.iOS.csproj", "{3BFA0D23-9172-46AF-BF9A-84F1E35BB969}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DownloadExample.UWP", "Sample\UWP\UWP.csproj", "{D32EDF26-94F4-4F80-B26C-CA250A3F6D7D}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UWP", "Sample\UWP\UWP.csproj", "{D32EDF26-94F4-4F80-B26C-CA250A3F6D7D}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DownloadExample", "Sample\DownloadExample\DownloadExample.csproj", "{FEE6A3A2-9CDD-473C-8587-6C13241BD03A}" EndProject @@ -271,6 +271,7 @@ Global {7F416A1F-D4DD-436E-A903-DF2FC75E623E}.AppStore|x86.Build.0 = Debug|Any CPU {7F416A1F-D4DD-436E-A903-DF2FC75E623E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {7F416A1F-D4DD-436E-A903-DF2FC75E623E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7F416A1F-D4DD-436E-A903-DF2FC75E623E}.Debug|Any CPU.Deploy.0 = Debug|Any CPU {7F416A1F-D4DD-436E-A903-DF2FC75E623E}.Debug|ARM.ActiveCfg = Debug|Any CPU {7F416A1F-D4DD-436E-A903-DF2FC75E623E}.Debug|ARM.Build.0 = Debug|Any CPU {7F416A1F-D4DD-436E-A903-DF2FC75E623E}.Debug|iPhone.ActiveCfg = Debug|Any CPU @@ -414,6 +415,9 @@ Global {D32EDF26-94F4-4F80-B26C-CA250A3F6D7D} = {11FE7FBB-8560-4D89-90F5-F218CF18A879} {FEE6A3A2-9CDD-473C-8587-6C13241BD03A} = {11FE7FBB-8560-4D89-90F5-F218CF18A879} EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {D7B718F5-272F-49BC-80BA-53BA5D5F417A} + EndGlobalSection GlobalSection(MonoDevelopProperties) = preSolution Policies = $0 $0.TextStylePolicy = $1 diff --git a/DownloadManager/Plugin.DownloadManager.Android/DownloadManagerImplementation.cs b/DownloadManager/Plugin.DownloadManager.Android/DownloadManagerImplementation.cs index 8b34adb..c5bf5e6 100644 --- a/DownloadManager/Plugin.DownloadManager.Android/DownloadManagerImplementation.cs +++ b/DownloadManager/Plugin.DownloadManager.Android/DownloadManagerImplementation.cs @@ -166,7 +166,7 @@ public void UpdateFileProperties (ICursor cursor, DownloadFileImplementation dow switch ((DownloadStatus)cursor.GetInt (cursor.GetColumnIndex (Android.App.DownloadManager.ColumnStatus))) { case DownloadStatus.Successful: downloadFile.DestinationPathName = cursor.GetString(cursor.GetColumnIndex("local_uri")); - downloadFile.StatusDetails = default(string); + downloadFile.StatusDetails = string.Empty; downloadFile.Status = DownloadFileStatus.COMPLETED; RemoveFile (downloadFile); break; @@ -236,12 +236,12 @@ public void UpdateFileProperties (ICursor cursor, DownloadFileImplementation dow break; case DownloadStatus.Pending: - downloadFile.StatusDetails = default(string); + downloadFile.StatusDetails = string.Empty; downloadFile.Status = DownloadFileStatus.PENDING; break; case DownloadStatus.Running: - downloadFile.StatusDetails = default(string); + downloadFile.StatusDetails = string.Empty; downloadFile.Status = DownloadFileStatus.RUNNING; break; } diff --git a/DownloadManager/Plugin.DownloadManager.Android/Plugin.DownloadManager.Android.csproj b/DownloadManager/Plugin.DownloadManager.Android/Plugin.DownloadManager.Android.csproj index d524e4b..70d51ea 100644 --- a/DownloadManager/Plugin.DownloadManager.Android/Plugin.DownloadManager.Android.csproj +++ b/DownloadManager/Plugin.DownloadManager.Android/Plugin.DownloadManager.Android.csproj @@ -16,8 +16,9 @@ Off false True - v7.0 - + v9.0 + + true diff --git a/Sample/Droid/DownloadExample.Droid.csproj b/Sample/Droid/DownloadExample.Droid.csproj index d702930..08e2cc1 100644 --- a/Sample/Droid/DownloadExample.Droid.csproj +++ b/Sample/Droid/DownloadExample.Droid.csproj @@ -1,4 +1,4 @@ - + Debug @@ -8,7 +8,7 @@ Library DownloadExample.Droid DownloadExample.Droid - v7.1 + v9.0 True Resources\Resource.designer.cs Resource @@ -16,7 +16,8 @@ Resources Assets false - + + true diff --git a/Sample/Droid/Properties/AndroidManifest.xml b/Sample/Droid/Properties/AndroidManifest.xml index 1c58d1c..d5cec63 100644 --- a/Sample/Droid/Properties/AndroidManifest.xml +++ b/Sample/Droid/Properties/AndroidManifest.xml @@ -1,9 +1,11 @@ - + - + - + + + \ No newline at end of file diff --git a/Sample/iOS/DownloadExample.iOS.csproj b/Sample/iOS/DownloadExample.iOS.csproj index c3d21a5..5d54c71 100644 --- a/Sample/iOS/DownloadExample.iOS.csproj +++ b/Sample/iOS/DownloadExample.iOS.csproj @@ -33,7 +33,8 @@ true bin\iPhone\Release - + + prompt 4 false @@ -50,7 +51,8 @@ true bin\iPhoneSimulator\Release - + + prompt 4 false @@ -91,8 +93,12 @@ - - + + false + + + false +