From dcf50674bd362af40d6535baf6107c953dd5fd97 Mon Sep 17 00:00:00 2001 From: matinzd <24797481+matinzd@users.noreply.github.com> Date: Sat, 29 Jun 2024 18:14:04 +0200 Subject: [PATCH] fix(#90): maximize lib compatibility --- .../permissions/HealthConnectPermissionDelegate.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/android/src/main/java/dev/matinzd/healthconnect/permissions/HealthConnectPermissionDelegate.kt b/android/src/main/java/dev/matinzd/healthconnect/permissions/HealthConnectPermissionDelegate.kt index 0db6a04..48dd639 100644 --- a/android/src/main/java/dev/matinzd/healthconnect/permissions/HealthConnectPermissionDelegate.kt +++ b/android/src/main/java/dev/matinzd/healthconnect/permissions/HealthConnectPermissionDelegate.kt @@ -1,5 +1,6 @@ package dev.matinzd.healthconnect.permissions +import androidx.activity.ComponentActivity import androidx.activity.result.ActivityResultLauncher import androidx.health.connect.client.PermissionController import com.facebook.react.ReactActivity @@ -15,7 +16,7 @@ object HealthConnectPermissionDelegate { private val coroutineScope = CoroutineScope(Dispatchers.IO) fun setPermissionDelegate( - activity: ReactActivity, + activity: ComponentActivity, providerPackageName: String = "com.google.android.apps.healthdata" ) { val contract = PermissionController.createRequestPermissionResultContract(providerPackageName)