Skip to content
This repository has been archived by the owner on May 15, 2024. It is now read-only.

Commit

Permalink
[WIP] Xamarin.Essentials 1.1.0 (#663)
Browse files Browse the repository at this point in the history
* Use SharedPreferences.Editor.Apply when editing to force disk write to be asynchronous (#637)

* GH-182 Color/Point/Rect/Size Extension Converters (#651)

* Add extension helpers for iOS and Android

* Add UWP colors and adjsut android colors.

* Add UWP Point/Rect/Size

* Rename and optimize!

* Add tests and color helpers!

* Fix unit test and add WithAlpha

* Cleanup iOS as it stores it from 0-1

* Tests are all green!

* Add generate-docs cmd :)

* Add docs config to all :)

* Additional clenaup for docs

* Added some docs

* Updated the mdoc target and regenerated the docs

* Allow for code reuse on macOS (#665)

Even though macOS is not yet officially supported, it is nice to reuse this code. macOS is exactly the same, except for this single property not supported.

* GH-196 Browser Customization (#646)

* Implemented GH-196

* Apply suggestions from code review: Naming

Renamed incorrectly spelled variables

Co-Authored-By: Mrnikbobjeff <schillinik@yahoo.de>

* Implemented GH-196

* Browser update work as requested. Using System.Drawing.Color now

* Adopted more review changes. Type forwarded.

* Review changes

* Made equals operator null safe, removed constructor

* Add documentation and simplify the API!

* Update viewmodel

* Back to 7.2

* GH-676 Require To Check GPS Location is Fake Or Not In GeoLocation (#677)

* Added  bool IsFromMockProvider in Location class

* Checkin

* csproj original

* Revert "csproj original"

This reverts commit 6302b95.

* Revert "Checkin"

This reverts commit 0881e4f.

* Revert "Added  bool IsFromMockProvider in Location class"

This reverts commit e56d940.

* Revert the Xamarin.Essentials.csproj and Samples.Android.csproj to original;

Adjust the property IsFromMockProvider in Location.shared and LocationExetensions.

* Edited sample to show if the location is from moking provider.

* Update docs

* Fixes #694 (#699)

* Update the mdoc to use the new minimum for VS2019

* GH-126: Finish Shake Detector API (#693)

* Update CONTRIBUTING.md (#692)

* GH-126 Detect Shake API (#666)

* Added shaken support

* name vhange

* check-in

* doc update

* Implements the Shake API inside Accelerometer Class;
Change sample to AccelorometerViewModel

* Fix the sample project

* Update the docs

* Added Queue mechanism based off seismic with tests as well. Something is not  right yet with calulating isaccelerating.

* Finalize shake detection!!!

* Re-generated the docs.

* Fix the VM after merge

* GH-704 Handle duplicate item in keychain (#705)

* Update CONTRIBUTING.md (#692)

* #704 if we get a duplicate item try to remove and then re-add if possible.

* Add all possible combinations  for coords to km or mile (#721)

* Add all possible combinations  for coords to km or mile

* Update UnitConverters_Tests.cs

* Use more explicit job definitions

* Update UnitConverters_Tests.cs

* GH-698 Set longer delay on connectivity changes - Android (#700)

* Update CONTRIBUTING.md (#692)

* Fixes #698

* Use original string instead of uri (#716)

* GH-643: Add Android P targeting and support 28 support (#669)

* Update PULL_REQUEST_TEMPLATE.md

* Fixes #643 to add android P targeting and support 28 support

* Add suppresses for Android P

* Cleanup SDKs based on @Redth

* Update more nugets

* More optimizations for Retargeting

* Refactor HasApiLevelN and updated support to 28.0.0.1

* Update manifest and key :)

* Update the device tests certificates

* Make sure to run the checks always

* Updating the certs again to see if CI notices this time...

* Change order to reflect enum (#735)

* Lock keystore on Android for cipher (#734)

* Add locks around android keystore.

* move convert out of lock

* GH-130 & GH-129: Android support for safe shareable file URI’s (#416)

* Android: Support for safe shareable file URI’s

On later versions of Android, you have to wrap streams of data you want to share outside your app (between apps) in a stream through a content provider.  Android Support providers a general use FileProvider we can use for this.  This commit basically adds support for getting all the right AndroidManifest declarations for the custom file provider based on the android support provider, so that we expose an internal method which gets a URI safe for sharing outside of the app.

* Fix absolute type naming

* Add a user interaction test for File Provider

* Fix vibration code

the ifdef meant an empty `else { }` statement with no `if { }` for platforms < 26.  This fixes that.

* Reorder using statements

* Fix test attribute

* Get provider authority properly

* Added external storage permission

* Change file provider path

This is md5(“xamarin_essentials”)

* Copy file into temp folder instead of file

We keep the filename the same this way but use a GUID for a temp sub-folder to ensure a unique path.

* Resgen

* Permissions may need to be checked to control functionality

* The Android FileProvider now can detect permissions
 - internal / external storage can be controlled
 - KitKat+ does not require the permissions
 - corrected the FileProvider resource xml

* Added support for email attachments
 - support for a string path and native file types

* Added attachments to the sample app

* Updated the docs with the new types

* Some fixes for iOS

* Fix the mdoc target

* regen docs

* remove the obsolete armeabi ABI

* Reworked the file logic to try and use public folders first
 - if the file is already exposed, then just use it directly
 - if the file is private, copy to an exposed location first
 - exposing the internal and external caches and the public/external files

* Be more specific with the external storage permission name

* Added some more depth to the comments here

* Unnecessary else

* Added base file info class

* EmailAttachment now derives from FileBase

* Added File Sharing

* Keep track of IStorageFile internally

* Prefer internal IStorageFile in UWP

* Use attachment name properly in UWP

* Add ctor to create from existing FileBase

This will let us use UWP to create a new instance of something derived from FileBase with another instance of something else derived from FileBase, all while keeping track of the same `IStorageFile` instance.

So we can conceivably do something like:
```csharp
var mediaFile = await MediaPicker.PickPhotoAsync();
var attachment = new EmailAttachment(mediaFile);
```

* Add ctors for FileBase

* Add ctors for ShareFileRequest

* We can't use N on pre-N platforms

* Updated the docs

* Update some docs.

* Bump

* Gate Email/Share files with feature flags

* Add sample for ShareFileRequest

* Added test for share method in netstandard

* [WIP] Adding the Device Tests to the yaml (#737)

* Add the device tests to the yaml
* Select the latest version of xamarin/xcode
* Specify the iPhone simulator in the yaml
* Install the Android emulator
* Fix the shared test

* try to resolve build issue with missing nuget

* Fix docs

* Fix ref

* Trim . off start of extension for getting mimetype

* Don't add empty strings on UWP to email (#738)

* Cleanup UWP a bit
  • Loading branch information
jamesmontemagno authored and Redth committed Mar 15, 2019
1 parent 806e5fc commit 2dd6bc0
Show file tree
Hide file tree
Showing 139 changed files with 8,610 additions and 2,132 deletions.
5 changes: 4 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,7 @@

# Force bash scripts to always use lf line endings so that if a repo is accessed
# in Unix via a file share from Windows, the scripts will work.
*.sh text eol=lf
*.sh text eol=lf

# Force the docs to always use lf line endings
docs/**/*.xml text eol=lf
2 changes: 1 addition & 1 deletion .openpublishing.publish.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
"nuget_feed": "https://www.myget.org/F/op/api/v2",
"path_to_root": "_dependentPackages/ECMA2Yaml",
"target_framework": "net45",
"version": "1.0.417"
"version": "latest"
},
{
"id": "memberpage.plugins",
Expand Down
33 changes: 23 additions & 10 deletions DeviceTests/DeviceTests.Android/DeviceTests.Android.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<WarningLevel>4</WarningLevel>
<AndroidManagedSymbols>true</AndroidManagedSymbols>
<AndroidUseSharedRuntime>false</AndroidUseSharedRuntime>
<AndroidSupportedAbis>armeabi;armeabi-v7a;x86;x86_64;arm64-v8a</AndroidSupportedAbis>
<AndroidSupportedAbis>armeabi-v7a;x86;x86_64;arm64-v8a</AndroidSupportedAbis>
<EmbedAssembliesIntoApk>true</EmbedAssembliesIntoApk>
<JavaMaximumHeapSize>1G</JavaMaximumHeapSize>
<AndroidLinkSkip />
Expand All @@ -52,11 +52,21 @@
<WarningLevel>4</WarningLevel>
<AndroidManagedSymbols>true</AndroidManagedSymbols>
<AndroidUseSharedRuntime>false</AndroidUseSharedRuntime>
<AndroidSupportedAbis>armeabi;armeabi-v7a;x86;x86_64;arm64-v8a</AndroidSupportedAbis>
<AndroidSupportedAbis>armeabi-v7a;x86;x86_64;arm64-v8a</AndroidSupportedAbis>
<EmbedAssembliesIntoApk>true</EmbedAssembliesIntoApk>
<JavaMaximumHeapSize>1G</JavaMaximumHeapSize>
<AndroidLinkSkip />
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Docs|AnyCPU'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\Docs\</OutputPath>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Reference Include="Mono.Android" />
<Reference Include="System" />
Expand All @@ -65,14 +75,14 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Xamarin.Forms" Version="3.3.0.967583" />
<PackageReference Include="Xamarin.Android.Support.Design" Version="27.0.2.1" />
<PackageReference Include="Xamarin.Android.Support.v7.AppCompat" Version="27.0.2.1" />
<PackageReference Include="Xamarin.Android.Support.v4" Version="27.0.2.1" />
<PackageReference Include="Xamarin.Android.Support.v7.CardView" Version="27.0.2.1" />
<PackageReference Include="Xamarin.Android.Support.v7.MediaRouter" Version="27.0.2.1" />
<PackageReference Include="Xamarin.Android.Support.CustomTabs" Version="27.0.2.1" />
<PackageReference Include="Xamarin.Android.Support.Core.Utils" Version="27.0.2.1" />
<PackageReference Include="Xamarin.Forms" Version="3.5.0.129452" />
<PackageReference Include="Xamarin.Android.Support.Design" Version="28.0.0.1" />
<PackageReference Include="Xamarin.Android.Support.v7.AppCompat" Version="28.0.0.1" />
<PackageReference Include="Xamarin.Android.Support.v4" Version="28.0.0.1" />
<PackageReference Include="Xamarin.Android.Support.v7.CardView" Version="28.0.0.1" />
<PackageReference Include="Xamarin.Android.Support.v7.MediaRouter" Version="28.0.0.1" />
<PackageReference Include="Xamarin.Android.Support.CustomTabs" Version="28.0.0.1" />
<PackageReference Include="Xamarin.Android.Support.Core.Utils" Version="28.0.0.1" />
<PackageReference Include="System.Numerics.Vectors" Version="4.5.0" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.devices" Version="2.5.20" />
Expand All @@ -93,6 +103,9 @@
<Compile Include="Resources\Resource.Designer.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<Compile Include="Tests\**\*.cs" />
</ItemGroup>
<ItemGroup>
<None Include="Properties\AndroidManifest.xml" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@
<uses-permission android:name="android.permission.FLASHLIGHT" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<application android:label="@string/app_name" android:icon="@mipmap/ic_launcher" android:roundIcon="@mipmap/ic_launcher_round" android:theme="@style/MainTheme"></application>
</manifest>

0 comments on commit 2dd6bc0

Please sign in to comment.