Sample Project Tweaks and Optimizations (#353)
* Make sure orientation sensor stops on sample. * Fix up all sensors page to start and stop correctly * Only check permission if unknown status * Update to latest sdk.extras * fix back button press on TTS page. Check for null. * Add samples sln for CI/CD * Update readme and samples sln * Don't use code sign key for simbuilds * let's try this gain * Update to projects * Cleanup sample config * bump sdk extras
This commit is contained in:
Родитель
56bc8dca66
Коммит
ba6b2899a2
|
@ -43,6 +43,20 @@
|
|||
<JavaMaximumHeapSize>1G</JavaMaximumHeapSize>
|
||||
<AndroidLinkSkip />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Samples|AnyCPU'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Samples</OutputPath>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<AndroidManagedSymbols>true</AndroidManagedSymbols>
|
||||
<AndroidUseSharedRuntime>false</AndroidUseSharedRuntime>
|
||||
<AndroidSupportedAbis>armeabi;armeabi-v7a;x86;x86_64;arm64-v8a</AndroidSupportedAbis>
|
||||
<EmbedAssembliesIntoApk>true</EmbedAssembliesIntoApk>
|
||||
<JavaMaximumHeapSize>1G</JavaMaximumHeapSize>
|
||||
<AndroidLinkSkip />
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Mono.Android" />
|
||||
<Reference Include="System" />
|
||||
|
|
|
@ -89,6 +89,42 @@
|
|||
<Prefer32Bit>true</Prefer32Bit>
|
||||
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Samples|ARM'">
|
||||
<OutputPath>bin\ARM\Samples\</OutputPath>
|
||||
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<NoWarn>;2008;NU1603</NoWarn>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>ARM</PlatformTarget>
|
||||
<UseVSHostingProcess>false</UseVSHostingProcess>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<Prefer32Bit>true</Prefer32Bit>
|
||||
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Samples|x64'">
|
||||
<OutputPath>bin\x64\Samples\</OutputPath>
|
||||
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<NoWarn>;2008;NU1603</NoWarn>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<UseVSHostingProcess>false</UseVSHostingProcess>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<Prefer32Bit>true</Prefer32Bit>
|
||||
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Samples|x86'">
|
||||
<OutputPath>bin\x86\Samples\</OutputPath>
|
||||
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<NoWarn>;2008;NU1603</NoWarn>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<UseVSHostingProcess>false</UseVSHostingProcess>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<Prefer32Bit>true</Prefer32Bit>
|
||||
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="UnitTests.HeadlessRunner" Version="2.0.0" />
|
||||
<PackageReference Include="Xamarin.Forms" Version="3.1.0.583944" />
|
||||
|
|
|
@ -27,6 +27,10 @@
|
|||
<CodesignKey>iPhone Developer</CodesignKey>
|
||||
<CodesignKey />
|
||||
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
|
||||
<CodesignProvision>
|
||||
</CodesignProvision>
|
||||
<CodesignExtraArgs />
|
||||
<CodesignResourceRules />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhoneSimulator' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
|
@ -69,6 +73,36 @@
|
|||
<CodesignKey>iPhone Developer</CodesignKey>
|
||||
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Samples|iPhoneSimulator'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\iPhoneSimulator\Samples</OutputPath>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<MtouchLink>SdkOnly</MtouchLink>
|
||||
<MtouchArch>x86_64</MtouchArch>
|
||||
<ConsolePause>false</ConsolePause>
|
||||
<CodesignKey>iPhone Developer</CodesignKey>
|
||||
<CodesignKey />
|
||||
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
|
||||
<MtouchExtraArgs>--linkskip=Xamarin.Forms.Platform.iOS --linkskip=Xamarin.Forms.Platform --linkskip=Xamarin.Forms.Core --linkskip=Xamarin.Forms.Xaml</MtouchExtraArgs>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Samples|iPhone'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\iPhone\Samples</OutputPath>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<MtouchArch>ARM64</MtouchArch>
|
||||
<ConsolePause>false</ConsolePause>
|
||||
<CodesignKey>iPhone Developer</CodesignKey>
|
||||
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(RunConfiguration)' == 'Default' ">
|
||||
<AppExtensionDebugBundleId />
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Xml" />
|
||||
|
|
57
README.md
57
README.md
|
@ -13,6 +13,8 @@ iOS, Android, and UWP offer unique operating system and platform APIs that devel
|
|||
| Jenkins | Build | Windows | [![Jenkins Build Status](https://jenkins.mono-project.com/buildStatus/icon?job=Components-Essentials)](https://jenkins.mono-project.com/view/Components/job/Components-Essentials/) |
|
||||
| VSTS | Build | Windows | ![VSTS Build Status](https://devdiv.visualstudio.com/_apis/public/build/definitions/0bdbc590-a062-4c3f-b0f6-9383f67865ee/8538/badge) |
|
||||
| Jenkins | Device Tests | macOS | [![Build Status](https://jenkins.mono-project.com/buildStatus/icon?job=Components-Essentials-DeviceTests-Mac)](https://jenkins.mono-project.com/job/Components-Essentials-DeviceTests-Mac) |
|
||||
| App Center | Sample App | Android | [![Build status](https://build.appcenter.ms/v0.1/apps/7a1f46ca-ba2f-477e-aacc-ff013c7d5f7a/branches/master/badge)](https://appcenter.ms) |
|
||||
| App Center | Sample App | iOS | [![Build status](https://build.appcenter.ms/v0.1/apps/43b39e9e-2b2b-482f-8afa-e9906334c85e/branches/master/badge)](https://appcenter.ms) |
|
||||
|
||||
## Installation
|
||||
Xamarin.Essentials is available via:
|
||||
|
@ -31,34 +33,35 @@ Xamarin.Essentials is focused on the following platforms:
|
|||
- Android (4.4+)
|
||||
- UWP (Fall Creators Update+)
|
||||
|
||||
## Current APIs:
|
||||
## API Documentation:
|
||||
The following cross-platform APIs are available in Xamarin.Essentials:
|
||||
- [x] [Accelerometer](https://docs.microsoft.com/xamarin/essentials/accelerometer)
|
||||
- [X] [App Information](https://docs.microsoft.com/xamarin/essentials/app-information)
|
||||
- [x] [Battery](https://docs.microsoft.com/xamarin/essentials/battery)
|
||||
- [x] [Clipboard](https://docs.microsoft.com/xamarin/essentials/clipboard)
|
||||
- [x] [Compass](https://docs.microsoft.com/xamarin/essentials/compass)
|
||||
- [x] [Connectivity](https://docs.microsoft.com/xamarin/essentials/connectivity)
|
||||
- [x] [Data Transfer (Share)](https://docs.microsoft.com/xamarin/essentials/data-transfer)
|
||||
- [x] [Device Display Information](https://docs.microsoft.com/en-us/xamarin/essentials/device-display)
|
||||
- [x] [Device Information](https://docs.microsoft.com/xamarin/essentials/device-information)
|
||||
- [x] [Email](https://docs.microsoft.com/xamarin/essentials/email)
|
||||
- [x] [File System Helpers](https://docs.microsoft.com/xamarin/essentials/file-system-helpers)
|
||||
- [x] [Flashlight](https://docs.microsoft.com/xamarin/essentials/flashlight)
|
||||
- [x] [Geocoding](https://docs.microsoft.com/xamarin/essentials/geocoding)
|
||||
- [x] [Geolocation](https://docs.microsoft.com/xamarin/essentials/geolocation)
|
||||
- [x] [Gyroscope](https://docs.microsoft.com/xamarin/essentials/gyroscope)
|
||||
- [x] [Magnetometer](https://docs.microsoft.com/xamarin/essentials/magnetometer)
|
||||
- [x] [Open Browser](https://docs.microsoft.com/xamarin/essentials/open-browser)
|
||||
- [x] [Orientation Sensor](https://docs.microsoft.com/en-us/xamarin/essentials/orientation-sensor)
|
||||
- [x] [Phone Dialer](https://docs.microsoft.com/xamarin/essentials/phone-dialer)
|
||||
- [x] [Preferences](https://docs.microsoft.com/xamarin/essentials/preferences)
|
||||
- [x] [Screen Lock](https://docs.microsoft.com/xamarin/essentials/screen-lock)
|
||||
- [x] [Secure Storage](https://docs.microsoft.com/xamarin/essentials/secure-storage)
|
||||
- [x] [SMS](https://docs.microsoft.com/xamarin/essentials/sms)
|
||||
- [x] [Text-to-Speech](https://docs.microsoft.com/xamarin/essentials/text-to-speech)
|
||||
- [x] [Version Tracking](https://docs.microsoft.com/xamarin/essentials/version-tracking)
|
||||
- [x] [Vibrate](https://docs.microsoft.com/xamarin/essentials/vibrate)
|
||||
- [Accelerometer](https://docs.microsoft.com/xamarin/essentials/accelerometer)
|
||||
- [App Information](https://docs.microsoft.com/xamarin/essentials/app-information)
|
||||
- [Battery](https://docs.microsoft.com/xamarin/essentials/battery)
|
||||
- [Clipboard](https://docs.microsoft.com/xamarin/essentials/clipboard)
|
||||
- [Compass](https://docs.microsoft.com/xamarin/essentials/compass)
|
||||
- [Connectivity](https://docs.microsoft.com/xamarin/essentials/connectivity)
|
||||
- [Data Transfer (Share)](https://docs.microsoft.com/xamarin/essentials/data-transfer)
|
||||
- [Device Display Information](https://docs.microsoft.com/en-us/xamarin/essentials/device-display)
|
||||
- [Device Information](https://docs.microsoft.com/xamarin/essentials/device-information)
|
||||
- [Email](https://docs.microsoft.com/xamarin/essentials/email)
|
||||
- [File System Helpers](https://docs.microsoft.com/xamarin/essentials/file-system-helpers)
|
||||
- [Flashlight](https://docs.microsoft.com/xamarin/essentials/flashlight)
|
||||
- [Geocoding](https://docs.microsoft.com/xamarin/essentials/geocoding)
|
||||
- [Geolocation](https://docs.microsoft.com/xamarin/essentials/geolocation)
|
||||
- [Gyroscope](https://docs.microsoft.com/xamarin/essentials/gyroscope)
|
||||
- [Magnetometer](https://docs.microsoft.com/xamarin/essentials/magnetometer)
|
||||
- [Open Browser](https://docs.microsoft.com/xamarin/essentials/open-browser)
|
||||
- [Orientation Sensor](https://docs.microsoft.com/en-us/xamarin/essentials/orientation-sensor)
|
||||
- [Power](https://docs.microsoft.com/en-us/xamarin/essentials/power)
|
||||
- [Phone Dialer](https://docs.microsoft.com/xamarin/essentials/phone-dialer)
|
||||
- [Preferences](https://docs.microsoft.com/xamarin/essentials/preferences)
|
||||
- [Screen Lock](https://docs.microsoft.com/xamarin/essentials/screen-lock)
|
||||
- [Secure Storage](https://docs.microsoft.com/xamarin/essentials/secure-storage)
|
||||
- [SMS](https://docs.microsoft.com/xamarin/essentials/sms)
|
||||
- [Text-to-Speech](https://docs.microsoft.com/xamarin/essentials/text-to-speech)
|
||||
- [Version Tracking](https://docs.microsoft.com/xamarin/essentials/version-tracking)
|
||||
- [Vibrate](https://docs.microsoft.com/xamarin/essentials/vibrate)
|
||||
|
||||
## Contributing
|
||||
Please read through our [Contribution Guide](CONTRIBUTING.md). We are not accepting new PRs for full features, however any issue that is marked as `up for grabs` are open for community contributions. We encourage creating new issues for bugs found during usage that the team will triage. Additionally, we are open for code refactoring suggestions in PRs.
|
||||
|
|
|
@ -42,6 +42,18 @@
|
|||
<AndroidSupportedAbis />
|
||||
<JavaMaximumHeapSize>1G</JavaMaximumHeapSize>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Samples|AnyCPU'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Samples</OutputPath>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<AndroidManagedSymbols>true</AndroidManagedSymbols>
|
||||
<AndroidUseSharedRuntime>false</AndroidUseSharedRuntime>
|
||||
<AndroidSupportedAbis />
|
||||
<JavaMaximumHeapSize>1G</JavaMaximumHeapSize>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Mono.Android" />
|
||||
<Reference Include="System" />
|
||||
|
|
|
@ -89,6 +89,42 @@
|
|||
<Prefer32Bit>true</Prefer32Bit>
|
||||
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Samples|ARM'">
|
||||
<OutputPath>bin\ARM\Samples\</OutputPath>
|
||||
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<NoWarn>;2008</NoWarn>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>ARM</PlatformTarget>
|
||||
<UseVSHostingProcess>false</UseVSHostingProcess>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<Prefer32Bit>true</Prefer32Bit>
|
||||
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Samples|x64'">
|
||||
<OutputPath>bin\x64\Samples\</OutputPath>
|
||||
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<NoWarn>;2008</NoWarn>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<UseVSHostingProcess>false</UseVSHostingProcess>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<Prefer32Bit>true</Prefer32Bit>
|
||||
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Samples|x86'">
|
||||
<OutputPath>bin\x86\Samples\</OutputPath>
|
||||
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<NoWarn>;2008</NoWarn>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<UseVSHostingProcess>false</UseVSHostingProcess>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<Prefer32Bit>true</Prefer32Bit>
|
||||
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Xamarin.Forms" Version="3.1.0.583944" />
|
||||
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform" Version="6.1.5" />
|
||||
|
|
|
@ -26,8 +26,8 @@
|
|||
<MtouchDebug>true</MtouchDebug>
|
||||
<MtouchExtraArgs>--linkskip=Xamarin.Forms.Platform.iOS --linkskip=Xamarin.Forms.Platform --linkskip=Xamarin.Forms.Core --linkskip=Xamarin.Forms.Xaml --linkskip=Samples</MtouchExtraArgs>
|
||||
<CodesignKey>iPhone Developer</CodesignKey>
|
||||
<CodesignKey />
|
||||
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
|
||||
<CodesignProvision />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhoneSimulator' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
|
@ -68,6 +68,29 @@
|
|||
<CodesignKey>iPhone Developer</CodesignKey>
|
||||
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Samples|iPhoneSimulator'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\iPhoneSimulator\Samples</OutputPath>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<MtouchLink>None</MtouchLink>
|
||||
<MtouchArch>x86_64</MtouchArch>
|
||||
<ConsolePause>false</ConsolePause>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Samples|iPhone'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\iPhone\Samples</OutputPath>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<MtouchArch>ARM64</MtouchArch>
|
||||
<ConsolePause>false</ConsolePause>
|
||||
<CodesignKey>iPhone Developer</CodesignKey>
|
||||
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Xml" />
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netstandard2.0</TargetFramework>
|
||||
<Configurations>Debug;Release;Samples</Configurations>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition=" '$(Configuration)'=='Debug' ">
|
||||
|
@ -12,6 +13,10 @@
|
|||
<DebugType>pdbonly</DebugType>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)'=='Samples'">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Xamarin.Forms" Version="3.1.0.583944" />
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<views:BasePage xmlns="http://xamarin.com/schemas/2014/forms"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
xmlns:views="clr-namespace:Samples.View"
|
||||
xmlns:viewmodels="clr-namespace:Samples.ViewModel"
|
||||
xmlns:views="clr-namespace:Samples.View"
|
||||
x:Class="Samples.View.AllSensorsPage"
|
||||
Title="All Sensors">
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
|||
<StackLayout Padding="12,0,12,12" Spacing="6">
|
||||
|
||||
<Label Text="Accelerometer" FontAttributes="Bold" Margin="0,6,0,0" />
|
||||
<Grid>
|
||||
<Grid x:Name="GridAccelerometer">
|
||||
<Grid.BindingContext>
|
||||
<viewmodels:AccelerometerViewModel />
|
||||
</Grid.BindingContext>
|
||||
|
@ -46,7 +46,7 @@
|
|||
</Grid>
|
||||
|
||||
<Label Text="Compass" FontAttributes="Bold" Margin="0,6,0,0" />
|
||||
<Grid>
|
||||
<Grid x:Name="GridCompass">
|
||||
<Grid.BindingContext>
|
||||
<viewmodels:CompassViewModel />
|
||||
</Grid.BindingContext>
|
||||
|
@ -75,7 +75,7 @@
|
|||
</Grid>
|
||||
|
||||
<Label Text="Gyroscope" FontAttributes="Bold" Margin="0,6,0,0" />
|
||||
<Grid>
|
||||
<Grid x:Name="GridGyro">
|
||||
<Grid.BindingContext>
|
||||
<viewmodels:GyroscopeViewModel />
|
||||
</Grid.BindingContext>
|
||||
|
@ -109,7 +109,7 @@
|
|||
</Grid>
|
||||
|
||||
<Label Text="Magnetometer" FontAttributes="Bold" Margin="0,6,0,0" />
|
||||
<Grid>
|
||||
<Grid x:Name="GridMagnetometer">
|
||||
<Grid.BindingContext>
|
||||
<viewmodels:MagnetometerViewModel />
|
||||
</Grid.BindingContext>
|
||||
|
@ -143,7 +143,7 @@
|
|||
</Grid>
|
||||
|
||||
<Label Text="Orientation Sensor" FontAttributes="Bold" Margin="0,6,0,0" />
|
||||
<Grid>
|
||||
<Grid x:Name="GridOrientation">
|
||||
<Grid.BindingContext>
|
||||
<viewmodels:OrientationSensorViewModel />
|
||||
</Grid.BindingContext>
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
namespace Samples.View
|
||||
using System.Threading.Tasks;
|
||||
using Samples.ViewModel;
|
||||
using Xamarin.Forms;
|
||||
|
||||
namespace Samples.View
|
||||
{
|
||||
public partial class AllSensorsPage : BasePage
|
||||
{
|
||||
|
@ -6,5 +10,27 @@
|
|||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
protected override void OnAppearing()
|
||||
{
|
||||
base.OnAppearing();
|
||||
|
||||
SetupBinding(GridAccelerometer.BindingContext);
|
||||
SetupBinding(GridCompass.BindingContext);
|
||||
SetupBinding(GridGyro.BindingContext);
|
||||
SetupBinding(GridMagnetometer.BindingContext);
|
||||
SetupBinding(GridOrientation.BindingContext);
|
||||
}
|
||||
|
||||
protected override void OnDisappearing()
|
||||
{
|
||||
TearDownBinding(GridAccelerometer.BindingContext);
|
||||
TearDownBinding(GridCompass.BindingContext);
|
||||
TearDownBinding(GridGyro.BindingContext);
|
||||
TearDownBinding(GridMagnetometer.BindingContext);
|
||||
TearDownBinding(GridOrientation.BindingContext);
|
||||
|
||||
base.OnDisappearing();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,22 +15,32 @@ namespace Samples.View
|
|||
{
|
||||
base.OnAppearing();
|
||||
|
||||
if (BindingContext is BaseViewModel vm)
|
||||
SetupBinding(BindingContext);
|
||||
}
|
||||
|
||||
protected override void OnDisappearing()
|
||||
{
|
||||
TearDownBinding(BindingContext);
|
||||
|
||||
base.OnDisappearing();
|
||||
}
|
||||
|
||||
protected void SetupBinding(object bindingContext)
|
||||
{
|
||||
if (bindingContext is BaseViewModel vm)
|
||||
{
|
||||
vm.DoDisplayAlert += OnDisplayAlert;
|
||||
vm.OnAppearing();
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnDisappearing()
|
||||
protected void TearDownBinding(object bindingContext)
|
||||
{
|
||||
if (BindingContext is BaseViewModel vm)
|
||||
if (bindingContext is BaseViewModel vm)
|
||||
{
|
||||
vm.OnDisappearing();
|
||||
vm.DoDisplayAlert -= OnDisplayAlert;
|
||||
}
|
||||
|
||||
base.OnDisappearing();
|
||||
}
|
||||
|
||||
Task OnDisplayAlert(string message)
|
||||
|
|
|
@ -100,7 +100,7 @@ namespace Samples.ViewModel
|
|||
void OnStop()
|
||||
{
|
||||
IsActive = false;
|
||||
Accelerometer.Stop();
|
||||
OrientationSensor.Stop();
|
||||
}
|
||||
|
||||
void OnReadingChanged(OrientationSensorChangedEventArgs e)
|
||||
|
|
|
@ -77,7 +77,7 @@ namespace Samples.ViewModel
|
|||
|
||||
void OnCancel()
|
||||
{
|
||||
if (!IsBusy && !cts.IsCancellationRequested)
|
||||
if (!IsBusy && (cts == null || !cts.IsCancellationRequested))
|
||||
return;
|
||||
|
||||
cts.Cancel();
|
||||
|
|
|
@ -3,10 +3,11 @@
|
|||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp2.0</TargetFramework>
|
||||
<IsPackable>false</IsPackable>
|
||||
<Configurations>Debug;Release;Samples</Configurations>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.5.0" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.7.2" />
|
||||
<PackageReference Include="xunit" Version="2.3.1" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.1" />
|
||||
<DotNetCliToolReference Include="dotnet-xunit" Version="2.3.1" />
|
||||
|
|
|
@ -59,6 +59,12 @@ Global
|
|||
Release|iPhoneSimulator = Release|iPhoneSimulator
|
||||
Release|x64 = Release|x64
|
||||
Release|x86 = Release|x86
|
||||
Samples|Any CPU = Samples|Any CPU
|
||||
Samples|ARM = Samples|ARM
|
||||
Samples|iPhone = Samples|iPhone
|
||||
Samples|iPhoneSimulator = Samples|iPhoneSimulator
|
||||
Samples|x64 = Samples|x64
|
||||
Samples|x86 = Samples|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{63A4F6A1-48BF-4D32-AED7-82F605EDB042}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
|
@ -85,6 +91,18 @@ Global
|
|||
{63A4F6A1-48BF-4D32-AED7-82F605EDB042}.Release|x64.Build.0 = Release|Any CPU
|
||||
{63A4F6A1-48BF-4D32-AED7-82F605EDB042}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{63A4F6A1-48BF-4D32-AED7-82F605EDB042}.Release|x86.Build.0 = Release|Any CPU
|
||||
{63A4F6A1-48BF-4D32-AED7-82F605EDB042}.Samples|Any CPU.ActiveCfg = Samples|Any CPU
|
||||
{63A4F6A1-48BF-4D32-AED7-82F605EDB042}.Samples|Any CPU.Build.0 = Samples|Any CPU
|
||||
{63A4F6A1-48BF-4D32-AED7-82F605EDB042}.Samples|ARM.ActiveCfg = Samples|Any CPU
|
||||
{63A4F6A1-48BF-4D32-AED7-82F605EDB042}.Samples|ARM.Build.0 = Samples|Any CPU
|
||||
{63A4F6A1-48BF-4D32-AED7-82F605EDB042}.Samples|iPhone.ActiveCfg = Samples|Any CPU
|
||||
{63A4F6A1-48BF-4D32-AED7-82F605EDB042}.Samples|iPhone.Build.0 = Samples|Any CPU
|
||||
{63A4F6A1-48BF-4D32-AED7-82F605EDB042}.Samples|iPhoneSimulator.ActiveCfg = Samples|Any CPU
|
||||
{63A4F6A1-48BF-4D32-AED7-82F605EDB042}.Samples|iPhoneSimulator.Build.0 = Samples|Any CPU
|
||||
{63A4F6A1-48BF-4D32-AED7-82F605EDB042}.Samples|x64.ActiveCfg = Samples|Any CPU
|
||||
{63A4F6A1-48BF-4D32-AED7-82F605EDB042}.Samples|x64.Build.0 = Samples|Any CPU
|
||||
{63A4F6A1-48BF-4D32-AED7-82F605EDB042}.Samples|x86.ActiveCfg = Samples|Any CPU
|
||||
{63A4F6A1-48BF-4D32-AED7-82F605EDB042}.Samples|x86.Build.0 = Samples|Any CPU
|
||||
{77C2F93D-6EB7-49F7-A74A-C80499EC206A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{77C2F93D-6EB7-49F7-A74A-C80499EC206A}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{77C2F93D-6EB7-49F7-A74A-C80499EC206A}.Debug|ARM.ActiveCfg = Debug|Any CPU
|
||||
|
@ -109,6 +127,17 @@ Global
|
|||
{77C2F93D-6EB7-49F7-A74A-C80499EC206A}.Release|x64.Build.0 = Release|Any CPU
|
||||
{77C2F93D-6EB7-49F7-A74A-C80499EC206A}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{77C2F93D-6EB7-49F7-A74A-C80499EC206A}.Release|x86.Build.0 = Release|Any CPU
|
||||
{77C2F93D-6EB7-49F7-A74A-C80499EC206A}.Samples|Any CPU.ActiveCfg = Samples|Any CPU
|
||||
{77C2F93D-6EB7-49F7-A74A-C80499EC206A}.Samples|ARM.ActiveCfg = Samples|Any CPU
|
||||
{77C2F93D-6EB7-49F7-A74A-C80499EC206A}.Samples|ARM.Build.0 = Samples|Any CPU
|
||||
{77C2F93D-6EB7-49F7-A74A-C80499EC206A}.Samples|iPhone.ActiveCfg = Samples|Any CPU
|
||||
{77C2F93D-6EB7-49F7-A74A-C80499EC206A}.Samples|iPhone.Build.0 = Samples|Any CPU
|
||||
{77C2F93D-6EB7-49F7-A74A-C80499EC206A}.Samples|iPhoneSimulator.ActiveCfg = Samples|Any CPU
|
||||
{77C2F93D-6EB7-49F7-A74A-C80499EC206A}.Samples|iPhoneSimulator.Build.0 = Samples|Any CPU
|
||||
{77C2F93D-6EB7-49F7-A74A-C80499EC206A}.Samples|x64.ActiveCfg = Samples|Any CPU
|
||||
{77C2F93D-6EB7-49F7-A74A-C80499EC206A}.Samples|x64.Build.0 = Samples|Any CPU
|
||||
{77C2F93D-6EB7-49F7-A74A-C80499EC206A}.Samples|x86.ActiveCfg = Samples|Any CPU
|
||||
{77C2F93D-6EB7-49F7-A74A-C80499EC206A}.Samples|x86.Build.0 = Samples|Any CPU
|
||||
{2550ED91-8AE1-4E9A-A964-C11515C8FA28}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{2550ED91-8AE1-4E9A-A964-C11515C8FA28}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{2550ED91-8AE1-4E9A-A964-C11515C8FA28}.Debug|ARM.ActiveCfg = Debug|Any CPU
|
||||
|
@ -133,6 +162,18 @@ Global
|
|||
{2550ED91-8AE1-4E9A-A964-C11515C8FA28}.Release|x64.Build.0 = Release|Any CPU
|
||||
{2550ED91-8AE1-4E9A-A964-C11515C8FA28}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{2550ED91-8AE1-4E9A-A964-C11515C8FA28}.Release|x86.Build.0 = Release|Any CPU
|
||||
{2550ED91-8AE1-4E9A-A964-C11515C8FA28}.Samples|Any CPU.ActiveCfg = Samples|Any CPU
|
||||
{2550ED91-8AE1-4E9A-A964-C11515C8FA28}.Samples|Any CPU.Build.0 = Samples|Any CPU
|
||||
{2550ED91-8AE1-4E9A-A964-C11515C8FA28}.Samples|ARM.ActiveCfg = Samples|Any CPU
|
||||
{2550ED91-8AE1-4E9A-A964-C11515C8FA28}.Samples|ARM.Build.0 = Samples|Any CPU
|
||||
{2550ED91-8AE1-4E9A-A964-C11515C8FA28}.Samples|iPhone.ActiveCfg = Samples|Any CPU
|
||||
{2550ED91-8AE1-4E9A-A964-C11515C8FA28}.Samples|iPhone.Build.0 = Samples|Any CPU
|
||||
{2550ED91-8AE1-4E9A-A964-C11515C8FA28}.Samples|iPhoneSimulator.ActiveCfg = Samples|Any CPU
|
||||
{2550ED91-8AE1-4E9A-A964-C11515C8FA28}.Samples|iPhoneSimulator.Build.0 = Samples|Any CPU
|
||||
{2550ED91-8AE1-4E9A-A964-C11515C8FA28}.Samples|x64.ActiveCfg = Samples|Any CPU
|
||||
{2550ED91-8AE1-4E9A-A964-C11515C8FA28}.Samples|x64.Build.0 = Samples|Any CPU
|
||||
{2550ED91-8AE1-4E9A-A964-C11515C8FA28}.Samples|x86.ActiveCfg = Samples|Any CPU
|
||||
{2550ED91-8AE1-4E9A-A964-C11515C8FA28}.Samples|x86.Build.0 = Samples|Any CPU
|
||||
{C1CD30D3-52CA-4F8E-8499-BE88567CA2F8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{C1CD30D3-52CA-4F8E-8499-BE88567CA2F8}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{C1CD30D3-52CA-4F8E-8499-BE88567CA2F8}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
|
||||
|
@ -169,6 +210,24 @@ Global
|
|||
{C1CD30D3-52CA-4F8E-8499-BE88567CA2F8}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{C1CD30D3-52CA-4F8E-8499-BE88567CA2F8}.Release|x86.Build.0 = Release|Any CPU
|
||||
{C1CD30D3-52CA-4F8E-8499-BE88567CA2F8}.Release|x86.Deploy.0 = Release|Any CPU
|
||||
{C1CD30D3-52CA-4F8E-8499-BE88567CA2F8}.Samples|Any CPU.ActiveCfg = Samples|Any CPU
|
||||
{C1CD30D3-52CA-4F8E-8499-BE88567CA2F8}.Samples|Any CPU.Build.0 = Samples|Any CPU
|
||||
{C1CD30D3-52CA-4F8E-8499-BE88567CA2F8}.Samples|Any CPU.Deploy.0 = Samples|Any CPU
|
||||
{C1CD30D3-52CA-4F8E-8499-BE88567CA2F8}.Samples|ARM.ActiveCfg = Samples|Any CPU
|
||||
{C1CD30D3-52CA-4F8E-8499-BE88567CA2F8}.Samples|ARM.Build.0 = Samples|Any CPU
|
||||
{C1CD30D3-52CA-4F8E-8499-BE88567CA2F8}.Samples|ARM.Deploy.0 = Samples|Any CPU
|
||||
{C1CD30D3-52CA-4F8E-8499-BE88567CA2F8}.Samples|iPhone.ActiveCfg = Samples|Any CPU
|
||||
{C1CD30D3-52CA-4F8E-8499-BE88567CA2F8}.Samples|iPhone.Build.0 = Samples|Any CPU
|
||||
{C1CD30D3-52CA-4F8E-8499-BE88567CA2F8}.Samples|iPhone.Deploy.0 = Samples|Any CPU
|
||||
{C1CD30D3-52CA-4F8E-8499-BE88567CA2F8}.Samples|iPhoneSimulator.ActiveCfg = Samples|Any CPU
|
||||
{C1CD30D3-52CA-4F8E-8499-BE88567CA2F8}.Samples|iPhoneSimulator.Build.0 = Samples|Any CPU
|
||||
{C1CD30D3-52CA-4F8E-8499-BE88567CA2F8}.Samples|iPhoneSimulator.Deploy.0 = Samples|Any CPU
|
||||
{C1CD30D3-52CA-4F8E-8499-BE88567CA2F8}.Samples|x64.ActiveCfg = Samples|Any CPU
|
||||
{C1CD30D3-52CA-4F8E-8499-BE88567CA2F8}.Samples|x64.Build.0 = Samples|Any CPU
|
||||
{C1CD30D3-52CA-4F8E-8499-BE88567CA2F8}.Samples|x64.Deploy.0 = Samples|Any CPU
|
||||
{C1CD30D3-52CA-4F8E-8499-BE88567CA2F8}.Samples|x86.ActiveCfg = Samples|Any CPU
|
||||
{C1CD30D3-52CA-4F8E-8499-BE88567CA2F8}.Samples|x86.Build.0 = Samples|Any CPU
|
||||
{C1CD30D3-52CA-4F8E-8499-BE88567CA2F8}.Samples|x86.Deploy.0 = Samples|Any CPU
|
||||
{E2571C97-C048-4F91-8BB3-546CF7410C4C}.Debug|Any CPU.ActiveCfg = Debug|iPhoneSimulator
|
||||
{E2571C97-C048-4F91-8BB3-546CF7410C4C}.Debug|Any CPU.Build.0 = Debug|iPhoneSimulator
|
||||
{E2571C97-C048-4F91-8BB3-546CF7410C4C}.Debug|ARM.ActiveCfg = Debug|iPhone
|
||||
|
@ -193,6 +252,15 @@ Global
|
|||
{E2571C97-C048-4F91-8BB3-546CF7410C4C}.Release|x64.Build.0 = Release|iPhoneSimulator
|
||||
{E2571C97-C048-4F91-8BB3-546CF7410C4C}.Release|x86.ActiveCfg = Release|iPhoneSimulator
|
||||
{E2571C97-C048-4F91-8BB3-546CF7410C4C}.Release|x86.Build.0 = Release|iPhoneSimulator
|
||||
{E2571C97-C048-4F91-8BB3-546CF7410C4C}.Samples|Any CPU.ActiveCfg = Samples|iPhone
|
||||
{E2571C97-C048-4F91-8BB3-546CF7410C4C}.Samples|Any CPU.Build.0 = Samples|iPhone
|
||||
{E2571C97-C048-4F91-8BB3-546CF7410C4C}.Samples|ARM.ActiveCfg = Samples|iPhone
|
||||
{E2571C97-C048-4F91-8BB3-546CF7410C4C}.Samples|iPhone.ActiveCfg = Samples|iPhone
|
||||
{E2571C97-C048-4F91-8BB3-546CF7410C4C}.Samples|iPhone.Build.0 = Samples|iPhone
|
||||
{E2571C97-C048-4F91-8BB3-546CF7410C4C}.Samples|iPhoneSimulator.ActiveCfg = Samples|iPhoneSimulator
|
||||
{E2571C97-C048-4F91-8BB3-546CF7410C4C}.Samples|iPhoneSimulator.Build.0 = Samples|iPhoneSimulator
|
||||
{E2571C97-C048-4F91-8BB3-546CF7410C4C}.Samples|x64.ActiveCfg = Samples|iPhone
|
||||
{E2571C97-C048-4F91-8BB3-546CF7410C4C}.Samples|x86.ActiveCfg = Samples|iPhone
|
||||
{A0798FC9-AB9D-4CCA-AF44-71B7A4691D5A}.Debug|Any CPU.ActiveCfg = Debug|x86
|
||||
{A0798FC9-AB9D-4CCA-AF44-71B7A4691D5A}.Debug|Any CPU.Build.0 = Debug|x86
|
||||
{A0798FC9-AB9D-4CCA-AF44-71B7A4691D5A}.Debug|Any CPU.Deploy.0 = Debug|x86
|
||||
|
@ -229,6 +297,20 @@ Global
|
|||
{A0798FC9-AB9D-4CCA-AF44-71B7A4691D5A}.Release|x86.ActiveCfg = Release|x86
|
||||
{A0798FC9-AB9D-4CCA-AF44-71B7A4691D5A}.Release|x86.Build.0 = Release|x86
|
||||
{A0798FC9-AB9D-4CCA-AF44-71B7A4691D5A}.Release|x86.Deploy.0 = Release|x86
|
||||
{A0798FC9-AB9D-4CCA-AF44-71B7A4691D5A}.Samples|Any CPU.ActiveCfg = Samples|x86
|
||||
{A0798FC9-AB9D-4CCA-AF44-71B7A4691D5A}.Samples|Any CPU.Build.0 = Samples|x86
|
||||
{A0798FC9-AB9D-4CCA-AF44-71B7A4691D5A}.Samples|Any CPU.Deploy.0 = Samples|x86
|
||||
{A0798FC9-AB9D-4CCA-AF44-71B7A4691D5A}.Samples|ARM.ActiveCfg = Samples|ARM
|
||||
{A0798FC9-AB9D-4CCA-AF44-71B7A4691D5A}.Samples|ARM.Build.0 = Samples|ARM
|
||||
{A0798FC9-AB9D-4CCA-AF44-71B7A4691D5A}.Samples|ARM.Deploy.0 = Samples|ARM
|
||||
{A0798FC9-AB9D-4CCA-AF44-71B7A4691D5A}.Samples|iPhone.ActiveCfg = Samples|x86
|
||||
{A0798FC9-AB9D-4CCA-AF44-71B7A4691D5A}.Samples|iPhoneSimulator.ActiveCfg = Samples|x86
|
||||
{A0798FC9-AB9D-4CCA-AF44-71B7A4691D5A}.Samples|x64.ActiveCfg = Samples|x64
|
||||
{A0798FC9-AB9D-4CCA-AF44-71B7A4691D5A}.Samples|x64.Build.0 = Samples|x64
|
||||
{A0798FC9-AB9D-4CCA-AF44-71B7A4691D5A}.Samples|x64.Deploy.0 = Samples|x64
|
||||
{A0798FC9-AB9D-4CCA-AF44-71B7A4691D5A}.Samples|x86.ActiveCfg = Samples|x86
|
||||
{A0798FC9-AB9D-4CCA-AF44-71B7A4691D5A}.Samples|x86.Build.0 = Samples|x86
|
||||
{A0798FC9-AB9D-4CCA-AF44-71B7A4691D5A}.Samples|x86.Deploy.0 = Samples|x86
|
||||
{CB2072E0-A437-4811-AE17-16CAE0DDA1B1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{CB2072E0-A437-4811-AE17-16CAE0DDA1B1}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{CB2072E0-A437-4811-AE17-16CAE0DDA1B1}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
|
||||
|
@ -265,6 +347,22 @@ Global
|
|||
{CB2072E0-A437-4811-AE17-16CAE0DDA1B1}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{CB2072E0-A437-4811-AE17-16CAE0DDA1B1}.Release|x86.Build.0 = Release|Any CPU
|
||||
{CB2072E0-A437-4811-AE17-16CAE0DDA1B1}.Release|x86.Deploy.0 = Release|Any CPU
|
||||
{CB2072E0-A437-4811-AE17-16CAE0DDA1B1}.Samples|Any CPU.ActiveCfg = Samples|Any CPU
|
||||
{CB2072E0-A437-4811-AE17-16CAE0DDA1B1}.Samples|ARM.ActiveCfg = Samples|Any CPU
|
||||
{CB2072E0-A437-4811-AE17-16CAE0DDA1B1}.Samples|ARM.Build.0 = Samples|Any CPU
|
||||
{CB2072E0-A437-4811-AE17-16CAE0DDA1B1}.Samples|ARM.Deploy.0 = Samples|Any CPU
|
||||
{CB2072E0-A437-4811-AE17-16CAE0DDA1B1}.Samples|iPhone.ActiveCfg = Samples|Any CPU
|
||||
{CB2072E0-A437-4811-AE17-16CAE0DDA1B1}.Samples|iPhone.Build.0 = Samples|Any CPU
|
||||
{CB2072E0-A437-4811-AE17-16CAE0DDA1B1}.Samples|iPhone.Deploy.0 = Samples|Any CPU
|
||||
{CB2072E0-A437-4811-AE17-16CAE0DDA1B1}.Samples|iPhoneSimulator.ActiveCfg = Samples|Any CPU
|
||||
{CB2072E0-A437-4811-AE17-16CAE0DDA1B1}.Samples|iPhoneSimulator.Build.0 = Samples|Any CPU
|
||||
{CB2072E0-A437-4811-AE17-16CAE0DDA1B1}.Samples|iPhoneSimulator.Deploy.0 = Samples|Any CPU
|
||||
{CB2072E0-A437-4811-AE17-16CAE0DDA1B1}.Samples|x64.ActiveCfg = Samples|Any CPU
|
||||
{CB2072E0-A437-4811-AE17-16CAE0DDA1B1}.Samples|x64.Build.0 = Samples|Any CPU
|
||||
{CB2072E0-A437-4811-AE17-16CAE0DDA1B1}.Samples|x64.Deploy.0 = Samples|Any CPU
|
||||
{CB2072E0-A437-4811-AE17-16CAE0DDA1B1}.Samples|x86.ActiveCfg = Samples|Any CPU
|
||||
{CB2072E0-A437-4811-AE17-16CAE0DDA1B1}.Samples|x86.Build.0 = Samples|Any CPU
|
||||
{CB2072E0-A437-4811-AE17-16CAE0DDA1B1}.Samples|x86.Deploy.0 = Samples|Any CPU
|
||||
{EE8FC716-27FC-405B-BD27-AF17E01A6671}.Debug|Any CPU.ActiveCfg = Debug|iPhoneSimulator
|
||||
{EE8FC716-27FC-405B-BD27-AF17E01A6671}.Debug|Any CPU.Build.0 = Debug|iPhoneSimulator
|
||||
{EE8FC716-27FC-405B-BD27-AF17E01A6671}.Debug|ARM.ActiveCfg = Debug|iPhone
|
||||
|
@ -289,6 +387,14 @@ Global
|
|||
{EE8FC716-27FC-405B-BD27-AF17E01A6671}.Release|x64.Build.0 = Release|iPhoneSimulator
|
||||
{EE8FC716-27FC-405B-BD27-AF17E01A6671}.Release|x86.ActiveCfg = Release|iPhoneSimulator
|
||||
{EE8FC716-27FC-405B-BD27-AF17E01A6671}.Release|x86.Build.0 = Release|iPhoneSimulator
|
||||
{EE8FC716-27FC-405B-BD27-AF17E01A6671}.Samples|Any CPU.ActiveCfg = Samples|iPhone
|
||||
{EE8FC716-27FC-405B-BD27-AF17E01A6671}.Samples|ARM.ActiveCfg = Samples|iPhone
|
||||
{EE8FC716-27FC-405B-BD27-AF17E01A6671}.Samples|iPhone.ActiveCfg = Samples|iPhone
|
||||
{EE8FC716-27FC-405B-BD27-AF17E01A6671}.Samples|iPhone.Build.0 = Samples|iPhone
|
||||
{EE8FC716-27FC-405B-BD27-AF17E01A6671}.Samples|iPhoneSimulator.ActiveCfg = Samples|iPhoneSimulator
|
||||
{EE8FC716-27FC-405B-BD27-AF17E01A6671}.Samples|iPhoneSimulator.Build.0 = Samples|iPhoneSimulator
|
||||
{EE8FC716-27FC-405B-BD27-AF17E01A6671}.Samples|x64.ActiveCfg = Samples|iPhone
|
||||
{EE8FC716-27FC-405B-BD27-AF17E01A6671}.Samples|x86.ActiveCfg = Samples|iPhone
|
||||
{4BD0D88F-7E7A-4C3B-9E34-BF3717A8FF4B}.Debug|Any CPU.ActiveCfg = Debug|x86
|
||||
{4BD0D88F-7E7A-4C3B-9E34-BF3717A8FF4B}.Debug|Any CPU.Build.0 = Debug|x86
|
||||
{4BD0D88F-7E7A-4C3B-9E34-BF3717A8FF4B}.Debug|Any CPU.Deploy.0 = Debug|x86
|
||||
|
@ -325,6 +431,18 @@ Global
|
|||
{4BD0D88F-7E7A-4C3B-9E34-BF3717A8FF4B}.Release|x86.ActiveCfg = Release|x86
|
||||
{4BD0D88F-7E7A-4C3B-9E34-BF3717A8FF4B}.Release|x86.Build.0 = Release|x86
|
||||
{4BD0D88F-7E7A-4C3B-9E34-BF3717A8FF4B}.Release|x86.Deploy.0 = Release|x86
|
||||
{4BD0D88F-7E7A-4C3B-9E34-BF3717A8FF4B}.Samples|Any CPU.ActiveCfg = Samples|x86
|
||||
{4BD0D88F-7E7A-4C3B-9E34-BF3717A8FF4B}.Samples|ARM.ActiveCfg = Samples|ARM
|
||||
{4BD0D88F-7E7A-4C3B-9E34-BF3717A8FF4B}.Samples|ARM.Build.0 = Samples|ARM
|
||||
{4BD0D88F-7E7A-4C3B-9E34-BF3717A8FF4B}.Samples|ARM.Deploy.0 = Samples|ARM
|
||||
{4BD0D88F-7E7A-4C3B-9E34-BF3717A8FF4B}.Samples|iPhone.ActiveCfg = Samples|x86
|
||||
{4BD0D88F-7E7A-4C3B-9E34-BF3717A8FF4B}.Samples|iPhoneSimulator.ActiveCfg = Samples|x86
|
||||
{4BD0D88F-7E7A-4C3B-9E34-BF3717A8FF4B}.Samples|x64.ActiveCfg = Samples|x64
|
||||
{4BD0D88F-7E7A-4C3B-9E34-BF3717A8FF4B}.Samples|x64.Build.0 = Samples|x64
|
||||
{4BD0D88F-7E7A-4C3B-9E34-BF3717A8FF4B}.Samples|x64.Deploy.0 = Samples|x64
|
||||
{4BD0D88F-7E7A-4C3B-9E34-BF3717A8FF4B}.Samples|x86.ActiveCfg = Samples|x86
|
||||
{4BD0D88F-7E7A-4C3B-9E34-BF3717A8FF4B}.Samples|x86.Build.0 = Samples|x86
|
||||
{4BD0D88F-7E7A-4C3B-9E34-BF3717A8FF4B}.Samples|x86.Deploy.0 = Samples|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
|
|
@ -32,9 +32,10 @@ namespace Xamarin.Essentials
|
|||
|
||||
static async Task<PermissionStatus> PlatformRequestAsync(PermissionType permission)
|
||||
{
|
||||
// Check status before requesting first
|
||||
if (await PlatformCheckStatusAsync(permission) == PermissionStatus.Granted)
|
||||
return PermissionStatus.Granted;
|
||||
// Check status before requesting first and only request if Unknown
|
||||
var status = await PlatformCheckStatusAsync(permission);
|
||||
if (status != PermissionStatus.Unknown)
|
||||
return status;
|
||||
|
||||
EnsureDeclared(permission);
|
||||
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
|
||||
<PackageProjectUrl>https://go.microsoft.com/fwlink/?linkid=868960</PackageProjectUrl>
|
||||
<MDocDocumentationDirectory>$(MSBuildThisFileDirectory)..\docs\en</MDocDocumentationDirectory>
|
||||
<Configurations>Debug;Release;Samples</Configurations>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)'=='Debug' ">
|
||||
<DebugType>full</DebugType>
|
||||
|
@ -39,9 +40,12 @@
|
|||
<PropertyGroup Condition=" '$(Configuration)'=='Release' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)'=='Samples'">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="mdoc" Version="5.7.0.1" PrivateAssets="All" />
|
||||
<PackageReference Include="MSBuild.Sdk.Extras" Version="1.4.0" PrivateAssets="All" />
|
||||
<PackageReference Include="mdoc" Version="5.7.1" PrivateAssets="All" />
|
||||
<PackageReference Include="MSBuild.Sdk.Extras" Version="1.6.37-preview" PrivateAssets="All" />
|
||||
<PackageReference Include="System.Numerics.Vectors" Version="4.5.0" />
|
||||
<Compile Include="**\*.shared.cs" />
|
||||
<Compile Include="**\*.shared.*.cs" />
|
||||
|
|
Загрузка…
Ссылка в новой задаче