This method allows you to customize the close button position in the internal browser that opens within your app. You can position the close button on the left or right or hide it completely to provide a seamless user experience that matches your app's design.
This method should be called in your Application Class right after initializing the Insider SDK.
The internal browser is used when users interact with specific campaigns or content that opens web pages within your application.
If you do not call this method or pass null as the parameter, the close button will be positioned on the right side by default.
This is an Android platform only feature. Calling this on iOS do not take any action.
Parameter | Description | Data Type |
|---|---|---|
position | Defines the position of the close button. • LEFT: Positions the close button at the top left corner. • RIGHT: Positions the close button at the top-right corner (default). • NONE: Hides the close button completely. | CloseButtonPosition |
Method Signature
window.Insider.setInternalBrowserCloseButtonPosition(position)Method Examples
This example positions the close button on the left.
window.Insider.setInternalBrowserCloseButtonPosition(Insider.closeButtonPosition.LEFT);This example positions the close button on the right (default).
window.Insider.setInternalBrowserCloseButtonPosition(Insider.closeButtonPosition.RIGHT);This example hides the close button.
window.Insider.setInternalBrowserCloseButtonPosition(Insider.closeButtonPosition.NONE);Proguard Configuration
If you are using ProGuard in your Android application, you need to add the following rule to your proguard-rules.pro file to prevent obfuscation of the CloseButtonPosition.
-keep class com.useinsider.insider.CloseButtonPosition { *; }