В моем приложении есть видео с наградами от admob.Проблема в том, что когда я нажимаю текстовое представление, чтобы показать объявление, ничего не происходит.
public RewardedVideoAd mRewardedVideoAd;
MobileAds.initialize(this, "ca-app-pub-3940256099942544/5224354917");
// Use an activity context to get the rewarded video instance.
mRewardedVideoAd = MobileAds.getRewardedVideoAdInstance(this);
mRewardedVideoAd.setRewardedVideoAdListener(this);
tip.setOnClickListener( new View.OnClickListener() {
@Override
public void onClick(View v) {
loadRewardedVideo();
}
});
и переопределения ...
@Override
public void onRewardedVideoAdLoaded() {
System.out.println("Loaded()");
}
@Override
public void onRewardedVideoAdOpened() {
System.out.println("Opened");
}
@Override
public void onRewardedVideoStarted() {
System.out.println("Started");
}
@Override
public void onRewardedVideoAdClosed() {
System.out.println("Closed");
}
@Override
public void onRewarded(RewardItem rewardItem) {
System.out.println("reward");
}
@Override
public void onRewardedVideoAdLeftApplication() {
System.out.println("left");
}
@Override
public void onRewardedVideoAdFailedToLoad(int i) {
System.out.println("failed");
}
@Override
public void onRewardedVideoCompleted() {
}
private void loadRewardedVideo() {
mRewardedVideoAd.loadAd("ca-app-pub-3940256099942544/5224354917",
new AdRequest.Builder().build());
}
я что-то пропустил?что здесь не так?спасибо.
вывод
I/Ads: This request is sent from a test device.
D/dalvikvm: GC_FOR_ALLOC freed 1654K, 22% free 7281K/9236K, paused 9ms, total 10ms
I/Ads: SDK version: afma-sdk-a-v15000000.15000000.0
D/dalvikvm: GC_FOR_ALLOC freed 1478K, 27% free 6773K/9236K, paused 8ms, total 8ms
D/dalvikvm: GC_FOR_ALLOC freed 1109K, 25% free 6979K/9236K, paused 10ms, total 11ms
D/EGL_emulation: eglMakeCurrent: 0xb7aa9b10: ver 2 0
E/EGL_emulation: tid 1994: eglSurfaceAttrib(1199): error 0x3009 (EGL_BAD_MATCH)
W/HardwareRenderer: Backbuffer cannot be preserved
W/AwContents: nativeOnDraw failed; clearing to background color.
I/ExoPlayerImpl: Init ExoPlayerLib/2.4.2 [generic_x86, Android SDK built for x86, unknown, 19]
I/chromium: [INFO:async_pixel_transfer_manager_android.cc(56)] Async pixel transfers not supported
D/gralloc_ranchu: gralloc_alloc: Creating ashmem region of size 589824
D/gralloc_ranchu: gralloc_alloc: Creating ashmem region of size 98304
D/gralloc_ranchu: gralloc_alloc: Creating ashmem region of size 98304
D/MetadataUtil: Skipped unknown metadata entry: gsst
Skipped unknown metadata entry: gstd
D/MediaCodecVideoRenderer: FalseCheck [legacyFrameSize, 640x360] [generic_x86, Android SDK built for x86, unknown, 19]
FalseCheck [legacyFrameSize, 640x360] [generic_x86, Android SDK built for x86, unknown, 19]
I/OMXClient: Using client-side OMX mux.
I/SoftAAC2: Reconfiguring decoder: 0->44100 Hz, 0->2 channels
D/dalvikvm: GC_FOR_ALLOC freed 1284K, 25% free 6998K/9236K, paused 16ms, total 16ms
I/System.out: Loaded()
Я тоже тестировал на реальном устройстве, и тоже ничего не происходит.