Skip to content Skip to sidebar Skip to footer

Issue With Phonegap And Millennialmedia

I'm trying to use MillenialMedia on my Phonegap app, but i just can't make it work. I get the following errors on the LogCat: 08-12 12:52:36.755: I/MillennialMediaSDK(333): Initial

Solution 1:

PhoneGap works by throwing HTML/CSS/JS into a special WebView (CordovaWebView), which is running on the entire screen. The code that controls this default behavior lives inside their DroidApp class.

To get Millennial ads to work (or any standard Android controls, for that matter), you have to create a class that extends android.app.Activity (rather than DroidApp) and embed your CordovaWebView within that activity. That CordovaWebView will handle all of your app's Phonegap-related assets while your activity and its corresponding layout can handle your Android-specific classes (like Millennial's MMAdView).

To get a deeper understanding of how PhoneGap works on Android, I strongly recommend reading their docs here: http://cordova.apache.org/docs/en/2.7.0/guide_cordova-webview_android.md.html

To get more on how to specifically get Millennial's SDK working in that environment, talk to the support folks here: https://tools.mmedia.com/user/supportDevPortal

Post a Comment for "Issue With Phonegap And Millennialmedia"