问题描述
我想在移动设备上测试 Mraid (http://www.iab.net/mraid)应用程序,但我找不到好的解决方案.
I want to test Mraid (http://www.iab.net/mraid) on mobile application, but I can't find a good solution.
在此链接中:https://github.com/mikerowehl/mraid-testing
他描述了设备测试,但它是 3 年前的,现在不起作用.我现在想使用自己的服务器将 mraid 广告推送到我的应用程序进行测试.
He describes about device testing but it is for 3 years ago and doesn't work now.i want to use my own server to push mraid ad to my application for testing like this now.
我如何才能拥有测试应用程序?
How can I have a testing application?
我在服务器上应该怎么做?
How should I do in server?
推荐答案
众所周知,Mraid 兼容广告包含 HTML+ Javascript(而 javascript 使用 Mraid API).由于您没有任何向您提供 Mraid 广告的服务器.我要做的就是在您的 APP 中创建一些 index.html 资源文件,并在您要加载广告的 webview 中加载此资源.
As you already know Mraid compatible Ads contain HTML+ Javascript(And javascript uses 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.
例如在 IOS 中检查此 stackoverflow 链接:如何将 javascript 从本地资源加载到 webview
E.g. In IOS check this stackoverflow link for:how to load javascript into webview from local resources
只需创建一些基本的 Mraid 广告(此站点上有很多示例 https://wiki.operamediaworks.com/display/AMS/MRAID+Sample+Ads 我通常使用这个 mraid 诊断广告来测试所有 mraid 相关功能 http://admarvel.s3.amazonaws.com/demo/mraid/MRAID_v2_diagnostics.txt).
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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!