Helium by Chartboost SDK 集成 如果您想使用 Helium by Chartboost SDK 监测广告收入,可以借助 SDK 到 SDK 集成,将数据发送到 Adjust 服务器。 要求 在您的应用中集成 Adjust 安卓 SDK v4.29.0 或更新版本。 示例 Java 1public void ilrdObserver (final HeliumImpressionData impData) {2 final AdjustAdRevenue adjustAdRevenue = new AdjustAdRevenue(AdjustConfig.AD_REVENUE_HELIUM_CHARTBOOST);3 // extract the ILRD payload4 final JSONObject json = impData.getIlrdInfo();5 try {6 final double adRevenue = json.getDouble("ad_revenue");7 final String currencyType = json.getString("currency_type");8 adjustAdRevenue.setRevenue(adRevenue, currencyType);9 } catch (JSONException e) {10 // error handling as either revenue or currency was not present11 return;12 }13 // optional fields14 final String networkName = json.optString("network_name"); // Helium demand network name15 final String placementName = json.optString("placement_name"); // Helium placement name16 final String lineItemName = json.optString("line_item_name"); // Helium line item name17 adjustAdRevenue.setAdRevenueNetwork(networkName);18 adjustAdRevenue.setAdRevenueUnit(placementName);19 adjustAdRevenue.setAdRevenuePlacement(lineItemName);20 // Send Adjust ad revenue21 Adjust.trackAdRevenue(adjustAdRevenue);22}