Splash Support
If you app use Splash Screen, please review the following information
When the Siprocal SDK receives a notification containing an InApp Ad and the user opens it, the SDK will open the app and display the InApp Ad. The screen where it will be shown depends on the current state of the app.
-
App is in foreground: The Ad is going to be shown in the current screen.
-
App is in background: SDK is going to open the app and show the Ad in the current screen. For example, the user was in Setting page of the app and minimize this one, when the user open the notification the Ad is going to be shown in the Setting page of the app.
-
App is dead: SDK is going to launch the Activity with the intent-filter MAIN and LAUNCHER and show the Ad when the first screen is visible.
In this last case if the application has setup one splash screen with those filters, the Ad is going to be show in the splash screen and this one disappeared when the splash screen navigate to the next screen. To handle this, SDK provide one method to can launch the Ad in one specific screen define by host app (this only is going to apply when app is dead).
For implement this is required follow the next steps:
- In the SDK Initialization, create the SiprocalSDKSettings object and include the method enablePopupHandling(). After that, pass the SiprocalSDKSettings object as the second parameter of the init method.
public class App extends Application {
@Override
public void onCreate(){
super.onCreate();
SiprocalSDKSettings siprocalSDKSettings = new SiprocalSDKSettings.Builder()
.enablePopupHandling()
.build();
SiprocalSDK.init(this, siprocalSDKSettings);
}
}
class App: Application() {
override fun onCreate() {
super.onCreate()
val siprocalSDKSettings = SiprocalSDKSettings.Builder()
.enablePopupHandling()
.build()
SiprocalSDK.init(this, siprocalSDKSettings)
}
}
- In the onCreated of the activity where desire show the Ad call, to method SiprocalSDK.showAvailableAd(activity)
SiprocalSDK.showAvailableAd(activity);
SiprocalSDK.showAvailableAd(activity)
Updated 5 months ago