Test Mraid on Device
Asked Answered
B

2

1

I want to test Mraid (http://www.iab.net/mraid) on mobile application, but I can't find a good solution.

in this link : https://github.com/mikerowehl/mraid-testing

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?

Bibliomancy answered 7/1, 2016 at 3:49 Comment(0)
B
1

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.

E.g. In IOS check this stackoverflow link for:how to load javascript into webview from local resources

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).

Hope it helps!

Bb answered 7/1, 2016 at 12:21 Comment(3)
thank you, but i have a question. how can I load mraid in webview. ads contain html and js uses mraid api doesn't work in browser simply. does it work on webview on mobile?Bibliomancy
Hi, In order to use Mraid compatible Ads inside a mobile App, the ad container (usually webview) where you are going to display the Ad shall be Mraid complaint as well. There are lots of Ad SDK vendors who implemented mraid specification so that that their Ad container is mraid complaint. What that means is Ad container must provide mraid javascript object to the Ad so that Ad can use this javascript API. And all the functionality which MRAID API provides to the Ad container must be implemented by Ad SDK. (part1)Bb
If your APP is not using any thirdparty AD SDK which supports Mraid, then it means you might need to implement this API yourself and provide this to the Ad container. In order for SDK to inject mraid objcet to the Ad container , Ad creative must have this javascript snippet as early as possible e.g. in the head section of the Ad Creative <script src=mraid.js"></script>. And lastly MRAID compatible Ads are supposed to work within APPs (not in mobile browsers) and that is what is the purpose of API, so that Ads can use device functionalities like calender,accelerometer, and resize Ads,etc(part2)Bb
V
1

MRAID

Mobile Rich Media Ad Interface Definitions(MRAID) - allows to use device(native) functionality from HTML/JS code.

[Android principle implementation]

IAB describes a common API but a technical part is provided by Ad SDK and consists of:

  1. mraid.js
  2. custom WebView

For testing your implementation you can use next resources:

Versicolor answered 6/2, 2020 at 15:22 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.