1. Android – Monetize ...
  2. Demo Apps

Demo Apps

All the demos have examples for all the AdFormats documented, demos use sometimes SDK Snapshot versions.

Each demo is a demo for each Initialization Type and how they are configured from the point of view of a Publisher. Please, keep in mind they have been done for the purpose of showcasing the solution and and may not be optimized or with correct design patterns.


Single Tag Demo

Repo Link to check the demos’ fork and clone the repo and test the apps locally.


Purpose

This demo showcases the use of Tagged Wrappers and Triggers. There are wrappers in all Activities and Fragments, also an Interstitial triggered each time to switch from fragment to fragment or from activity to activity.

If required for showcasing for each special format, there will be an activity for each one, such as Infinite Scroll.

Description

We are going to describe what happens in this demo for one of the activity.

First on initialization, we get the data from Fake data built into the SDK. This data contains all of the ConfigBuilder demo data and the Single Tag data Screens and ad places. In production, this information will come from our Database.

Now In the MainActivity we will find an example of Relative Positioning feature where we see a Banner being placed AFTER the wrapper and the wrapper this time is a LinearLayout with the tag pub_wrapper_tag that has a button inside button2. If the button is clicked, we will see and Interstitial and a Log from the Demo, this is showing how we can trigger ads from buttons without overriding your code, maintaining it simple. Also if we click the button “Switch to Activity 2″ to go to the second activity we will see an Interstitial.

In the same activity we have a fragment, the fragment one has another Banner this time INSIDE the wrapper so this wrapper is only used For the ad. Also in this Fragment we have an event saying that if we click the button “Go To Fragment two” before going to the fragment two we see an Interstitial, this works because we just put our showAd() event before your transition.

Manual Config Demo

Repo Link, if you want to check the demos fork and clone the repo and test the apps locally


Purpose

This demo showcases how to use RefineryAdFactory with each adFormat and also illustrates how quick, in terms of lines of code added, you can add monetization to the app. One activity has all the formats by pressing the each format button and showing it in a programmatically created wrapper.

If required for showcasing each special format, there will be an activity for each one, such as Infinite Scroll.

Description

First on initialization, we obtain the data from Fake data built into the SDK using the setDebug() method and the initialize() method, this data just contains all of the ConfigBuilder demo data, in production this will come from our DB.

Now, in the MainActivity, we create the wrapper programmatically as in the guide of Creating a Wrapper. Each button of the view is binded to a RefineryAdFactory Method corresponding to the AdFormat.

We also have the button to delete all cached ads and reset consent, specially for testing purposes.

The Interstitial has the show function immediately after the load event in the lifecycle.

This is not needed to do this in this way it could be in other event, Transitions or View Clicks


Come possiamo aiutarti?