简体   繁体   English

在设备上测试Mraid

[英]Test Mraid on Device

I want to test Mraid ( http://www.iab.net/mraid ) on mobile application, but I can't find a good solution.我想在移动应用程序上测试 Mraid ( http://www.iab.net/mraid ),但找不到好的解决方案。

in this link : https://github.com/mikerowehl/mraid-testing在此链接中: https : //github.com/mikerowehl/mraid-testing

He describes about device testing but it is for 3 years ago and doesn't work now.他描述了设备测试,但它是 3 年前的,现在不起作用。 i want to use my own server to push mraid ad to my application for testing like this now.我想使用我自己的服务器将 mraid 广告推送到我的应用程序以进行这样的测试。

How can I have a testing application?我怎样才能有一个测试应用程序?

How should I do in server?我应该怎么做服务器?

As you already know Mraid compatible Ads contain HTML+ Javascript(And javascript uses Mraid API).如您所知,Mraid 兼容广告包含 HTML+ Javascript(并且 javascript 使用 Mraid API)。 Since you don't have any server that delivers Mraid Ads to you.What I would do is simply create some index.html resource file inside your APP and load this resource within the webview where you want to load the Ad.由于您没有任何向您提供 Mraid 广告的服务器。我要做的就是在您的 APP 中创建一些 index.html 资源文件,并在您要加载广告的 webview 中加载此资源。

Eg In IOS check this stackoverflow link for: how to load javascript into webview from local resources例如,在 IOS 中检查此 stackoverflow 链接: 如何从本地资源将 javascript 加载到 webview

Just create some basic Mraid Ad (there are lots of examples on this site https://wiki.operamediaworks.com/display/AMS/MRAID+Sample+Ads and I usually use this mraid diagnostics Ad to test all the mraid related functionality http://admarvel.s3.amazonaws.com/demo/mraid/MRAID_v2_diagnostics.txt ).只需创建一些基本的Mraid Ad(本站点上有很多示例https://wiki.operamediaworks.com/display/AMS/MRAID+Sample+Ads ,我通常使用此mraid 诊断广告来测试所有mraid 相关功能http ://admarvel.s3.amazonaws.com/demo/mraid/MRAID_v2_diagnostics.txt )。

Hope it helps!希望能帮助到你!

MRAID - Mobile Rich Media Ad Interface Definitions - allows to use device(native) functionality from HTML/JS code. MRAID - 移动富媒体广告界面定义 - 允许使用来自 HTML/JS 代码的设备(本机)功能。

[Android principle implementation] 【Android原理实现】

IAB describes a common API but a technical part is provided by Ad SDK and consists of: IAB 描述了一个通用 API,但技术部分由Ad SDK提供,包括:

  1. mraid.js
  2. custom WebView

For testing your implementation you can use next resources:为了测试您的实现,您可以使用以下资源:

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM