标签: mopub

Mopub:测试Facebook Audience Network Native Ad集成

我不确定如何测试Facebook Audience Network与Mopub的集成.在Facebook Audience Network页面上进行测试时,它没有显示有关测试与原生广告集成的任何信息:

https://developers.facebook.com/docs/audience-network/testing

在mopub文档中,我已完成与第三方广告网络集成的所有步骤:

https://github.com/mopub/mopub-android-sdk/wiki/Integrating-Native-Third-Party-Ad-Networks

我还完成了本教程的这一部分,通过创建一个库存项目来自行测试您的广告素材,该库存项目是原生广告和为原生广告提供服务的测试订单.这适用于我的应用,但这是我自己创建的广告,它不是Facebook广告:

https://dev.twitter.com/mopub-demand/overview/self-testing-your-creatives

存储屏幕:它显示广告来源细分,但不包括Facebook受众网络.

在此输入图像描述

订购屏幕

屏幕显示我自己创建的订单,该订单适用于我的应用.我可以在我的应用中看到自己的广告素材:

在此输入图像描述

网络屏幕

这是显示我已添加FacebookAudienceNetwork的网络屏幕:

在此输入图像描述

这是FacebookAudienceNetwork的配置:

在此输入图像描述

Facebook placement_id在下面的图片中变暗,但它与Facebook上的匹配.

Facebook网站:

在此输入图像描述

我怎么知道Facebook Audience Network已成功与MoPub集成用于原生广告 - 有没有办法对此进行测试?

android mopub facebook-audience-network

3
推荐指数
1
解决办法
1536
查看次数

MoPub如何使用具有动态单元格高度的MPTableViewAdPlacer实现iOS原生广告?

我正在使用MPTableViewAdPlacer在iOS UITableView中实现原生广告.初始化MPTableViewAdPlacer时,它会要求MPStaticNativeAdRendererSettings,它需要实现viewSizeHandler.但是,这是在提取任何广告之前,因为名称建议为"静态"原生广告.我正在尝试实现一个可以在获取adData后计算单元格高度,例如标题,图像等.我一直试图找到一种方法来实现动态单元格高度,但所有示例应用程序,twitter提供的说明仅显示静态高度实现.

代码如下:

-(void)setupAdPlacer {

    MPNativeAdRequestTargeting *targeting = [MPNativeAdRequestTargeting targeting];
    targeting.location = [[CLLocationManager alloc] init].location;

    targeting.desiredAssets = [NSSet setWithObjects: kAdMainImageKey, kAdCTATextKey, kAdTextKey, kAdTitleKey, nil];

    MPStaticNativeAdRendererSettings *settings = [[MPStaticNativeAdRendererSettings alloc] init];

    settings.renderingViewClass = [REPostListViewMoPubAdCell class];
    settings.viewSizeHandler = ^(CGFloat maximumWidth) {
    return CGSizeMake(maximumWidth, 312.0);

    // STATIC HEIGHT
    };

    MPNativeAdRendererConfiguration *config = [MPStaticNativeAdRenderer rendererConfigurationWithRendererSettings:settings];

    self.adPlacer = [MPTableViewAdPlacer placerWithTableView:self.tableView viewController:self adPositioning:positioning rendererConfigurations:@[config]];
    self.adPlacer.delegate = self;

    [self.adPlacer loadAdsForAdUnitID:@"xxxxxxxxxxx" targeting:targeting];
}
Run Code Online (Sandbox Code Playgroud)

objective-c ios mopub facebook-audience-network

3
推荐指数
1
解决办法
1008
查看次数

如何初始化MoPub?

我是 Mopub 的新手。只是想在 Android 中添加 Mopub 广告。所以,我一直在关注这个文档: https://developers.mopub.com/publishers/android/initialize/

文档建议这样写:

MoPub.initializeSdk(context, new SdkConfiguration.Builder("AD_UNIT_ID")
                .build(), null);
Run Code Online (Sandbox Code Playgroud)

但我不清楚,AD_UNIT_ID代码中该写什么?横幅广告、插页式广告或奖励广告单元 ID?或者我每次都必须在显示任何类型的广告之前进行初始化?

android mopub

3
推荐指数
1
解决办法
633
查看次数

"找不到mopub-android-sdk.apk!"

我试图将mopub广告合并到我的游戏中并收到错误"找不到mopub-android-sdk.apk!" 在尝试运行游戏时在eclipse的控制台窗口中报告.我很困惑为什么它应该寻找一个apk文件 - 肯定是一个apk文件是一个包装程序来执行(纠正我,如果我错了) - 但我认为mopub应该是一个库.当然所有的mopub功能都应该内置到我的单机游戏apk中,不应该吗?

编辑:控制台输出看起来像这样......

 ------------------------------
 Android Launch!
 adb is running normally.
 Performing com.company.game.Splash activity launch
 Automatic Target Mode: using device '0123456789ABCDEF'
 Uploading Game.apk onto device '0123456789ABCDEF'
 Installing Game.apk...
 Success!
 Could not find mopub-android-sdk.apk!
 Starting activity com.company.game.Splash on device 0123456789ABCDEF
Run Code Online (Sandbox Code Playgroud)

所以它看起来像我已经安装了我的game.apk - 为什么它然后想要安装mopub-android-sdk.apk?

编辑:我只是尝试让MoPub的示例演示工作,这很好.所以现在我怀疑我在游戏项目中设置错误的东西.

java eclipse android mopub

2
推荐指数
1
解决办法
1408
查看次数

Unity/iOS - MoPub 安装 - Xcode 编译错误

我已经完全按照此处的“构建说明”中的说明完成了所有操作:https : //github.com/mopub/mopub-unity-ios-plugin

  1. 将 UnityPlugin 的 MoPubiOS.unitypackage 导入您的 Unity iOS 项目

  2. (可选)在Unity构建窗口中添加UnityPlugin的Plugins/MoPub/testSupport/MoPubTestScene【包含MoPubGUIManager.cs示例】

  3. 使用 Unity Player 将您的 Unity iOS 项目构建到 Xcode 项目中

  4. 将以下源文件夹和文件复制到 Xcode 项目的 Classes/ 文件夹中 MoPubSdk 的 MoPubSDK/ 目录的完整内容 b. MoPubSdk 的 TouchJSON/ 目录(包括父目录) c. 来自 UnityPlugin 的 MoPubBinding.m、MoPubManager.h 和 MoPubManager.mm 文件

  5. 对 Xcode 的构建阶段中包含的框架进行修改 添加 StoreKit.framework b。添加 AdSupport.framework 并将其设置为 Optional

  6. 构建并运行您的 Xcode 项目

而且,当我尝试构建 Xcode 项目时,我收到 9 个链接器错误:

架构 armv7 的未定义符号:“_ moPubShowInterstitialAd”,引用自:RegisterMonoModules.o 中的 RegisterMonoModules() “ _moPubRequestInterstitialAd”,引用自:RegisterMonoModules.o 中的 RegisterMonoModules() “ _moPubShowBanner”,引用自:RegisterMonoModules.o RegisterMono “ _moPubReportApplicationOpen”,引用自:RegisterMonoModules.o 中的 RegisterMonoModules() “ _moPubRefreshAd”,引用自:RegisterMonoModules.o …

unity-game-engine ios mopub

2
推荐指数
1
解决办法
2974
查看次数

我的FragmentActivity中的ClassNotFoundException mopub

我正在尝试将mopub添加到我的应用中.我通过AndroidStudio插件安装了sdk.并将此添加到我的xml中

 <com.mopub.mobileads.mopubview
   android:id="@+id/adview"
    android:layout_alignParentBottom="true"
    android:layout_width="fill_parent"
    android:layout_height="50dp">
</com.mopub.mobileads.mopubview>
Run Code Online (Sandbox Code Playgroud)

但它给了我这些错误:

The following classes could not be found:
- com.mopub.mobileads.mopubview (Fix Build Path, Create Class)
Run Code Online (Sandbox Code Playgroud)

当我运行应用程序时崩溃:

java.lang.RuntimeException:无法启动活动ComponentInfo {com.example.hroshandel.myapplication/com.example.hroshandel.myapplication.SimpleIntro_FragmentActivity}:android.view.InflateException:二进制XML文件行#15:错误输出类com.mopub .mobileads.mopubview

引起:android.view.InflateException:二进制XML文件行#15:错误膨胀类com.mopub.mobileads.mopubview

at com.example.hroshandel.myapplication.SimpleIntro_FragmentActivity.onCreate(SimpleIntro_FragmentActivity.java:20)

引起:java.lang.ClassNotFoundException:在路径上找不到类"com.mopub.mobileads.mopubview":DexPathList [[zip file"/data/app/com.example.hroshandel.myapplication-4.apk"] ,nativeLibraryDirectories = [/ data/app-lib/com.example.hroshandel.myapplication-4,/ vendor/lib,/ system/lib]]

android buildpath android-layout mopub android-studio

2
推荐指数
1
解决办法
1262
查看次数

无法在Android应用程序中显示Mopub的原生广告

我已经与Mopub集成在我的Android应用程序中显示广告.我可以展示bannner和插页式广告,但不能展示原生广告,

布局文件代码,

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  android:orientation="vertical"  >
  <TextView
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:text="@string/note_title_label"
    style="?android:listSeparatorTextViewStyle"
    />
  <EditText android:id="@+id/note_title"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:hint="@string/note_title_hint"
    />
    <TextView
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:text="@string/note_details_label"
    style="?android:listSeparatorTextViewStyle"
    />
    <EditText android:id="@+id/note_details"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:hint="@string/note_details_hint"
    />
    <Button android:id="@+id/note_date"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_marginLeft="16dp"
    android:layout_marginRight="16dp"
    />
    <CheckBox android:id="@+id/note_solved"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_marginLeft="16dp"
    android:layout_marginRight="16dp"
    android:text="@string/note_solved_label"
    />

    <RelativeLayout  android:id="@+id/native_ad_layout"
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="50dp">
    >    
    <ImageView android:id="@+id/native_ad_main_image"
                    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
        />  
    <ImageView android:id="@+id/native_ad_icon_image"
                    android:layout_width="fill_parent"
    android:layout_height="wrap_content"  
         />  
    <TextView android:id="@+id/native_ad_title" 
            android:layout_width="fill_parent"
    android:layout_height="wrap_content"
        />  
    <TextView android:id="@+id/native_ad_text" 
       android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        />
</RelativeLayout>

</LinearLayout>
Run Code Online (Sandbox Code Playgroud)

fragment.java中的逻辑(与上面的布局相关联)用于显示原生广告的文件,

    @TargetApi(11) …
Run Code Online (Sandbox Code Playgroud)

android ads android-layout android-fragments mopub

1
推荐指数
1
解决办法
2392
查看次数