diff --git a/.github/ISSUE_TEMPLATE/feature-request.md b/.github/ISSUE_TEMPLATE/feature-request.md
index e741c1570..d8dc9b817 100644
--- a/.github/ISSUE_TEMPLATE/feature-request.md
+++ b/.github/ISSUE_TEMPLATE/feature-request.md
@@ -6,22 +6,4 @@ labels: feature-request
assignees: ''
---
-
-## Summary
-Please provide a brief summary of your proposal. Two to three sentences is best here.
-
-## API Changes
-
-Include a list of all API changes, additions, subtractions as would be required by your proposal. These APIs should be considered placeholders, so the naming is not as important as getting the concepts correct. If possible you should include some "example" code of usage of your new API. You should also provide details of the level of availability for the feature on each of the supported platforms.
-
-e.g.
-
-In order to facilitate the new Shiny Button api, a bool is added to the Button class. This is done as a bool because it is simpler to data bind and other reasons...
-
- var button = new Button ();
- button.MakeShiny = true; // new API
-
-The MakeShiny API works even if the button is already visible.
-
-## Intended Use Case
-Provide a detailed example of where your proposal would be used and for what purpose.
\ No newline at end of file
+We are no longer accepting new feature request for Xamarin.Essentials. Please make your new feature requests in the .NET MAUI repo which contains .NET MAUI Essentials.
diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
index c918f7b74..bc46302e5 100644
--- a/.github/PULL_REQUEST_TEMPLATE.md
+++ b/.github/PULL_REQUEST_TEMPLATE.md
@@ -1,3 +1,20 @@
+
+
### Description of Change ###
Describe your changes here.
diff --git a/DeviceTests/DeviceTests.Android/DeviceTests.Android.csproj b/DeviceTests/DeviceTests.Android/DeviceTests.Android.csproj
index 0240f5a08..ec88c04ec 100644
--- a/DeviceTests/DeviceTests.Android/DeviceTests.Android.csproj
+++ b/DeviceTests/DeviceTests.Android/DeviceTests.Android.csproj
@@ -9,7 +9,6 @@
DeviceTests.DroidXamarinEssentialsDeviceTestsAndroidv10.0
- falseTruetrueResource
@@ -19,6 +18,7 @@
truetrueXamarin.Android.Net.AndroidClientHandler
+ armeabi-v7a;x86;x86_64;arm64-v8atrue
@@ -29,7 +29,6 @@
prompt4None
- armeabi-v7a;x86;x86_64;arm64-v8a1Gfalsefalse
@@ -47,7 +46,6 @@
4truefalse
- armeabi-v7a;x86;x86_64;arm64-v8atrue1G
@@ -59,12 +57,13 @@
-
+
-
-
+
+
+
diff --git a/DeviceTests/DeviceTests.Android/Properties/AndroidManifest.xml b/DeviceTests/DeviceTests.Android/Properties/AndroidManifest.xml
index 4ab740cad..7d1546089 100644
--- a/DeviceTests/DeviceTests.Android/Properties/AndroidManifest.xml
+++ b/DeviceTests/DeviceTests.Android/Properties/AndroidManifest.xml
@@ -12,5 +12,36 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/DeviceTests/DeviceTests.Shared/DeviceTests.Shared.csproj b/DeviceTests/DeviceTests.Shared/DeviceTests.Shared.csproj
index 8e6758173..903c8db25 100644
--- a/DeviceTests/DeviceTests.Shared/DeviceTests.Shared.csproj
+++ b/DeviceTests/DeviceTests.Shared/DeviceTests.Shared.csproj
@@ -1,7 +1,7 @@
-
+
- Xamarin.iOS10;MonoAndroid90;uap10.0.16299
- Xamarin.iOS10;MonoAndroid90;
+ Xamarin.iOS10;MonoAndroid10.0;uap10.0.16299
+ Xamarin.iOS10;MonoAndroid10.0;XamarinEssentialsDeviceTestsSharedDeviceTests.Shared$(AssemblyName) ($(TargetFramework))
@@ -23,7 +23,7 @@
-
+
@@ -37,14 +37,6 @@
-
-
-
-
-
-
-
-
diff --git a/DeviceTests/DeviceTests.Shared/Geocoding_Tests.cs b/DeviceTests/DeviceTests.Shared/Geocoding_Tests.cs
index 771612655..ef2dac7f2 100644
--- a/DeviceTests/DeviceTests.Shared/Geocoding_Tests.cs
+++ b/DeviceTests/DeviceTests.Shared/Geocoding_Tests.cs
@@ -48,7 +48,7 @@ public async Task Get_Placemarks_Location(double latitude, double longitude)
}
[Theory]
- [InlineData("Microsoft Building 25 Redmond WA USA")]
+ [InlineData("Redmond, WA, USA")]
public async Task Get_Locations(string address)
{
try
diff --git a/DeviceTests/DeviceTests.UWP/DeviceTests.UWP.csproj b/DeviceTests/DeviceTests.UWP/DeviceTests.UWP.csproj
index 9e1398bf9..3ace48502 100644
--- a/DeviceTests/DeviceTests.UWP/DeviceTests.UWP.csproj
+++ b/DeviceTests/DeviceTests.UWP/DeviceTests.UWP.csproj
@@ -114,7 +114,7 @@
-
+
diff --git a/DeviceTests/DeviceTests.iOS/DeviceTests.iOS.csproj b/DeviceTests/DeviceTests.iOS/DeviceTests.iOS.csproj
index b340089a1..cedc68a32 100644
--- a/DeviceTests/DeviceTests.iOS/DeviceTests.iOS.csproj
+++ b/DeviceTests/DeviceTests.iOS/DeviceTests.iOS.csproj
@@ -77,10 +77,10 @@
-
+
-
+
diff --git a/DeviceTests/DeviceTests.iOS/Main.cs b/DeviceTests/DeviceTests.iOS/Main.cs
index c79e23b40..82ad09057 100644
--- a/DeviceTests/DeviceTests.iOS/Main.cs
+++ b/DeviceTests/DeviceTests.iOS/Main.cs
@@ -1,4 +1,5 @@
-using UIKit;
+using System;
+using UIKit;
namespace DeviceTests.iOS
{
@@ -6,10 +7,10 @@ public class Application
{
static void Main(string[] args)
{
- if (args?.Length > 0) // usually means this is from xharness
- UIApplication.Main(args, null, nameof(TestApplicationDelegate));
+ if (!string.IsNullOrWhiteSpace(Environment.GetEnvironmentVariable("ci-run")))
+ UIApplication.Main(args, null, typeof(TestApplicationDelegate));
else
- UIApplication.Main(args, null, nameof(AppDelegate));
+ UIApplication.Main(args, null, typeof(AppDelegate));
}
}
}
diff --git a/DeviceTests/build.cake b/DeviceTests/build.cake
index 4bea8f8b0..69aa1586b 100644
--- a/DeviceTests/build.cake
+++ b/DeviceTests/build.cake
@@ -41,6 +41,7 @@ System.Environment.SetEnvironmentVariable("PATH",
$"{ANDROID_HOME}/emulator" + System.IO.Path.PathSeparator +
EnvironmentVariable("PATH"));
+var RESTORE_CONFIG = MakeAbsolute((FilePath)"../devopsnuget.config").FullPath;
// utils
@@ -99,6 +100,7 @@ Task("build-ios")
c.Properties["Platform"] = new List { "iPhoneSimulator" };
c.Properties["BuildIpa"] = new List { "true" };
c.Properties["ContinuousIntegrationBuild"] = new List { "false" };
+ c.Properties["RestoreConfigFile"] = new List { RESTORE_CONFIG };
c.Targets.Clear();
c.Targets.Add("Rebuild");
c.BinaryLogger = new MSBuildBinaryLogSettings {
@@ -116,11 +118,12 @@ Task("test-ios-emu")
CleanDirectories(IOS_TEST_RESULTS_PATH.FullPath);
// Run the tests
- var resultCode = StartProcess("xharness", "ios test " +
+ var resultCode = StartProcess("xharness", "apple test " +
$"--app=\"{IOS_IPA_PATH}\" " +
$"--targets=\"ios-simulator-64\" " +
$"--output-directory=\"{IOS_TEST_RESULTS_PATH}\" " +
- $"--verbosity=\"Debug\" ");
+ $"--verbosity=\"Debug\" " +
+ $"--set-env=ci-run=true ");
// Rename test result files
var resultFiles = GetFiles($"{IOS_TEST_RESULTS_PATH}/*.xml");
@@ -142,6 +145,7 @@ Task("build-android")
c.Configuration = "Debug"; // needs to be debug so unit tests get discovered
c.Restore = true;
c.Properties["ContinuousIntegrationBuild"] = new List { "false" };
+ c.Properties["RestoreConfigFile"] = new List { RESTORE_CONFIG };
c.Targets.Clear();
c.Targets.Add("Rebuild");
c.Targets.Add("SignAndroidPackage");
@@ -221,6 +225,7 @@ Task("build-uwp")
c.Properties["AppxBundlePlatforms"] = new List { "x86" };
c.Properties["AppxBundle"] = new List { "Always" };
c.Properties["AppxPackageSigningEnabled"] = new List { "true" };
+ c.Properties["RestoreConfigFile"] = new List { RESTORE_CONFIG };
c.Targets.Clear();
c.Targets.Add("Rebuild");
c.BinaryLogger = new MSBuildBinaryLogSettings {
diff --git a/README.md b/README.md
index c5a3e24f6..c0dc98d5a 100644
--- a/README.md
+++ b/README.md
@@ -77,3 +77,5 @@ Here are some frequently asked questions about Xamarin.Essentials, but be sure t
Please see the [License](LICENSE).
+## Stats
+
diff --git a/Samples/Samples.Android/Samples.Android.csproj b/Samples/Samples.Android/Samples.Android.csproj
index d373ef946..96bcf008a 100644
--- a/Samples/Samples.Android/Samples.Android.csproj
+++ b/Samples/Samples.Android/Samples.Android.csproj
@@ -58,11 +58,9 @@
-
-
+
+
-
-
diff --git a/Samples/Samples.Mac/Samples.Mac.csproj b/Samples/Samples.Mac/Samples.Mac.csproj
index c8ce05423..15c88faeb 100644
--- a/Samples/Samples.Mac/Samples.Mac.csproj
+++ b/Samples/Samples.Mac/Samples.Mac.csproj
@@ -61,8 +61,8 @@
-
-
+
+
diff --git a/Samples/Samples.UWP/Samples.UWP.csproj b/Samples/Samples.UWP/Samples.UWP.csproj
index fb0afd793..1f47c7941 100644
--- a/Samples/Samples.UWP/Samples.UWP.csproj
+++ b/Samples/Samples.UWP/Samples.UWP.csproj
@@ -119,8 +119,8 @@
-
-
+
+
diff --git a/Samples/Samples.iOS/Main.cs b/Samples/Samples.iOS/Main.cs
index 0bb5eadad..5ece82925 100644
--- a/Samples/Samples.iOS/Main.cs
+++ b/Samples/Samples.iOS/Main.cs
@@ -6,7 +6,7 @@ public class Application
{
static void Main(string[] args)
{
- UIApplication.Main(args, null, nameof(AppDelegate));
+ UIApplication.Main(args, null, typeof(AppDelegate));
}
}
}
diff --git a/Samples/Samples.iOS/Samples.iOS.csproj b/Samples/Samples.iOS/Samples.iOS.csproj
index c17c6cd67..03f794e05 100644
--- a/Samples/Samples.iOS/Samples.iOS.csproj
+++ b/Samples/Samples.iOS/Samples.iOS.csproj
@@ -80,8 +80,8 @@
-
-
+
+
diff --git a/Samples/Samples/App.xaml b/Samples/Samples/App.xaml
index 69b065d88..c5348dff4 100644
--- a/Samples/Samples/App.xaml
+++ b/Samples/Samples/App.xaml
@@ -10,6 +10,21 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/Samples/Samples/Samples.csproj b/Samples/Samples/Samples.csproj
index bd5450509..f85919620 100644
--- a/Samples/Samples/Samples.csproj
+++ b/Samples/Samples/Samples.csproj
@@ -15,8 +15,8 @@
-
-
+
+
diff --git a/Samples/Samples/View/DeviceInfoPage.xaml b/Samples/Samples/View/DeviceInfoPage.xaml
index a7ca78225..af212e140 100644
--- a/Samples/Samples/View/DeviceInfoPage.xaml
+++ b/Samples/Samples/View/DeviceInfoPage.xaml
@@ -29,6 +29,7 @@
+
diff --git a/Samples/Samples/View/LauncherPage.xaml b/Samples/Samples/View/LauncherPage.xaml
index 1a3c2d09f..c6efd422b 100644
--- a/Samples/Samples/View/LauncherPage.xaml
+++ b/Samples/Samples/View/LauncherPage.xaml
@@ -35,8 +35,8 @@
-
-
+
diff --git a/Samples/Samples/View/MediaPickerPage.xaml b/Samples/Samples/View/MediaPickerPage.xaml
index efac0d742..8baf6fca5 100644
--- a/Samples/Samples/View/MediaPickerPage.xaml
+++ b/Samples/Samples/View/MediaPickerPage.xaml
@@ -16,7 +16,7 @@
-
+
diff --git a/Samples/Samples/ViewModel/FilePickerViewModel.cs b/Samples/Samples/ViewModel/FilePickerViewModel.cs
index b94fb1352..eb8d6fcd1 100644
--- a/Samples/Samples/ViewModel/FilePickerViewModel.cs
+++ b/Samples/Samples/ViewModel/FilePickerViewModel.cs
@@ -136,12 +136,15 @@ async Task PickAndShow(PickOptions options)
if (result != null)
{
- Text = $"File Name: {result.FileName}";
+ var size = await GetStreamSizeAsync(result);
- if (result.FileName.EndsWith("jpg", StringComparison.OrdinalIgnoreCase) ||
- result.FileName.EndsWith("png", StringComparison.OrdinalIgnoreCase))
+ Text = $"File Name: {result.FileName} ({size:0.00} KB)";
+
+ var ext = Path.GetExtension(result.FileName).ToLowerInvariant();
+ if (ext == ".jpg" || ext == ".jpeg" || ext == ".png" || ext == ".gif")
{
var stream = await result.OpenReadAsync();
+
Image = ImageSource.FromStream(() => stream);
IsImageVisible = true;
}
@@ -165,6 +168,19 @@ async Task PickAndShow(PickOptions options)
}
}
+ async Task GetStreamSizeAsync(FileResult result)
+ {
+ try
+ {
+ using var stream = await result.OpenReadAsync();
+ return stream.Length / 1024.0;
+ }
+ catch
+ {
+ return 0.0;
+ }
+ }
+
async void DoPickMultipleFiles()
{
try
@@ -193,6 +209,7 @@ async void DoPickMultipleFiles()
else
{
Text = $"Pick cancelled.";
+ IsImageVisible = false;
}
}
catch (Exception ex)
diff --git a/Samples/Samples/ViewModel/GeocodingViewModel.cs b/Samples/Samples/ViewModel/GeocodingViewModel.cs
index 4db043f1f..82266b387 100644
--- a/Samples/Samples/ViewModel/GeocodingViewModel.cs
+++ b/Samples/Samples/ViewModel/GeocodingViewModel.cs
@@ -10,7 +10,7 @@ public class GeocodingViewModel : BaseViewModel
{
string lat = 47.67398.ToString();
string lon = (-122.121513).ToString();
- string address = "Microsoft Building 25 Redmond WA USA";
+ string address = "Microsoft Building 25 Redmond WA";
string geocodeAddress;
string geocodePosition;
diff --git a/Samples/Samples/ViewModel/LauncherViewModel.cs b/Samples/Samples/ViewModel/LauncherViewModel.cs
index 96416fe80..24c60fe08 100644
--- a/Samples/Samples/ViewModel/LauncherViewModel.cs
+++ b/Samples/Samples/ViewModel/LauncherViewModel.cs
@@ -1,6 +1,7 @@
using System;
using System.IO;
using System.Windows.Input;
+using Samples.Helpers;
using Xamarin.Essentials;
using Xamarin.Forms;
@@ -29,7 +30,7 @@ public LauncherViewModel()
LaunchMailCommand = new Command(OnLaunchMail);
LaunchBrowserCommand = new Command(OnLaunchBrowser);
CanLaunchCommand = new Command(CanLaunch);
- LaunchFileCommand = new Command(OnFileRequest);
+ LaunchFileCommand = new Command(OnFileRequest);
}
public string FileAttachmentContents
@@ -79,7 +80,7 @@ async void CanLaunch()
}
}
- async void OnFileRequest()
+ async void OnFileRequest(Xamarin.Forms.View element)
{
if (!string.IsNullOrWhiteSpace(FileAttachmentContents))
{
@@ -88,9 +89,12 @@ async void OnFileRequest()
var file = Path.Combine(FileSystem.CacheDirectory, fn);
File.WriteAllText(file, FileAttachmentContents);
+ var rect = element.GetAbsoluteBounds().ToSystemRectangle();
+ rect.Y += 40;
await Launcher.OpenAsync(new OpenFileRequest
{
- File = new ReadOnlyFile(file)
+ File = new ReadOnlyFile(file),
+ PresentationSourceBounds = rect
});
}
}
diff --git a/Samples/Samples/ViewModel/TextToSpeechViewModel.cs b/Samples/Samples/ViewModel/TextToSpeechViewModel.cs
index aa33e972a..0be4fa795 100644
--- a/Samples/Samples/ViewModel/TextToSpeechViewModel.cs
+++ b/Samples/Samples/ViewModel/TextToSpeechViewModel.cs
@@ -1,4 +1,5 @@
-using System.Linq;
+using System;
+using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Input;
@@ -87,13 +88,27 @@ void OnCancel()
async Task OnPickLocale()
{
- var locales = await TextToSpeech.GetLocalesAsync();
- var names = locales.Select(i => i.Name).ToArray();
+ var allLocales = await TextToSpeech.GetLocalesAsync();
+ var locales = allLocales
+ .OrderBy(i => i.Language.ToLowerInvariant())
+ .ToArray();
- var result = await Application.Current.MainPage.DisplayActionSheet("Pick", "OK", null, names);
+ var languages = locales
+ .Select(i => string.IsNullOrEmpty(i.Country) ? i.Language : $"{i.Language} ({i.Country})")
+ .ToArray();
- selectedLocale = locales.FirstOrDefault(i => i.Name == result);
- Locale = (result == "OK" || string.IsNullOrEmpty(result)) ? "Default" : result;
+ var result = await Application.Current.MainPage.DisplayActionSheet("Pick", "OK", null, languages);
+
+ if (!string.IsNullOrEmpty(result) && Array.IndexOf(languages, result) is int idx && idx != -1)
+ {
+ selectedLocale = locales[idx];
+ Locale = result;
+ }
+ else
+ {
+ selectedLocale = null;
+ Locale = "Default";
+ }
}
public ICommand CancelCommand { get; }
diff --git a/Tests/Tests.csproj b/Tests/Tests.csproj
index 4b89bfe8f..e6814b1d2 100644
--- a/Tests/Tests.csproj
+++ b/Tests/Tests.csproj
@@ -15,7 +15,7 @@
-
+
diff --git a/Xamarin.Essentials/AssemblyInfo/AssemblyInfo.ios.tvos.watchos.macos.cs b/Xamarin.Essentials/AssemblyInfo/AssemblyInfo.ios.tvos.watchos.macos.cs
index 9c6171d57..cb3cbe85e 100644
--- a/Xamarin.Essentials/AssemblyInfo/AssemblyInfo.ios.tvos.watchos.macos.cs
+++ b/Xamarin.Essentials/AssemblyInfo/AssemblyInfo.ios.tvos.watchos.macos.cs
@@ -1,3 +1,5 @@
using Foundation;
+#pragma warning disable CS0618 // Type or member is obsolete
[assembly: LinkerSafe]
+#pragma warning restore CS0618 // Type or member is obsolete
diff --git a/Xamarin.Essentials/Browser/Browser.android.cs b/Xamarin.Essentials/Browser/Browser.android.cs
index 70e794088..6e3a0bbdd 100644
--- a/Xamarin.Essentials/Browser/Browser.android.cs
+++ b/Xamarin.Essentials/Browser/Browser.android.cs
@@ -22,7 +22,9 @@ static Task PlatformOpenAsync(Uri uri, BrowserLaunchOptions options)
var tabsBuilder = new CustomTabsIntent.Builder();
tabsBuilder.SetShowTitle(true);
if (options.PreferredToolbarColor.HasValue)
+#pragma warning disable CS0618 // Type or member is obsolete
tabsBuilder.SetToolbarColor(options.PreferredToolbarColor.Value.ToInt());
+#pragma warning restore CS0618 // Type or member is obsolete
if (options.TitleMode != BrowserTitleMode.Default)
tabsBuilder.SetShowTitle(options.TitleMode == BrowserTitleMode.Show);
diff --git a/Xamarin.Essentials/Connectivity/Connectivity.ios.tvos.macos.reachability.cs b/Xamarin.Essentials/Connectivity/Connectivity.ios.tvos.macos.reachability.cs
index 7823f086f..073df700f 100644
--- a/Xamarin.Essentials/Connectivity/Connectivity.ios.tvos.macos.reachability.cs
+++ b/Xamarin.Essentials/Connectivity/Connectivity.ios.tvos.macos.reachability.cs
@@ -83,9 +83,11 @@ internal static IEnumerable GetActiveConnectionType()
{
status.Add(NetworkStatus.ReachableViaCarrierDataNetwork);
}
-#endif
-
+ else if (defaultNetworkAvailable)
+#else
+ // If the connection is reachable and no connection is required, then assume it's WiFi
if (defaultNetworkAvailable)
+#endif
{
status.Add(NetworkStatus.ReachableViaWiFiNetwork);
}
diff --git a/Xamarin.Essentials/Contacts/Contacts.android.cs b/Xamarin.Essentials/Contacts/Contacts.android.cs
index fa813494b..ff0639c1b 100644
--- a/Xamarin.Essentials/Contacts/Contacts.android.cs
+++ b/Xamarin.Essentials/Contacts/Contacts.android.cs
@@ -5,22 +5,31 @@
using Android.Content;
using Android.Database;
using Android.Provider;
+using CommonDataKinds = Android.Provider.ContactsContract.CommonDataKinds;
+using StructuredName = Android.Provider.ContactsContract.CommonDataKinds.StructuredName;
namespace Xamarin.Essentials
{
public static partial class Contacts
{
+ const string idCol = ContactsContract.Contacts.InterfaceConsts.Id;
+ const string displayNameCol = ContactsContract.Contacts.InterfaceConsts.DisplayName;
+ const string mimetypeCol = ContactsContract.Data.InterfaceConsts.Mimetype;
+
+ const string contactIdCol = CommonDataKinds.Phone.InterfaceConsts.ContactId;
+
static async Task PlatformPickContactAsync()
{
- var intent = new Intent(Intent.ActionPick);
- intent.SetType(ContactsContract.CommonDataKinds.Phone.ContentType);
-
+ var intent = new Intent(Intent.ActionPick, ContactsContract.Contacts.ContentUri);
var result = await IntermediateActivity.StartAsync(intent, Platform.requestCodePickContact).ConfigureAwait(false);
+ if (result?.Data == null)
+ return null;
- if (result?.Data != null)
- return GetContact(result.Data);
+ using var cursor = Platform.ContentResolver.Query(result?.Data, null, null, null, null);
+ if (cursor?.MoveToFirst() != true)
+ return null;
- return null;
+ return GetContact(cursor);
}
static Task> PlatformGetAllAsync(CancellationToken cancellationToken)
@@ -30,106 +39,95 @@ static Task> PlatformGetAllAsync(CancellationToken cancella
IEnumerable GetEnumerable()
{
- if (cursor?.MoveToFirst() ?? false)
+ if (cursor?.MoveToFirst() == true)
{
do
{
- var contact = GetContact(cursor, ContactsContract.Contacts.InterfaceConsts.Id);
+ var contact = GetContact(cursor);
if (contact != null)
yield return contact;
}
while (cursor.MoveToNext());
}
- cursor.Close();
+ cursor?.Close();
}
}
- internal static Contact GetContact(global::Android.Net.Uri contactUri)
+ static Contact GetContact(ICursor cursor)
{
- if (contactUri == null)
- return default;
-
- using var cursor = Platform.ContentResolver.Query(contactUri, null, null, null, null);
+ var id = GetString(cursor, idCol);
+ var displayName = GetString(cursor, displayNameCol);
+ var phones = GetNumbers(id)?.Select(p => new ContactPhone(p));
+ var emails = GetEmails(id)?.Select(e => new ContactEmail(e));
+ var (prefix, given, middle, family, suffix) = GetName(id);
- if (cursor.MoveToFirst())
- {
- return GetContact(
- cursor,
- ContactsContract.CommonDataKinds.Phone.InterfaceConsts.ContactId);
- }
-
- return default;
+ return new Contact(id, prefix, given, middle, family, suffix, phones, emails, displayName);
}
- static Contact GetContact(ICursor cursor, string idKey)
+ static IEnumerable GetNumbers(string id)
{
- var displayName = cursor.GetString(cursor.GetColumnIndex(ContactsContract.Contacts.InterfaceConsts.DisplayName));
- var idQ = new string[1] { cursor.GetString(cursor.GetColumnIndex(idKey)) };
- var phones = GetNumbers(idQ)?.Select(
- item => new ContactPhone(item.data));
- var emails = GetEmails(idQ)?.Select(
- item => new ContactEmail(item.data));
- var name = GetName(idQ[0]);
-
- return new Contact(idQ[0], name.Prefix, name.Given, name.Middle, name.Family, name.Suffix, phones, emails, displayName);
- }
+ var uri = CommonDataKinds.Phone.ContentUri
+ .BuildUpon()
+ .AppendQueryParameter(ContactsContract.RemoveDuplicateEntries, "1")
+ .Build();
- static IEnumerable<(string data, string type)> GetNumbers(string[] idQ)
- {
- var uri = ContactsContract.CommonDataKinds.Phone.ContentUri.BuildUpon().AppendQueryParameter(ContactsContract.RemoveDuplicateEntries, "1").Build();
- var cursor = Platform.ContentResolver.Query(uri, null, $"{ContactsContract.CommonDataKinds.Phone.InterfaceConsts.ContactId}=?", idQ, null);
+ var cursor = Platform.ContentResolver.Query(uri, null, $"{contactIdCol}=?", new[] { id }, null);
- return ReadCursorItems(cursor, ContactsContract.CommonDataKinds.Phone.Number, ContactsContract.CommonDataKinds.Phone.InterfaceConsts.Type);
+ return ReadCursorItems(cursor, CommonDataKinds.Phone.Number);
}
- static IEnumerable<(string data, string type)> GetEmails(string[] idQ)
+ static IEnumerable GetEmails(string id)
{
- var uri = ContactsContract.CommonDataKinds.Email.ContentUri.BuildUpon().AppendQueryParameter(ContactsContract.RemoveDuplicateEntries, "1").Build();
- var cursor = Platform.ContentResolver.Query(uri, null, $"{ContactsContract.CommonDataKinds.Phone.InterfaceConsts.ContactId}=?", idQ, null);
+ var uri = CommonDataKinds.Email.ContentUri
+ .BuildUpon()
+ .AppendQueryParameter(ContactsContract.RemoveDuplicateEntries, "1")
+ .Build();
+
+ var cursor = Platform.ContentResolver.Query(uri, null, $"{contactIdCol}=?", new[] { id }, null);
- return ReadCursorItems(cursor, ContactsContract.CommonDataKinds.Email.Address, ContactsContract.CommonDataKinds.Email.InterfaceConsts.Type);
+ return ReadCursorItems(cursor, CommonDataKinds.Email.Address);
}
- static IEnumerable<(string data, string type)> ReadCursorItems(ICursor cursor, string dataKey, string typeKey)
+ static IEnumerable ReadCursorItems(ICursor cursor, string dataKey)
{
- if (cursor?.MoveToFirst() ?? false)
+ if (cursor?.MoveToFirst() == true)
{
do
{
- var data = cursor.GetString(cursor.GetColumnIndex(dataKey));
- var type = cursor.GetString(cursor.GetColumnIndex(typeKey));
-
+ var data = GetString(cursor, dataKey);
if (data != null)
- yield return (data, type);
+ yield return data;
}
while (cursor.MoveToNext());
}
cursor?.Close();
}
- static (string Prefix, string Given, string Middle, string Family, string Suffix) GetName(string idQ)
+ static (string Prefix, string Given, string Middle, string Family, string Suffix) GetName(string id)
{
- var whereNameParams = new string[] { ContactsContract.CommonDataKinds.StructuredName.ContentItemType };
- var whereName = $"{ContactsContract.Data.InterfaceConsts.Mimetype} = ? AND {ContactsContract.CommonDataKinds.StructuredName.InterfaceConsts.ContactId} = {idQ}";
+ var selection = $"{mimetypeCol}=? AND {contactIdCol}=?";
+ var selectionArgs = new string[] { StructuredName.ContentItemType, id };
+
using var cursor = Platform.ContentResolver.Query(
ContactsContract.Data.ContentUri,
null,
- whereName,
- whereNameParams,
+ selection,
+ selectionArgs,
null);
- if (cursor?.MoveToFirst() ?? false)
- {
- return (
- cursor.GetString(cursor.GetColumnIndex(ContactsContract.CommonDataKinds.StructuredName.Prefix)),
- cursor.GetString(cursor.GetColumnIndex(ContactsContract.CommonDataKinds.StructuredName.GivenName)),
- cursor.GetString(cursor.GetColumnIndex(ContactsContract.CommonDataKinds.StructuredName.MiddleName)),
- cursor.GetString(cursor.GetColumnIndex(ContactsContract.CommonDataKinds.StructuredName.FamilyName)),
- cursor.GetString(cursor.GetColumnIndex(ContactsContract.CommonDataKinds.StructuredName.Suffix)));
- }
+ if (cursor?.MoveToFirst() != true)
+ return (null, null, null, null, null);
- return (null, null, null, null, null);
+ return (
+ GetString(cursor, StructuredName.Prefix),
+ GetString(cursor, StructuredName.GivenName),
+ GetString(cursor, StructuredName.MiddleName),
+ GetString(cursor, StructuredName.FamilyName),
+ GetString(cursor, StructuredName.Suffix));
}
+
+ static string GetString(ICursor cursor, string column) =>
+ cursor.GetString(cursor.GetColumnIndex(column));
}
}
diff --git a/Xamarin.Essentials/Contacts/Contacts.ios.macos.cs b/Xamarin.Essentials/Contacts/Contacts.ios.macos.cs
index d1b54132e..17022bb04 100644
--- a/Xamarin.Essentials/Contacts/Contacts.ios.macos.cs
+++ b/Xamarin.Essentials/Contacts/Contacts.ios.macos.cs
@@ -39,6 +39,14 @@ static Task PlatformPickContactAsync()
})
};
+ if (picker.PresentationController != null)
+ {
+ picker.PresentationController.Delegate = new Platform.UIPresentationControllerDelegate
+ {
+ DismissHandler = () => source?.TrySetResult(null)
+ };
+ }
+
uiView.PresentViewController(picker, true, null);
return source.Task;
diff --git a/Xamarin.Essentials/DeviceDisplay/DeviceDisplay.android.cs b/Xamarin.Essentials/DeviceDisplay/DeviceDisplay.android.cs
index d105fd5b1..4747ce369 100644
--- a/Xamarin.Essentials/DeviceDisplay/DeviceDisplay.android.cs
+++ b/Xamarin.Essentials/DeviceDisplay/DeviceDisplay.android.cs
@@ -1,4 +1,6 @@
using System;
+using System.Diagnostics;
+using System.Threading.Tasks;
using Android.Content;
using Android.Content.Res;
using Android.Provider;
@@ -34,7 +36,7 @@ static bool PlatformKeepScreenOn
static DisplayInfo GetMainDisplayInfo()
{
using var displayMetrics = new DisplayMetrics();
- using var display = GetDefaultDisplay();
+ var display = GetDefaultDisplay();
display?.GetRealMetrics(displayMetrics);
return new DisplayInfo(
@@ -42,7 +44,8 @@ static DisplayInfo GetMainDisplayInfo()
height: displayMetrics?.HeightPixels ?? 0,
density: displayMetrics?.Density ?? 0,
orientation: CalculateOrientation(),
- rotation: CalculateRotation());
+ rotation: CalculateRotation(),
+ rate: display?.RefreshRate ?? 0);
}
static void StartScreenMetricsListeners()
@@ -66,7 +69,7 @@ static void OnScreenMetricsChanged()
static DisplayRotation CalculateRotation()
{
- using var display = GetDefaultDisplay();
+ var display = GetDefaultDisplay();
return display?.Rotation switch
{
@@ -91,9 +94,17 @@ static DisplayOrientation CalculateOrientation()
static Display GetDefaultDisplay()
{
- using var service = Platform.AppContext.GetSystemService(Context.WindowService);
- using var windowManager = service?.JavaCast();
- return windowManager?.DefaultDisplay;
+ try
+ {
+ using var service = Platform.AppContext.GetSystemService(Context.WindowService);
+ using var windowManager = service?.JavaCast();
+ return windowManager?.DefaultDisplay;
+ }
+ catch (Exception ex)
+ {
+ Debug.WriteLine($"Unable to get default display: {ex}");
+ return null;
+ }
}
}
@@ -104,6 +115,10 @@ class Listener : OrientationEventListener
internal Listener(Context context, Action handler)
: base(context) => onChanged = handler;
- public override void OnOrientationChanged(int orientation) => onChanged();
+ public override async void OnOrientationChanged(int orientation)
+ {
+ await Task.Delay(500);
+ onChanged();
+ }
}
}
diff --git a/Xamarin.Essentials/DeviceDisplay/DeviceDisplay.ios.cs b/Xamarin.Essentials/DeviceDisplay/DeviceDisplay.ios.cs
index 5ef3de6b4..2f7ce1e36 100644
--- a/Xamarin.Essentials/DeviceDisplay/DeviceDisplay.ios.cs
+++ b/Xamarin.Essentials/DeviceDisplay/DeviceDisplay.ios.cs
@@ -23,7 +23,8 @@ static DisplayInfo GetMainDisplayInfo()
height: bounds.Height * scale,
density: scale,
orientation: CalculateOrientation(),
- rotation: CalculateRotation());
+ rotation: CalculateRotation(),
+ rate: Platform.HasOSVersion(10, 3) ? UIScreen.MainScreen.MaximumFramesPerSecond : 0);
}
static void StartScreenMetricsListeners()
diff --git a/Xamarin.Essentials/DeviceDisplay/DeviceDisplay.macos.cs b/Xamarin.Essentials/DeviceDisplay/DeviceDisplay.macos.cs
index 35bbaf967..16c307c76 100644
--- a/Xamarin.Essentials/DeviceDisplay/DeviceDisplay.macos.cs
+++ b/Xamarin.Essentials/DeviceDisplay/DeviceDisplay.macos.cs
@@ -1,4 +1,5 @@
using AppKit;
+using CoreVideo;
using Foundation;
namespace Xamarin.Essentials
@@ -38,12 +39,22 @@ static DisplayInfo GetMainDisplayInfo()
var frame = mainScreen.Frame;
var scale = mainScreen.BackingScaleFactor;
+ var mainDisplayId = CoreGraphicsInterop.MainDisplayId;
+
+ // try determine the refresh rate, but fall back to 60Hz
+ var refreshRate = CoreGraphicsInterop.GetRefreshRate(mainDisplayId);
+ if (refreshRate == 0)
+ refreshRate = CVDisplayLinkInterop.GetRefreshRate(mainDisplayId);
+ if (refreshRate == 0)
+ refreshRate = 60.0;
+
return new DisplayInfo(
width: frame.Width,
height: frame.Height,
density: scale,
orientation: DisplayOrientation.Portrait,
- rotation: DisplayRotation.Rotation0);
+ rotation: DisplayRotation.Rotation0,
+ rate: (float)refreshRate);
}
static void StartScreenMetricsListeners()
diff --git a/Xamarin.Essentials/DeviceDisplay/DeviceDisplay.shared.cs b/Xamarin.Essentials/DeviceDisplay/DeviceDisplay.shared.cs
index 7583ccac9..8b6f10876 100644
--- a/Xamarin.Essentials/DeviceDisplay/DeviceDisplay.shared.cs
+++ b/Xamarin.Essentials/DeviceDisplay/DeviceDisplay.shared.cs
@@ -17,7 +17,7 @@ public static bool KeepScreenOn
public static DisplayInfo MainDisplayInfo => GetMainDisplayInfo();
static void SetCurrent(DisplayInfo metrics) =>
- currentMetrics = new DisplayInfo(metrics.Width, metrics.Height, metrics.Density, metrics.Orientation, metrics.Rotation);
+ currentMetrics = new DisplayInfo(metrics.Width, metrics.Height, metrics.Density, metrics.Orientation, metrics.Rotation, metrics.RefreshRate);
public static event EventHandler MainDisplayInfoChanged
{
diff --git a/Xamarin.Essentials/DeviceDisplay/DeviceDisplay.uwp.cs b/Xamarin.Essentials/DeviceDisplay/DeviceDisplay.uwp.cs
index 328055374..2ee952f75 100644
--- a/Xamarin.Essentials/DeviceDisplay/DeviceDisplay.uwp.cs
+++ b/Xamarin.Essentials/DeviceDisplay/DeviceDisplay.uwp.cs
@@ -1,4 +1,5 @@
using Windows.Graphics.Display;
+using Windows.Graphics.Display.Core;
using Windows.System.Display;
namespace Xamarin.Essentials
@@ -54,12 +55,16 @@ static DisplayInfo GetMainDisplayInfo(DisplayInformation di = null)
var w = di.ScreenWidthInRawPixels;
var h = di.ScreenHeightInRawPixels;
+ var hdi = HdmiDisplayInformation.GetForCurrentView();
+ var hdm = hdi?.GetCurrentDisplayMode();
+
return new DisplayInfo(
width: perpendicular ? h : w,
height: perpendicular ? w : h,
density: di.LogicalDpi / 96.0,
orientation: CalculateOrientation(di),
- rotation: rotation);
+ rotation: rotation,
+ rate: (float)(hdm?.RefreshRate ?? 0));
}
static void StartScreenMetricsListeners()
diff --git a/Xamarin.Essentials/DeviceInfo/DeviceInfo.macos.cs b/Xamarin.Essentials/DeviceInfo/DeviceInfo.macos.cs
index d1a217773..4ae018d4f 100644
--- a/Xamarin.Essentials/DeviceInfo/DeviceInfo.macos.cs
+++ b/Xamarin.Essentials/DeviceInfo/DeviceInfo.macos.cs
@@ -27,7 +27,9 @@ static string GetDeviceName()
try
{
+#pragma warning disable CS0618 // Type or member is obsolete
return NSString.FromHandle(computerNameHandle);
+#pragma warning restore CS0618 // Type or member is obsolete
}
finally
{
diff --git a/Xamarin.Essentials/Email/Email.ios.cs b/Xamarin.Essentials/Email/Email.ios.cs
index b8035526b..5b0cf6613 100644
--- a/Xamarin.Essentials/Email/Email.ios.cs
+++ b/Xamarin.Essentials/Email/Email.ios.cs
@@ -1,4 +1,6 @@
-using System.Threading.Tasks;
+using System;
+using System.IO;
+using System.Threading.Tasks;
using Foundation;
using MessageUI;
using UIKit;
@@ -42,17 +44,28 @@ static Task ComposeWithMailCompose(EmailMessage message)
foreach (var attachment in message.Attachments)
{
var data = NSData.FromFile(attachment.FullPath);
+ if (data == null)
+ throw new FileNotFoundException($"Attachment {attachment.FileName} not found.", attachment.FullPath);
+
controller.AddAttachmentData(data, attachment.ContentType, attachment.FileName);
}
}
- // show the controller
var tcs = new TaskCompletionSource();
controller.Finished += (sender, e) =>
{
controller.DismissViewController(true, null);
tcs.TrySetResult(e.Result == MFMailComposeResult.Sent);
};
+
+ if (controller.PresentationController != null)
+ {
+ controller.PresentationController.Delegate = new Platform.UIPresentationControllerDelegate
+ {
+ DismissHandler = () => tcs.TrySetResult(false)
+ };
+ }
+
parentController.PresentViewController(controller, true, null);
return tcs.Task;
diff --git a/Xamarin.Essentials/FilePicker/FilePicker.android.cs b/Xamarin.Essentials/FilePicker/FilePicker.android.cs
index dc83fc0ca..b6a576fd8 100644
--- a/Xamarin.Essentials/FilePicker/FilePicker.android.cs
+++ b/Xamarin.Essentials/FilePicker/FilePicker.android.cs
@@ -13,7 +13,7 @@ static async Task> PlatformPickAsync(PickOptions options
{
// we only need the permission when accessing the file, but it's more natural
// to ask the user first, then show the picker.
- await Permissions.RequestAsync();
+ await Permissions.EnsureGrantedAsync();
// Essentials supports >= API 19 where this action is available
var action = Intent.ActionOpenDocument;
diff --git a/Xamarin.Essentials/FilePicker/FilePicker.ios.cs b/Xamarin.Essentials/FilePicker/FilePicker.ios.cs
index 2a43df790..76516c429 100644
--- a/Xamarin.Essentials/FilePicker/FilePicker.ios.cs
+++ b/Xamarin.Essentials/FilePicker/FilePicker.ios.cs
@@ -11,7 +11,7 @@ namespace Xamarin.Essentials
{
public static partial class FilePicker
{
- static Task> PlatformPickAsync(PickOptions options, bool allowMultiple = false)
+ static async Task> PlatformPickAsync(PickOptions options, bool allowMultiple = false)
{
var allowedUtis = options?.FileTypes?.Value?.ToArray() ?? new string[]
{
@@ -22,45 +22,21 @@ static Task> PlatformPickAsync(PickOptions options, bool
var tcs = new TaskCompletionSource>();
- // Note: Importing (UIDocumentPickerMode.Import) makes a local copy of the document,
- // while opening (UIDocumentPickerMode.Open) opens the document directly. We do the
- // latter, so the user accesses the original file.
- var documentPicker = new UIDocumentPickerViewController(allowedUtis, UIDocumentPickerMode.Open);
+ // Use Open instead of Import so that we can attempt to use the original file.
+ // If the file is from an external provider, then it will be downloaded.
+ using var documentPicker = new UIDocumentPickerViewController(allowedUtis, UIDocumentPickerMode.Open);
if (Platform.HasOSVersion(11, 0))
documentPicker.AllowsMultipleSelection = allowMultiple;
documentPicker.Delegate = new PickerDelegate
{
- PickHandler = urls =>
- {
- try
- {
- tcs.TrySetResult(GetFileResults(urls));
- }
- catch (Exception ex)
- {
- // pass exception to task so that it doesn't get lost in the UI main loop
- tcs.SetException(ex);
- }
- }
+ PickHandler = urls => GetFileResults(urls, tcs)
};
if (documentPicker.PresentationController != null)
{
- documentPicker.PresentationController.Delegate = new PickerPresentationControllerDelegate
+ documentPicker.PresentationController.Delegate = new Platform.UIPresentationControllerDelegate
{
- PickHandler = urls =>
- {
- try
- {
- // there was a cancellation
- tcs.TrySetResult(GetFileResults(urls));
- }
- catch (Exception ex)
- {
- // pass exception to task so that it doesn't get lost in the UI main loop
- tcs.SetException(ex);
- }
- }
+ DismissHandler = () => GetFileResults(null, tcs)
};
}
@@ -68,13 +44,22 @@ static Task> PlatformPickAsync(PickOptions options, bool
parentController.PresentViewController(documentPicker, true, null);
- return tcs.Task;
+ return await tcs.Task;
}
- static IEnumerable GetFileResults(NSUrl[] urls) =>
- urls?.Length > 0
- ? urls.Select(url => new UIDocumentFileResult(url))
- : Enumerable.Empty();
+ static async void GetFileResults(NSUrl[] urls, TaskCompletionSource> tcs)
+ {
+ try
+ {
+ var results = await FileSystem.EnsurePhysicalFileResultsAsync(urls);
+
+ tcs.TrySetResult(results);
+ }
+ catch (Exception ex)
+ {
+ tcs.TrySetException(ex);
+ }
+ }
class PickerDelegate : UIDocumentPickerDelegate
{
@@ -89,14 +74,6 @@ public override void DidPickDocument(UIDocumentPickerViewController controller,
public override void DidPickDocument(UIDocumentPickerViewController controller, NSUrl url)
=> PickHandler?.Invoke(new NSUrl[] { url });
}
-
- class PickerPresentationControllerDelegate : UIAdaptivePresentationControllerDelegate
- {
- public Action PickHandler { get; set; }
-
- public override void DidDismiss(UIPresentationController presentationController) =>
- PickHandler?.Invoke(null);
- }
}
public partial class FilePickerFileType
diff --git a/Xamarin.Essentials/FileSystem/FileSystem.android.cs b/Xamarin.Essentials/FileSystem/FileSystem.android.cs
index e771a2ac7..7617f9cce 100644
--- a/Xamarin.Essentials/FileSystem/FileSystem.android.cs
+++ b/Xamarin.Essentials/FileSystem/FileSystem.android.cs
@@ -72,45 +72,51 @@ internal static Java.IO.File GetEssentialsTemporaryFile(Java.IO.File root, strin
return tmpFile;
}
- internal static string EnsurePhysicalPath(AndroidUri uri)
+ internal static string EnsurePhysicalPath(AndroidUri uri, bool requireExtendedAccess = true)
{
// if this is a file, use that
if (uri.Scheme.Equals(UriSchemeFile, StringComparison.OrdinalIgnoreCase))
return uri.Path;
// try resolve using the content provider
- var absolute = ResolvePhysicalPath(uri);
+ var absolute = ResolvePhysicalPath(uri, requireExtendedAccess);
if (!string.IsNullOrWhiteSpace(absolute) && Path.IsPathRooted(absolute))
return absolute;
// fall back to just copying it
- absolute = CacheContentFile(uri);
- if (!string.IsNullOrWhiteSpace(absolute) && Path.IsPathRooted(absolute))
- return absolute;
+ var cached = CacheContentFile(uri);
+ if (!string.IsNullOrWhiteSpace(cached) && Path.IsPathRooted(cached))
+ return cached;
throw new FileNotFoundException($"Unable to resolve absolute path or retrieve contents of URI '{uri}'.");
}
- static string ResolvePhysicalPath(AndroidUri uri)
+ static string ResolvePhysicalPath(AndroidUri uri, bool requireExtendedAccess = true)
{
- if (Platform.HasApiLevelKitKat && DocumentsContract.IsDocumentUri(Platform.AppContext, uri))
+ if (uri.Scheme.Equals(UriSchemeFile, StringComparison.OrdinalIgnoreCase))
{
- var resolved = ResolveDocumentPath(uri);
- if (File.Exists(resolved))
- return resolved;
- }
+ // if it is a file, then return directly
- if (uri.Scheme.Equals(UriSchemeContent, StringComparison.OrdinalIgnoreCase))
- {
- var resolved = ResolveContentPath(uri);
+ var resolved = uri.Path;
if (File.Exists(resolved))
return resolved;
}
- else if (uri.Scheme.Equals(UriSchemeFile, StringComparison.OrdinalIgnoreCase))
+ else if (!requireExtendedAccess || !Platform.HasApiLevel(29))
{
- var resolved = uri.Path;
- if (File.Exists(resolved))
- return resolved;
+ // if this is on an older OS version, or we just need it now
+
+ if (Platform.HasApiLevelKitKat && DocumentsContract.IsDocumentUri(Platform.AppContext, uri))
+ {
+ var resolved = ResolveDocumentPath(uri);
+ if (File.Exists(resolved))
+ return resolved;
+ }
+ else if (uri.Scheme.Equals(UriSchemeContent, StringComparison.OrdinalIgnoreCase))
+ {
+ var resolved = ResolveContentPath(uri);
+ if (File.Exists(resolved))
+ return resolved;
+ }
}
return null;
@@ -236,7 +242,11 @@ static string CacheContentFile(AndroidUri uri)
filename = Path.ChangeExtension(filename, extension);
// create a temporary file
- var tmpFile = GetEssentialsTemporaryFile(Platform.AppContext.CacheDir, filename);
+ var hasPermission = Permissions.IsDeclaredInManifest(global::Android.Manifest.Permission.WriteExternalStorage);
+ var root = hasPermission
+ ? Platform.AppContext.ExternalCacheDir
+ : Platform.AppContext.CacheDir;
+ var tmpFile = GetEssentialsTemporaryFile(root, filename);
// copy to the destination
using var dstStream = File.Create(tmpFile.CanonicalPath);
diff --git a/Xamarin.Essentials/FileSystem/FileSystem.ios.cs b/Xamarin.Essentials/FileSystem/FileSystem.ios.cs
index cd53f0d8b..873b88ead 100644
--- a/Xamarin.Essentials/FileSystem/FileSystem.ios.cs
+++ b/Xamarin.Essentials/FileSystem/FileSystem.ios.cs
@@ -1,5 +1,7 @@
using System;
+using System.Collections.Generic;
using System.IO;
+using System.Linq;
using System.Threading.Tasks;
using Foundation;
using Photos;
@@ -7,29 +9,168 @@
namespace Xamarin.Essentials
{
- class UIDocumentFileResult : FileResult
+ public partial class FileSystem
{
- readonly Stream fileStream;
+ internal static async Task EnsurePhysicalFileResultsAsync(params NSUrl[] urls)
+ {
+ if (urls == null || urls.Length == 0)
+ return Array.Empty();
- internal UIDocumentFileResult(NSUrl url)
+ var opts = NSFileCoordinatorReadingOptions.WithoutChanges;
+ var intents = urls.Select(x => NSFileAccessIntent.CreateReadingIntent(x, opts)).ToArray();
+
+ using var coordinator = new NSFileCoordinator();
+
+ var tcs = new TaskCompletionSource();
+
+ coordinator.CoordinateAccess(intents, new NSOperationQueue(), error =>
+ {
+ if (error != null)
+ {
+ tcs.TrySetException(new NSErrorException(error));
+ return;
+ }
+
+ var bookmarks = new List();
+
+ foreach (var intent in intents)
+ {
+ var url = intent.Url;
+ var result = new BookmarkDataFileResult(url);
+ bookmarks.Add(result);
+ }
+
+ tcs.TrySetResult(bookmarks.ToArray());
+ });
+
+ return await tcs.Task;
+ }
+ }
+
+ class BookmarkDataFileResult : FileResult
+ {
+ NSData bookmark;
+
+ internal BookmarkDataFileResult(NSUrl url)
: base()
{
- url.StartAccessingSecurityScopedResource();
+ try
+ {
+ url.StartAccessingSecurityScopedResource();
+
+ var newBookmark = url.CreateBookmarkData(0, Array.Empty(), null, out var bookmarkError);
+ if (bookmarkError != null)
+ throw new NSErrorException(bookmarkError);
+
+ UpdateBookmark(url, newBookmark);
+ }
+ finally
+ {
+ url.StopAccessingSecurityScopedResource();
+ }
+ }
+
+ void UpdateBookmark(NSUrl url, NSData newBookmark)
+ {
+ bookmark = newBookmark;
var doc = new UIDocument(url);
FullPath = doc.FileUrl?.Path;
FileName = doc.LocalizedName ?? Path.GetFileName(FullPath);
+ }
+
+ internal override Task PlatformOpenReadAsync()
+ {
+ var url = NSUrl.FromBookmarkData(bookmark, 0, null, out var isStale, out var error);
- // immediately open a file stream, in case iOS cleans up the picked file
- fileStream = File.OpenRead(FullPath);
+ if (error != null)
+ throw new NSErrorException(error);
+
+ url.StartAccessingSecurityScopedResource();
- url.StopAccessingSecurityScopedResource();
+ if (isStale)
+ {
+ var newBookmark = url.CreateBookmarkData(NSUrlBookmarkCreationOptions.SuitableForBookmarkFile, Array.Empty(), null, out error);
+ if (error != null)
+ throw new NSErrorException(error);
+
+ UpdateBookmark(url, newBookmark);
+ }
+
+ var fileStream = File.OpenRead(FullPath);
+ Stream stream = new SecurityScopedStream(fileStream, url);
+ return Task.FromResult(stream);
+ }
+
+ class SecurityScopedStream : Stream
+ {
+ FileStream stream;
+ NSUrl url;
+
+ internal SecurityScopedStream(FileStream stream, NSUrl url)
+ {
+ this.stream = stream;
+ this.url = url;
+ }
+
+ public override bool CanRead => stream.CanRead;
+
+ public override bool CanSeek => stream.CanSeek;
+
+ public override bool CanWrite => stream.CanWrite;
+
+ public override long Length => stream.Length;
+
+ public override long Position
+ {
+ get => stream.Position;
+ set => stream.Position = value;
+ }
+
+ public override void Flush() =>
+ stream.Flush();
+
+ public override int Read(byte[] buffer, int offset, int count) =>
+ stream.Read(buffer, offset, count);
+
+ public override long Seek(long offset, SeekOrigin origin) =>
+ stream.Seek(offset, origin);
+
+ public override void SetLength(long value) =>
+ stream.SetLength(value);
+
+ public override void Write(byte[] buffer, int offset, int count) =>
+ stream.Write(buffer, offset, count);
+
+ protected override void Dispose(bool disposing)
+ {
+ base.Dispose(disposing);
+
+ if (disposing)
+ {
+ stream?.Dispose();
+ stream = null;
+
+ url?.StopAccessingSecurityScopedResource();
+ url = null;
+ }
+ }
+ }
+ }
+
+ class UIDocumentFileResult : FileResult
+ {
+ internal UIDocumentFileResult(NSUrl url)
+ : base()
+ {
+ var doc = new UIDocument(url);
+ FullPath = doc.FileUrl?.Path;
+ FileName = doc.LocalizedName ?? Path.GetFileName(FullPath);
}
internal override Task PlatformOpenReadAsync()
{
- // make sure we are at he beginning
- fileStream.Seek(0, SeekOrigin.Begin);
+ Stream fileStream = File.OpenRead(FullPath);
return Task.FromResult(fileStream);
}
diff --git a/Xamarin.Essentials/Launcher/Launcher.ios.tvos.cs b/Xamarin.Essentials/Launcher/Launcher.ios.tvos.cs
index 2bbaa3bda..94db65c78 100644
--- a/Xamarin.Essentials/Launcher/Launcher.ios.tvos.cs
+++ b/Xamarin.Essentials/Launcher/Launcher.ios.tvos.cs
@@ -1,6 +1,8 @@
using System;
using System.Diagnostics;
+using System.Drawing;
using System.Threading.Tasks;
+using CoreGraphics;
using Foundation;
using UIKit;
@@ -34,43 +36,32 @@ static Task PlatformTryOpenAsync(Uri uri)
static Task PlatformOpenAsync(OpenFileRequest request)
{
- var fileUrl = NSUrl.FromFilename(request.File.FullPath);
-
- documentController = UIDocumentInteractionController.FromUrl(fileUrl);
- documentController.Delegate = new DocumentControllerDelegate
+ documentController = new UIDocumentInteractionController()
{
- DismissHandler = () =>
- {
- documentController?.Dispose();
- documentController = null;
- }
+ Name = request.File.FileName,
+ Url = NSUrl.FromFilename(request.File.FullPath),
+ Uti = request.File.ContentType
};
- documentController.Uti = request.File.ContentType;
- var vc = Platform.GetCurrentViewController();
+ var view = Platform.GetCurrentUIViewController().View;
+
+ CGRect rect;
- CoreGraphics.CGRect? rect = null;
- if (DeviceInfo.Idiom == DeviceIdiom.Tablet)
+ if (request.PresentationSourceBounds != Rectangle.Empty)
{
- rect = new CoreGraphics.CGRect(new CoreGraphics.CGPoint(vc.View.Bounds.Width / 2, vc.View.Bounds.Height), CoreGraphics.CGRect.Empty.Size);
+ rect = request.PresentationSourceBounds.ToPlatformRectangle();
}
else
{
- rect = vc.View.Bounds;
+ rect = DeviceInfo.Idiom == DeviceIdiom.Tablet
+ ? new CGRect(new CGPoint(view.Bounds.Width / 2, view.Bounds.Height), CGRect.Empty.Size)
+ : view.Bounds;
}
- documentController.PresentOpenInMenu(rect.Value, vc.View, true);
-
+ documentController.PresentOpenInMenu(rect, view, true);
return Task.CompletedTask;
}
- class DocumentControllerDelegate : UIDocumentInteractionControllerDelegate
- {
- public Action DismissHandler { get; set; }
-
- public override void DidDismissOpenInMenu(UIDocumentInteractionController controller)
- => DismissHandler?.Invoke();
- }
#else
static Task PlatformOpenAsync(OpenFileRequest request) =>
throw new FeatureNotSupportedException();
diff --git a/Xamarin.Essentials/Launcher/Launcher.shared.cs b/Xamarin.Essentials/Launcher/Launcher.shared.cs
index 6fab395f2..1fc905ea8 100644
--- a/Xamarin.Essentials/Launcher/Launcher.shared.cs
+++ b/Xamarin.Essentials/Launcher/Launcher.shared.cs
@@ -1,6 +1,8 @@
using System;
-using System.IO;
using System.Threading.Tasks;
+#if !NETSTANDARD1_0
+using System.Drawing;
+#endif
namespace Xamarin.Essentials
{
@@ -86,5 +88,9 @@ public OpenFileRequest(string title, FileBase file)
public string Title { get; set; }
public ReadOnlyFile File { get; set; }
+
+#if !NETSTANDARD1_0
+ public Rectangle PresentationSourceBounds { get; set; } = Rectangle.Empty;
+#endif
}
}
diff --git a/Xamarin.Essentials/MediaPicker/MediaPicker.android.cs b/Xamarin.Essentials/MediaPicker/MediaPicker.android.cs
index 76e51ab15..2c4a22dfd 100644
--- a/Xamarin.Essentials/MediaPicker/MediaPicker.android.cs
+++ b/Xamarin.Essentials/MediaPicker/MediaPicker.android.cs
@@ -22,7 +22,7 @@ static async Task PlatformPickAsync(MediaPickerOptions options, bool
{
// We only need the permission when accessing the file, but it's more natural
// to ask the user first, then show the picker.
- await Permissions.RequestAsync();
+ await Permissions.EnsureGrantedAsync();
var intent = new Intent(Intent.ActionGetContent);
intent.SetType(photo ? FileSystem.MimeTypes.ImageAll : FileSystem.MimeTypes.VideoAll);
diff --git a/Xamarin.Essentials/MediaPicker/MediaPicker.ios.cs b/Xamarin.Essentials/MediaPicker/MediaPicker.ios.cs
index 58b1988b4..44a06155a 100644
--- a/Xamarin.Essentials/MediaPicker/MediaPicker.ios.cs
+++ b/Xamarin.Essentials/MediaPicker/MediaPicker.ios.cs
@@ -37,7 +37,8 @@ static async Task PhotoAsync(MediaPickerOptions options, bool photo,
if (!UIImagePickerController.AvailableMediaTypes(sourceType).Contains(mediaType))
throw new FeatureNotSupportedException();
- if (!photo)
+ // microphone only needed if video will be captured
+ if (!photo && !pickExisting)
await Permissions.EnsureGrantedAsync();
// Check if picking existing or not and ensure permission accordingly as they can be set independently from each other
@@ -65,34 +66,18 @@ static async Task PhotoAsync(MediaPickerOptions options, bool photo,
var tcs = new TaskCompletionSource(picker);
picker.Delegate = new PhotoPickerDelegate
{
- CompletedHandler = info =>
+ CompletedHandler = async info =>
{
- try
- {
- tcs.TrySetResult(DictionaryToMediaFile(info));
- }
- catch (Exception ex)
- {
- tcs.TrySetException(ex);
- }
+ GetFileResult(info, tcs);
+ await vc.DismissViewControllerAsync(true);
}
};
if (picker.PresentationController != null)
{
- picker.PresentationController.Delegate = new PhotoPickerPresentationControllerDelegate
+ picker.PresentationController.Delegate = new Platform.UIPresentationControllerDelegate
{
- CompletedHandler = info =>
- {
- try
- {
- tcs.TrySetResult(DictionaryToMediaFile(info));
- }
- catch (Exception ex)
- {
- tcs.TrySetException(ex);
- }
- }
+ DismissHandler = () => GetFileResult(null, tcs)
};
}
@@ -100,14 +85,24 @@ static async Task PhotoAsync(MediaPickerOptions options, bool photo,
var result = await tcs.Task;
- await vc.DismissViewControllerAsync(true);
-
picker?.Dispose();
picker = null;
return result;
}
+ static void GetFileResult(NSDictionary info, TaskCompletionSource tcs)
+ {
+ try
+ {
+ tcs.TrySetResult(DictionaryToMediaFile(info));
+ }
+ catch (Exception ex)
+ {
+ tcs.TrySetException(ex);
+ }
+ }
+
static FileResult DictionaryToMediaFile(NSDictionary info)
{
if (info == null)
@@ -172,13 +167,5 @@ public override void FinishedPickingMedia(UIImagePickerController picker, NSDict
public override void Canceled(UIImagePickerController picker) =>
CompletedHandler?.Invoke(null);
}
-
- class PhotoPickerPresentationControllerDelegate : UIAdaptivePresentationControllerDelegate
- {
- public Action CompletedHandler { get; set; }
-
- public override void DidDismiss(UIPresentationController presentationController) =>
- CompletedHandler?.Invoke(null);
- }
}
}
diff --git a/Xamarin.Essentials/Permissions/Permissions.android.cs b/Xamarin.Essentials/Permissions/Permissions.android.cs
index f8afa8f69..e80105ae7 100644
--- a/Xamarin.Essentials/Permissions/Permissions.android.cs
+++ b/Xamarin.Essentials/Permissions/Permissions.android.cs
@@ -29,10 +29,23 @@ public static bool IsDeclaredInManifest(string permission)
internal static void OnRequestPermissionsResult(int requestCode, string[] permissions, Permission[] grantResults)
=> BasePlatformPermission.OnRequestPermissionsResult(requestCode, permissions, grantResults);
+ public partial class PermissionResult
+ {
+ public PermissionResult(string[] permissions, Permission[] grantResults)
+ {
+ Permissions = permissions;
+ GrantResults = grantResults;
+ }
+
+ public string[] Permissions { get; }
+
+ public Permission[] GrantResults { get; }
+ }
+
public abstract partial class BasePlatformPermission : BasePermission
{
- static readonly Dictionary tcs)> requests =
- new Dictionary)>();
+ static readonly Dictionary> requests =
+ new Dictionary>();
static readonly object locker = new object();
static int requestCode;
@@ -79,9 +92,6 @@ public override async Task RequestAsync()
if (await CheckStatusAsync() == PermissionStatus.Granted)
return PermissionStatus.Granted;
- TaskCompletionSource tcs;
- var doRequest = true;
-
var runtimePermissions = RequiredPermissions.Where(p => p.isRuntime)
?.Select(p => p.androidPermission)?.ToArray();
@@ -90,38 +100,32 @@ public override async Task RequestAsync()
if (runtimePermissions == null || !runtimePermissions.Any())
return PermissionStatus.Granted;
- var permissionId = string.Join(';', runtimePermissions);
+ var permissionResult = await DoRequest(runtimePermissions);
+ if (permissionResult.GrantResults.Any(g => g == Permission.Denied))
+ return PermissionStatus.Denied;
+
+ return PermissionStatus.Granted;
+ }
+
+ protected virtual async Task DoRequest(string[] permissions)
+ {
+ TaskCompletionSource tcs;
lock (locker)
{
- if (requests.ContainsKey(permissionId))
- {
- tcs = requests[permissionId].tcs;
- doRequest = false;
- }
- else
- {
- tcs = new TaskCompletionSource();
+ tcs = new TaskCompletionSource();
- requestCode = Platform.NextRequestCode();
+ requestCode = Platform.NextRequestCode();
- requests.Add(permissionId, (requestCode, tcs));
- }
+ requests.Add(requestCode, tcs);
}
- if (!doRequest)
- return await tcs.Task;
-
if (!MainThread.IsMainThread)
throw new PermissionException("Permission request must be invoked on main thread.");
- ActivityCompat.RequestPermissions(Platform.GetCurrentActivity(true), runtimePermissions.ToArray(), requestCode);
+ ActivityCompat.RequestPermissions(Platform.GetCurrentActivity(true), permissions.ToArray(), requestCode);
var result = await tcs.Task;
-
- if (requests.ContainsKey(permissionId))
- requests.Remove(permissionId);
-
return result;
}
@@ -157,22 +161,11 @@ internal static void OnRequestPermissionsResult(int requestCode, string[] permis
{
lock (locker)
{
- // Check our pending requests for one with a matching request code
- foreach (var kvp in requests)
+ if (requests.ContainsKey(requestCode))
{
- if (kvp.Value.requestCode == requestCode)
- {
- var tcs = kvp.Value.tcs;
-
- // Look for any denied requests, and deny the whole request if so
- // Remember, each PermissionType is tied to 1 or more android permissions
- // so if any android permissions denied the whole PermissionType is considered denied
- if (grantResults.Any(g => g == Permission.Denied))
- tcs.TrySetResult(PermissionStatus.Denied);
- else
- tcs.TrySetResult(PermissionStatus.Granted);
- break;
- }
+ var result = new PermissionResult(permissions, grantResults);
+ requests[requestCode].TrySetResult(result);
+ requests.Remove(requestCode);
}
}
}
@@ -239,6 +232,24 @@ public override (string androidPermission, bool isRuntime)[] RequiredPermissions
(Manifest.Permission.AccessCoarseLocation, true),
(Manifest.Permission.AccessFineLocation, true)
};
+
+ public override async Task RequestAsync()
+ {
+ // Check status before requesting first
+ if (await CheckStatusAsync() == PermissionStatus.Granted)
+ return PermissionStatus.Granted;
+
+ var permissionResult = await DoRequest(new string[] { Manifest.Permission.AccessCoarseLocation, Manifest.Permission.AccessFineLocation });
+
+ // when requesting fine location, user can decline and set coarse instead
+ var count = permissionResult.GrantResults.Count(x => x == Permission.Granted);
+ return count switch
+ {
+ 2 => PermissionStatus.Granted,
+ 1 => PermissionStatus.Restricted,
+ _ => PermissionStatus.Denied
+ };
+ }
}
public partial class LocationAlways : BasePlatformPermission
@@ -260,6 +271,30 @@ public override (string androidPermission, bool isRuntime)[] RequiredPermissions
return permissions.ToArray();
}
}
+
+#if __ANDROID_29__
+ public override async Task RequestAsync()
+ {
+ // Check status before requesting first
+ if (await CheckStatusAsync() == PermissionStatus.Granted)
+ return PermissionStatus.Granted;
+
+ if (Platform.HasApiLevel(30))
+ {
+ var permissionResult = await new LocationWhenInUse().RequestAsync();
+ if (permissionResult == PermissionStatus.Denied)
+ return PermissionStatus.Denied;
+
+ var result = await DoRequest(new string[] { Manifest.Permission.AccessBackgroundLocation });
+ if (!result.GrantResults.All(x => x == Permission.Granted))
+ permissionResult = PermissionStatus.Restricted;
+
+ return permissionResult;
+ }
+
+ return await base.RequestAsync();
+ }
+#endif
}
public partial class Maps : BasePlatformPermission
diff --git a/Xamarin.Essentials/Permissions/Permissions.ios.tvos.watchos.cs b/Xamarin.Essentials/Permissions/Permissions.ios.tvos.watchos.cs
index 7404a05bd..e4af5e548 100644
--- a/Xamarin.Essentials/Permissions/Permissions.ios.tvos.watchos.cs
+++ b/Xamarin.Essentials/Permissions/Permissions.ios.tvos.watchos.cs
@@ -210,7 +210,7 @@ public void AuthorizationChanged(CLLocationManager manager, CLAuthorizationStatu
[Export("locationManagerDidChangeAuthorization:")]
public void DidChangeAuthorization(CLLocationManager manager) =>
- AuthorizationStatusChanged?.Invoke(this, new CLAuthorizationChangedEventArgs(manager.AuthorizationStatus));
+ AuthorizationStatusChanged?.Invoke(this, new CLAuthorizationChangedEventArgs(manager.GetAuthorizationStatus()));
}
}
diff --git a/Xamarin.Essentials/PhoneDialer/PhoneDialer.android.cs b/Xamarin.Essentials/PhoneDialer/PhoneDialer.android.cs
index 3274d1ca7..7ca7a6006 100644
--- a/Xamarin.Essentials/PhoneDialer/PhoneDialer.android.cs
+++ b/Xamarin.Essentials/PhoneDialer/PhoneDialer.android.cs
@@ -28,21 +28,21 @@ static void PlatformOpen(string number)
var phoneNumber = string.Empty;
#if __ANDROID_24__
if (Platform.HasApiLevelN)
- phoneNumber = PhoneNumberUtils.FormatNumber(number, Java.Util.Locale.GetDefault(Java.Util.Locale.Category.Format).Country);
+ phoneNumber = PhoneNumberUtils.FormatNumber(number, Java.Util.Locale.GetDefault(Java.Util.Locale.Category.Format).Country) ?? phoneNumber;
else if (Platform.HasApiLevel(BuildVersionCodes.Lollipop))
#else
if (Platform.HasApiLevel(BuildVersionCodes.Lollipop))
#endif
- phoneNumber = PhoneNumberUtils.FormatNumber(number, Java.Util.Locale.Default.Country);
+ phoneNumber = PhoneNumberUtils.FormatNumber(number, Java.Util.Locale.Default.Country) ?? phoneNumber;
else
#pragma warning disable CS0618
- phoneNumber = PhoneNumberUtils.FormatNumber(number);
+ phoneNumber = PhoneNumberUtils.FormatNumber(number) ?? phoneNumber;
#pragma warning restore CS0618
// if we are an extension then we need to encode
if (phoneNumber.Contains(',') || phoneNumber.Contains(';'))
- phoneNumber = URLEncoder.Encode(phoneNumber, "UTF-8");
+ phoneNumber = URLEncoder.Encode(phoneNumber, "UTF-8") ?? phoneNumber;
var dialIntent = ResolveDialIntent(phoneNumber);
diff --git a/Xamarin.Essentials/Platform/Platform.ios.tvos.watchos.cs b/Xamarin.Essentials/Platform/Platform.ios.tvos.watchos.cs
index 635e4d3f7..3461d6e6d 100644
--- a/Xamarin.Essentials/Platform/Platform.ios.tvos.watchos.cs
+++ b/Xamarin.Essentials/Platform/Platform.ios.tvos.watchos.cs
@@ -73,12 +73,20 @@ internal static bool HasOSVersion(int major, int minor) =>
#if __IOS__ || __TVOS__
+ static Func getCurrentController;
+
+ public static void Init(Func getCurrentUIViewController)
+ => getCurrentController = getCurrentUIViewController;
+
public static UIViewController GetCurrentUIViewController() =>
GetCurrentViewController(false);
internal static UIViewController GetCurrentViewController(bool throwIfNull = true)
{
- UIViewController viewController = null;
+ var viewController = getCurrentController?.Invoke();
+
+ if (viewController != null)
+ return viewController;
var window = UIApplication.SharedApplication.KeyWindow;
@@ -138,5 +146,24 @@ internal static UIWindow GetCurrentWindow(bool throwIfNull = true)
internal static NSOperationQueue GetCurrentQueue() =>
NSOperationQueue.CurrentQueue ?? new NSOperationQueue();
+
+#if __IOS__
+ internal class UIPresentationControllerDelegate : UIAdaptivePresentationControllerDelegate
+ {
+ public Action DismissHandler { get; set; }
+
+ public override void DidDismiss(UIPresentationController presentationController)
+ {
+ DismissHandler?.Invoke();
+ DismissHandler = null;
+ }
+
+ protected override void Dispose(bool disposing)
+ {
+ DismissHandler?.Invoke();
+ base.Dispose(disposing);
+ }
+ }
+#endif
}
}
diff --git a/Xamarin.Essentials/Platform/Platform.macos.cs b/Xamarin.Essentials/Platform/Platform.macos.cs
index fbe0981d9..9f09000fc 100644
--- a/Xamarin.Essentials/Platform/Platform.macos.cs
+++ b/Xamarin.Essentials/Platform/Platform.macos.cs
@@ -2,6 +2,7 @@
using System.Runtime.InteropServices;
using AppKit;
using CoreFoundation;
+using CoreVideo;
using Foundation;
using ObjCRuntime;
@@ -20,6 +21,57 @@ internal static NSWindow GetCurrentWindow(bool throwIfNull = true)
}
}
+ internal static class CoreGraphicsInterop
+ {
+ public static uint MainDisplayId => CGMainDisplayID();
+
+ [DllImport(Constants.CoreGraphicsLibrary)]
+ static extern IntPtr CGDisplayCopyDisplayMode(uint display);
+
+ [DllImport(Constants.CoreGraphicsLibrary)]
+ static extern void CGDisplayModeRelease(IntPtr mode);
+
+ [DllImport(Constants.CoreGraphicsLibrary)]
+ static extern double CGDisplayModeGetRefreshRate(IntPtr mode);
+
+ [DllImport(Constants.CoreGraphicsLibrary)]
+ static extern uint CGMainDisplayID();
+
+ public static double GetRefreshRate(uint display)
+ {
+ var mode = CGDisplayCopyDisplayMode(display);
+ if (mode == IntPtr.Zero)
+ return 0.0;
+
+ var refreshRate = CGDisplayModeGetRefreshRate(mode);
+
+ CGDisplayModeRelease(mode);
+
+ return refreshRate;
+ }
+ }
+
+ internal static class CVDisplayLinkInterop
+ {
+ [DllImport(Constants.CoreGraphicsLibrary)]
+ static extern int CVDisplayLinkCreateWithCGDisplay(uint display, out IntPtr handle);
+
+ public static double GetRefreshRate(uint display)
+ {
+ var result = CVDisplayLinkCreateWithCGDisplay(display, out var handle);
+ if (result != 0 || handle == IntPtr.Zero)
+ return 0.0;
+
+ using var dl = new CVDisplayLink(handle);
+
+ var period = dl.NominalOutputVideoRefreshPeriod;
+ if (((CVTimeFlags)period.Flags).HasFlag(CVTimeFlags.IsIndefinite) || period.TimeValue == 0)
+ return 0.0;
+
+ return period.TimeScale / (double)period.TimeValue;
+ }
+ }
+
internal static class IOKit
{
const string IOKitLibrary = "/System/Library/Frameworks/IOKit.framework/IOKit";
@@ -180,7 +232,9 @@ internal static BatteryState GetInternalBatteryState()
// we weren't able to work out what was happening, so try and guess
var typeHandle = IOPSGetProvidingPowerSourceType(infoHandle);
+#pragma warning disable CS0618 // Type or member is obsolete
if (NSString.FromHandle(typeHandle) == kIOPMBatteryPowerKey)
+#pragma warning restore CS0618 // Type or member is obsolete
return BatteryState.Discharging;
return BatteryState.NotCharging;
@@ -245,7 +299,9 @@ internal static BatteryPowerSource GetProvidingPowerSource()
{
infoHandle = IOPSCopyPowerSourcesInfo();
var typeHandle = IOPSGetProvidingPowerSourceType(infoHandle);
+#pragma warning disable CS0618 // Type or member is obsolete
switch (NSString.FromHandle(typeHandle))
+#pragma warning restore CS0618 // Type or member is obsolete
{
case kIOPMBatteryPowerKey:
return BatteryPowerSource.Battery;
diff --git a/Xamarin.Essentials/Share/Share.ios.cs b/Xamarin.Essentials/Share/Share.ios.cs
index 6d40e5cd6..162415527 100644
--- a/Xamarin.Essentials/Share/Share.ios.cs
+++ b/Xamarin.Essentials/Share/Share.ios.cs
@@ -58,7 +58,7 @@ static Task PlatformRequestAsync(ShareMultipleFilesRequest request)
{
activityController.PopoverPresentationController.SourceView = vc.View;
- if (request.PresentationSourceBounds != Rectangle.Empty)
+ if (request.PresentationSourceBounds != Rectangle.Empty || Platform.HasOSVersion(13, 0))
activityController.PopoverPresentationController.SourceRect = request.PresentationSourceBounds.ToPlatformRectangle();
}
diff --git a/Xamarin.Essentials/Sms/Sms.ios.cs b/Xamarin.Essentials/Sms/Sms.ios.cs
index 19da4bbb1..acd775f99 100644
--- a/Xamarin.Essentials/Sms/Sms.ios.cs
+++ b/Xamarin.Essentials/Sms/Sms.ios.cs
@@ -21,13 +21,21 @@ static Task PlatformComposeAsync(SmsMessage message)
messageController.Recipients = message?.Recipients?.ToArray() ?? new string[] { };
- // show the controller
var tcs = new TaskCompletionSource();
messageController.Finished += (sender, e) =>
{
messageController.DismissViewController(true, null);
tcs?.TrySetResult(e.Result == MessageComposeResult.Sent);
};
+
+ if (controller.PresentationController != null)
+ {
+ controller.PresentationController.Delegate = new Platform.UIPresentationControllerDelegate
+ {
+ DismissHandler = () => tcs.TrySetResult(false)
+ };
+ }
+
controller.PresentViewController(messageController, true, null);
return tcs.Task;
diff --git a/Xamarin.Essentials/TextToSpeech/TextToSpeech.ios.tvos.watchos.cs b/Xamarin.Essentials/TextToSpeech/TextToSpeech.ios.tvos.watchos.cs
index f7f555eb6..bf6eca930 100644
--- a/Xamarin.Essentials/TextToSpeech/TextToSpeech.ios.tvos.watchos.cs
+++ b/Xamarin.Essentials/TextToSpeech/TextToSpeech.ios.tvos.watchos.cs
@@ -13,7 +13,7 @@ public static partial class TextToSpeech
internal static Task> PlatformGetLocalesAsync() =>
Task.FromResult(AVSpeechSynthesisVoice.GetSpeechVoices()
- .Select(v => new Locale(v.Language, null, v.Language, v.Identifier)));
+ .Select(v => new Locale(v.Language, null, v.Name, v.Identifier)));
internal static async Task PlatformSpeakAsync(string text, SpeechOptions options, CancellationToken cancelToken = default)
{
diff --git a/Xamarin.Essentials/TextToSpeech/TextToSpeech.macos.cs b/Xamarin.Essentials/TextToSpeech/TextToSpeech.macos.cs
index 626aecde0..f8977801d 100644
--- a/Xamarin.Essentials/TextToSpeech/TextToSpeech.macos.cs
+++ b/Xamarin.Essentials/TextToSpeech/TextToSpeech.macos.cs
@@ -14,7 +14,8 @@ public static partial class TextToSpeech
internal static Task> PlatformGetLocalesAsync() =>
Task.FromResult(NSSpeechSynthesizer.AvailableVoices
- .Select(v => new Locale(v, null, null, null)));
+ .Select(voice => NSSpeechSynthesizer.AttributesForVoice(voice))
+ .Select(attribute => new Locale(attribute["VoiceLanguage"]?.ToString(), null, attribute["VoiceName"]?.ToString(), attribute["VoiceIdentifier"]?.ToString())));
internal static async Task PlatformSpeakAsync(string text, SpeechOptions options, CancellationToken cancelToken = default)
{
@@ -30,7 +31,7 @@ internal static async Task PlatformSpeakAsync(string text, SpeechOptions options
ss.Volume = NormalizeVolume(options.Volume);
if (options.Locale != null)
- ss.Voice = options.Locale.Language;
+ ss.Voice = options.Locale.Id;
}
ssd.FinishedSpeaking += OnFinishedSpeaking;
diff --git a/Xamarin.Essentials/Types/DisplayInfo.shared.cs b/Xamarin.Essentials/Types/DisplayInfo.shared.cs
index 530657e39..6923f6865 100644
--- a/Xamarin.Essentials/Types/DisplayInfo.shared.cs
+++ b/Xamarin.Essentials/Types/DisplayInfo.shared.cs
@@ -12,6 +12,17 @@ public DisplayInfo(double width, double height, double density, DisplayOrientati
Density = density;
Orientation = orientation;
Rotation = rotation;
+ RefreshRate = 0;
+ }
+
+ public DisplayInfo(double width, double height, double density, DisplayOrientation orientation, DisplayRotation rotation, float rate)
+ {
+ Width = width;
+ Height = height;
+ Density = density;
+ Orientation = orientation;
+ Rotation = rotation;
+ RefreshRate = rate;
}
public double Width { get; }
@@ -24,6 +35,8 @@ public DisplayInfo(double width, double height, double density, DisplayOrientati
public DisplayRotation Rotation { get; }
+ public float RefreshRate { get; }
+
public static bool operator ==(DisplayInfo left, DisplayInfo right) =>
left.Equals(right);
diff --git a/Xamarin.Essentials/Types/LocationExtensions.ios.tvos.watchos.macos.cs b/Xamarin.Essentials/Types/LocationExtensions.ios.tvos.watchos.macos.cs
index 80355b6df..cfdf74fa3 100644
--- a/Xamarin.Essentials/Types/LocationExtensions.ios.tvos.watchos.macos.cs
+++ b/Xamarin.Essentials/Types/LocationExtensions.ios.tvos.watchos.macos.cs
@@ -8,6 +8,9 @@ namespace Xamarin.Essentials
{
public static partial class LocationExtensions
{
+ [System.Runtime.InteropServices.DllImport(ObjCRuntime.Constants.ObjectiveCLibrary, EntryPoint = "objc_msgSend")]
+ static extern CLAuthorizationStatus CLAuthorizationStatus_objc_msgSend(IntPtr receiver, IntPtr selector);
+
internal static Location ToLocation(this CLPlacemark placemark) =>
new Location
{
@@ -30,7 +33,7 @@ internal static Location ToLocation(this CLLocation location) =>
Accuracy = location.HorizontalAccuracy,
VerticalAccuracy = location.VerticalAccuracy,
Timestamp = location.Timestamp.ToDateTime(),
-#if __iOS__ || __WATCHOS__
+#if __IOS__ || __WATCHOS__
Course = location.Course < 0 ? default(double?) : location.Course,
Speed = location.Speed < 0 ? default(double?) : location.Speed,
#endif
@@ -52,15 +55,19 @@ internal static DateTimeOffset ToDateTime(this NSDate timestamp)
internal static CLAuthorizationStatus GetAuthorizationStatus(this CLLocationManager locationManager)
{
-#if !__MACOS__ // this is coming in macOS 11
-#if __WATCHOS__
+#if __MACOS__
+ if (DeviceInfo.Version >= new Version(11, 0))
+#elif __WATCHOS__
if (Platform.HasOSVersion(7, 0))
#else
if (Platform.HasOSVersion(14, 0))
#endif
- return locationManager.AuthorizationStatus;
+ {
+ // return locationManager.AuthorizationStatus;
-#endif
+ var sel = ObjCRuntime.Selector.GetHandle("authorizationStatus");
+ return CLAuthorizationStatus_objc_msgSend(locationManager.Handle, sel);
+ }
return CLLocationManager.Status;
}
diff --git a/Xamarin.Essentials/Types/PlatformExtensions/ColorExtensions.ios.tvos.watchos.cs b/Xamarin.Essentials/Types/PlatformExtensions/ColorExtensions.ios.tvos.watchos.cs
index 3dd7fed4f..058bd0b50 100644
--- a/Xamarin.Essentials/Types/PlatformExtensions/ColorExtensions.ios.tvos.watchos.cs
+++ b/Xamarin.Essentials/Types/PlatformExtensions/ColorExtensions.ios.tvos.watchos.cs
@@ -12,7 +12,7 @@ public static Color ToSystemColor(this UIColor color)
throw new ArgumentNullException(nameof(color));
color.GetRGBA(out var red, out var green, out var blue, out var alpha);
- return Color.FromArgb((int)(alpha * 255), (int)(red * 255), (int)(green * 255), (int)(blue * 255));
+ return Color.FromArgb((int)Math.Round(alpha * 255), (int)Math.Round(red * 255), (int)Math.Round(green * 255), (int)Math.Round(blue * 255));
}
public static UIColor ToPlatformColor(this Color color) =>
diff --git a/Xamarin.Essentials/Types/PlatformExtensions/ColorExtensions.macos.cs b/Xamarin.Essentials/Types/PlatformExtensions/ColorExtensions.macos.cs
index ec39fbdb5..e79447d58 100644
--- a/Xamarin.Essentials/Types/PlatformExtensions/ColorExtensions.macos.cs
+++ b/Xamarin.Essentials/Types/PlatformExtensions/ColorExtensions.macos.cs
@@ -16,7 +16,7 @@ public static Color ToSystemColor(this NSColor color)
color = color.UsingColorSpace(NSColorSpace.SRGBColorSpace);
color.GetRgba(out var red, out var green, out var blue, out var alpha);
- return Color.FromArgb((int)(alpha * 255), (int)(red * 255), (int)(green * 255), (int)(blue * 255));
+ return Color.FromArgb((int)Math.Round(alpha * 255), (int)Math.Round(red * 255), (int)Math.Round(green * 255), (int)Math.Round(blue * 255));
}
public static NSColor ToPlatformColor(this Color color) =>
diff --git a/Xamarin.Essentials/WebAuthenticator/WebAuthenticator.android.cs b/Xamarin.Essentials/WebAuthenticator/WebAuthenticator.android.cs
index 762825e81..482185ba4 100644
--- a/Xamarin.Essentials/WebAuthenticator/WebAuthenticator.android.cs
+++ b/Xamarin.Essentials/WebAuthenticator/WebAuthenticator.android.cs
@@ -47,8 +47,10 @@ internal static bool OnResume(Intent intent)
}
}
- static async Task PlatformAuthenticateAsync(Uri url, Uri callbackUrl)
+ static async Task PlatformAuthenticateAsync(WebAuthenticatorOptions webAuthenticatorOptions)
{
+ var url = webAuthenticatorOptions?.Url;
+ var callbackUrl = webAuthenticatorOptions?.CallbackUrl;
var packageName = Platform.AppContext.PackageName;
// Create an intent to see if the app developer wired up the callback activity correctly
diff --git a/Xamarin.Essentials/WebAuthenticator/WebAuthenticator.ios.tvos.cs b/Xamarin.Essentials/WebAuthenticator/WebAuthenticator.ios.tvos.cs
index 8ff0b6c38..99fbce63c 100644
--- a/Xamarin.Essentials/WebAuthenticator/WebAuthenticator.ios.tvos.cs
+++ b/Xamarin.Essentials/WebAuthenticator/WebAuthenticator.ios.tvos.cs
@@ -9,6 +9,7 @@
using SafariServices;
#endif
using UIKit;
+using WebKit;
namespace Xamarin.Essentials
{
@@ -36,8 +37,12 @@ public static partial class WebAuthenticator
static SFAuthenticationSession sf;
#endif
- internal static async Task PlatformAuthenticateAsync(Uri url, Uri callbackUrl)
+ internal static async Task PlatformAuthenticateAsync(WebAuthenticatorOptions webAuthenticatorOptions)
{
+ var url = webAuthenticatorOptions?.Url;
+ var callbackUrl = webAuthenticatorOptions?.CallbackUrl;
+ var prefersEphemeralWebBrowserSession = webAuthenticatorOptions?.PrefersEphemeralWebBrowserSession ?? false;
+
if (!VerifyHasUrlSchemeOrDoesntRequire(callbackUrl.Scheme))
throw new InvalidOperationException("You must register your URL Scheme handler in your app's Info.plist.");
@@ -73,6 +78,11 @@ static void AuthSessionCallback(NSUrl cbUrl, NSError error)
{
var ctx = new ContextProvider(Platform.GetCurrentWindow());
void_objc_msgSend_IntPtr(was.Handle, ObjCRuntime.Selector.GetHandle("setPresentationContextProvider:"), ctx.Handle);
+ was.PrefersEphemeralWebBrowserSession = prefersEphemeralWebBrowserSession;
+ }
+ else if (prefersEphemeralWebBrowserSession)
+ {
+ ClearCookies();
}
using (was)
@@ -82,6 +92,9 @@ static void AuthSessionCallback(NSUrl cbUrl, NSError error)
}
}
+ if (prefersEphemeralWebBrowserSession)
+ ClearCookies();
+
if (UIDevice.CurrentDevice.CheckSystemVersion(11, 0))
{
sf = new SFAuthenticationSession(WebUtils.GetNativeUrl(url), scheme, AuthSessionCallback);
@@ -117,6 +130,24 @@ static void AuthSessionCallback(NSUrl cbUrl, NSError error)
return await tcsResponse.Task;
}
+ static void ClearCookies()
+ {
+ NSUrlCache.SharedCache.RemoveAllCachedResponses();
+
+#if __IOS__
+ if (UIDevice.CurrentDevice.CheckSystemVersion(11, 0))
+ {
+ WKWebsiteDataStore.DefaultDataStore.HttpCookieStore.GetAllCookies((cookies) =>
+ {
+ foreach (var cookie in cookies)
+ {
+ WKWebsiteDataStore.DefaultDataStore.HttpCookieStore.DeleteCookie(cookie, null);
+ }
+ });
+ }
+#endif
+ }
+
internal static bool OpenUrl(Uri uri)
{
// If we aren't waiting on a task, don't handle the url
diff --git a/Xamarin.Essentials/WebAuthenticator/WebAuthenticator.macos.cs b/Xamarin.Essentials/WebAuthenticator/WebAuthenticator.macos.cs
index c1b6ffa2b..35d8f2615 100644
--- a/Xamarin.Essentials/WebAuthenticator/WebAuthenticator.macos.cs
+++ b/Xamarin.Essentials/WebAuthenticator/WebAuthenticator.macos.cs
@@ -23,8 +23,10 @@ static WebAuthenticator()
callbackHelper.Register();
}
- internal static async Task PlatformAuthenticateAsync(Uri url, Uri callbackUrl)
+ internal static async Task PlatformAuthenticateAsync(WebAuthenticatorOptions webAuthenticatorOptions)
{
+ var url = webAuthenticatorOptions?.Url;
+ var callbackUrl = webAuthenticatorOptions?.CallbackUrl;
if (!AppInfo.VerifyHasUrlScheme(callbackUrl.Scheme))
throw new InvalidOperationException("You must register your URL Scheme handler in your app's Info.plist!");
@@ -57,6 +59,8 @@ static void AuthSessionCallback(NSUrl cbUrl, NSError error)
var ctx = new ContextProvider(Platform.GetCurrentWindow());
was.PresentationContextProvider = ctx;
+ was.PrefersEphemeralWebBrowserSession = webAuthenticatorOptions?.PrefersEphemeralWebBrowserSession ?? false;
+
was.Start();
return await tcsResponse.Task;
}
diff --git a/Xamarin.Essentials/WebAuthenticator/WebAuthenticator.netstandard.watchos.tizen.cs b/Xamarin.Essentials/WebAuthenticator/WebAuthenticator.netstandard.watchos.tizen.cs
index dad14f81c..5935eb38e 100644
--- a/Xamarin.Essentials/WebAuthenticator/WebAuthenticator.netstandard.watchos.tizen.cs
+++ b/Xamarin.Essentials/WebAuthenticator/WebAuthenticator.netstandard.watchos.tizen.cs
@@ -7,7 +7,7 @@ namespace Xamarin.Essentials
{
public static partial class WebAuthenticator
{
- static Task PlatformAuthenticateAsync(Uri url, Uri callbackUrl)
+ static Task PlatformAuthenticateAsync(WebAuthenticatorOptions webAuthenticatorOptions)
=> throw ExceptionUtils.NotSupportedOrImplementedException;
}
}
diff --git a/Xamarin.Essentials/WebAuthenticator/WebAuthenticator.shared.cs b/Xamarin.Essentials/WebAuthenticator/WebAuthenticator.shared.cs
index 3c4b5819d..cff777494 100644
--- a/Xamarin.Essentials/WebAuthenticator/WebAuthenticator.shared.cs
+++ b/Xamarin.Essentials/WebAuthenticator/WebAuthenticator.shared.cs
@@ -9,6 +9,18 @@ namespace Xamarin.Essentials
public static partial class WebAuthenticator
{
public static Task AuthenticateAsync(Uri url, Uri callbackUrl)
- => PlatformAuthenticateAsync(url, callbackUrl);
+ => PlatformAuthenticateAsync(new WebAuthenticatorOptions { Url = url, CallbackUrl = callbackUrl });
+
+ public static Task AuthenticateAsync(WebAuthenticatorOptions webAuthenticatorOptions)
+ => PlatformAuthenticateAsync(webAuthenticatorOptions);
+ }
+
+ public class WebAuthenticatorOptions
+ {
+ public Uri Url { get; set; }
+
+ public Uri CallbackUrl { get; set; }
+
+ public bool PrefersEphemeralWebBrowserSession { get; set; }
}
}
diff --git a/Xamarin.Essentials/WebAuthenticator/WebAuthenticator.uwp.cs b/Xamarin.Essentials/WebAuthenticator/WebAuthenticator.uwp.cs
index 7897e1ba2..85e636eb3 100644
--- a/Xamarin.Essentials/WebAuthenticator/WebAuthenticator.uwp.cs
+++ b/Xamarin.Essentials/WebAuthenticator/WebAuthenticator.uwp.cs
@@ -14,8 +14,11 @@ namespace Xamarin.Essentials
{
public static partial class WebAuthenticator
{
- static async Task PlatformAuthenticateAsync(Uri url, Uri callbackUrl)
+ static async Task PlatformAuthenticateAsync(WebAuthenticatorOptions webAuthenticatorOptions)
{
+ var url = webAuthenticatorOptions?.Url;
+ var callbackUrl = webAuthenticatorOptions?.CallbackUrl;
+
if (!IsUriProtocolDeclared(callbackUrl.Scheme))
throw new InvalidOperationException($"You need to declare the windows.protocol usage of the protocol/scheme `{callbackUrl.Scheme}` in your AppxManifest.xml file");
diff --git a/Xamarin.Essentials/WebAuthenticator/WebAuthenticatorIntermediateActivity.android.cs b/Xamarin.Essentials/WebAuthenticator/WebAuthenticatorIntermediateActivity.android.cs
index 7c197dc7d..03a348a1c 100644
--- a/Xamarin.Essentials/WebAuthenticator/WebAuthenticatorIntermediateActivity.android.cs
+++ b/Xamarin.Essentials/WebAuthenticator/WebAuthenticatorIntermediateActivity.android.cs
@@ -21,15 +21,15 @@ protected override void OnCreate(Bundle savedInstanceState)
var extras = savedInstanceState ?? Intent.Extras;
// read the values
- launched = extras.GetBoolean(launchedExtra, false);
- actualIntent = extras.GetParcelable(actualIntentExtra) as Intent;
+ launched = extras?.GetBoolean(launchedExtra, false) ?? false;
+ actualIntent = extras?.GetParcelable(actualIntentExtra) as Intent;
}
protected override void OnResume()
{
base.OnResume();
- if (!launched)
+ if (actualIntent != null && !launched)
{
// if this is the first time, start the authentication flow
StartActivity(actualIntent);
diff --git a/Xamarin.Essentials/Xamarin.Essentials.csproj b/Xamarin.Essentials/Xamarin.Essentials.csproj
index 4d7b8c1d1..1c08ad731 100644
--- a/Xamarin.Essentials/Xamarin.Essentials.csproj
+++ b/Xamarin.Essentials/Xamarin.Essentials.csproj
@@ -1,6 +1,6 @@
-
+
- netstandard1.0;netstandard2.0;Xamarin.iOS10;Xamarin.TVOS10;Xamarin.WatchOS10;MonoAndroid80;MonoAndroid81;MonoAndroid90;MonoAndroid10.0;tizen40;Xamarin.Mac20;
+ netstandard1.0;netstandard2.0;Xamarin.iOS10;Xamarin.TVOS10;Xamarin.WatchOS10;MonoAndroid10.0;tizen40;Xamarin.Mac20;$(TargetFrameworks);uap10.0.16299;Xamarin.EssentialsXamarin.Essentials
@@ -77,17 +77,7 @@
-
-
-
-
-
-
-
-
-
-
-
+
@@ -125,4 +115,4 @@
-
\ No newline at end of file
+
diff --git a/azure-pipelines.yml b/azure-pipelines.yml
index 3cdd99492..d8b126a75 100644
--- a/azure-pipelines.yml
+++ b/azure-pipelines.yml
@@ -8,7 +8,7 @@ pr:
- develop
variables:
- BASE_VERSION: 1.6.0
+ BASE_VERSION: 1.7.1
PREVIEW_LABEL: 'ci'
BUILD_NUMBER: $[counter(format('{0}_{1}_{2}', variables['BASE_VERSION'], variables['PREVIEW_LABEL'], variables['Build.SourceBranch']), 1)]
NUGET_VERSION: $[format('{0}-{1}.{2}', variables['BASE_VERSION'], variables['PREVIEW_LABEL'], variables['BUILD_NUMBER'])]
@@ -99,7 +99,7 @@ stages:
verbosity: diagnostic
cakeFile: DeviceTests/build.cake
cakeTarget: test-ios-emu
- cakeExtraArgs: --ios-device="`"iPhone 11`"" --ios-runtime="`"com.apple.CoreSimulator.SimRuntime.iOS-14-2`""
+ xharness: '1.0.0-prerelease.21620.1'
- template: .ci/build.yml@components
parameters:
@@ -119,20 +119,37 @@ stages:
- template: .ci/build.yml@components
parameters:
- name: devicetests_android_api_23
+ name: devicetests_android_api_22
runChecks: false
- displayName: Android API 23
- publishOutputSuffix: '-android23'
+ displayName: Android API 22
+ publishOutputSuffix: '-android22'
windowsImage: ''
areaPath: $(AREA_PATH)
verbosity: diagnostic
cakeFile: DeviceTests/build.cake
cakeTarget: test-android-emu
- cakeExtraArgs: --avd-target="`"system-images;android-23;google_apis;x86`""
+ cakeExtraArgs: --avd-target="`"system-images;android-22;google_apis;x86`""
preBuildSteps:
- - bash: sh -c "echo \"y\" | $ANDROID_HOME/tools/bin/sdkmanager \"system-images;android-23;google_apis;x86\""
+ - bash: sh -c "echo \"y\" | $ANDROID_HOME/tools/bin/sdkmanager \"system-images;android-22;google_apis;x86\""
displayName: Install the Android emulators
+# - template: .ci/build.yml@components
+# parameters:
+# name: devicetests_android_api_23
+# runChecks: false
+# continueOnError: true
+# displayName: Android API 23
+# publishOutputSuffix: '-android23'
+# windowsImage: ''
+# areaPath: $(AREA_PATH)
+# verbosity: diagnostic
+# cakeFile: DeviceTests/build.cake
+# cakeTarget: test-android-emu
+# cakeExtraArgs: --avd-target="`"system-images;android-23;google_apis;x86`""
+# preBuildSteps:
+# - bash: sh -c "echo \"y\" | $ANDROID_HOME/tools/bin/sdkmanager \"system-images;android-23;google_apis;x86\""
+# displayName: Install the Android emulators
+
- template: .ci/build.yml@components
parameters:
name: devicetests_android_api_24
@@ -181,18 +198,18 @@ stages:
- bash: sh -c "echo \"y\" | $ANDROID_HOME/tools/bin/sdkmanager \"system-images;android-29;google_apis;x86\""
displayName: Install the Android emulators
- - template: .ci/build.yml@components
- parameters:
- name: devicetests_android_api_30
- runChecks: false
- displayName: Android API 30
- publishOutputSuffix: '-android30'
- windowsImage: ''
- areaPath: $(AREA_PATH)
- verbosity: diagnostic
- cakeFile: DeviceTests/build.cake
- cakeTarget: test-android-emu
- cakeExtraArgs: --avd-target="`"system-images;android-30;google_apis;x86`""
- preBuildSteps:
- - bash: sh -c "echo \"y\" | $ANDROID_HOME/tools/bin/sdkmanager \"system-images;android-30;google_apis;x86\""
- displayName: Install the Android emulators
+ # - template: .ci/build.yml@components
+ # parameters:
+ # name: devicetests_android_api_30
+ # runChecks: false
+ # displayName: Android API 30
+ # publishOutputSuffix: '-android30'
+ # windowsImage: ''
+ # areaPath: $(AREA_PATH)
+ # verbosity: diagnostic
+ # cakeFile: DeviceTests/build.cake
+ # cakeTarget: test-android-emu
+ # cakeExtraArgs: --avd-target="`"system-images;android-30;google_apis;x86`""
+ # preBuildSteps:
+ # - bash: sh -c "echo \"y\" | $ANDROID_HOME/tools/bin/sdkmanager \"system-images;android-30;google_apis;x86\""
+ # displayName: Install the Android emulators
diff --git a/build.cake b/build.cake
index 172267bc3..a5f25f82a 100644
--- a/build.cake
+++ b/build.cake
@@ -4,6 +4,8 @@ var NUGET_VERSION = EnvironmentVariable("NUGET_VERSION") ?? "1.0.0";
var GIT_SHA = Argument("gitSha", EnvironmentVariable("GIT_SHA") ?? "");
var GIT_BRANCH_NAME = Argument("gitBranch", EnvironmentVariable("GIT_BRANCH_NAME") ?? "");
+var RESTORE_CONFIG = MakeAbsolute(new FilePath("./devopsnuget.config")).FullPath;
+
Task("prepare")
.Does(() =>
{
@@ -18,6 +20,7 @@ Task("libs")
MSBuild("./Xamarin.Essentials/Xamarin.Essentials.csproj", new MSBuildSettings()
.EnableBinaryLogger("./output/binlogs/libs.binlog")
.SetConfiguration("Release")
+ .WithProperty("RestoreConfigFile", RESTORE_CONFIG)
.WithRestore());
});
@@ -32,6 +35,7 @@ Task("nugets")
.SetConfiguration("Release")
.WithRestore()
.WithProperty("PackageOutputPath", MakeAbsolute(new FilePath("./output/")).FullPath)
+ .WithProperty("RestoreConfigFile", RESTORE_CONFIG)
.WithTarget("Pack"));
});
@@ -46,6 +50,9 @@ Task("tests")
DotNetCoreTest(csproj.FullPath, new DotNetCoreTestSettings {
Configuration = "Release",
Logger = $"trx;LogFileName={csproj.GetFilenameWithoutExtension()}.trx",
+ EnvironmentVariables = new Dictionary {
+ { "RestoreConfigFile", RESTORE_CONFIG }
+ }
});
} catch (Exception) {
failed++;
@@ -67,6 +74,7 @@ Task("samples")
MSBuild("./Xamarin.Essentials.sln", new MSBuildSettings()
.EnableBinaryLogger("./output/binlogs/samples.binlog")
.SetConfiguration("Release")
+ .WithProperty("RestoreConfigFile", RESTORE_CONFIG)
.WithRestore());
});
@@ -79,6 +87,7 @@ Task("docs")
.EnableBinaryLogger("./output/binlogs/docs.binlog")
.SetConfiguration("Release")
.WithRestore()
+ .WithProperty("RestoreConfigFile", RESTORE_CONFIG)
.WithTarget("mdocupdatedocs"));
});
diff --git a/devopsnuget.config b/devopsnuget.config
new file mode 100644
index 000000000..8f831e620
--- /dev/null
+++ b/devopsnuget.config
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/en/FrameworksIndex/xamarin-essentials-android.xml b/docs/en/FrameworksIndex/xamarin-essentials-android.xml
index 9a1732ed4..c83f2f067 100644
--- a/docs/en/FrameworksIndex/xamarin-essentials-android.xml
+++ b/docs/en/FrameworksIndex/xamarin-essentials-android.xml
@@ -313,6 +313,7 @@
+
@@ -322,6 +323,7 @@
+
@@ -617,6 +619,7 @@
+
@@ -882,6 +885,7 @@
+
@@ -897,6 +901,15 @@
+
+
+
+
+
+
+
+
+
diff --git a/docs/en/FrameworksIndex/xamarin-essentials-ios.xml b/docs/en/FrameworksIndex/xamarin-essentials-ios.xml
index ec8f9c654..021875739 100644
--- a/docs/en/FrameworksIndex/xamarin-essentials-ios.xml
+++ b/docs/en/FrameworksIndex/xamarin-essentials-ios.xml
@@ -301,6 +301,7 @@
+
@@ -310,6 +311,7 @@
+
@@ -596,6 +598,7 @@
+
@@ -878,6 +881,7 @@
+
@@ -893,6 +897,15 @@
+
+
+
+
+
+
+
+
+
diff --git a/docs/en/FrameworksIndex/xamarin-essentials-macos.xml b/docs/en/FrameworksIndex/xamarin-essentials-macos.xml
index 77123e41c..a0eb6f453 100644
--- a/docs/en/FrameworksIndex/xamarin-essentials-macos.xml
+++ b/docs/en/FrameworksIndex/xamarin-essentials-macos.xml
@@ -300,6 +300,7 @@
+
@@ -309,6 +310,7 @@
+
@@ -494,6 +496,7 @@
+
@@ -594,6 +597,7 @@
+
@@ -836,6 +840,7 @@
+
@@ -851,6 +856,15 @@
+
+
+
+
+
+
+
+
+
diff --git a/docs/en/FrameworksIndex/xamarin-essentials-tvos.xml b/docs/en/FrameworksIndex/xamarin-essentials-tvos.xml
index e749a3153..2cb23a385 100644
--- a/docs/en/FrameworksIndex/xamarin-essentials-tvos.xml
+++ b/docs/en/FrameworksIndex/xamarin-essentials-tvos.xml
@@ -300,6 +300,7 @@
+
@@ -309,6 +310,7 @@
+
@@ -595,6 +597,7 @@
+
@@ -843,6 +846,7 @@
+
@@ -858,6 +862,15 @@
+
+
+
+
+
+
+
+
+
diff --git a/docs/en/FrameworksIndex/xamarin-essentials-uwp.xml b/docs/en/FrameworksIndex/xamarin-essentials-uwp.xml
index 14c4d0b8d..84b1d398c 100644
--- a/docs/en/FrameworksIndex/xamarin-essentials-uwp.xml
+++ b/docs/en/FrameworksIndex/xamarin-essentials-uwp.xml
@@ -302,6 +302,7 @@
+
@@ -311,6 +312,7 @@
+
@@ -597,6 +599,7 @@
+
@@ -845,6 +848,7 @@
+
@@ -860,6 +864,15 @@
+
+
+
+
+
+
+
+
+
diff --git a/docs/en/FrameworksIndex/xamarin-essentials-watchos.xml b/docs/en/FrameworksIndex/xamarin-essentials-watchos.xml
index 0927214d5..6a74f770c 100644
--- a/docs/en/FrameworksIndex/xamarin-essentials-watchos.xml
+++ b/docs/en/FrameworksIndex/xamarin-essentials-watchos.xml
@@ -300,6 +300,7 @@
+
@@ -309,6 +310,7 @@
+
@@ -595,6 +597,7 @@
+
@@ -851,6 +854,7 @@
+
@@ -866,6 +870,15 @@
+
+
+
+
+
+
+
+
+
diff --git a/docs/en/FrameworksIndex/xamarin-essentials.xml b/docs/en/FrameworksIndex/xamarin-essentials.xml
index 3e0919a04..0c91ab3ec 100644
--- a/docs/en/FrameworksIndex/xamarin-essentials.xml
+++ b/docs/en/FrameworksIndex/xamarin-essentials.xml
@@ -299,6 +299,7 @@
+
@@ -308,6 +309,7 @@
+
@@ -594,6 +596,7 @@
+
@@ -815,6 +818,7 @@
+
@@ -830,6 +834,15 @@
+
+
+
+
+
+
+
+
+
diff --git a/docs/en/Xamarin.Essentials/Accelerometer.xml b/docs/en/Xamarin.Essentials/Accelerometer.xml
index 95e98a05e..f5ce665b3 100644
--- a/docs/en/Xamarin.Essentials/Accelerometer.xml
+++ b/docs/en/Xamarin.Essentials/Accelerometer.xml
@@ -14,9 +14,7 @@
Accelerometer data of the acceleration of the device in three dimensional space.
-
-
-
+
@@ -34,9 +32,7 @@
Gets if accelerometer is being monitored.If monitoring.
-
-
-
+
@@ -53,9 +49,7 @@
Event triggered when reading of sensor changes.
-
-
-
+
@@ -72,9 +66,7 @@
Event triggered when a shake has been detected on the device.
-
-
-
+
@@ -115,9 +107,7 @@
Stop monitoring for changes to accelerometer.
-
-
-
+
diff --git a/docs/en/Xamarin.Essentials/AccelerometerChangedEventArgs.xml b/docs/en/Xamarin.Essentials/AccelerometerChangedEventArgs.xml
index 879600d6a..85a35a329 100644
--- a/docs/en/Xamarin.Essentials/AccelerometerChangedEventArgs.xml
+++ b/docs/en/Xamarin.Essentials/AccelerometerChangedEventArgs.xml
@@ -12,9 +12,7 @@
Event arguments containing the current reading.
-
-
-
+
@@ -50,9 +48,7 @@
The current values of accelerometer.The reading.
-
-
-
+
diff --git a/docs/en/Xamarin.Essentials/AccelerometerData.xml b/docs/en/Xamarin.Essentials/AccelerometerData.xml
index c64fefe65..18a79394a 100644
--- a/docs/en/Xamarin.Essentials/AccelerometerData.xml
+++ b/docs/en/Xamarin.Essentials/AccelerometerData.xml
@@ -21,9 +21,7 @@
Data representing the devies' three accelerometers.
-
-
-
+
@@ -84,12 +82,8 @@
Gets the acceleration vector in G's (gravitational force).
-
-
-
-
-
-
+
+
@@ -111,9 +105,7 @@
Object to compare
If equal to another objectIf equal
-
-
-
+
@@ -138,9 +130,7 @@
Other AccelerometerData to compare with.
Compares the underlying Vector3 instances.True if they are equal, otherwise false.
-
-
-
+
@@ -159,9 +149,7 @@
Get the hash code for object.The hash code
-
-
-
+
@@ -185,9 +173,7 @@
Right to compare
Equality operator for equalsIf equal
-
-
-
+
@@ -211,9 +197,7 @@
Right to check
Inequality checkIf not equal
-
-
-
+
diff --git a/docs/en/Xamarin.Essentials/ActivityState.xml b/docs/en/Xamarin.Essentials/ActivityState.xml
index fecc85485..a46d8e729 100644
--- a/docs/en/Xamarin.Essentials/ActivityState.xml
+++ b/docs/en/Xamarin.Essentials/ActivityState.xml
@@ -11,9 +11,7 @@
A state of an Android Activity.
-
-
-
+
diff --git a/docs/en/Xamarin.Essentials/ActivityStateChangedEventArgs.xml b/docs/en/Xamarin.Essentials/ActivityStateChangedEventArgs.xml
index ffbe2906c..e1a36ae2d 100644
--- a/docs/en/Xamarin.Essentials/ActivityStateChangedEventArgs.xml
+++ b/docs/en/Xamarin.Essentials/ActivityStateChangedEventArgs.xml
@@ -12,9 +12,7 @@
Event argments when an Android Activity's state changes.
-
-
-
+
@@ -32,9 +30,7 @@
Gets the Activity of which the state changed.The Activity for the event.
-
-
-
+
@@ -52,9 +48,7 @@
The state of the Activity.The state of the Activity for the event.
-
-
-
+
diff --git a/docs/en/Xamarin.Essentials/AppInfo.xml b/docs/en/Xamarin.Essentials/AppInfo.xml
index c3a7451f8..2c3c073d1 100644
--- a/docs/en/Xamarin.Essentials/AppInfo.xml
+++ b/docs/en/Xamarin.Essentials/AppInfo.xml
@@ -12,9 +12,7 @@
Represents information about the application.
-
-
-
+
@@ -32,9 +30,7 @@
Gets the application build number.The application build number.
-
-
-
+
@@ -52,9 +48,7 @@
Gets the application name.The application name.
-
-
-
+
@@ -108,9 +102,7 @@
Open the settings menu or page for the application.
-
-
-
+
@@ -128,9 +120,7 @@
Gets the application version.The application version.
-
-
-
+
@@ -148,9 +138,7 @@
Gets the application version.The application version.
-
-
-
+
diff --git a/docs/en/Xamarin.Essentials/AppTheme.xml b/docs/en/Xamarin.Essentials/AppTheme.xml
index f0920b9a9..462a61303 100644
--- a/docs/en/Xamarin.Essentials/AppTheme.xml
+++ b/docs/en/Xamarin.Essentials/AppTheme.xml
@@ -11,9 +11,7 @@
Application Theme Type
-
-
-
+
diff --git a/docs/en/Xamarin.Essentials/AppleSignInAuthenticator+Options.xml b/docs/en/Xamarin.Essentials/AppleSignInAuthenticator+Options.xml
index 5559584ad..30791ffe7 100644
--- a/docs/en/Xamarin.Essentials/AppleSignInAuthenticator+Options.xml
+++ b/docs/en/Xamarin.Essentials/AppleSignInAuthenticator+Options.xml
@@ -12,9 +12,7 @@
Options for Native Apple Sign In
-
-
-
+
@@ -28,9 +26,7 @@
-
-
-
+ To be added.
@@ -48,12 +44,8 @@
Include email scope.
-
-
-
-
-
-
+
+
@@ -70,12 +62,8 @@
Include full name scope.
-
-
-
-
-
-
+
+
diff --git a/docs/en/Xamarin.Essentials/AppleSignInAuthenticator.xml b/docs/en/Xamarin.Essentials/AppleSignInAuthenticator.xml
index 96d015048..d7421a023 100644
--- a/docs/en/Xamarin.Essentials/AppleSignInAuthenticator.xml
+++ b/docs/en/Xamarin.Essentials/AppleSignInAuthenticator.xml
@@ -33,12 +33,8 @@
Additional Sign In options.
Performs a native Apple Sign In authentication request.
-
-
-
-
-
-
+
+
diff --git a/docs/en/Xamarin.Essentials/Barometer.xml b/docs/en/Xamarin.Essentials/Barometer.xml
index 3f961fe87..968231480 100644
--- a/docs/en/Xamarin.Essentials/Barometer.xml
+++ b/docs/en/Xamarin.Essentials/Barometer.xml
@@ -12,9 +12,7 @@
Monitor changes to the atmospheric pressure.
-
-
-
+
@@ -32,9 +30,7 @@
Gets if barometer is actively being monitored.If barometer is being monitored.
-
-
-
+
@@ -51,9 +47,7 @@
Event triggered when barometer reading changes.
-
-
-
+
@@ -92,9 +86,7 @@
Stop monitoring for changes to the barometer.
-
-
-
+
diff --git a/docs/en/Xamarin.Essentials/BarometerChangedEventArgs.xml b/docs/en/Xamarin.Essentials/BarometerChangedEventArgs.xml
index 568f10a11..61407f7ec 100644
--- a/docs/en/Xamarin.Essentials/BarometerChangedEventArgs.xml
+++ b/docs/en/Xamarin.Essentials/BarometerChangedEventArgs.xml
@@ -12,9 +12,7 @@
The current pressure information from the change event.
-
-
-
+
@@ -50,9 +48,7 @@
Gets the current barometer pressure dataPressure in hPA
-
-
-
+
diff --git a/docs/en/Xamarin.Essentials/BarometerData.xml b/docs/en/Xamarin.Essentials/BarometerData.xml
index 13b4cef4e..cc4f9c0e6 100644
--- a/docs/en/Xamarin.Essentials/BarometerData.xml
+++ b/docs/en/Xamarin.Essentials/BarometerData.xml
@@ -23,9 +23,7 @@
Contains the pressure measured by the user's device.
-
-
-
+
@@ -65,9 +63,7 @@
Object to compare
If equal to another objectIf equal
-
-
-
+
@@ -92,9 +88,7 @@
Other object to compare
If equal to another objectIf equal
-
-
-
+
@@ -113,9 +107,7 @@
Get has code for object.The hash code.
-
-
-
+
@@ -139,9 +131,7 @@
Right to compare
If equal to another objectIf equal
-
-
-
+
@@ -165,9 +155,7 @@
Right to comapre
If not equal to another objectIf not equal
-
-
-
+
@@ -184,9 +172,7 @@
Gets the current pressure in hectopascals.
-
-
-
+ To be added.
@@ -205,9 +191,7 @@
Outputs the data as a string.
-
-
-
+ To be added.
diff --git a/docs/en/Xamarin.Essentials/Battery.xml b/docs/en/Xamarin.Essentials/Battery.xml
index 39a64a4b5..e7940a20e 100644
--- a/docs/en/Xamarin.Essentials/Battery.xml
+++ b/docs/en/Xamarin.Essentials/Battery.xml
@@ -34,9 +34,7 @@
Event trigger when battery properties have changed.
-
-
-
+
@@ -56,9 +54,7 @@
Level of charge. Returns -1 if no battery exists.
-
-
-
+
@@ -76,9 +72,7 @@
Gets the current energy saver status of the device.The current status of energy saver mode.
-
-
-
+
@@ -95,9 +89,7 @@
Event that is triggered when energy saver status changes.
-
-
-
+
@@ -117,9 +109,7 @@
Power source, or uknown.
-
-
-
+
@@ -137,9 +127,7 @@
Gets the charging state of the device if it can be determined.Battery state, or unknown.
-
-
-
+
diff --git a/docs/en/Xamarin.Essentials/BatteryInfoChangedEventArgs.xml b/docs/en/Xamarin.Essentials/BatteryInfoChangedEventArgs.xml
index f1029641b..7f6429810 100644
--- a/docs/en/Xamarin.Essentials/BatteryInfoChangedEventArgs.xml
+++ b/docs/en/Xamarin.Essentials/BatteryInfoChangedEventArgs.xml
@@ -52,9 +52,7 @@
Gets the current charge level of the device from 0.0 to 1.0.Level of charge.
-
-
-
+
@@ -72,9 +70,7 @@
Gets the current power source for the device.Power source, or unknown
-
-
-
+
@@ -92,9 +88,7 @@
Gets the charging state of the device if it can be determined.Battery state, or unknown.
-
-
-
+
@@ -112,9 +106,7 @@
Outputs the data as a string.
-
-
-
+ To be added.
diff --git a/docs/en/Xamarin.Essentials/BatteryPowerSource.xml b/docs/en/Xamarin.Essentials/BatteryPowerSource.xml
index cdfd85696..baf00644d 100644
--- a/docs/en/Xamarin.Essentials/BatteryPowerSource.xml
+++ b/docs/en/Xamarin.Essentials/BatteryPowerSource.xml
@@ -11,9 +11,7 @@
How the device and battery are currently being powered or charged.
-
-
-
+
diff --git a/docs/en/Xamarin.Essentials/BatteryState.xml b/docs/en/Xamarin.Essentials/BatteryState.xml
index e4a568d49..d2b619fd9 100644
--- a/docs/en/Xamarin.Essentials/BatteryState.xml
+++ b/docs/en/Xamarin.Essentials/BatteryState.xml
@@ -11,9 +11,7 @@
The current state of the battery and if it is being charged or full.
-
-
-
+
diff --git a/docs/en/Xamarin.Essentials/Browser.xml b/docs/en/Xamarin.Essentials/Browser.xml
index 15cb900f9..cf432117d 100644
--- a/docs/en/Xamarin.Essentials/Browser.xml
+++ b/docs/en/Xamarin.Essentials/Browser.xml
@@ -12,9 +12,7 @@
Provides a way to display a web page inside an app.
-
-
-
+
@@ -36,9 +34,7 @@
Uri to launch.
Open the browser to specified uri.Completed task when browser is launched, but not necessarily closed. Result indicates if launching was successful or not.
-
-
-
+
@@ -60,9 +56,7 @@
Uri to launch.
Open the browser to specified uri.Completed task when browser is launched, but not necessarily closed. Result indicates if launching was successful or not.
-
-
-
+
@@ -86,9 +80,7 @@
How to launch the browser.
Open the browser to specified uri.Completed task when browser is launched, but not necessarily closed. Result indicates if launching was successful or not.
-
-
-
+
@@ -112,9 +104,7 @@
Launch options for the browser.
Open the browser to specified uri.Completed task when browser is launched, but not necessarily closed. Result indicates if launching was successful or not.
-
-
-
+
@@ -138,9 +128,7 @@
How to launch the browser.
Open the browser to specified uri.Completed task when browser is launched, but not necessarily closed. Result indicates if launching was successful or not.
-
-
-
+
@@ -164,9 +152,7 @@
Launch options for the browser.
Open the browser to specified uri.Completed task when browser is launched, but not necessarily closed. Result indicates if launching was successful or not.
-
-
-
+
diff --git a/docs/en/Xamarin.Essentials/BrowserLaunchFlags.xml b/docs/en/Xamarin.Essentials/BrowserLaunchFlags.xml
index 416f6a3bf..df0ea50be 100644
--- a/docs/en/Xamarin.Essentials/BrowserLaunchFlags.xml
+++ b/docs/en/Xamarin.Essentials/BrowserLaunchFlags.xml
@@ -16,9 +16,7 @@
Additional flags that can be set to control how the browser opens.
-
-
-
+
diff --git a/docs/en/Xamarin.Essentials/BrowserLaunchOptions.xml b/docs/en/Xamarin.Essentials/BrowserLaunchOptions.xml
index a0acf8ff6..7feb45592 100644
--- a/docs/en/Xamarin.Essentials/BrowserLaunchOptions.xml
+++ b/docs/en/Xamarin.Essentials/BrowserLaunchOptions.xml
@@ -27,9 +27,7 @@
Default constructor.
-
-
-
+
@@ -65,9 +63,7 @@
Launch type of the browser.The launch type.
-
-
-
+
@@ -85,9 +81,7 @@
Preferred color of the controls on the browser.Gets the color for controls.
-
-
-
+
@@ -105,9 +99,7 @@
Preferred color of the background toolbar.Gets the toolbar color.
-
-
-
+
@@ -125,9 +117,7 @@
Preferred mode for the title display.Gets the title display mode.
-
-
-
+
diff --git a/docs/en/Xamarin.Essentials/BrowserTitleMode.xml b/docs/en/Xamarin.Essentials/BrowserTitleMode.xml
index 91aebf798..61245e1b5 100644
--- a/docs/en/Xamarin.Essentials/BrowserTitleMode.xml
+++ b/docs/en/Xamarin.Essentials/BrowserTitleMode.xml
@@ -11,9 +11,7 @@
Mode for the title.
-
-
-
+
diff --git a/docs/en/Xamarin.Essentials/Clipboard.xml b/docs/en/Xamarin.Essentials/Clipboard.xml
index 03b69d5f3..bcc80dac7 100644
--- a/docs/en/Xamarin.Essentials/Clipboard.xml
+++ b/docs/en/Xamarin.Essentials/Clipboard.xml
@@ -12,9 +12,7 @@
Provides a way to work with text on the device clipboard.
-
-
-
+
@@ -31,9 +29,7 @@
Fires when the clipboard content changes.
-
-
-
+
@@ -52,9 +48,7 @@
Returns any text that is on the clipboard.Returns text that is on the clipboard, or null if there is none.
-
-
-
+
@@ -71,12 +65,8 @@
Gets a value indicating whether there is any text on the clipboard.
-
-
-
-
-
-
+
+
diff --git a/docs/en/Xamarin.Essentials/ColorConverters.xml b/docs/en/Xamarin.Essentials/ColorConverters.xml
index 905164ab2..2ff8f63aa 100644
--- a/docs/en/Xamarin.Essentials/ColorConverters.xml
+++ b/docs/en/Xamarin.Essentials/ColorConverters.xml
@@ -12,9 +12,7 @@
Contains several helper methods to convert System.Drawing.Color
-
-
-
+
@@ -36,9 +34,7 @@
A string value similar to the syntax used in HTML, eg "00FF00". Alpha can optionally be specified as the first pair of the characters ("CC00FF00").
Creates a new Color from a Hex string.A color from the Hex string.
-
-
-
+
@@ -64,9 +60,7 @@
The luminosity of the color from 0-100.
Creates a new Color from hue, saturation, and lightness.A new color from the Hsla.
-
-
-
+
@@ -94,9 +88,7 @@
The alpha of the color from 0-255.
Creates a new Color from hue, saturation, luminosity, and alpha.A new color from the Hsla.
-
-
-
+
@@ -118,9 +110,7 @@
A single value representing argb.
Creates a new Color from an UInt.A new color from the Uint
-
-
-
+
diff --git a/docs/en/Xamarin.Essentials/ColorExtensions.xml b/docs/en/Xamarin.Essentials/ColorExtensions.xml
index 2692d8284..16910bc9b 100644
--- a/docs/en/Xamarin.Essentials/ColorExtensions.xml
+++ b/docs/en/Xamarin.Essentials/ColorExtensions.xml
@@ -12,9 +12,7 @@
Extension methods for System.Drawing.Color
-
-
-
+
@@ -38,9 +36,7 @@
The delta to add to the current luminosity.
Adds luminosity to the existing colorThe new color.
-
-
-
+
@@ -68,9 +64,7 @@
The Alpha value in double.
Convert HSVa color into System.Drawing.Color.System.Drawing.Color.
-
-
-
+
@@ -92,9 +86,7 @@
A color to obtain the complement for.
Returns a new color that is on the opposite side of the color wheel from the original.A color that is the complement of the value passed in.
-
-
-
+
@@ -118,9 +110,7 @@
The percentage from 0-1f
Multiplies the current alpha by a percentage (0-1f)The new color.
-
-
-
+
@@ -147,9 +137,7 @@
The current color to manipulate.
Convert a System.Drawing.Color struct into HSV Color.A tuple of doubles with the values of Hue, Saturation and Value, respectively.
-
-
-
+
@@ -193,9 +181,7 @@
The color to use as a base.
Converts the color to the system specific color.The system color.
-
-
-
+
@@ -239,9 +225,7 @@
The color to use as a base.
Converts the color to the system specific color.The system color.
-
-
-
+
@@ -263,9 +247,7 @@
The color to use as a base.
Converts the color to the system specific color.The system color.
-
-
-
+
@@ -287,9 +269,7 @@
The color to use as a base.
Converts the color to a UInt representation.The UInt representation.
-
-
-
+
@@ -313,9 +293,7 @@
The alpha to set 0-255.
Creates a new color based on this color, but with a new alpha (0-255).The new color.
-
-
-
+
@@ -339,9 +317,7 @@
The hue to set 0-360.
Creates a new color based on this color, but with a new hue (0-360).The new color.
-
-
-
+
@@ -365,9 +341,7 @@
The luminosity to set 0-100.
Creates a new color based on this color, but with a new luminosity (0-100).The new color.
-
-
-
+
@@ -391,9 +365,7 @@
The saturation to set 0-100.
Creates a new color based on this color, but with a new saturation (0-100).The new color.
-
-
-
+
diff --git a/docs/en/Xamarin.Essentials/Compass.xml b/docs/en/Xamarin.Essentials/Compass.xml
index 34d84a3e5..57e78cad4 100644
--- a/docs/en/Xamarin.Essentials/Compass.xml
+++ b/docs/en/Xamarin.Essentials/Compass.xml
@@ -12,9 +12,7 @@
Monitor changes to the orientation of the user's device.
-
-
-
+
@@ -32,9 +30,7 @@
Gets if compass is actively being monitored.If compass is being monitored.
-
-
-
+
@@ -51,9 +47,7 @@
Event triggered when compass reading changes.
-
-
-
+
@@ -133,9 +127,7 @@
Stop monitoring for changes to the compass.
-
-
-
+
diff --git a/docs/en/Xamarin.Essentials/CompassChangedEventArgs.xml b/docs/en/Xamarin.Essentials/CompassChangedEventArgs.xml
index 19253b533..789fae8e1 100644
--- a/docs/en/Xamarin.Essentials/CompassChangedEventArgs.xml
+++ b/docs/en/Xamarin.Essentials/CompassChangedEventArgs.xml
@@ -12,9 +12,7 @@
Event arguments when compass reading changes.
-
-
-
+
@@ -50,9 +48,7 @@
Gets the current reading.The reading.
-
-
-
+
diff --git a/docs/en/Xamarin.Essentials/CompassData.xml b/docs/en/Xamarin.Essentials/CompassData.xml
index dea519d62..3516b9866 100644
--- a/docs/en/Xamarin.Essentials/CompassData.xml
+++ b/docs/en/Xamarin.Essentials/CompassData.xml
@@ -23,9 +23,7 @@
Contains the orientation of the user's device.
-
-
-
+
@@ -65,9 +63,7 @@
Object to compare
If equal to another objectIf equal
-
-
-
+
@@ -92,9 +88,7 @@
Other AccelerometerData to compare with.
Compares the underlying doubles.True if they are equal, otherwise false.
-
-
-
+
@@ -113,9 +107,7 @@
Get the hash code for object.The hash code
-
-
-
+
@@ -133,9 +125,7 @@
The heading (measured in degrees) relative to magnetic north.The magnetic north heading.
-
-
-
+
@@ -159,9 +149,7 @@
Right to compare
Equality operator for equalsIf equal
-
-
-
+
@@ -185,9 +173,7 @@
Right to check
Inequality checkIf not equal
-
-
-
+
@@ -205,9 +191,7 @@
Current string representation of the data.
-
-
-
+ To be added.
diff --git a/docs/en/Xamarin.Essentials/ConnectionProfile.xml b/docs/en/Xamarin.Essentials/ConnectionProfile.xml
index 4e72eaab2..f9ca29a6a 100644
--- a/docs/en/Xamarin.Essentials/ConnectionProfile.xml
+++ b/docs/en/Xamarin.Essentials/ConnectionProfile.xml
@@ -11,9 +11,7 @@
Describes the type of connection the device is using.
-
-
-
+
diff --git a/docs/en/Xamarin.Essentials/Connectivity.xml b/docs/en/Xamarin.Essentials/Connectivity.xml
index 99513c93e..6e267c0fe 100644
--- a/docs/en/Xamarin.Essentials/Connectivity.xml
+++ b/docs/en/Xamarin.Essentials/Connectivity.xml
@@ -12,9 +12,7 @@
Connectivity and networking helpers.
-
-
-
+
diff --git a/docs/en/Xamarin.Essentials/ConnectivityChangedEventArgs.xml b/docs/en/Xamarin.Essentials/ConnectivityChangedEventArgs.xml
index b9361376c..c2cd5aee0 100644
--- a/docs/en/Xamarin.Essentials/ConnectivityChangedEventArgs.xml
+++ b/docs/en/Xamarin.Essentials/ConnectivityChangedEventArgs.xml
@@ -12,9 +12,7 @@
The current connectivity information from the change event.
-
-
-
+
@@ -34,9 +32,7 @@
The current access of the network
The connection profiles of the events changing
Public constructor
-
-
-
+
@@ -54,9 +50,7 @@
Gets the active connectivity types for the device.List of all connection profiles.
-
-
-
+
@@ -74,9 +68,7 @@
Gets the current state of network access. Does not guarantee full access to the internet.The current network access state.
-
-
-
+
@@ -94,12 +86,8 @@
The string representation of the event.
-
-
-
-
-
-
+
+
diff --git a/docs/en/Xamarin.Essentials/Contact.xml b/docs/en/Xamarin.Essentials/Contact.xml
index be33b3f43..03e60f7f0 100644
--- a/docs/en/Xamarin.Essentials/Contact.xml
+++ b/docs/en/Xamarin.Essentials/Contact.xml
@@ -65,7 +65,7 @@
-
+ Property
diff --git a/docs/en/Xamarin.Essentials/DeviceDisplay.xml b/docs/en/Xamarin.Essentials/DeviceDisplay.xml
index 815c90160..da78501ef 100644
--- a/docs/en/Xamarin.Essentials/DeviceDisplay.xml
+++ b/docs/en/Xamarin.Essentials/DeviceDisplay.xml
@@ -12,9 +12,7 @@
Represents information about the device screen.
-
-
-
+
@@ -32,9 +30,7 @@
Gets or sets if the screen shold be kept on.If the screen keep on is set.
-
-
-
+
@@ -52,9 +48,7 @@
Gets the main screens display info.The main screen display info.
-
-
-
+
@@ -71,9 +65,7 @@
Event that is triggered when the main display info changes.
-
-
-
+
diff --git a/docs/en/Xamarin.Essentials/DeviceIdiom.xml b/docs/en/Xamarin.Essentials/DeviceIdiom.xml
index 14c4bc932..0b5de818b 100644
--- a/docs/en/Xamarin.Essentials/DeviceIdiom.xml
+++ b/docs/en/Xamarin.Essentials/DeviceIdiom.xml
@@ -21,9 +21,7 @@
The idiom (form factor) of the device.
-
-
-
+
@@ -44,12 +42,8 @@
The idiom name of the device
Creates a new device idiom.
-
-
-
-
-
-
+
+
@@ -66,9 +60,7 @@
Gets the desktop idiom.
-
-
-
+ To be added.
diff --git a/docs/en/Xamarin.Essentials/DeviceInfo.xml b/docs/en/Xamarin.Essentials/DeviceInfo.xml
index 2dfb71ab7..dd0ef94ba 100644
--- a/docs/en/Xamarin.Essentials/DeviceInfo.xml
+++ b/docs/en/Xamarin.Essentials/DeviceInfo.xml
@@ -12,9 +12,7 @@
Represents information about the device.
-
-
-
+
@@ -32,9 +30,7 @@
Gets the type of device the application is running on.The device type.
-
-
-
+
@@ -52,9 +48,7 @@
Gets the idiom of the device. The idiom.
-
-
-
+
@@ -72,9 +66,7 @@
Gets the manufacturer of the device.Device manufacturer.
-
-
-
+
@@ -92,9 +84,7 @@
Gets the model of the device.Device model.
-
-
-
+
@@ -112,9 +102,7 @@
Gets the name of the device.The name of the device (often specified by the user).
-
-
-
+
@@ -132,9 +120,7 @@
Gets the platform or operating system of the device.The platform of device.
-
-
-
+
@@ -152,9 +138,7 @@
Gets the version of the operating system.The device operating system.
-
-
-
+
@@ -172,9 +156,7 @@
Gets the version of the operating system.The version of the operating system.
-
-
-
+
diff --git a/docs/en/Xamarin.Essentials/DevicePlatform.xml b/docs/en/Xamarin.Essentials/DevicePlatform.xml
index 1e0780ae9..df8215fb8 100644
--- a/docs/en/Xamarin.Essentials/DevicePlatform.xml
+++ b/docs/en/Xamarin.Essentials/DevicePlatform.xml
@@ -21,9 +21,7 @@
The device platform that the application is running on.
-
-
-
+
diff --git a/docs/en/Xamarin.Essentials/DeviceType.xml b/docs/en/Xamarin.Essentials/DeviceType.xml
index 1786401c2..375f54063 100644
--- a/docs/en/Xamarin.Essentials/DeviceType.xml
+++ b/docs/en/Xamarin.Essentials/DeviceType.xml
@@ -11,9 +11,7 @@
Various types of devices.
-
-
-
+
diff --git a/docs/en/Xamarin.Essentials/DisplayInfo.xml b/docs/en/Xamarin.Essentials/DisplayInfo.xml
index 6b641b238..03df2d624 100644
--- a/docs/en/Xamarin.Essentials/DisplayInfo.xml
+++ b/docs/en/Xamarin.Essentials/DisplayInfo.xml
@@ -21,9 +21,7 @@
Represents information about the screen.
-
-
-
+
@@ -52,6 +50,34 @@
To be added.
+
+
+
+
+ Constructor
+
+ Xamarin.Essentials
+ 1.0.0.0
+
+
+
+
+
+
+
+
+
+
+ The width of the display
+ The height of the display
+ The screen density
+ The current orientation
+ The rotation of the device.
+ The refresh rate of the display.
+ Main constructor for Display Information
+ To be added.
+
+
@@ -93,9 +119,7 @@
Object to compare.
If equal to another object.If equal.
-
-
-
+
@@ -120,9 +144,7 @@
The other display info to compare.
If equal to another object.If equal.
-
-
-
+
@@ -141,9 +163,7 @@
Gets the hash code for object.The hash code.
-
-
-
+
@@ -161,9 +181,7 @@
Gets the height of the screen for the current orientation.The height in pixels.
-
-
-
+
@@ -187,9 +205,7 @@
Right to compare.
If equal to another object.If equal
-
-
-
+
@@ -213,9 +229,7 @@
Right to compare
If not equal to another object.If not equal
-
-
-
+
@@ -233,6 +247,24 @@
Gets the orientation of the device.The orientation.
+
+
+
+
+
+
+
+ Property
+
+ Xamarin.Essentials
+ 1.0.0.0
+
+
+ System.Single
+
+
+ Gets the refresh rate of the display.
+ The refresh rate in Hz.
@@ -253,9 +285,7 @@
Gets the rotation from the designated orientation.The rotation
-
-
-
+
@@ -274,9 +304,7 @@
String representation of information.String information about display info.
-
-
-
+
@@ -294,9 +322,7 @@
Gets the width of the scrreen for the current orientation.The width in pixels.
-
-
-
+
diff --git a/docs/en/Xamarin.Essentials/DisplayInfoChangedEventArgs.xml b/docs/en/Xamarin.Essentials/DisplayInfoChangedEventArgs.xml
index eccbf4271..eaebc4104 100644
--- a/docs/en/Xamarin.Essentials/DisplayInfoChangedEventArgs.xml
+++ b/docs/en/Xamarin.Essentials/DisplayInfoChangedEventArgs.xml
@@ -12,9 +12,7 @@
Main display information event arguments.
-
-
-
+
diff --git a/docs/en/Xamarin.Essentials/DisplayOrientation.xml b/docs/en/Xamarin.Essentials/DisplayOrientation.xml
index 8a01604c2..5aebde20f 100644
--- a/docs/en/Xamarin.Essentials/DisplayOrientation.xml
+++ b/docs/en/Xamarin.Essentials/DisplayOrientation.xml
@@ -11,9 +11,7 @@
Display Orientation
-
-
-
+
diff --git a/docs/en/Xamarin.Essentials/DisplayRotation.xml b/docs/en/Xamarin.Essentials/DisplayRotation.xml
index d20695df2..8a0962669 100644
--- a/docs/en/Xamarin.Essentials/DisplayRotation.xml
+++ b/docs/en/Xamarin.Essentials/DisplayRotation.xml
@@ -11,9 +11,7 @@
Display rotation.
-
-
-
+
diff --git a/docs/en/Xamarin.Essentials/DistanceUnits.xml b/docs/en/Xamarin.Essentials/DistanceUnits.xml
index 6dd827d45..283646d51 100644
--- a/docs/en/Xamarin.Essentials/DistanceUnits.xml
+++ b/docs/en/Xamarin.Essentials/DistanceUnits.xml
@@ -11,9 +11,7 @@
Distance Unit for use in conversion.
-
-
-
+
diff --git a/docs/en/Xamarin.Essentials/Email.xml b/docs/en/Xamarin.Essentials/Email.xml
index 2618fbfce..4560116d2 100644
--- a/docs/en/Xamarin.Essentials/Email.xml
+++ b/docs/en/Xamarin.Essentials/Email.xml
@@ -12,9 +12,7 @@
Provides an easy way to allow the user to send emails.
-
-
-
+
@@ -32,12 +30,8 @@
Opens the default email client to allow the user to send the message.
-
-
-
-
-
-
+
+
@@ -58,12 +52,8 @@
The email message.
Opens the default email client to allow the user to send the message.
-
-
-
-
-
-
+
+
@@ -94,12 +84,8 @@
The email body.
The email recipients.
Opens the default email client to allow the user to send the message with the provided subject, body and recipients.
-
-
-
-
-
-
+
+
diff --git a/docs/en/Xamarin.Essentials/EmailAttachment.xml b/docs/en/Xamarin.Essentials/EmailAttachment.xml
index d18bd7d31..e65183c00 100644
--- a/docs/en/Xamarin.Essentials/EmailAttachment.xml
+++ b/docs/en/Xamarin.Essentials/EmailAttachment.xml
@@ -12,9 +12,7 @@
Email file attachment.
-
-
-
+
@@ -32,9 +30,7 @@
Full path and filename to file.
Email attachment from filename.
-
-
-
+
@@ -52,9 +48,7 @@
Existing file.
Email attachment from existing file.
-
-
-
+
@@ -74,9 +68,7 @@
Full path and filename to file.
Content type (MIME type) of the file (eg: `image/png`).
Explicit content type (MIME type) of file.
-
-
-
+
diff --git a/docs/en/Xamarin.Essentials/EmailBodyFormat.xml b/docs/en/Xamarin.Essentials/EmailBodyFormat.xml
index 7a1347dd0..bf5ef9d29 100644
--- a/docs/en/Xamarin.Essentials/EmailBodyFormat.xml
+++ b/docs/en/Xamarin.Essentials/EmailBodyFormat.xml
@@ -11,9 +11,7 @@
Represents various types of email body formats.
-
-
-
+
diff --git a/docs/en/Xamarin.Essentials/EmailMessage.xml b/docs/en/Xamarin.Essentials/EmailMessage.xml
index 0537623b3..0dd37d1c3 100644
--- a/docs/en/Xamarin.Essentials/EmailMessage.xml
+++ b/docs/en/Xamarin.Essentials/EmailMessage.xml
@@ -12,9 +12,7 @@
Represents a single email message.
-
-
-
+
@@ -29,9 +27,7 @@
Creates a new instance of EmailMessage.
-
-
-
+
@@ -59,9 +55,7 @@
The email body.
The email's recipients.
Creates a new instance of EmailMessage with the specified subject, body and recipients.
-
-
-
+
@@ -78,12 +72,8 @@
Gets or sets a list of file attachments.
-
-
-
-
-
-
+
+
@@ -100,12 +90,8 @@
Gets or sets the email's BCC recipients.
-
-
-
-
-
-
+
+
@@ -122,12 +108,8 @@
Gets or sets the email's body.
-
-
-
-
-
-
+
+
@@ -144,12 +126,8 @@
Gets or sets a value indicating whether the message is in plain text or HTML (not supported on UWP).
-
-
-
-
-
-
+
+
@@ -166,12 +144,8 @@
Gets or sets the email's CC recipients.
-
-
-
-
-
-
+
+
@@ -188,12 +162,8 @@
Gets or sets the email's subject.
-
-
-
-
-
-
+
+
@@ -210,12 +180,8 @@
Gets or sets the email's recipients.
-
-
-
-
-
-
+
+
diff --git a/docs/en/Xamarin.Essentials/EnergySaverStatus.xml b/docs/en/Xamarin.Essentials/EnergySaverStatus.xml
index 781f1e7e3..2b358fa7c 100644
--- a/docs/en/Xamarin.Essentials/EnergySaverStatus.xml
+++ b/docs/en/Xamarin.Essentials/EnergySaverStatus.xml
@@ -11,9 +11,7 @@
Status of energy saver on the device.
-
-
-
+
diff --git a/docs/en/Xamarin.Essentials/ExperimentalFeatures.xml b/docs/en/Xamarin.Essentials/ExperimentalFeatures.xml
index 768d37030..7a3c25494 100644
--- a/docs/en/Xamarin.Essentials/ExperimentalFeatures.xml
+++ b/docs/en/Xamarin.Essentials/ExperimentalFeatures.xml
@@ -12,9 +12,7 @@
Enables experimental features in Xamarin.Essentials
-
-
-
+
@@ -42,9 +40,7 @@
Obsolete as of version 1.3.0 and no longer required to use the feature. Experimental feature for email attachments.
-
-
-
+
@@ -71,9 +67,7 @@
List of features to enable.
Enable experimental features for Xamarin.Essentials.
-
-
-
+
@@ -118,9 +112,7 @@
Obsolete as of version 1.3.0 and no longer required to use the feature. Experimental feature for requesting a file to be opened.
-
-
-
+
@@ -148,9 +140,7 @@
Obsolete as of version 1.3.0 and no longer required to use the feature. Experimental feature for share a file with other applications.
-
-
-
+
diff --git a/docs/en/Xamarin.Essentials/FeatureNotSupportedException.xml b/docs/en/Xamarin.Essentials/FeatureNotSupportedException.xml
index 63bfe7485..58632c940 100644
--- a/docs/en/Xamarin.Essentials/FeatureNotSupportedException.xml
+++ b/docs/en/Xamarin.Essentials/FeatureNotSupportedException.xml
@@ -12,9 +12,7 @@
Exception that occurs when an attempt is made to use a feature on a platform that does not support it.
-
-
-
+
@@ -29,9 +27,7 @@
Creates a new instance of FeatureNotSupportedException.
-
-
-
+
@@ -49,9 +45,7 @@
The exception message.
Creates a new instance of FeatureNotSupportedException with the specified message.
-
-
-
+
@@ -71,9 +65,7 @@
The exception message.
The inner exception.
Creates a new instance of FeatureNotSupportedException with the specified message and inner exception.
-
-
-
+
diff --git a/docs/en/Xamarin.Essentials/FileBase.xml b/docs/en/Xamarin.Essentials/FileBase.xml
index 0546c280c..b40d1f732 100644
--- a/docs/en/Xamarin.Essentials/FileBase.xml
+++ b/docs/en/Xamarin.Essentials/FileBase.xml
@@ -12,9 +12,7 @@
A representation of a file and its content type.
-
-
-
+
@@ -32,9 +30,7 @@
An existing FileBase instance to use.
FileBase from an existing instance.
-
-
-
+
@@ -51,12 +47,8 @@
Gets or sets the file's content type as a MIME type (eg: `image/png`).
-
-
-
-
-
-
+
+
@@ -90,13 +82,9 @@
System.String
- Gets the full path and filename.
-
-
-
-
-
-
+ This property is purely informative, and does not always return the actual physical path to the file. To get the file, use OpenReadAsync method.
+
+
diff --git a/docs/en/Xamarin.Essentials/FileProvider.xml b/docs/en/Xamarin.Essentials/FileProvider.xml
index 125a2c1e0..daffeb974 100644
--- a/docs/en/Xamarin.Essentials/FileProvider.xml
+++ b/docs/en/Xamarin.Essentials/FileProvider.xml
@@ -20,9 +20,7 @@
Android FileProvider implementation for creating Content URIs to share files with other applications.
-
-
-
+
@@ -37,9 +35,7 @@
Default constructor.
-
-
-
+
@@ -56,9 +52,7 @@
Gets or sets the temporary location for file sharing.
-
-
-
+ The default is to prefer external and fallback to internal.
diff --git a/docs/en/Xamarin.Essentials/FileProviderLocation.xml b/docs/en/Xamarin.Essentials/FileProviderLocation.xml
index ce393c65d..b3145319d 100644
--- a/docs/en/Xamarin.Essentials/FileProviderLocation.xml
+++ b/docs/en/Xamarin.Essentials/FileProviderLocation.xml
@@ -11,9 +11,7 @@
Location to save temporary files to for sharing.
-
-
-
+
diff --git a/docs/en/Xamarin.Essentials/FileSystem.xml b/docs/en/Xamarin.Essentials/FileSystem.xml
index a4eac7e9e..4b7194968 100644
--- a/docs/en/Xamarin.Essentials/FileSystem.xml
+++ b/docs/en/Xamarin.Essentials/FileSystem.xml
@@ -12,9 +12,7 @@
Provides an easy way to access the locations for device folders.
-
-
-
+
@@ -72,9 +70,7 @@
the name of the file to load from the app package.
Opens a stream to a file contained within the app package.Returns a stream to the file.
-
-
-
+
diff --git a/docs/en/Xamarin.Essentials/Flashlight.xml b/docs/en/Xamarin.Essentials/Flashlight.xml
index 5ac46dbb5..fd623784f 100644
--- a/docs/en/Xamarin.Essentials/Flashlight.xml
+++ b/docs/en/Xamarin.Essentials/Flashlight.xml
@@ -12,9 +12,7 @@
Turn the Flashlight / Torch / Lamp On and Off.
-
-
-
+
@@ -32,12 +30,8 @@
Turns the Flashlight Off.
-
-
-
-
-
-
+
+
@@ -55,12 +49,8 @@
Turns the Flashlight On.
-
-
-
-
-
-
+
+
diff --git a/docs/en/Xamarin.Essentials/Geocoding.xml b/docs/en/Xamarin.Essentials/Geocoding.xml
index 17eba78f0..4fd2f8d30 100644
--- a/docs/en/Xamarin.Essentials/Geocoding.xml
+++ b/docs/en/Xamarin.Essentials/Geocoding.xml
@@ -12,9 +12,7 @@
Easily convert between geographic coordinated and place names.
-
-
-
+
@@ -38,9 +36,7 @@
List of locations that best match the address or null if none found.
-
-
-
+
@@ -62,9 +58,7 @@
Location to find placemarks for.
Retrieve placemarks for a given location.List of placemarks or null if no placemarks are found.
-
-
-
+
@@ -88,9 +82,7 @@
Longitude of the location.
Retrieve location for a given address.List of placemarks or null if no placemarks are found.
-
-
-
+
diff --git a/docs/en/Xamarin.Essentials/Geolocation.xml b/docs/en/Xamarin.Essentials/Geolocation.xml
index ec2ce9451..83ce2c2de 100644
--- a/docs/en/Xamarin.Essentials/Geolocation.xml
+++ b/docs/en/Xamarin.Essentials/Geolocation.xml
@@ -12,9 +12,7 @@
Provides a way to get the current location of the device.
-
-
-
+
@@ -52,9 +50,7 @@
Returns the current location of the device.Returns the location.
-
-
-
+
@@ -76,9 +72,7 @@
The criteria to use when determining the location of the device.
Returns the current location of the device using the specified criteria.Returns the location.
-
-
-
+
@@ -102,9 +96,7 @@
A token for cancelling the operation.
Returns the current location of the device using the specified criteria.Returns the location.
-
-
-
+
diff --git a/docs/en/Xamarin.Essentials/GeolocationAccuracy.xml b/docs/en/Xamarin.Essentials/GeolocationAccuracy.xml
index 0ffccf647..8bda73613 100644
--- a/docs/en/Xamarin.Essentials/GeolocationAccuracy.xml
+++ b/docs/en/Xamarin.Essentials/GeolocationAccuracy.xml
@@ -11,9 +11,7 @@
Represents levels of accuracy when determining location.
-
-
-
+
diff --git a/docs/en/Xamarin.Essentials/GeolocationRequest.xml b/docs/en/Xamarin.Essentials/GeolocationRequest.xml
index a76471705..2b7939fe4 100644
--- a/docs/en/Xamarin.Essentials/GeolocationRequest.xml
+++ b/docs/en/Xamarin.Essentials/GeolocationRequest.xml
@@ -12,9 +12,7 @@
Represents the criteria for a location request.
-
-
-
+
@@ -29,9 +27,7 @@
Creates a new instance of GeolocationRequest.
-
-
-
+
@@ -49,9 +45,7 @@
The desired accuracy.
Creates a new instance of GeolocationRequest with the specified accuracy.
-
-
-
+
@@ -71,9 +65,7 @@
The desired accuracy.
The request timeout.
Creates a new instance of GeolocationRequest with the specified accuracy and timeout.
-
-
-
+
@@ -91,9 +83,7 @@
Gets or sets the desired accuracy of the resulting location.The desired accuracy of the location.
-
-
-
+
@@ -111,9 +101,7 @@
Gets or sets the location request timeout.The location request timeout.
-
-
-
+
diff --git a/docs/en/Xamarin.Essentials/Gyroscope.xml b/docs/en/Xamarin.Essentials/Gyroscope.xml
index ef993abea..12976f891 100644
--- a/docs/en/Xamarin.Essentials/Gyroscope.xml
+++ b/docs/en/Xamarin.Essentials/Gyroscope.xml
@@ -12,9 +12,7 @@
Gyroscope data of the rotation around the device's three primary axis.
-
-
-
+
@@ -32,9 +30,7 @@
Gets if gyro is being monitored.If monitoring.
-
-
-
+
@@ -51,9 +47,7 @@
Event triggered when reading of sensor changes.
-
-
-
+
@@ -92,9 +86,7 @@
Stop monitoring for changes to gyro.
-
-
-
+
diff --git a/docs/en/Xamarin.Essentials/GyroscopeChangedEventArgs.xml b/docs/en/Xamarin.Essentials/GyroscopeChangedEventArgs.xml
index 8de924ac4..bdd25c872 100644
--- a/docs/en/Xamarin.Essentials/GyroscopeChangedEventArgs.xml
+++ b/docs/en/Xamarin.Essentials/GyroscopeChangedEventArgs.xml
@@ -12,9 +12,7 @@
Event arguments containing the current reading.
-
-
-
+
@@ -50,9 +48,7 @@
Gets the reading of the gyro.The reading.
-
-
-
+
diff --git a/docs/en/Xamarin.Essentials/GyroscopeData.xml b/docs/en/Xamarin.Essentials/GyroscopeData.xml
index b8ca7994e..7dd514f33 100644
--- a/docs/en/Xamarin.Essentials/GyroscopeData.xml
+++ b/docs/en/Xamarin.Essentials/GyroscopeData.xml
@@ -21,9 +21,7 @@
Gyroscope information.
-
-
-
+
@@ -84,12 +82,8 @@
Gets the angular velocity vector in radians per second.
-
-
-
-
-
-
+
+
@@ -111,9 +105,7 @@
Object to compare
If equal to another objectIf equal
-
-
-
+
@@ -138,9 +130,7 @@
Other GyroscopeData to compare with.
Compares the underlying Vector3 instances.True if they match, otherwise false.
-
-
-
+
@@ -159,9 +149,7 @@
Get the hash code for object.The hash code
-
-
-
+
@@ -185,9 +173,7 @@
Right to compare
Equality operator for equalsIf equal
-
-
-
+
@@ -211,9 +197,7 @@
Right to check
Inequality checkIf not equal
-
-
-
+
diff --git a/docs/en/Xamarin.Essentials/HapticFeedback.xml b/docs/en/Xamarin.Essentials/HapticFeedback.xml
index 4bcd93500..56db0b978 100644
--- a/docs/en/Xamarin.Essentials/HapticFeedback.xml
+++ b/docs/en/Xamarin.Essentials/HapticFeedback.xml
@@ -12,9 +12,7 @@
Provides methods to control HapticFeedback responses
-
-
-
+
@@ -35,9 +33,7 @@
The type of a HapticFeedback response that will be called
Calls the platform-oriented method to cause a HapticFeedback response of the specified type
-
-
-
+
diff --git a/docs/en/Xamarin.Essentials/HapticFeedbackType.xml b/docs/en/Xamarin.Essentials/HapticFeedbackType.xml
index d14cbb70c..b72c69d29 100644
--- a/docs/en/Xamarin.Essentials/HapticFeedbackType.xml
+++ b/docs/en/Xamarin.Essentials/HapticFeedbackType.xml
@@ -11,9 +11,7 @@
Enumerates the possible types of HapticFeedback response
-
-
-
+
diff --git a/docs/en/Xamarin.Essentials/Launcher.xml b/docs/en/Xamarin.Essentials/Launcher.xml
index 5d65fe9aa..e41676ade 100644
--- a/docs/en/Xamarin.Essentials/Launcher.xml
+++ b/docs/en/Xamarin.Essentials/Launcher.xml
@@ -77,9 +77,7 @@
string uri scheme
Launches the app specified by the uri scheme
-
-
-
+ May throw System.UriFormatException if uri is malformed. Verify if the uri scheme is supported before calling this method
@@ -101,9 +99,7 @@
uri scheme
Launches the app specified by the uri scheme
-
-
-
+ May throw System.UriFormatException if uri is malformed. Verify if the uri scheme is supported before calling this method
@@ -125,12 +121,8 @@
Request that contains information on the file to open.
Requests to open a file in an application based on content type.
-
-
-
-
-
-
+
+
diff --git a/docs/en/Xamarin.Essentials/Locale.xml b/docs/en/Xamarin.Essentials/Locale.xml
index faa346422..9821b24f9 100644
--- a/docs/en/Xamarin.Essentials/Locale.xml
+++ b/docs/en/Xamarin.Essentials/Locale.xml
@@ -12,9 +12,7 @@
Represents a specific geographical, political, or cultural region.
-
-
-
+
@@ -31,9 +29,7 @@
Country name or code.
-
-
-
+ This value may vary between platforms.
@@ -51,12 +47,8 @@
Unique Id of the Locale.
-
-
-
-
-
-
+
+
@@ -73,9 +65,7 @@
Language name or code.
-
-
-
+ This value may vary between platforms.
@@ -93,12 +83,8 @@
Display name of the Locale.
-
-
-
-
-
-
+
+
diff --git a/docs/en/Xamarin.Essentials/Location.xml b/docs/en/Xamarin.Essentials/Location.xml
index e059b52ed..1c88db366 100644
--- a/docs/en/Xamarin.Essentials/Location.xml
+++ b/docs/en/Xamarin.Essentials/Location.xml
@@ -12,9 +12,7 @@
The latitude, longitude, altitude and time information reported by the device.
-
-
-
+
@@ -29,9 +27,7 @@
Default constructor.
-
-
-
+
@@ -49,9 +45,7 @@
Location to copy values from.
Copy constructor.
-
-
-
+
@@ -71,9 +65,7 @@
Default latitude for location.
Default longitude for location.
Parametrized constructor with latitude and longitude parameters.
-
-
-
+
@@ -95,9 +87,7 @@
Default longitude for location.
Timestamp for the location (Utc based).
Parametrized constructor with latitude, longitude and timestamp parameters.
-
-
-
+
@@ -119,9 +109,7 @@
Default longitude for location.
To be added.
Parametrized constructor with latitude, longitude and altitude parameters.
-
-
-
+
@@ -139,9 +127,7 @@
Gets or sets the horizontal accuracy (in meters) of the location.The horizontal accuracy of the location.
-
-
-
+
@@ -203,9 +189,7 @@
Units to return.
Calculate distance between two locations.Distance between two locations in the unit selected.
-
-
-
+
@@ -233,9 +217,7 @@
Unit to return.
Calculate distance between two locations.Distance calculated.
-
-
-
+
@@ -263,9 +245,7 @@
Unit to use.
Calculate distance between two locations.Distance calculated.
-
-
-
+
@@ -295,9 +275,7 @@
Units to return.
Calculate distance between two locations.Distance between two locations in the unit selected.
-
-
-
+
@@ -337,9 +315,7 @@
Inform if location is from GPS or from Mock.True if is from Mock and False if from GPS.
-
-
-
+
@@ -357,9 +333,7 @@
Gets or sets the latitude of location.Latitude of the location.
-
-
-
+
@@ -377,9 +351,7 @@
Gets or sets the longitude of location.Longitude of the location.
-
-
-
+
@@ -397,9 +369,7 @@
Speed in meters per second.Speed measured by the device..
-
-
-
+
@@ -417,9 +387,7 @@
Gets or sets the timestamp of the location.UTC timestamp.
-
-
-
+
@@ -456,9 +424,7 @@
Gets or sets the vertical accuracy (in meters) of the location.The vertical accuracy of the location.
-
-
-
+
diff --git a/docs/en/Xamarin.Essentials/LocationExtensions.xml b/docs/en/Xamarin.Essentials/LocationExtensions.xml
index e827e08de..971168e9d 100644
--- a/docs/en/Xamarin.Essentials/LocationExtensions.xml
+++ b/docs/en/Xamarin.Essentials/LocationExtensions.xml
@@ -12,9 +12,7 @@
Location Extensions
-
-
-
+
@@ -40,9 +38,7 @@
Units to use during calculation.
Extension to calculate distance from location to another location.Distance in units fro two locations.
-
-
-
+
@@ -70,9 +66,7 @@
Units to use.
Extension to calculate distance from location to another location.Distance calculated.
-
-
-
+
@@ -94,9 +88,7 @@
Location to open to.
Open maps to this location.Task to wait.
-
-
-
+
@@ -120,9 +112,7 @@
Options to use.
Open maps to this location.Task to wait.
-
-
-
+
diff --git a/docs/en/Xamarin.Essentials/Magnetometer.xml b/docs/en/Xamarin.Essentials/Magnetometer.xml
index c1c45719e..b71a849d2 100644
--- a/docs/en/Xamarin.Essentials/Magnetometer.xml
+++ b/docs/en/Xamarin.Essentials/Magnetometer.xml
@@ -12,9 +12,7 @@
Detect device's orentation relative to Earth's magnetic field in microteslas (µ).
-
-
-
+
@@ -32,9 +30,7 @@
Gets if magnetometer is being monitored.If monitoring.
-
-
-
+
@@ -51,9 +47,7 @@
Event triggered when reading of sensor changes.
-
-
-
+
@@ -92,9 +86,7 @@
Stop monitoring for changes to magnetometer.
-
-
-
+
diff --git a/docs/en/Xamarin.Essentials/MagnetometerChangedEventArgs.xml b/docs/en/Xamarin.Essentials/MagnetometerChangedEventArgs.xml
index 03425d067..4f9f490fa 100644
--- a/docs/en/Xamarin.Essentials/MagnetometerChangedEventArgs.xml
+++ b/docs/en/Xamarin.Essentials/MagnetometerChangedEventArgs.xml
@@ -12,9 +12,7 @@
Event arguments containing the current reading.
-
-
-
+
@@ -50,9 +48,7 @@
Gets the reading of the magnetometer.The reading.
-
-
-
+
diff --git a/docs/en/Xamarin.Essentials/MagnetometerData.xml b/docs/en/Xamarin.Essentials/MagnetometerData.xml
index c4511d3c3..20d836549 100644
--- a/docs/en/Xamarin.Essentials/MagnetometerData.xml
+++ b/docs/en/Xamarin.Essentials/MagnetometerData.xml
@@ -21,9 +21,7 @@
Data for magnetometer changes.
-
-
-
+
@@ -89,9 +87,7 @@
Object to compare
If equal to another objectIf equal
-
-
-
+
@@ -116,9 +112,7 @@
Other MagnetometerData to compare with.
Compares the underlying Vector3 instances.True if they match, otherwise false.
-
-
-
+
@@ -137,9 +131,7 @@
Get the hash code for object.The hash code
-
-
-
+
@@ -156,12 +148,8 @@
Gets the magnetic field vector in microteslas (µ).
-
-
-
-
-
-
+
+
@@ -185,9 +173,7 @@
Right to compare
Equality operator for equalsIf equal
-
-
-
+
@@ -211,9 +197,7 @@
Right to check
Inequality checkIf not equal
-
-
-
+
diff --git a/docs/en/Xamarin.Essentials/MainThread.xml b/docs/en/Xamarin.Essentials/MainThread.xml
index 63b6c96eb..8d8b82d87 100644
--- a/docs/en/Xamarin.Essentials/MainThread.xml
+++ b/docs/en/Xamarin.Essentials/MainThread.xml
@@ -33,9 +33,7 @@
Action to execute.
Invokes an action on the main thread of the application.
-
-
-
+
@@ -168,9 +166,7 @@
Gets if it is the current main UI thread.If main thread.
-
-
-
+
diff --git a/docs/en/Xamarin.Essentials/Map.xml b/docs/en/Xamarin.Essentials/Map.xml
index daf581b1c..727d9be14 100644
--- a/docs/en/Xamarin.Essentials/Map.xml
+++ b/docs/en/Xamarin.Essentials/Map.xml
@@ -12,9 +12,7 @@
Map helpers to open a route to specified places via default platforms maps implementation.
-
-
-
+
@@ -36,9 +34,7 @@
Location to open on maps.
Open the installed application to a specific location.Task to be completed.
-
-
-
+
@@ -60,9 +56,7 @@
Placemark to open on maps.
Open the installed application to a specific placemark.Task to be completed.
-
-
-
+
@@ -86,9 +80,7 @@
Longitude to open to.
Open the installed application to a specific location.Task to be completed.
-
-
-
+
@@ -112,9 +104,7 @@
Launch options to use.
Open the installed application to a specific location with launch options.Task to be completed.
-
-
-
+
@@ -138,9 +128,7 @@
Launch options to use.
Open the installed application to a specific placemark with launch options.Task to be completed.
-
-
-
+
@@ -166,9 +154,7 @@
Launch options to use.
Open the installed application to a specific location.Task to be completed.
-
-
-
+
diff --git a/docs/en/Xamarin.Essentials/MapLaunchOptions.xml b/docs/en/Xamarin.Essentials/MapLaunchOptions.xml
index 9bb17c158..b52f0de51 100644
--- a/docs/en/Xamarin.Essentials/MapLaunchOptions.xml
+++ b/docs/en/Xamarin.Essentials/MapLaunchOptions.xml
@@ -45,9 +45,7 @@
Name of destination to display to user.Gets the name.
-
-
-
+
@@ -65,9 +63,7 @@
The navigation mode to use.Gets the navigation mode.
-
-
-
+
diff --git a/docs/en/Xamarin.Essentials/NetworkAccess.xml b/docs/en/Xamarin.Essentials/NetworkAccess.xml
index 3768993a9..83fb0bd03 100644
--- a/docs/en/Xamarin.Essentials/NetworkAccess.xml
+++ b/docs/en/Xamarin.Essentials/NetworkAccess.xml
@@ -11,9 +11,7 @@
Various states of the connection to the internet.
-
-
-
+
diff --git a/docs/en/Xamarin.Essentials/NotImplementedInReferenceAssemblyException.xml b/docs/en/Xamarin.Essentials/NotImplementedInReferenceAssemblyException.xml
index 92a7db24c..8c9839140 100644
--- a/docs/en/Xamarin.Essentials/NotImplementedInReferenceAssemblyException.xml
+++ b/docs/en/Xamarin.Essentials/NotImplementedInReferenceAssemblyException.xml
@@ -12,9 +12,7 @@
Exception that occurs when executed from a reference assembly. This usually means that the NuGet was not installed into the app project.
-
-
-
+
@@ -29,9 +27,7 @@
Default constructor.
-
-
-
+
diff --git a/docs/en/Xamarin.Essentials/OpenFileRequest.xml b/docs/en/Xamarin.Essentials/OpenFileRequest.xml
index fd5380585..0f61b0605 100644
--- a/docs/en/Xamarin.Essentials/OpenFileRequest.xml
+++ b/docs/en/Xamarin.Essentials/OpenFileRequest.xml
@@ -12,9 +12,7 @@
Standard request for opening a file to another application.
-
-
-
+
@@ -29,9 +27,7 @@
Open request with an existing file.
-
-
-
+
@@ -51,9 +47,7 @@
Title to display on open dialog if available.
File to open.
Open request with an existing file.
-
-
-
+
@@ -73,9 +67,7 @@
Title to display on open dialog if available.
File to open.
Open request with an existing file.
-
-
-
+
@@ -92,12 +84,26 @@
File to open.
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+ Property
+
+ Xamarin.Essentials
+ 1.0.0.0
+
+
+ System.Drawing.Rectangle
+
+
+ Gets or sets the source rectangle to display the Share UI from.
+
+ This is only used on iOS currently.
@@ -114,12 +120,8 @@
Title to display on open dialog if available.
-
-
-
-
-
-
+
+
diff --git a/docs/en/Xamarin.Essentials/OrientationSensor.xml b/docs/en/Xamarin.Essentials/OrientationSensor.xml
index 2098df6a3..e12381fc9 100644
--- a/docs/en/Xamarin.Essentials/OrientationSensor.xml
+++ b/docs/en/Xamarin.Essentials/OrientationSensor.xml
@@ -12,9 +12,7 @@
Device orientation (quaternion) relative to magnetic fields.
-
-
-
+
@@ -32,9 +30,7 @@
Gets of currently monitoring the sensor.If monitoring.
-
-
-
+
@@ -53,9 +49,7 @@
Event triggered when reading of sensor changes.
-
-
-
+
@@ -76,9 +70,7 @@
Sensor speed to use.
Starts monitoring orientation sensor with specific speed.
-
-
-
+
@@ -96,9 +88,7 @@
Stops monitoring.
-
-
-
+
diff --git a/docs/en/Xamarin.Essentials/OrientationSensorChangedEventArgs.xml b/docs/en/Xamarin.Essentials/OrientationSensorChangedEventArgs.xml
index 29a62e485..e0e723ec3 100644
--- a/docs/en/Xamarin.Essentials/OrientationSensorChangedEventArgs.xml
+++ b/docs/en/Xamarin.Essentials/OrientationSensorChangedEventArgs.xml
@@ -12,9 +12,7 @@
Orientation event args when reading changes.
-
-
-
+
@@ -50,9 +48,7 @@
Gets the reading when it changes.The current Reading
-
-
-
+
diff --git a/docs/en/Xamarin.Essentials/OrientationSensorData.xml b/docs/en/Xamarin.Essentials/OrientationSensorData.xml
index 69888deed..e61614a49 100644
--- a/docs/en/Xamarin.Essentials/OrientationSensorData.xml
+++ b/docs/en/Xamarin.Essentials/OrientationSensorData.xml
@@ -21,9 +21,7 @@
Sensor data for orientation.
-
-
-
+
@@ -93,9 +91,7 @@
Object to compare
If equal to another objectIf equal
-
-
-
+
@@ -120,9 +116,7 @@
Other OrientationSensorData to compare with.
Compares the underlying Quaternion instances.True if they match, otherwise false.
-
-
-
+
@@ -141,9 +135,7 @@
Get the hash code for object.The hash code
-
-
-
+
@@ -167,9 +159,7 @@
Right to compare
Equality operator for equalsIf equal
-
-
-
+
@@ -193,9 +183,7 @@
Right to check
Inequality checkIf not equal
-
-
-
+
@@ -213,9 +201,7 @@
Gets the current orientation that represents a Quaternion.Gets the current orientation
-
-
-
+
diff --git a/docs/en/Xamarin.Essentials/PermissionException.xml b/docs/en/Xamarin.Essentials/PermissionException.xml
index e36a69d1b..a0f5b5af2 100644
--- a/docs/en/Xamarin.Essentials/PermissionException.xml
+++ b/docs/en/Xamarin.Essentials/PermissionException.xml
@@ -12,9 +12,7 @@
Exception that occures when calling an API that requires a specific permission.
-
-
-
+
@@ -32,9 +30,7 @@
Permission that is required.
Constructor with permission information.
-
-
-
+
diff --git a/docs/en/Xamarin.Essentials/PermissionStatus.xml b/docs/en/Xamarin.Essentials/PermissionStatus.xml
index 25ebc2ccb..9ddfb9f16 100644
--- a/docs/en/Xamarin.Essentials/PermissionStatus.xml
+++ b/docs/en/Xamarin.Essentials/PermissionStatus.xml
@@ -11,9 +11,7 @@
Status of the permission.
-
-
-
+
diff --git a/docs/en/Xamarin.Essentials/Permissions+BasePermission.xml b/docs/en/Xamarin.Essentials/Permissions+BasePermission.xml
index d55d34577..6c29931ff 100644
--- a/docs/en/Xamarin.Essentials/Permissions+BasePermission.xml
+++ b/docs/en/Xamarin.Essentials/Permissions+BasePermission.xml
@@ -85,7 +85,6 @@
Request a specific permission from the user.
- The status of the permission that was requested.The request will be prompted to the user if it hasn't been granted. iOS only allows the permission to be requested once, any additional requests will return immediatelly.
diff --git a/docs/en/Xamarin.Essentials/Permissions+Battery.xml b/docs/en/Xamarin.Essentials/Permissions+Battery.xml
index 3f9dcd30a..7a403afe6 100644
--- a/docs/en/Xamarin.Essentials/Permissions+Battery.xml
+++ b/docs/en/Xamarin.Essentials/Permissions+Battery.xml
@@ -46,9 +46,7 @@
Check status of Battery permission.Task of PermissionStatus for Battery.
-
-
-
+
diff --git a/docs/en/Xamarin.Essentials/Permissions+NetworkState.xml b/docs/en/Xamarin.Essentials/Permissions+NetworkState.xml
index ae51a4dc0..2e710fc05 100644
--- a/docs/en/Xamarin.Essentials/Permissions+NetworkState.xml
+++ b/docs/en/Xamarin.Essentials/Permissions+NetworkState.xml
@@ -50,7 +50,6 @@
Get a list of required permissions.
- List of required permissions.To be added.
diff --git a/docs/en/Xamarin.Essentials/Permissions.xml b/docs/en/Xamarin.Essentials/Permissions.xml
index 0203cbaef..307dbb928 100644
--- a/docs/en/Xamarin.Essentials/Permissions.xml
+++ b/docs/en/Xamarin.Essentials/Permissions.xml
@@ -12,9 +12,7 @@
Access to checking and requesting application permissions.
-
-
-
+
@@ -39,12 +37,10 @@
- To be added.
+ The permission to check.Checks the status of a specific permission.The current status of the permission.
-
-
-
+
@@ -66,9 +62,7 @@
Name of the capability on UWP.
Checks if a specific capability name is declared.If the capability is declared.
-
-
-
+
@@ -90,9 +84,7 @@
The name of the specific permission in the manifest to check.
Checks if a permission is declared in the Android manifest file.If the permission is declared or not.
-
-
-
+
@@ -114,9 +106,7 @@
The usage key to check in the info.plist.
Check if a usage key is specified in the info.plist file.If it is declared in the info.plist.
-
-
-
+
@@ -159,7 +149,7 @@
- To be added.
+ The permission to request.Request a specific permission from the user.The status of the permission that was requested.The request will be prompted to the user if it hasn't been granted. iOS only allows the permission to be requested once, any additional requests will return immediatelly.
@@ -189,6 +179,7 @@
The type of permission.Gets whether you should show UI with rationale for requesting a permission.
+ Returns true if rationale should be displayed, otherwise false.
diff --git a/docs/en/Xamarin.Essentials/PhoneDialer.xml b/docs/en/Xamarin.Essentials/PhoneDialer.xml
index 13aaa3b60..56fc90c8b 100644
--- a/docs/en/Xamarin.Essentials/PhoneDialer.xml
+++ b/docs/en/Xamarin.Essentials/PhoneDialer.xml
@@ -12,9 +12,7 @@
Open the platform phone dialer to place a call.
-
-
-
+
diff --git a/docs/en/Xamarin.Essentials/Placemark.xml b/docs/en/Xamarin.Essentials/Placemark.xml
index 50d7678c0..205a13778 100644
--- a/docs/en/Xamarin.Essentials/Placemark.xml
+++ b/docs/en/Xamarin.Essentials/Placemark.xml
@@ -12,9 +12,7 @@
User-friendly description of a geographic coordinate. This contains information such as the name of the place, its address, and other information.
-
-
-
+
@@ -29,9 +27,7 @@
Default constructor for placemark.
-
-
-
+
@@ -49,9 +45,7 @@
Placemark to copy.
Constructor to create a deep copy.
-
-
-
+
@@ -69,9 +63,7 @@
Gets or sets the administrative area name of the address, for example, "CA", or null if it is unknown.The admin area.
-
-
-
+
@@ -89,9 +81,7 @@
Gets or sets the country ISO code.The country ISO code.
-
-
-
+
@@ -109,9 +99,7 @@
Gets or sets the country name.The country name.
-
-
-
+
@@ -129,9 +117,7 @@
Gets or sets the feature name.The feature name.
-
-
-
+
@@ -149,9 +135,7 @@
Gets or sets the city or town.The city or town of the locality.
-
-
-
+
@@ -169,9 +153,7 @@
Gets or sets the location of the placemark.The location of the placemark.
-
-
-
+
@@ -189,9 +171,7 @@
Gets or sets the postal code.The postal code.
-
-
-
+
@@ -209,9 +189,7 @@
Gets or sets the sub-administrative area name of the address, for example, "Santa Clara County", or null if it is unknown.The sub-admin area.
-
-
-
+
@@ -229,9 +207,7 @@
Gets or sets the sub locality.The sub locality.
-
-
-
+
@@ -249,9 +225,7 @@
Gets or sets optional info: sub street or region.The sub thoroughfare.
-
-
-
+
@@ -269,9 +243,7 @@
Gets or sets the street name.The street name.
-
-
-
+
@@ -289,8 +261,8 @@
A string representation of the placemark.
- A string representation of the placemark.
- To be added.
+ Returns a string representation of the placemark.
+
diff --git a/docs/en/Xamarin.Essentials/PlacemarkExtensions.xml b/docs/en/Xamarin.Essentials/PlacemarkExtensions.xml
index 58896fb83..080157096 100644
--- a/docs/en/Xamarin.Essentials/PlacemarkExtensions.xml
+++ b/docs/en/Xamarin.Essentials/PlacemarkExtensions.xml
@@ -33,9 +33,7 @@
The placemark to open the map to.
Open the map to the placemark.
-
-
-
+ To be added.
diff --git a/docs/en/Xamarin.Essentials/Platform.xml b/docs/en/Xamarin.Essentials/Platform.xml
index cc9e16be0..32b60ee80 100644
--- a/docs/en/Xamarin.Essentials/Platform.xml
+++ b/docs/en/Xamarin.Essentials/Platform.xml
@@ -12,9 +12,7 @@
Platform specific helpers.
-
-
-
+
@@ -31,9 +29,7 @@
Event that is triggered when any Android Activity's state changes.
-
-
-
+
@@ -51,9 +47,7 @@
The current application's context.The applications context.
-
-
-
+
@@ -97,9 +91,7 @@
Gets the current Activity. This value is set OnCreate, OnPause, and OnResume.The current Activity or null if none or Init was not called.
-
-
-
+
@@ -118,9 +110,7 @@
Get the currently visible UIViewController.The visible UIViewController or null if not found.
-
-
-
+
@@ -141,9 +131,7 @@
Application to initialize with.
Initialize Xamarin.Essentials with Android's application class.
-
-
-
+
@@ -166,9 +154,7 @@
Activity to use for initialization.
Bundle of the activity.
Initialize Xamarin.Essentials with Android's activity and bundle.
-
-
-
+
@@ -253,9 +239,7 @@
The permissions from the corresponding overridden method in an activity.
The grantResults from the corresponding overridden method in an activity.
Pass permission request results from an activity's overridden method to the library for handling internal permission requests.
-
-
-
+
@@ -349,9 +333,7 @@
Cancellation token to stop waiting for Activity to be created or active.
Wait for an Activity to be create or active.The current Android Activity.
-
-
-
+
diff --git a/docs/en/Xamarin.Essentials/PointExtensions.xml b/docs/en/Xamarin.Essentials/PointExtensions.xml
index cdc05c827..bd500ac3c 100644
--- a/docs/en/Xamarin.Essentials/PointExtensions.xml
+++ b/docs/en/Xamarin.Essentials/PointExtensions.xml
@@ -12,9 +12,7 @@
Extension methods for Point.
-
-
-
+
@@ -36,9 +34,7 @@
The point to convert.
Converts the point ot the system representation.The converted point.
-
-
-
+
@@ -60,9 +56,7 @@
The point to convert.
Converts the point ot the system representation.The converted point.
-
-
-
+
@@ -84,9 +78,7 @@
The point to convert.
Converts the point ot the system representation.The converted point.
-
-
-
+
@@ -108,9 +100,7 @@
The point to convert.
Converts the point ot the system representation.The converted point.
-
-
-
+
@@ -132,9 +122,7 @@
The point to convert.
Converts the point ot the system representation.The converted point.
-
-
-
+
@@ -156,9 +144,7 @@
The point to convert.
Converts the point ot the system representation.The converted point.
-
-
-
+
diff --git a/docs/en/Xamarin.Essentials/Preferences.xml b/docs/en/Xamarin.Essentials/Preferences.xml
index 1257c4224..7fb0d2bf5 100644
--- a/docs/en/Xamarin.Essentials/Preferences.xml
+++ b/docs/en/Xamarin.Essentials/Preferences.xml
@@ -43,9 +43,7 @@
Clears all keys and values.
-
-
-
+
@@ -66,9 +64,7 @@
Shared container name.
Clears all keys and values.
-
-
-
+
@@ -90,9 +86,7 @@
Preference key.
Checks the existence of a given key.Returns true if the key exists.
-
-
-
+
@@ -116,9 +110,7 @@
Shared container name.
Checks the existence of a given key.Returns true if the key exists.
-
-
-
+
@@ -142,9 +134,7 @@
Default value to return if the key does not exist.
Gets the value for a given key, or the default specified if the key does not exist.Value for the given key, or the default if it does not exist.
-
-
-
+
@@ -168,9 +158,7 @@
Default value to return if the key does not exist.
Gets the value for a given key, or the default specified if the key does not exist.Value for the given key, or the default if it does not exist.
-
-
-
+
@@ -194,9 +182,7 @@
Default value to return if the key does not exist.
Gets the value for a given key, or the default specified if the key does not exist.Value for the given key, or the default if it does not exist.
-
-
-
+
@@ -220,9 +206,7 @@
Default value to return if the key does not exist.
Gets the value for a given key, or the default specified if the key does not exist.Value for the given key, or the default if it does not exist.
-
-
-
+
@@ -246,9 +230,7 @@
Default value to return if the key does not exist.
Gets the value for a given key, or the default specified if the key does not exist.Value for the given key, or the default if it does not exist.
-
-
-
+
@@ -272,9 +254,7 @@
Default value to return if the key does not exist.
Gets the value for a given key, or the default specified if the key does not exist.Value for the given key, or the default if it does not exist.
-
-
-
+
@@ -298,9 +278,7 @@
Default value to return if the key does not exist.
Gets the value for a given key, or the default specified if the key does not exist.Value for the given key, or the default if it does not exist.
-
-
-
+
@@ -326,9 +304,7 @@
Shared container key.
Gets the value for a given key, or the default specified if the key does not exist.Value for the given key, or the default if it does not exist.
-
-
-
+
@@ -354,9 +330,7 @@
Shared container key.
Gets the value for a given key, or the default specified if the key does not exist.Value for the given key, or the default if it does not exist.
-
-
-
+
@@ -382,9 +356,7 @@
Shared container key.
Gets the value for a given key, or the default specified if the key does not exist.Value for the given key, or the default if it does not exist.
-
-
-
+
@@ -410,9 +382,7 @@
Shared container key.
Gets the value for a given key, or the default specified if the key does not exist.Value for the given key, or the default if it does not exist.
-
-
-
+
@@ -438,9 +408,7 @@
Shared container key.
Gets the value for a given key, or the default specified if the key does not exist.Value for the given key, or the default if it does not exist.
-
-
-
+
@@ -466,9 +434,7 @@
Shared container key.
Gets the value for a given key, or the default specified if the key does not exist.Value for the given key, or the default if it does not exist.
-
-
-
+
@@ -494,9 +460,7 @@
Shared container key.
Gets the value for a given key, or the default specified if the key does not exist.Value for the given key, or the default if it does not exist.
-
-
-
+
@@ -517,9 +481,7 @@
Preference key.
Removes a key and its associated value if it exists.
-
-
-
+
@@ -542,9 +504,7 @@
Preference key.
Shared container name.
Removes a key and its associated value if it exists.
-
-
-
+
@@ -567,9 +527,7 @@
Preference key.
Preference value.
Sets a value for a given key.
-
-
-
+
@@ -592,9 +550,7 @@
Preference key.
Preference value.
Sets a value for a given key.
-
-
-
+
@@ -617,9 +573,7 @@
Preference key.
Preference value.
Sets a value for a given key.
-
-
-
+
@@ -642,9 +596,7 @@
Preference key.
Preference value.
Sets a value for a given key.
-
-
-
+
@@ -667,9 +619,7 @@
Preference key.
Preference value.
Sets a value for a given key.
-
-
-
+
@@ -692,9 +642,7 @@
Preference key.
Preference value.
Sets a value for a given key.
-
-
-
+
@@ -717,9 +665,7 @@
Preference key.
Preference value.
Sets a value for a given key.
-
-
-
+
@@ -744,9 +690,7 @@
Preference value.
Shared container name.
Sets a value for a given key.
-
-
-
+
@@ -771,9 +715,7 @@
Preference value.
Shared container name.
Sets a value for a given key.
-
-
-
+
@@ -798,9 +740,7 @@
Preference value.
Shared container name.
Sets a value for a given key.
-
-
-
+
@@ -825,9 +765,7 @@
Preference value.
Shared container name.
Sets a value for a given key.
-
-
-
+
@@ -852,9 +790,7 @@
Preference value.
Shared container name.
Sets a value for a given key.
-
-
-
+
@@ -879,9 +815,7 @@
Preference value.
Shared container name.
Sets a value for a given key.
-
-
-
+
@@ -906,9 +840,7 @@
Preference value.
Shared container name.
Sets a value for a given key.
-
-
-
+
diff --git a/docs/en/Xamarin.Essentials/ReadOnlyFile.xml b/docs/en/Xamarin.Essentials/ReadOnlyFile.xml
index a58f389d4..a9efe3c0c 100644
--- a/docs/en/Xamarin.Essentials/ReadOnlyFile.xml
+++ b/docs/en/Xamarin.Essentials/ReadOnlyFile.xml
@@ -12,9 +12,7 @@
A representation of a file and its content type.
-
-
-
+
@@ -32,9 +30,7 @@
Full file path.
Construct a file taking in file path.
-
-
-
+
@@ -52,9 +48,7 @@
File to use for ReadOnlyFile
Construct a file taking in file.
-
-
-
+
@@ -74,9 +68,7 @@
Full file path.
Content type (MIME type) of the file (eg: `image/png`).
Construct a file taking in file path and content type (MIME type).
-
-
-
+
diff --git a/docs/en/Xamarin.Essentials/RectangleExtensions.xml b/docs/en/Xamarin.Essentials/RectangleExtensions.xml
index 6b53e3c4e..ff251240e 100644
--- a/docs/en/Xamarin.Essentials/RectangleExtensions.xml
+++ b/docs/en/Xamarin.Essentials/RectangleExtensions.xml
@@ -12,9 +12,7 @@
Extension methods for Rectangle.
-
-
-
+
@@ -36,9 +34,7 @@
The base rectangle to convert.
Convert to system rectangle.The converted rectangle.
-
-
-
+
@@ -60,9 +56,7 @@
The base rectangle to convert.
Convert to system rectangle.The converted rectangle.
-
-
-
+
@@ -84,9 +78,7 @@
The base rectangle to convert.
Convert to system rectangle.The converted rectangle.
-
-
-
+
@@ -108,9 +100,7 @@
The base rectangle to convert.
Convert to system rectangle.The converted rectangle.
-
-
-
+
@@ -132,9 +122,7 @@
The base rectangle to convert.
Convert to system rectangle.The converted rectangle.
-
-
-
+
@@ -156,9 +144,7 @@
The base rectangle to convert.
Convert to system rectangle.The converted rectangle.
-
-
-
+
diff --git a/docs/en/Xamarin.Essentials/Screenshot.xml b/docs/en/Xamarin.Essentials/Screenshot.xml
index def485101..f557a7722 100644
--- a/docs/en/Xamarin.Essentials/Screenshot.xml
+++ b/docs/en/Xamarin.Essentials/Screenshot.xml
@@ -12,7 +12,7 @@
Take a screenshot depicting the current View.
- Output is always a PNG file.
+
@@ -29,9 +29,9 @@
- To be added.
- To be added.
- To be added.
+ Capture the screen.
+ Returns the caprured screenshot.
+
@@ -47,9 +47,9 @@
System.Boolean
- To be added.
- To be added.
- To be added.
+ Gets a value indicating whether capturing screenshots are supported.
+
+
diff --git a/docs/en/Xamarin.Essentials/ScreenshotFormat.xml b/docs/en/Xamarin.Essentials/ScreenshotFormat.xml
index 2745bea21..76cd415f1 100644
--- a/docs/en/Xamarin.Essentials/ScreenshotFormat.xml
+++ b/docs/en/Xamarin.Essentials/ScreenshotFormat.xml
@@ -10,8 +10,8 @@
System.Enum
- To be added.
- To be added.
+ The format to read screenshot images.
+
@@ -28,7 +28,7 @@
1
- To be added.
+ Read the screenshot image as a JPEG.
@@ -45,7 +45,7 @@
0
- To be added.
+ Read the screenshot image as a PNG.
diff --git a/docs/en/Xamarin.Essentials/SecureStorage.xml b/docs/en/Xamarin.Essentials/SecureStorage.xml
index a385c33dd..ef3dc5d1a 100644
--- a/docs/en/Xamarin.Essentials/SecureStorage.xml
+++ b/docs/en/Xamarin.Essentials/SecureStorage.xml
@@ -66,9 +66,7 @@
Storage Key.
Gets the decrypted value for a given Key.Decrypted string or null if key does not exist.
-
-
-
+
@@ -108,9 +106,7 @@
The key to remove.
Removes the encrypted key/value pair for the given key.Returns true if the key value pair was removed.
-
-
-
+
@@ -128,9 +124,7 @@
Removes all of the stored encrypted key/value pairs.
-
-
-
+
@@ -153,12 +147,8 @@
Storage Key.
The value to be encrypted.
Stores the value which is encrypted, for a given Key.
-
-
-
-
-
-
+
+
@@ -183,12 +173,8 @@
The value to be encrypted.
The KeyChain accessibility to create the encrypted record with.
Stores the value which is encrypted, for a given Key. iOS override to specify SecAccessible for the KeyChain.
-
-
-
-
-
-
+
+
diff --git a/docs/en/Xamarin.Essentials/SensorSpeed.xml b/docs/en/Xamarin.Essentials/SensorSpeed.xml
index 870c870b3..1b8a6cc3e 100644
--- a/docs/en/Xamarin.Essentials/SensorSpeed.xml
+++ b/docs/en/Xamarin.Essentials/SensorSpeed.xml
@@ -11,9 +11,7 @@
Sensor speed to monitor for changes.
-
-
-
+
diff --git a/docs/en/Xamarin.Essentials/Share.xml b/docs/en/Xamarin.Essentials/Share.xml
index 89467d782..fed62e938 100644
--- a/docs/en/Xamarin.Essentials/Share.xml
+++ b/docs/en/Xamarin.Essentials/Share.xml
@@ -12,9 +12,7 @@
Share data such as text and uris to other applications.
-
-
-
+
@@ -36,9 +34,7 @@
Text to share.
Show the share user interface to share text.Task when completed.
-
-
-
+
@@ -60,9 +56,7 @@
File request to share.
Show the user interface to share a file.Task when completed.
-
-
-
+
@@ -84,9 +78,7 @@
Multiple Files request to share.
Show the user interface to share a multiple files.Task when completed.
-
-
-
+
@@ -108,9 +100,7 @@
Share request with options.
Show the share user interface to share text or uri.Task when completed.
-
-
-
+
@@ -134,9 +124,7 @@
Title for the share user interface.
Show the share user interface to share text with a title.Task when completed.
-
-
-
+
diff --git a/docs/en/Xamarin.Essentials/ShareFile.xml b/docs/en/Xamarin.Essentials/ShareFile.xml
index bf9cc6809..8603c3ac5 100644
--- a/docs/en/Xamarin.Essentials/ShareFile.xml
+++ b/docs/en/Xamarin.Essentials/ShareFile.xml
@@ -12,9 +12,7 @@
A file to be shared.
-
-
-
+
@@ -32,9 +30,7 @@
The full path and filename.
File to be shared.
-
-
-
+
@@ -52,9 +48,7 @@
Existing file to be shared.
Shares an existing file.
-
-
-
+
@@ -73,12 +67,8 @@
Full path and filename.
Explicit content type (MIME type) of the file (eg: `image/png`).
-
-
-
-
-
-
+
+
diff --git a/docs/en/Xamarin.Essentials/ShareFileRequest.xml b/docs/en/Xamarin.Essentials/ShareFileRequest.xml
index 1386bd920..f9cfa3cb7 100644
--- a/docs/en/Xamarin.Essentials/ShareFileRequest.xml
+++ b/docs/en/Xamarin.Essentials/ShareFileRequest.xml
@@ -12,9 +12,7 @@
Standard request for sharing a file to another application.
-
-
-
+
@@ -29,9 +27,7 @@
Default constructor.
-
-
-
+
@@ -49,9 +45,7 @@
Existing file.
Share request with an existing file.
-
-
-
+
@@ -69,9 +63,7 @@
Existing file.
Share request with an existing file.
-
-
-
+
@@ -91,9 +83,7 @@
Title to use on the share user interface.
Existing file.
Share request with an existing file.
-
-
-
+
@@ -113,9 +103,7 @@
Title to use on the share user interface.
Existing file.
Share requerst with an existing file.
-
-
-
+
@@ -132,12 +120,8 @@
Gets or sets the file to share.
-
-
-
-
-
-
+
+
diff --git a/docs/en/Xamarin.Essentials/ShareMultipleFilesRequest.xml b/docs/en/Xamarin.Essentials/ShareMultipleFilesRequest.xml
index 2a1749013..06bb4f07c 100644
--- a/docs/en/Xamarin.Essentials/ShareMultipleFilesRequest.xml
+++ b/docs/en/Xamarin.Essentials/ShareMultipleFilesRequest.xml
@@ -12,9 +12,7 @@
Standard request for sharing a multiple files to another application.
-
-
-
+
@@ -29,15 +27,13 @@
Default constructor.
-
-
-
+
-
-
+
+ ConstructorXamarin.Essentials
@@ -49,15 +45,13 @@
Existing files.
Share request with an existing files.
-
-
-
+
-
-
+
+ ConstructorXamarin.Essentials
@@ -69,15 +63,13 @@
Existing files.
Share request with an existing files.
-
-
-
+
-
-
+
+ ConstructorXamarin.Essentials
@@ -91,15 +83,13 @@
Title to use on the share user interface.
Existing files.
Share request with an existing files.
-
-
-
+
-
-
+
+ ConstructorXamarin.Essentials
@@ -113,14 +103,12 @@
Title to use on the share user interface.
Existing files.
Share requerst with an existing files.
-
-
-
+
-
-
+
+ Property
@@ -128,16 +116,34 @@
1.0.0.0
- System.Collections.Generic.IEnumerable<Xamarin.Essentials.ShareFile>
+ System.Collections.Generic.List<Xamarin.Essentials.ShareFile>Gets or sets the files to share.
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+ Method
+
+ Xamarin.Essentials
+ 1.0.0.0
+
+
+ Xamarin.Essentials.ShareMultipleFilesRequest
+
+
+
+
+
+ The request to convert into a multi-file request.
+ Convert a single file share request into a multi-file share request.
+ Returns a multi-file share request containing the single file.
+
diff --git a/docs/en/Xamarin.Essentials/ShareRequestBase.xml b/docs/en/Xamarin.Essentials/ShareRequestBase.xml
index 8e871dc2f..aa856f2a6 100644
--- a/docs/en/Xamarin.Essentials/ShareRequestBase.xml
+++ b/docs/en/Xamarin.Essentials/ShareRequestBase.xml
@@ -11,12 +11,8 @@
-
-
-
-
-
-
+
+
@@ -30,12 +26,8 @@
-
-
-
-
-
-
+
+
@@ -52,9 +44,7 @@
Gets or sets the source rectangle to display the Share UI from.
-
-
-
+ This is only used on iOS currently.
@@ -73,9 +63,7 @@
Gets or sets the title to use on the share user interfaceThe title to be displayed.
-
-
-
+
diff --git a/docs/en/Xamarin.Essentials/ShareTextRequest.xml b/docs/en/Xamarin.Essentials/ShareTextRequest.xml
index b14cc4000..e70ab267a 100644
--- a/docs/en/Xamarin.Essentials/ShareTextRequest.xml
+++ b/docs/en/Xamarin.Essentials/ShareTextRequest.xml
@@ -12,9 +12,7 @@
Standard request for sharing text to other applications.
-
-
-
+
@@ -29,9 +27,7 @@
Default constructor.
-
-
-
+
@@ -49,9 +45,7 @@
Text to share.
Share request with text.
-
-
-
+
@@ -71,9 +65,7 @@
Text to share.
Title for share user interface.
Share request with text and title.
-
-
-
+
@@ -91,9 +83,7 @@
Gets or sets the subject that is sometimes used for applications such as mail clients.The subject.
-
-
-
+
@@ -111,9 +101,7 @@
Gets or sets the main text or message to share.The main text.
-
-
-
+
diff --git a/docs/en/Xamarin.Essentials/SizeExtensions.xml b/docs/en/Xamarin.Essentials/SizeExtensions.xml
index 69bac27a7..3718a64dc 100644
--- a/docs/en/Xamarin.Essentials/SizeExtensions.xml
+++ b/docs/en/Xamarin.Essentials/SizeExtensions.xml
@@ -12,9 +12,7 @@
Extension methods for Size.
-
-
-
+
@@ -36,9 +34,7 @@
Base size to convert.
Convert to system Size.Converted size.
-
-
-
+
@@ -60,9 +56,7 @@
Base size to convert.
Convert to system Size.Converted size.
-
-
-
+
@@ -84,9 +78,7 @@
Base size to convert.
Convert to system Size.Converted size.
-
-
-
+
@@ -108,9 +100,7 @@
Base size to convert.
Convert to system SizeF.Converted size.
-
-
-
+
@@ -132,9 +122,7 @@
Base size to convert.
Convert to system SizeF.Converted size.
-
-
-
+
@@ -156,9 +144,7 @@
Base size to convert.
Convert to system SizeF.Converted size.
-
-
-
+
diff --git a/docs/en/Xamarin.Essentials/Sms.xml b/docs/en/Xamarin.Essentials/Sms.xml
index 4d186b307..0ab8afb53 100644
--- a/docs/en/Xamarin.Essentials/Sms.xml
+++ b/docs/en/Xamarin.Essentials/Sms.xml
@@ -12,9 +12,7 @@
Provides an easy way to allow the user to send SMS messages.
-
-
-
+
@@ -32,12 +30,8 @@
Opens the default SMS client to allow the user to send the message.
-
-
-
-
-
-
+
+
@@ -58,12 +52,8 @@
The message to send.
Opens the default SMS client to allow the user to send the message.
-
-
-
-
-
-
+
+
diff --git a/docs/en/Xamarin.Essentials/SmsMessage.xml b/docs/en/Xamarin.Essentials/SmsMessage.xml
index 869fce8c9..4fd8ca313 100644
--- a/docs/en/Xamarin.Essentials/SmsMessage.xml
+++ b/docs/en/Xamarin.Essentials/SmsMessage.xml
@@ -12,9 +12,7 @@
Represents a single SMS message.
-
-
-
+
@@ -29,9 +27,7 @@
Creates a new instance of SmsMessage
-
-
-
+
@@ -51,9 +47,7 @@
Content of the message
Recipients to receive the message.
Creates a new instance of SmsMessage
-
-
-
+
@@ -73,9 +67,7 @@
Content of the message
Recipient to receive the message.
Creates a new instance of SmsMessage
-
-
-
+
@@ -92,12 +84,8 @@
Gets the body of the message.
-
-
-
-
-
-
+
+
@@ -114,12 +102,8 @@
Gets the recipient of the message.
-
-
-
-
-
-
+
+
diff --git a/docs/en/Xamarin.Essentials/SpeechOptions.xml b/docs/en/Xamarin.Essentials/SpeechOptions.xml
index a3b79e58f..406b6ba30 100644
--- a/docs/en/Xamarin.Essentials/SpeechOptions.xml
+++ b/docs/en/Xamarin.Essentials/SpeechOptions.xml
@@ -12,9 +12,7 @@
Text-to-speech options.
-
-
-
+
@@ -28,12 +26,8 @@
-
-
-
-
-
-
+
+
@@ -50,9 +44,7 @@
Gets or Sets a specific Locale to use with text to speech.
-
-
-
+ The Language property should match a Locale value returned by GetLocalesAsync().
@@ -70,9 +62,7 @@
The pitch to use when speaking.
-
-
-
+ This value should be between 0f and 2.0f.
@@ -90,9 +80,7 @@
The volume to use when speaking.
-
-
-
+ This value should be between 0f and 1.0f.
diff --git a/docs/en/Xamarin.Essentials/TextToSpeech.xml b/docs/en/Xamarin.Essentials/TextToSpeech.xml
index 1ccc92931..3c37b371d 100644
--- a/docs/en/Xamarin.Essentials/TextToSpeech.xml
+++ b/docs/en/Xamarin.Essentials/TextToSpeech.xml
@@ -12,9 +12,7 @@
Speak text to Speech
-
-
-
+
@@ -32,12 +30,8 @@
Gets a list of Locales supported by Text to Speech.
-
-
-
-
-
-
+
+
@@ -60,12 +54,8 @@
The text to speak..
Optional cancellation token to stop speaking.
Speaks the given text with default options.
-
-
-
-
-
-
+
+
@@ -90,12 +80,8 @@
The options to use for speaking.
Optional cancellation token to stop speaking.
Speaks the given text with the specified options.
-
-
-
-
-
-
+
+
diff --git a/docs/en/Xamarin.Essentials/VersionTracking.xml b/docs/en/Xamarin.Essentials/VersionTracking.xml
index 989468ab9..4100174cf 100644
--- a/docs/en/Xamarin.Essentials/VersionTracking.xml
+++ b/docs/en/Xamarin.Essentials/VersionTracking.xml
@@ -12,9 +12,7 @@
Provides an easy way to track an app's version on a device.
-
-
-
+
@@ -31,12 +29,8 @@
Gets the collection of build numbers of the app that ran on this device.
-
-
-
-
-
-
+
+
@@ -53,12 +47,8 @@
Gets the current build of the app.
-
-
-
-
-
-
+
+
@@ -75,12 +65,8 @@
Gets the current version number of the app.
-
-
-
-
-
-
+
+
@@ -97,12 +83,8 @@
Gets the build number of first version of the app that was installed on this device.
-
-
-
-
-
-
+
+
@@ -119,12 +101,8 @@
Gets the version number of the first version of the app that was installed on this device.
-
-
-
-
-
-
+
+
@@ -141,12 +119,8 @@
Gets a value indicating whether this is the first time this app has ever been launched on this device.
-
-
-
-
-
-
+
+
@@ -168,9 +142,7 @@
The build number.
Determines if this is the first launch of the app for a specified build number.Returns true if this is the first launch of the app for the specified build number; otherwise false.
-
-
-
+
@@ -187,12 +159,8 @@
Gets a value indicating if this is the first launch of the app for the current build number.
-
-
-
-
-
-
+
+
@@ -209,12 +177,8 @@
Gets a value indicating if this is the first launch of the app for the current version number.
-
-
-
-
-
-
+
+
@@ -236,9 +200,7 @@
The version number.
Determines if this is the first launch of the app for a specified version number.Returns true if this is the first launch of the app for the specified version number; otherwise false.
-
-
-
+
@@ -255,12 +217,8 @@
Gets the build number for the previously run version.
-
-
-
-
-
-
+
+
@@ -277,12 +235,8 @@
Gets the version number for the previously run version.
-
-
-
-
-
-
+
+
@@ -300,9 +254,7 @@
Starts tracking version information.
-
-
-
+
@@ -319,12 +271,8 @@
Gets the collection of version numbers of the app that ran on this device.
-
-
-
-
-
-
+
+
diff --git a/docs/en/Xamarin.Essentials/Vibration.xml b/docs/en/Xamarin.Essentials/Vibration.xml
index 2856e0999..bd7604e1c 100644
--- a/docs/en/Xamarin.Essentials/Vibration.xml
+++ b/docs/en/Xamarin.Essentials/Vibration.xml
@@ -12,9 +12,7 @@
Provides an easy way to make the device vibrate.
-
-
-
+
@@ -32,9 +30,7 @@
Cancel any current vibrations.
-
-
-
+
@@ -52,9 +48,7 @@
Vibrate the device fo 500ms.
-
-
-
+
diff --git a/docs/en/Xamarin.Essentials/WebAuthenticator.xml b/docs/en/Xamarin.Essentials/WebAuthenticator.xml
index 5c7ffbe20..17c8c9b14 100644
--- a/docs/en/Xamarin.Essentials/WebAuthenticator.xml
+++ b/docs/en/Xamarin.Essentials/WebAuthenticator.xml
@@ -36,9 +36,7 @@
Expected callback url that the navigation flow will eventually redirect to.
Begin an authentication flow by navigating to the specified url and waiting for a callback/redirect to the callbackUrl scheme.Returns a result parsed out from the callback url.
-
-
-
+
diff --git a/docs/en/Xamarin.Essentials/WebAuthenticatorCallbackActivity.xml b/docs/en/Xamarin.Essentials/WebAuthenticatorCallbackActivity.xml
index d0a036bd3..5e3a4adcb 100644
--- a/docs/en/Xamarin.Essentials/WebAuthenticatorCallbackActivity.xml
+++ b/docs/en/Xamarin.Essentials/WebAuthenticatorCallbackActivity.xml
@@ -26,9 +26,7 @@
-
-
-
+ To be added.To be added.
@@ -48,15 +46,9 @@
-
-
-
-
- This method should be called from the same method in the parent activity which initiated the web authentication.
-
-
-
-
+
+ This method should be called from the same method in the parent activity which initiated the web authentication.
+
diff --git a/docs/en/Xamarin.Essentials/WebAuthenticatorResult.xml b/docs/en/Xamarin.Essentials/WebAuthenticatorResult.xml
index 67e69c8c2..8285f35e4 100644
--- a/docs/en/Xamarin.Essentials/WebAuthenticatorResult.xml
+++ b/docs/en/Xamarin.Essentials/WebAuthenticatorResult.xml
@@ -26,9 +26,7 @@
-
-
-
+ To be added.
@@ -83,9 +81,7 @@
The value for the `access_token` key.Access Token parsed from the callback URI access_token parameter.
-
-
-
+
@@ -103,9 +99,7 @@
The expiry date as calculated by the timestamp of when the result was created plus the value in seconds for the `expires_in` key.Timestamp of the creation of the object instance plus the expires_in seconds parsed from the callback URI.
-
-
-
+
@@ -126,12 +120,8 @@
Key from the callback URI's query string.
Gets a value for a given key from the dictionary.
-
-
-
-
-
-
+
+
@@ -166,12 +156,8 @@
The dictionary of key/value pairs parsed form the callback URI's querystring.
-
-
-
-
-
-
+
+
@@ -191,16 +177,10 @@
-
-
-
-
-
-
+
+
Puts a key/value pair into the dictionary.
-
-
-
+
@@ -218,9 +198,7 @@
The value for the `refresh_token` key.Refresh Token parsed from the callback URI refresh_token parameter.
-
-
-
+
@@ -238,9 +216,7 @@
The refresh token expiry date as calculated by the timestamp of when the result was created plus the value in seconds for the refresh_token_expires_in key.Timestamp of the creation of the object instance plus the expires_in seconds parsed from the callback URI.
-
-
-
+
@@ -257,12 +233,8 @@
The timestamp when the class was instantiated, which usually corresponds with the parsed result of a request.
-
-
-
-
-
-
+
+
diff --git a/docs/en/index.xml b/docs/en/index.xml
index 17470ad7b..5ffb9c6f3 100644
--- a/docs/en/index.xml
+++ b/docs/en/index.xml
@@ -99,7 +99,10 @@
System.Runtime.Versioning.TargetFramework("Xamarin.Mac,Version=v2.0", FrameworkDisplayName="Xamarin.Mac")
- System.Reflection.AssemblyInformationalVersion("1.0.0")
+ System.Reflection.AssemblyMetadata("RepositoryUrl", "https://github.com/xamarin/Essentials")
+
+
+ System.Reflection.AssemblyInformationalVersion("1.0.0+2fb7c9ee75e244e990677fa4ef85bbfd730a97e7")
@@ -248,6 +251,7 @@
+
diff --git a/docs/en/ns-Xamarin.Essentials.xml b/docs/en/ns-Xamarin.Essentials.xml
index 064f83088..7421b0321 100644
--- a/docs/en/ns-Xamarin.Essentials.xml
+++ b/docs/en/ns-Xamarin.Essentials.xml
@@ -1,8 +1,6 @@
Xamarin.Essentials offers a cross-platform API for platform specific features.
-
-
-
+
diff --git a/nuget.config b/nuget.config
deleted file mode 100644
index 0cce70d92..000000000
--- a/nuget.config
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file