Skip to end of metadata
Go to start of metadata

You are viewing an old version of this content. View the current version.

Compare with Current View Version History

« Previous Version 2 Next »

What are they?

Tagged wrappers are normal android views with two requirements:

  1. Has the XML attribute android:tag defined or added with the setTag method. This is used to find the views where you want to add the monetization inventory.

  2. It is a ViewGroup or a Subtype, like FrameLayout, LinearLayout, ConstraintLayout, Relativelayout, etc.

Where to add the wrappers?

Everywhere you have a white space. Tagged wrappers don’t need to contain ads, its just for flexibility and future proofing. It is true that overloading your app with ads is not the best user experience, but the wrappers don’t need to be filled with ads, that’s why we recommend you add the wrappers everywhere where is a blank space in the screen. Even if you do not want to fill them in.

We can manage which ones are and are not filled from the web interface.

Best Practices when adding a wrapper

For Creating the wrappers you need to ensure the wrapper view:

  • Do not overlaps other wrappers on the app content, no matter the size it takes. if it is an space that you have a max Size to it, put it in the tag name.

  • Every blank space is a good space for a wrapper (even if you do not plan to use it).

  • Do not use only one tag for all of your wrappers, it will be hard to configure your monetization and change it according to your needs. So use as many different tags as possible (like id’s but you can have some of them be repeated when it makes sense)

  • Use LineaLayout as the wrapper view (if possible), because it is the simples ViewGroup inheritor.

Limitations

  • We can fill either all of the wrappers with a tag or just the first one we find with that tag: if you want to differentiate any wrappers you need to assign a different tag to those. E.g.: if you want us to fill a wrapper at the bottom of the screen that has the tag ads_wrapper we can fill that. However, if you have multiple wrappers with the same tag, and you want to fill all of them and exclude some while having the same tag, it’s not possible. We encourage you to ask for advice to our technical support on how to group wrappers.

Example

# activity_main.xml
...
<!-- this would your layout -->
<ConstraintLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_marginStart="10dp"
    android:layout_marginEnd="10dp">
    ...
    <!-- this is the wrapper -->
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:tag="single_tag_infinite_scroll_ad_wrapper_tag"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="parent"
        app:layout_constraintVertical_bias="0.0">
    </LinearLayout>
</ConstraintLayout>
...

  • No labels