You can trigger this method to change the partner name during the current session before the next initialization. This method allows you to change the partner name within the current session instantly.
You may want to change the partner name for various reasons, such as a user's location or language change on the app. For example, let's say you have an app that operates in multiple countries and one Insider panel for each country you operate in. When a user changes their country on the app, you should trigger this method to log the respective data for the user for each country and to send the messages based on the user's selected country from the correct panel accordingly.
The following table displays the data type for the parameters of the method.
| Parameter | Data Type |
|---|---|
| newPartnerName | String |
Method Signature
Insider.Instance.reinitWithPartnerName(String newPartnerName)Once you change the partner name:
- The events for a user are logged separately for each panel.
- User's attributes such as opt-in information, device token, UDID (unique device ID), and device attributes are also shared with the user profile on the other panel.
- If a user receives a push notification from panel A and doesn't click it, but clicks the push notification after switching to panel B, this push notification cannot be tracked.
- It is recommended to not trigger any events in 1 second upon reiniting the SDK as the reinit operation needs to be processed first. This duration might differ depending on the user's network.
- If the user's GDPR opt-in is false, this method cannot be executed for the respective user.
Multiple Inone Panel Name Handling For QR/Email
The partner name you add to app/build.gradle for directing to the application with QR/Email during the integration process is functional for a single panel. Read more on Required Dependencies and Permissions.
android {
defaultConfig {
// DO NOT FORGET to change your_partner_name.
// Use only lowercase and your_partner_name is provided by Insider.
manifestPlaceholders = [partner:"your_partner_name"]
}
}
1. Keep adding this code you added for your main panel and replace the your_partner_name value with your main panel name.
2. Add the following code to your AndroidManifest.XML file to use this routing in more than one panel on the same app.
<activity
android:name="com.useinsider.insider.InsiderLoginActivity"
android:taskAffinity=""
android:exported="true"
android:noHistory="true"
android:theme="@android:style/Theme.Translucent.NoTitleBar">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="insider{partner_name_1}" />
<data android:scheme="insider{partner_name_2}" />
<data android:scheme="insider{partner_name_3}" />
<!-- You can arrange this part according to your Inone panel names. -->
</intent-filter>
</activity>
After adding this code, you need the SDK to initialize it with the panel name so that you will be redirected with QR/Email for a stable operation.