1. Android – Monetize ...
  2. Use Manual
  3. Creating a Wrapper
  4. Tagged Wrappers Guidelines

Tagged Wrappers Guidelines

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 in the Single tag where you want us to add the monetization inventory.

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

Where to add the wrappers?

While it is true that overload your app with ads is not the best user experience, 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, that is acceptable. We can manage which ones are and are not filled the our dashboard.

Best Practices when adding a wrapper

Creating views, you need to ensure the wrapper view:

  • Do not overlap other wrappers on the app content.

  • 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 id’s as possible

  • Use Framelayout as the wrapper view (if possible), because it is the cheapest 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 be 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>
      ...

Wie können wir helfen?