Contact Syncing Guide
Control phone contact syncing and permissions in the StreamLayer Android SDK. Use StreamLayer.setPhoneContactsOptions() to manage contact UI and backend sync behavior.
Contact Syncing Guide
The StreamLayer SDK uses a phone number verification system by default, which requires the READ_CONTACTS permission. If your host app already implements another verification system (email or other) or you do not need phone contacts for the invite friends process, you can configure contact syncing options on the SDK side.
To manage phone contact options and related features, call StreamLayer.setPhoneContactsOptions() 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 isUiEnabled parameter controls whether the phone contacts UI and permission dialog are displayed. The isSyncEnabled parameter controls whether phone contacts sync with the StreamLayer backend.
Related
- Integration Guide — Complete SDK setup instructions
- Authentication Forwarding — Authentication options
Updated 21 days ago
