Skip to content
Last updated

To initialize the SDK, you need to add the following activities to the AndroidManifest.xml file:


<activity
    android:name="com.sinch.chat.sdk.SinchChatActivity"
    android:configChanges="orientation|screenSize|screenLayout|keyboardHidden"
/>
<activity
    android:name="com.sinch.chat.sdk.SinchInboxChatActivity"
    android:configChanges="orientation|screenSize|screenLayout|keyboardHidden"
/>

Then we need to call the initialize method. Since we want to initialize the SDK as soon as possible, the best place to do this is in the MainActivity.kt file, in the onCreate method. It looks something like this:

override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContent {
            SinchChatSDK.initialize(applicationContext)
        }
    }
Note:

To learn how to initaizlie push notifications, see the Push notification section.

After initializing, you must [set the identity]((/docs/sinch-chat/getting-started/android/set-identity/).