AppsFlyerAdRevenue

概要

AppsFlyerAdRevenue is the parent class for the ad revenue SDK.

メソッド

initaliaze

メソッドのシグネチャ

public static void initialize(AppsFlyerAdRevenue revenue)

詳細
Initializes the ad revenue SDK.

引数の入力

タイプ名前詳細
AppsFlyerAdRevenuerevenueCreates and initializes an AdRevenue singleton object.

返されるコード
void.

使用例:

AppsFlyerAdRevenue.Builder afRevenueBuilder = new AppsFlyerAdRevenue.Builder( this);
AppsFlyerAdRevenue.initialize(afRevenueBuilder.build());

logAdRevenue

メソッドのシグネチャ

public static void logAdRevenue(@NonNull String monetizationNetwork, @NonNull MediationNetwork mediationNetwork, @NonNull Currency eventRevenueCurrency, @NonNull Double eventRevenue, @Nullable Map<String, String> nonMandatory)

詳細
Logs an ad revenue impression.

引数の入力

タイプ名前詳細
StringmonetizationNetworkメディエーションネットワークの名前。
MediationNetworkmediationNetworkEnum of the medation network.
CurrencyeventRevenueCurrencyCurrency of the ad revenue event.
DoubleeventRevenueAmount of the ad revenue event.
Map<String, String>nonMandatoryContains native and custom fields for the ad revenue payload, as described in the following usage example.

返されるコード
void.

使用例:

// Creating optional customParams
        Map<String, String> customParams = new HashMap<>();
        customParams.put(Scheme.COUNTRY, "US");
        customParams.put(Scheme.AD_UNIT, "89b8c0159a50ebd1");
        customParams.put(Scheme.AD_TYPE, AppsFlyerAdNetworkEventType.BANNER.toString());
        customParams.put(Scheme.PLACEMENT, "place");
        customParams.put(Scheme.ECPM_PAYLOAD, "encrypt");
        customParams.put("foo", "test1");
        customParams.put("bar", "test2");

        // Actually recording a single impression
        AppsFlyerAdRevenue.logAdRevenue(
                "ironsource",
                MediationNetwork.googleadmob,
                Currency.getInstance(Locale.US),
                0.99,
                customParams
        );

変数

MediationNetwork

定数

タイプ名前詳細
StringironsourceThe name of the mediation network.
StringapplovinmaxThe name of the mediation network.
StringgoogleadmobThe name of the mediation network.
StringfyberThe name of the mediation network.
StringappodealThe name of the mediation network.
StringadmostThe name of the mediation network.
StringtoponThe name of the mediation network.
StringtradplusThe name of the mediation network.
StringyandexThe name of the mediation network.
StringchartboostThe name of the mediation network.
StringunityThe name of the mediation network.

このページは役に立ちましたか?