In short: We use reacte native on android and use the native VideoView to show videos with ads using the Google IMA SDK for android. The video plays, the ads play, but the Webview containing "read more" and "skip ad" is not added to the view hierarchy. When I use the exact same code in a native app. Everything works.
Some more context:
02-01 17:15:30.742 20258-20258/com.videoplayer I/chromium: [INFO:CONSOLE(741)] " [ 53.222s] [ima.vast.VideoAdEventTracker] dispatching event firstquartile", source: https://imasdk.googleapis.com/native/core/3.44.0/native_bridge_debug__nl.js (741)
02-01 17:15:30.745 20258-20258/com.videoplayer I/SDK_LOG:ima.vast.VideoAdEventTracker: dispatching event firstquartile
02-01 17:15:30.762 20258-20258/com.videoplayer I/chromium: [INFO:CONSOLE(741)] " [ 53.241s] [ima.vast.VastAdServerReporter] Reporting urls for event : firstquartile", source: https://imasdk.googleapis.com/native/core/3.44.0/native_bridge_debug__nl.js (741)
02-01 17:15:30.764 20258-20258/com.videoplayer I/chromium: [INFO:CONSOLE(741)] " [ 53.243s] [ima.vast.VastAdServerReporter] Pinging reporting URL: https://pubads.g.doubleclick.net/pagead/conversion/?ai=BodGfHD1zWuSp...shortend....3D33%26pngs%3D9,14,15s&gv=atos%3D0,0,0,0,0%26amtos%3D0,0,0,0,0%26avt%3D0%26davs%3D0%26dafvs%3D0%26ss%3D1%26t%3D1517501725661&sdkv=h.3.44.0%2Fn.android.3.7.4%2Fcom.videoplayer", source: https://imasdk.googleapis.com/native/core/3.44.0/native_bridge_debug__nl.js (741)
02-01 17:15:30.765 20258-20258/com.videoplayer I/chromium: [INFO:CONSOLE(741)] " [ 53.243s] [ima.vast.VastAdServerReporter] Pinging reporting URL: https://pubads.g.doubleclick.net/pagead/conversion/?ai=B2oRCHD1zWu7CE4_Og...shortend....%26ss%3D1%26t%3D1517501725661&sdkv=h.3.44.0%2Fn.android.3.7.4%2Fcom.videoplayer", source: https://imasdk.googleapis.com/native/core/3.44.0/native_bridge_debug__nl.js (741)
- When inspecting the view it's clear the webview is not added to the view-hierarchy.
Relevant code from the React Native component:
@SuppressLint("ViewConstructor")
public class ReactVideoViewWithAds extends FrameLayout implements
LifecycleEventListener {
private VideoPlayerWithAdPlayback mVideoPlayerWithAdPlayback;
private RelativeLayout mCompanionAdSlot;
private VideoPlayerController mVideoPlayerController;
public ReactVideoViewWithAds(ThemedReactContext themedReactContext) {
super(themedReactContext);
createViews();
themedReactContext.addLifecycleEventListener(this);
}
private void createViews() {
FrameLayout.LayoutParams companionAdLayoutParams = new FrameLayout.LayoutParams(
FrameLayout.LayoutParams.MATCH_PARENT,
(int) (50 * getResources().getSystem().getDisplayMetrics().density));
companionAdLayoutParams.gravity = Gravity.CENTER_HORIZONTAL;
mCompanionAdSlot = new RelativeLayout(getContext());
mCompanionAdSlot.setBackgroundColor(Color.BLUE);
addView(mCompanionAdSlot, companionAdLayoutParams);
//player with ad playback
FrameLayout.LayoutParams layoutParams = new FrameLayout.LayoutParams(
FrameLayout.LayoutParams.MATCH_PARENT,
FrameLayout.LayoutParams.MATCH_PARENT);
mVideoPlayerWithAdPlayback = new VideoPlayerWithAdPlayback(getContext());
addView(mVideoPlayerWithAdPlayback, layoutParams);
initPlayer();
}
private void initPlayer() {
mVideoPlayerController = new VideoPlayerController(
getContext(),
mVideoPlayerWithAdPlayback,
null,
null,
"nl",
mCompanionAdSlot,
null);
}--
You received this message because you are subscribed to the Google Groups "Interactive Media Ads SDK" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ima-sdk+unsubscribe@googlegroups.com.
To post to this group, send email to ima...@googlegroups.com.
Visit this group at https://groups.google.com/group/ima-sdk.
For more options, visit https://groups.google.com/d/optout.