Skip to content

Repository files navigation

Profile


👻 Multiplatform Contacts is a straight forward library used to get Contacts in Android and iOS.


sample iOS

sample Android

On Android

Add the following on your Manifest file:

 <uses-permissionandroid:name="android.permission.READ_CONTACTS" />

Gradle

You can add a dependency inside the androidMain or commonMain source set:

commonMain.dependencies {
implementation("io.github.lilytreasure:multiplatformContacts:1.0.1")
}

Usage

var phoneNumber by remember { mutableStateOf("") }
val multiplatformContactsPicker = pickMultiplatformContacts(onResult = {number->
phoneNumber = number
})
Column(Modifier.fillMaxWidth(), horizontalAlignment =Alignment.CenterHorizontally) {
Button(onClick = {
multiplatformContactsPicker.launch()
}) {
Text("Load contacts")
}
Text(text = phoneNumber)
}

About

Compose Multiplatform Contacts Library (Android ,iOS)

Topics

Resources

Stars

8 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages