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)