adwhirl causing android app to crash
I'm trying to integrate adwhirl into one of my apps and it keeps crashing when I try and run it. I have current set it to test mode to try and get it working in the emulator, but it only works part of the time. It's never crashed without adwhirl. I've included my logcat in case anybody knows how I can fix my error. Thanks for the help.
I/MillennialMediaAdSDK( 541): Last ad name is null. Call for new ad.
D/MillennialMediaAdSDK( 541): *********** Advertising test mode is deprecated.
D/MillennialMediaAdSDK( 541): Calling for an advertisement: http://androidsdk.a
ds.mp.mydas.mobi/getAd.php5?sdkapid=37786&auid=000000000000000&ua=Mozilla%2F5.0+
%28Linux%3B+U%3B+Android+2.3.1%3B+en-us%3B+sdk+Build%2FGSI11%29+AppleWebKit%2F53
3.1+%28KHTML%2C+like+Gecko%29+Version%2F4.0+Mobile+Safari%2F533.1sdk&dm=sdk&dv=A
ndroid2.3.1&mmisdk=4.1.0-11.03.04.a&cachedvideo=true&adtype=MMBannerAdTop
D/dalvikvm( 541): GC_CONCURRENT freed 340K, 51% free 2894K/5831K, external 1022
K/1038K, paused 5ms+4ms
W/dalvikvm( 541): JNI WARNING: jarray 0x40572640 points to non-array object (Lj
ava/lang/String;)
I/dalvikvm( 541): "WebViewCoreThread" prio=5 tid=10 NATIVE
I/dalvikvm( 541): | group="main" sCount=0 dsCount=0 obj=0x40570320 self=0x206
450
I/dalvikvm( 541): | sysTid=553 nice=0 sched=0/0 cgrp=default handle=2158264
I/dalvikvm( 541): | schedstat=( 244795849 86489457 35 )
I/dalvikvm( 541): at android.webkit.JWebCoreJavaBridge.sharedTimerFired(Nativ
e Method)
I/dalvikvm( 541): at android.webkit.JWebCoreJavaBridge.sharedTimerFired(Nativ
e Method)
I/dalvikvm( 541): at android.webkit.JWebCoreJavaBridge.fireSharedTimer(JWebCo
reJavaBridge.java:91)
I/dalvikvm( 541): at android.webkit.JWebCoreJavaBridge.handleMessage(JWebCore
JavaBridge.java:108)
I/dalvikvm( 541): at android.os.Handler.dispatchMessage(Handler.java:99)
I/dalvikvm( 541): at android.os.Looper.loop(Looper.java:123)
I/dalvikvm( 541): at android.webkit.WebViewCore$WebCoreThread.run(WebViewCore
.java:629)
I/dalvikvm( 541): at java.lang.Thread.run(Thread.java:1019)
I/dalvikvm( 541):
E/dalvikvm( 541): VM aborting
I/DEBUG ( 540): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *
**
I/DEBUG ( 540): Build fingerprint: 'generic/sdk/generic:2.3.1/GSI11/93351:eng
/test-keys'
I/DEBUG ( 540): pid: 541, tid: 553 >>> org.paceacademy <<<
I/DEBUG ( 540): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr deadd00
d
I/DEBUG ( 540): r0 fffffebc r1 deadd00d r2 00000026 r3 00000000
I/DEBUG ( 540): r4 81da45c8 r5 40572640 r6 81d859ec r7 0020efa8
I/DEBUG ( 540): r8 439c1b58 r9 42ddbf1c 10 42ddbf04 fp 4168d82c
I/DEBUG ( 540): ip 81da4728 sp 439c0e90 lr afd19375 pc 81d45a02 cpsr 200
00030
I/DEBUG ( 540): #00 pc 00045a02 /system/lib/libdvm.so
I/DEBUG ( 540): #01 pc 000376fc /system/lib/libdvm.so
I/DEBUG ( 540): #02 pc 000399c4 /system/lib/libdvm.so
I/DEBUG ( 540): #03 pc 0003a4a0 /system/lib/libdvm.so
I/DEBUG ( 540): #04 pc 0032b6e6 /system/lib/libwebcore.so
I/DEBUG ( 540): #05 pc 002a4db4 /system/lib/libwebcore.so
I/DEBUG ( 540): #06 pc 001a6146 /system/lib/libwebcore.so
I/DEBUG ( 540): #07 pc 002a5880 /system/lib/libwebcore.so
I/DEBUG ( 540): #08 pc 00359e5e /system/lib/libwebcore.so
I/DEBUG ( 540): #09 pc 0035d336 /system/lib/libwebcore.so
I/DEBUG ( 540): #10 pc 003638ea /system/lib/libwebcore.so
I/DEBUG ( 540): #11 pc 0019f70a /system/lib/libwebcore.so
I/DEBUG ( 540): #12 pc 0019f790 /system/lib/libwebcore.so
I/DEBUG ( 540): #13 pc 001a3d9a /system/lib/libwebcore.so
I/DEBUG ( 540): #14 pc 000d0dca /system/lib/libwebcore.so
I/DEBUG ( 540): #15 pc 000d1b7a /system/lib/libwebcore.so
I/DEBUG ( 540): #16 pc 000d1dee /system/lib/libwebcore.so
I/DEBUG ( 540): #17 pc 000d2dae /system/lib/libwebcore.so
I/DEBUG ( 540): #18 pc 000d31d4 /system/lib/libwebcore.so
I/DEBUG ( 540): #19 pc 000e260a /system/lib/libwebcore.so
I/DEBUG ( 540): #20 pc 000e2634 /system/lib/libwebcore.so
I/DEBUG ( 540): #21 pc 001a8f06 /system/lib/libwebcore.so
I/DEBUG ( 540): #22 pc 000dfcfe /system/lib/libwebcore.so
I/DEBUG ( 540): #23 pc 00271980 /system/lib/libwebcore.so
I/DEBUG ( 540): #24 pc 002719b4 /system/lib/libwebcore.so
I/DEBUG ( 540): #25 pc 000e1a08 /system/lib/libwebcore.so
I/DEBUG ( 540): #26 pc 00272e0a /system/lib/libwebcore.so
I/DEBUG ( 540): #27 pc 000eb132 /system/lib/libwebcore.so
I/DEBUG ( 540): #28 pc 00272de6 /system/lib/libwebcore.so
I/DEBUG ( 540): #29 pc 0027322e /system/lib/libwebcore.so
I/DEBUG ( 540): #30 pc 002732d6 /system/lib/libwebcore.so
I/DEBUG ( 540): #31 pc 00273418 /system/lib/libwebcore.so
I/DEBUG ( 540):
I/DEBUG ( 540): code around pc:
I/DEBUG ( 540): 81d459e0 447a4479 ed0cf7d1 20004c09 ee34f7d1
I/DEBUG ( 540): 81d459f0 447c4808 6bdb5823 d0002b00 49064798
I/DEBUG ( 540): 81d45a00 700a2226 eea0f7d1 0004361f 000451dd
I/DEBUG ( 540): 81d45a10 0005ebd2 fffffebc deadd00d b510b40e
I/DEBUG ( 540): 81d45a20 4c0a4b09 447bb083 aa05591b 6b5bca02
I/DEBUG ( 540):
I/DEBUG ( 540): code around lr:
I/DEBUG ( 540): afd19354 b0834a0d 589c447b 26009001 686768a5
I/DEBUG ( 540): afd19364 220ce008 2b005eab 1c28d003 47889901
I/DEBUG ( 540): afd19374 35544306 d5f43f01 2c006824 b003d1ee
I/DEBUG ( 540): afd19384 bdf01c30 000281a8 ffffff88 1c0fb5f0
I/DEBUG ( 540): afd19394 43551c3d a904b087 1c16ac01 604d9004
I/DEBUG ( 540):
I/DEBUG ( 540): stack:
I/DEBUG ( 540): 439c0e50 00000015
I/DEBUG ( 540): 439c0e54 afd18407 /system/lib/libc.so
I/DEBUG ( 540): 439c0e58 afd4270c /system/lib/libc.so
I/DEBUG ( 540): 439c0e5c afd426b8 /system/lib/libc.so
I/DEBUG ( 540): 439c0e60 00000000
I/DEBUG ( 540): 439c0e64 afd19375 /system/lib/libc.so
I/DEBUG ( 540): 439c0e68 00206450 [heap]
I/DEBUG ( 540): 439c0e6c afd183d9 /system/lib/libc.so
I/DEBUG ( 540): 439c0e70 0020efa8 [heap]
I/DEBUG ( 540): 439c0e74 0005ebd2 [heap]
I/DEBUG ( 540): 439c0e78 40572640 /dev/ashmem/dalvik-heap (deleted)
I/DEBUG ( 540): 439c0e7c 81d859ec /system/lib/libdvm.so
I/DEBUG ( 540): 439c0e80 0020efa8 [heap]
I/DEBUG ( 540): 439c0e84 afd18437 /system/lib/libc.so
I/DEBUG ( 540): 439c0e88 df002777
I/DEBUG ( 540): 439c0e8c e3a070ad
I/DEBUG ( 540): #00 439c0e90 00000001
I/DEBUG ( 540): 439c0e94 81d37701 /system/lib/libdvm.so
I/DEBUG ( 540): #01 439c0e98 00000001
I/DEBUG ( 540): 439c0e9c 81d399c9 /system/lib/libdvm.so
I/BootReceiver( 60): Copying /data/tombstones/tombstone_00 to DropBox (SYSTEM_
TOMBSTONE)
D/Zygote ( 32): Process 541 terminated by signal (11)
I/ActivityManager( 60): Process org.paceacademy (pid 541) has died.
E/InputDispatcher( 60): channel '406ec328 org.paceacademy/org.paceacademy.Yach
tMain (server)' ~ Consumer closed input channel or an error occurred. events=0x
8
E/InputDispatcher( 60): channel '406ec328 org.paceacademy/org.paceacademy.Yach
tMain (server)' ~ Channel is unrecoverably broken and will be disposed!
I/WindowManager( 60): WIN DEATH: Window{406ec328 org.paceacademy/org.paceacade
my.YachtMain paused=false}
D/dalvikvm( 60): GC_CONCURRENT freed 910K, 51% free 4257K/8519K, external 2269
K/3469K, paused 6ms+5ms
D/dalvikvm( 60): GC_FOR_MALLOC freed 777K, 51% free 4190K/8519K, external 2269
K/3469K, paused 48ms
W/InputManagerService( 60): Got RemoteException sending setActive(false) notif
ication to pid 541 uid 10031
I/ActivityManager( 60): Starting: Intent { act=android.intent.action.MAIN cat=
[android.intent.category.LAUNCHER] flg=0x10200000 cmp=org.paceacademy/.YachtMain
} from pid 132
I/ActivityManager( 60): Start proc org.paceacademy for activity org.paceacadem
y/.YachtMain: pid=558 uid=10031 gids={3003}
I/AdWhirl SDK( 558): Creating adWhirlManager...
D/AdWhirl SDK( 558): Locale is: en_US
D/AdWhirl SDK( 558): Hashed device ID is: 7d1dd13a2fa91c0ad174cb69a11549a3
I/AdWhirl SDK( 558): Finished creating adWhirlManager
D/AdWhirl SDK( 558): Prefs{dc2a61bb5f3e4b09bfe540337f6b3169}: {"config": "{"ext
ra":{"location_on":0,"background_color_rgb":{"red":255,"green":255,"blue":255,"a
lpha":1},"text_color_rgb":{"red":0,"green":0,"blue":0,"alpha":1},"cycle_time":30
,"transition":8},"rations":[{"nid":"e3b8017b430843b5a029b3ec810578f6","type":1,"
nname":"admob","weight":50,"priority":1,"key":"a14d79bee7a2b3a"},{"nid":"c59db85
5942646f899f70286a04a9819","type":6,"nname":"millennial","weight":50,"priority":
2,"key":"37786"}]}
D/AdWhirl SDK( 558): ", "timestamp": 1300642235582}
I/AdWhirl SDK( 558): Using stored config data
D/AdWhirl SDK( 558): Received jsonString: {"extra":{"location_on":0,"background
_color_rgb":{"red":255,"green":255,"blue":255,"alpha":1},"text_color_rgb":{"red"
:0,"green":0,"blue":0,"alpha":1},"cycle_time":30,"transition":8},"rations":[{"ni
d":"e3b8017b430843b5a029b3ec810578f6","type":1,"nname":"admob","weight":50,"prio
rity":1,"key":"a14d79bee7a2b3a"},{"nid":"c59db855942646f899f70286a04a9819","type
":6,"nname":"millennial","weight":50,"priority":2,"key":"37786"}]}
I/AdWhirl SDK( 558): Rotating Ad
D/AdWhirl SDK( 558): Dart is <72.10939745113429> of <100.0>
I/ActivityManager( 60): Displayed org.paceacademy/.YachtMain: +1s263ms
D/AdWhirl SDK( 558): Showing ad:
D/AdWhirl SDK( 558): nid: c59db855942646f899f70286a04a9819
D/AdWhirl SDK( 558): name: millennial
D/AdWhirl SDK( 558): type: 6
D/AdWhirl SDK( 558): key: 37786
D/AdWhirl SDK( 558): key2:
D/AdWhirl SDK( 558): Valid adapter, calling handle()
D/MillennialMediaAdSDK( 558): New MMAdView Started
I/MillennialMediaAdSDK( 558): Activity: ActivityInfo{40532bf8 com.millennialmed
ia.android.VideoPlayer}
I/MillennialMediaAdSDK( 558): Activity: ActivityInfo{405336e0 com.millennialmed
ia.android.MMAdViewOverlayActivity}
D/MillennialMediaAdSDK( 558): callForAd
D/MillennialMediaAdSDK( 558): Automatic ad fetching is off with -1. You must ma
nually call for ads.
I/MillennialMediaAdSDK( 558): No download in progress.
I/MillennialMediaAdSDK( 558): Pending download?: false
I/MillennialMediaAdSDK( 558): No incomplete downloads.
I/MillennialMediaAdSDK( 558): Last ad name is null. Call for new ad.
D/MillennialMediaAdSDK( 558): *********** Advertising test mode is deprecated.
D/MillennialMediaAdSDK( 558): Calling for an advertisement: http://androidsdk.a
ds.mp.mydas.mobi/getAd.php5?sdkapid=37786&auid=000000000000000&ua=Mozilla%2F5.0+
%28Linux%3B+U%3B+Android+2.3.1%3B+en-us%3B+sdk+Build%2FGSI11%29+AppleWebKit%2F53
3.1+%28KHTML%2C+like+Gecko%29+Version%2F4.0+Mobile+Safari%2F533.1sdk&dm=sdk&dv=A
ndroid2.3.1&mmisdk=4.1.0-11.03.04.a&cachedvideo=true&adtype=MMBannerAdTop
W/dalvikvm( 558): JNI WARNING: jarray 0x4058f070 points to non-array object (Lj
ava/lang/String;)
I/dalvikvm( 558): "WebViewCoreThread" prio=5 tid=10 NATIVE
I/dalvikvm( 558): | group="main" sCount=0 dsCount=0 obj=0x40536d08 self=0x1f0
d48
I/dalvikvm( 558): | sysTid=567 nice=0 sched=0/0 cgrp=default handle=2035328
I/dalvikvm( 558): | schedstat=( 212422317 125415498 40 )
I/dalvikvm( 558): at android.webkit.JWebCoreJavaBridge.sharedTimerFired(Nativ
e Method)
I/dalvikvm( 558): at android.webkit.JWebCoreJavaBridge.sharedTimerFired(Nativ
e Method)
I/dalvikvm( 558): at android.webkit.JWebCoreJavaBridge.fireSharedTimer(JWebCo
reJavaBridge.java:91)
I/dalvikvm( 558): at android.webkit.JWebCoreJavaBridge.handleMessage(JWebCore
JavaBridge.java:108)
I/dalvikvm( 558): at android.os.Handler.dispatchMessage(Handler.java:99)
I/dalvikvm( 558): at android.os.Looper.loop(Looper.java:123)
I/dalvikvm( 558): at android.webkit.WebViewCore$WebCoreThread.run(WebViewCore
.java:629)
I/dalvikvm( 558): at java.lang.Thread.run(Thread.java:1019)
I/dalvikvm( 558):
E/dalvikvm( 558): VM aborting
I/DEBUG ( 540): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *
**
I/DEBUG ( 540): Build fingerprint: 'generic/sdk/generic:2.3.1/GSI11/93351:eng
/test-keys'
I/DEBUG ( 540): pid: 558, tid: 567 >>> org.paceacademy <<<
I/DEBUG ( 540): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr deadd00
d
I/DEBUG ( 540): r0 fffffebc r1 deadd00d r2 00000026 r3 00000000
I/DEBUG ( 540): r4 81da45c8 r5开发者_运维问答 4058f070 r6 81d859ec r7 001f0f48
I/DEBUG ( 540): r8 43868b58 r9 42ddbf1c 10 42ddbf04 fp 4168d82c
I/DEBUG ( 540): ip 81da4728 sp 43867e90 lr afd19375 pc 81d45a02 cpsr 200
00030
I/DEBUG ( 540): #00 pc 00045a02 /system/lib/libdvm.so
I/DEBUG ( 540): #01 pc 000376fc /system/lib/libdvm.so
I/DEBUG ( 540): #02 pc 000399c4 /system/lib/libdvm.so
I/DEBUG ( 540): #03 pc 0003a4a0 /system/lib/libdvm.so
I/DEBUG ( 540): #04 pc 0032b6e6 /system/lib/libwebcore.so
I/DEBUG ( 540): #05 pc 002a4db4 /system/lib/libwebcore.so
I/DEBUG ( 540): #06 pc 001a6146 /system/lib/libwebcore.so
I/DEBUG ( 540): #07 pc 002a5880 /system/lib/libwebcore.so
I/DEBUG ( 540): #08 pc 00359e5e /system/lib/libwebcore.so
I/DEBUG ( 540): #09 pc 0035d336 /system/lib/libwebcore.so
I/DEBUG ( 540): #10 pc 003638ea /system/lib/libwebcore.so
I/DEBUG ( 540): #11 pc 0019f70a /system/lib/libwebcore.so
I/DEBUG ( 540): #12 pc 0019f790 /system/lib/libwebcore.so
I/DEBUG ( 540): #13 pc 001a3d9a /system/lib/libwebcore.so
I/DEBUG ( 540): #14 pc 000d0dca /system/lib/libwebcore.so
I/DEBUG ( 540): #15 pc 000d1b7a /system/lib/libwebcore.so
I/DEBUG ( 540): #16 pc 000d1dee /system/lib/libwebcore.so
I/DEBUG ( 540): #17 pc 000d2dae /system/lib/libwebcore.so
I/DEBUG ( 540): #18 pc 000d31d4 /system/lib/libwebcore.so
I/DEBUG ( 540): #19 pc 000e260a /system/lib/libwebcore.so
I/DEBUG ( 540): #20 pc 000e2634 /system/lib/libwebcore.so
I/DEBUG ( 540): #21 pc 001a8f06 /system/lib/libwebcore.so
I/DEBUG ( 540): #22 pc 000dfcfe /system/lib/libwebcore.so
I/DEBUG ( 540): #23 pc 00271980 /system/lib/libwebcore.so
I/DEBUG ( 540): #24 pc 002719b4 /system/lib/libwebcore.so
I/DEBUG ( 540): #25 pc 000e1a08 /system/lib/libwebcore.so
I/DEBUG ( 540): #26 pc 00272e0a /system/lib/libwebcore.so
I/DEBUG ( 540): #27 pc 000eb132 /system/lib/libwebcore.so
I/DEBUG ( 540): #28 pc 00272de6 /system/lib/libwebcore.so
I/DEBUG ( 540): #29 pc 0027322e /system/lib/libwebcore.so
I/DEBUG ( 540): #30 pc 002732d6 /system/lib/libwebcore.so
I/DEBUG ( 540): #31 pc 00273418 /system/lib/libwebcore.so
I/DEBUG ( 540):
I/DEBUG ( 540): code around pc:
I/DEBUG ( 540): 81d459e0 447a4479 ed0cf7d1 20004c09 ee34f7d1
I/DEBUG ( 540): 81d459f0 447c4808 6bdb5823 d0002b00 49064798
I/DEBUG ( 540): 81d45a00 700a2226 eea0f7d1 0004361f 000451dd
I/DEBUG ( 540): 81d45a10 0005ebd2 fffffebc deadd00d b510b40e
I/DEBUG ( 540): 81d45a20 4c0a4b09 447bb083 aa05591b 6b5bca02
I/DEBUG ( 540):
I/DEBUG ( 540): code around lr:
I/DEBUG ( 540): afd19354 b0834a0d 589c447b 26009001 686768a5
I/DEBUG ( 540): afd19364 220ce008 2b005eab 1c28d003 47889901
I/DEBUG ( 540): afd19374 35544306 d5f43f01 2c006824 b003d1ee
I/DEBUG ( 540): afd19384 bdf01c30 000281a8 ffffff88 1c0fb5f0
I/DEBUG ( 540): afd19394 43551c3d a904b087 1c16ac01 604d9004
I/DEBUG ( 540):
I/DEBUG ( 540): stack:
I/DEBUG ( 540): 43867e50 00000015
I/DEBUG ( 540): 43867e54 afd18407 /system/lib/libc.so
I/DEBUG ( 540): 43867e58 afd4270c /system/lib/libc.so
I/DEBUG ( 540): 43867e5c afd426b8 /system/lib/libc.so
I/DEBUG ( 540): 43867e60 00000000
I/DEBUG ( 540): 43867e64 afd19375 /system/lib/libc.so
I/DEBUG ( 540): 43867e68 001f0d48 [heap]
I/DEBUG ( 540): 43867e6c afd183d9 /system/lib/libc.so
I/DEBUG ( 540): 43867e70 001f0f48 [heap]
I/DEBUG ( 540): 43867e74 0005ebd2 [heap]
I/DEBUG ( 540): 43867e78 4058f070 /dev/ashmem/dalvik-heap (deleted)
I/DEBUG ( 540): 43867e7c 81d859ec /system/lib/libdvm.so
I/DEBUG ( 540): 43867e80 001f0f48 [heap]
I/DEBUG ( 540): 43867e84 afd18437 /system/lib/libc.so
I/DEBUG ( 540): 43867e88 df002777
I/DEBUG ( 540): 43867e8c e3a070ad
I/DEBUG ( 540): #00 43867e90 00000001
I/DEBUG ( 540): 43867e94 81d37701 /system/lib/libdvm.so
I/DEBUG ( 540): #01 43867e98 00000001
I/DEBUG ( 540): 43867e9c 81d399c9 /system/lib/libdvm.so
I/BootReceiver( 60): Copying /data/tombstones/tombstone_01 to DropBox (SYSTEM_
TOMBSTONE)
D/Zygote ( 32): Process 558 terminated by signal (11)
E/InputDispatcher( 60): channel '406df298 org.paceacademy/org.paceacademy.Yach
tMain (server)' ~ Consumer closed input channel or an error occurred. events=0x
8
E/InputDispatcher( 60): channel '406df298 org.paceacademy/org.paceacademy.Yach
tMain (server)' ~ Channel is unrecoverably broken and will be disposed!
D/dalvikvm( 60): GC_FOR_MALLOC freed 800K, 51% free 4213K/8519K, external 2269
K/3469K, paused 80ms
I/ActivityManager( 60): Process org.paceacademy (pid 558) has died.
I/WindowManager( 60): WIN DEATH: Window{406df298 org.paceacademy/org.paceacade
my.YachtMain paused=false}
D/dalvikvm( 60): GC_FOR_MALLOC freed 773K, 51% free 4184K/8519K, external 2269
K/3469K, paused 51ms
W/InputManagerService( 60): Got RemoteException sending setActive(false) notif
ication to pid 558 uid 10031
There are two good news about this.
- this does only affect the Millennial adapter -- all others are working fine
- it does only occur in the emulator and only for 2.3. On real devices it is not an issue.
You can read this Millennial Media's Android developer wiki. They answer the question "Why is my app crashing in the Android 2.3 emulator?" the following way:
The MMAdView class relies upon the WebView’s javascript to java bridge. Unfortunately, this bridge is broken in the 2.3 implementation of the Android emulator and will likely never be fixed. As an alternative you can do testing with other versions of the emulator or use a physical Android 2.3 device. http://code.google.com/p/android/issues/detail?id=12987
To work around this and allow me to test my app in the 2.3 emulator without the need to deactivate Millennial in the AdWhirl web interface I've patched AdWhirl's Millennial adapter to skip gracefully in the 2.3 emulator. This can be done the following way:
- use 7-Zip or a similar tool to remove
com.adwhirl.adapters.MillennialAdapter
from theAdWhirlSDK_Android_2.6.3.jar
. - Download the java file for the
MillennialAdapter
from the AdWhirl code repository and place it in your project in the correct folder structure (com.adwhirl.adapters
). - Adjust the beginning of the adapter´s
handle()
method, so that it looks like the following:
@Override public void handle() { Log.d(AdWhirlUtil.ADWHIRL, "Using GoodNews specific MillennialAdapter"); /* * prevent 2.3 emulator from crashing */ if ("google_sdk".equals(Build.PRODUCT) && "9".equals(Build.VERSION.SDK)) { Log.d(AdWhirlUtil.ADWHIRL, "Detected Gingerbread Emulator"); throw new RuntimeException( "MillenialAdapter not supported on Gingerbread emulator"); } ...
If you now start your app in the 2.3 emulator AdWhirl will rollover whenever trying to request a Gingerbread ad and use the next network from your backfill list. If you start your app e.g. in a 2.2 emulator or on a real device the Millennial ads will show up.
精彩评论