From 98c159a35f820ece24e7f7ee7e2aabbd8de276bb Mon Sep 17 00:00:00 2001 From: ARIYAMA Keiji Date: Sun, 25 Apr 2021 01:29:28 +0900 Subject: [PATCH 1/3] Add missing methods --- Android/ExposureNotification/build.cake | 2 +- .../Additions/Connection.ConnectionsClient.cs | 7 ------- .../Additions/ExposureNotificationClient.cs | 6 ++++++ .../source/PlayServicesNearby/Transforms/Metadata.xml | 7 +++++-- 4 files changed, 12 insertions(+), 10 deletions(-) delete mode 100644 Android/ExposureNotification/source/PlayServicesNearby/Additions/Connection.ConnectionsClient.cs diff --git a/Android/ExposureNotification/build.cake b/Android/ExposureNotification/build.cake index 9a293a0908..4f386f54ae 100644 --- a/Android/ExposureNotification/build.cake +++ b/Android/ExposureNotification/build.cake @@ -1,7 +1,7 @@ var TARGET = Argument ("t", Argument ("target", "ci")); var NUGET_VERSION = "19.7.1-eap.1"; -var AAR_URL = "https://github.com/google/exposure-notifications-android/raw/a93e236997943408308e2b750966567ebdb8d3df/app/libs/play-services-nearby-exposurenotification-1.7.1-eap.aar"; +var AAR_URL = "https://github.com/google/exposure-notifications-android/raw/c92f95287471a7a7b43c4e3c554bb4aff40d2ba1/app/libs/play-services-nearby-exposurenotification-1.8.3-eap.aar"; Task ("externals") .Does (() => diff --git a/Android/ExposureNotification/source/PlayServicesNearby/Additions/Connection.ConnectionsClient.cs b/Android/ExposureNotification/source/PlayServicesNearby/Additions/Connection.ConnectionsClient.cs deleted file mode 100644 index 03b3608769..0000000000 --- a/Android/ExposureNotification/source/PlayServicesNearby/Additions/Connection.ConnectionsClient.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace Android.Gms.Nearby.Connection -{ - public partial class ConnectionsClient - { - public static int MaxBytesDataSize => MAX_BYTES_DATA_SIZE; - } -} diff --git a/Android/ExposureNotification/source/PlayServicesNearby/Additions/ExposureNotificationClient.cs b/Android/ExposureNotification/source/PlayServicesNearby/Additions/ExposureNotificationClient.cs index 72554b86d1..0edf51051d 100644 --- a/Android/ExposureNotification/source/PlayServicesNearby/Additions/ExposureNotificationClient.cs +++ b/Android/ExposureNotification/source/PlayServicesNearby/Additions/ExposureNotificationClient.cs @@ -66,6 +66,12 @@ public async Task GetPackageConfigurationAsync() public async Task GetStatusAsync() => await NativeGetStatus().CastTask(); + + public Task RequestPreAuthorizedTemporaryExposureKeyHistoryAsync() + => NativeRequestPreAuthorizedTemporaryExposureKeyHistory().CastTask(); + + public Task RequestPreAuthorizedTemporaryExposureKeyReleaseAsync() + => NativeRequestPreAuthorizedTemporaryExposureKeyRelease().CastTask(); } internal static class GoogleTaskExtensions diff --git a/Android/ExposureNotification/source/PlayServicesNearby/Transforms/Metadata.xml b/Android/ExposureNotification/source/PlayServicesNearby/Transforms/Metadata.xml index dc1058a66a..be2d9d3f87 100644 --- a/Android/ExposureNotification/source/PlayServicesNearby/Transforms/Metadata.xml +++ b/Android/ExposureNotification/source/PlayServicesNearby/Transforms/Metadata.xml @@ -90,8 +90,11 @@ NativeGetPackageConfiguration NativeGetStatus - DeviceSupportsLocationlessScanning - GetDeviceSupportsLocationlessScanning + DeviceSupportsLocationlessScanning + NativeDeviceSupportsLocationlessScanning + + NativeRequestPreAuthorizedTemporaryExposureKeyHistory + NativeRequestPreAuthorizedTemporaryExposureKeyRelease From 31d0b3d6e6e505d6c0d341dbb93ffe011c0c2104 Mon Sep 17 00:00:00 2001 From: ARIYAMA Keiji Date: Sun, 25 Apr 2021 08:50:57 +0900 Subject: [PATCH 2/3] Add missing methods/property --- iOS/ExposureNotification/source/ApiDefinition.cs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/iOS/ExposureNotification/source/ApiDefinition.cs b/iOS/ExposureNotification/source/ApiDefinition.cs index 747430f5a5..d363ec6b53 100644 --- a/iOS/ExposureNotification/source/ApiDefinition.cs +++ b/iOS/ExposureNotification/source/ApiDefinition.cs @@ -356,6 +356,7 @@ interface ENExposureInfo { delegate void ENGetExposureInfoHandler ([NullAllowed] ENExposureInfo [] exposures, [NullAllowed] NSError error); delegate void ENGetExposureWindowsHandler ([NullAllowed] ENExposureWindow [] exposureWindows, [NullAllowed] NSError error); delegate void ENGetUserTraveledHandler (bool traveled, NSError error); + delegate void ENDiagnosisKeysAvailableHandler ([NullAllowed] ENTemporaryExposureKey [] keys); [Introduced (PlatformName.iOS, 13, 5)] [BaseType (typeof (NSObject))] @@ -419,5 +420,19 @@ interface ENManager { [Async] [Export ("getTestDiagnosisKeysWithCompletionHandler:")] void GetTestDiagnosisKeys (ENGetDiagnosisKeysHandler completionHandler); + + [Introduced (PlatformName.iOS, 14, 4)] + [NullAllowed, Export ("diagnosisKeysAvailableHandler", ArgumentSemantic.Copy)] + ENDiagnosisKeysAvailableHandler DiagnosisKeysAvailableHandler { get; set; } + + [Introduced (PlatformName.iOS, 14, 4)] + [Async] + [Export ("preAuthorizeDiagnosisKeysWithCompletionHandler:")] + void PreAuthorizeDiagnosisKeys (ENErrorHandler completionHandler); + + [Introduced (PlatformName.iOS, 14, 4)] + [Async] + [Export ("requestPreAuthorizedDiagnosisKeysWithCompletionHandler:")] + void RequestPreAuthorizedDiagnosisKeys (ENErrorHandler completionHandler); } } From 4fad55a98b433c3c753b1644628d4bd927275d63 Mon Sep 17 00:00:00 2001 From: ARIYAMA Keiji Date: Sun, 25 Apr 2021 18:58:22 +0900 Subject: [PATCH 3/3] Update libraries --- .../source/PlayServicesNearby/PlayServicesNearby.csproj | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Android/ExposureNotification/source/PlayServicesNearby/PlayServicesNearby.csproj b/Android/ExposureNotification/source/PlayServicesNearby/PlayServicesNearby.csproj index 190352057a..ae7ed06378 100644 --- a/Android/ExposureNotification/source/PlayServicesNearby/PlayServicesNearby.csproj +++ b/Android/ExposureNotification/source/PlayServicesNearby/PlayServicesNearby.csproj @@ -38,9 +38,9 @@ - - - + + +