-
Notifications
You must be signed in to change notification settings - Fork 1
Campaigns
All the Malcom campaigns allows you to measure the impact of your campaign in impressions and clicks.
In order to can show a campaign inside an activity, you should add this UI element on the activity's layout:
<RelativeLayout
android:id="@+id/campaign_banner_layout"
android:layout_width="fill_parent"
android:layout_height="300dip">
</RelativeLayout>
This campaigns are designed to promote one application from other and allows you to measure the impact of the campaign on number of downloads. To add a cross selling campaign to your activity:
MCMCoreAdapter.getInstance().moduleCampaignAddCrossSelling(this);
By default, campaigns in Malcom has a duration of 15 seconds. After this time, campaign will be automatically removed from screen. You can set this time by using the following method (Setting to zero seconds, the campaign won't dissapear from screen):
MCMCoreAdapter.getInstance().moduleCampaignAddCrossSelling(this, this, 0, R.drawable.loading_image);
The second parameter is the interface that will be notified with the campaign actions. It is defined in MCMCampaignNotifiedDelegate
.
The last parameter allows you to use a image while the remote resource is loading.
The promotion campaigns are designed to make a custom promotion inside your application. To add a promotion campaign to your activity (also you can use the simplified methods):
MCMCoreAdapter.getInstance().moduleCampaignAddPromotion(this, this, R.drawable.loading_image);
The rate my app campaigns show a dialog that remember the user to make a review of the application in the store. All the configuration about number of launches or days before repeat the dialog shown are set on the malcom web so the only line that you need to add on your code is:
MCMCoreAdapter.getInstance().moduleCampaignAddRateMyApp(this, this);
Where the first parameter is the activity where the dialog will be shown and the second is the interface that will be called when the user press one of the options.
In order to customize the texts for the dialog, you can add this entries to your string.xml file with these keys:
<string name="malcom_rate_title">Your title</string>
<string name="malcom_rate_message">Your message</string>
<string name="malcom_rate_button">Your rate button title</string>
<string name="malcom_remind_button">Your remind button title</string>
<string name="malcom_disable_button">Your disable button title</string>