CrossPromotionHelper

Overview

Android SDK cross-promotion helper class.

Go back to the SDK reference index.

Class declaration

public class CrossPromotionHelper
class CrossPromotionHelper

Import the class

import com.appsflyer.share.CrossPromotionHelper;
import com.appsflyer.share.CrossPromotionHelper

Methods

logAndOpenStore

Method signature

public static void logAndOpenStore(@NonNull Context context,
                                   String promoted_app_id,
                                   String campaign,
                                   Map<String, String> userParams)
fun logAndOpenStore(context: Context,
                    promoted_app_id: String?,
                    campaign: String?,
                    userParams: Map<String, String>?)

Description
Sends the click to AppsFlyer and opens the promoted app's Play Store listing. Learn more in Cross-promotion.

Input arguments

TypeNameDescription
ContextcontextApplication / Activity Context.
Stringpromoted_app_idPromoted App ID, the package name of the promoted app as it appears within the AppsFlyer dashboard.
StringcampaignName of cross-promotion campaign.
Map<String, String>userParamsOptional. Custom parameters that are added to the link.

Returns
void.

logCrossPromoteImpression

Method signature

public static void logCrossPromoteImpression(@NonNull Context context,
                                             String appID,
                                             String campaign,
                                             Map<String, String> userParams)
fun logCrossPromoteImpression(context: Context,
                              appID: String?,
                              campaign: String?,
                              userParams: Map<String, String>?)

Description
Logs an impression as part of a cross-promotion campaign. Make sure to use the promoted App ID as it appears within the AppsFlyer dashboard. Learn more in Cross-promotion.

Input arguments

TypeNameDescription
ContextcontextApplication / Activity Context.
StringappIDPromoted App ID, the package name of the promoted app as it appears within the AppsFlyer dashboard.
StringcampaignName of cross-promotion campaign.
Map<String, String>userParamsOptional. Custom parameters that are added to the link.

Returns
void.

setUrl

Method signature

public static void setUrl(Map<String, String> mapOfURLs)
fun setUrl(mapOfURLs: Map<String, String>?)

Description
Sets a map of URLs for CrossPromotionHelper.

Input arguments

TypeNameDescription
Map<String, String>mapOfURLsMap of URLs.

Returns
void.


Did this page help you?