Contact Syncing Guide
Managing Phone Contacts
The StreamLayer SDK uses a phone number verification system by default, which requires READ_CONTACTS permission on an android device. If your host app has already implemented another verification system (email or others) or you don't need to get a phone number from the contact book for the invite friends process, you can mange phone contacts options on SDK's side.
To managed phone contacts options and related features call StreamLayer.setPhoneContactsOptions() function in the Application class:
class App : Application() {
override fun onCreate() {
super.onCreate()
StreamLayer.initializeApp(this, BuildConfig.SL_SDK_KEY)
StreamLayer.setPhoneContactsOptions(isUiEnabled = false, isSyncEnabled = false) // call after SDKs init
}
}The parameter isUiEnabled indicates if phone contacts ui and contact permissions dialog are enabled or not. The parameter isSyncEnabled indicates if phone contacts sync with our backend is enabled or not.
Updated 6 months ago
