MREC
MREC is 300x250 banner. This type can be useful if the application has a large free area for placing a banner in the interface.
We recommend you always check whether an ad is available before trying to show it.
- Kotlin
- Java
if (Appodeal.isLoaded(Appodeal.MREC)) {
Appodeal.show(this, Appodeal.MREC)
}
if (Appodeal.isLoaded(Appodeal.MREC)) {
Appodeal.show(this, Appodeal.MREC);
}
Display
To display MREC, you need to call the following code in the activity:
- Add
com.appodeal.ads.MrecViewto your layout file:
<com.appodeal.ads.MrecView
android:id="@+id/appodealMrecView"
android:layout_width="300dp"
android:layout_height="250dp" />
- Set view id before the SDK initialization to show MREC:
- Kotlin
- Java
Appodeal.setMrecViewId(R.id.appodealMrecView)
Appodeal.setMrecViewId(R.id.appodealMrecView);
- Now you can show the MREC in the view specified (Make sure that the required view is on the screen):
- Kotlin
- Java
Appodeal.show(this, Appodeal.MREC)
Appodeal.show(this, Appodeal.MREC);
You can use our demo app as a reference project.
Demo App
If you want to use advanced MREC integration, you can find detailed documentation here