【发布时间】:2020-06-21 07:36:50
【问题描述】:
我想在用户通过应用内购买帮助购买移除广告包后禁用 Admob 广告。我想删除插页式广告和奖励广告,下面是插页式广告和奖励广告的代码:
InterstitialAd myInterstitial = InterstitialAd(
adUnitId: Platform.isIOS ? ios_ads : android_ads,
listener: (MobileAdEvent event) {
print("InterstitialAd event is $event");
},
);
myInterstitial
..load()
..show(
anchorType: AnchorType.bottom,
anchorOffset: 0.0,
);
激励广告
RewardedVideoAd.instance.listener =
(RewardedVideoAdEvent event, {String rewardType, int rewardAmount}) {
if (event == RewardedVideoAdEvent.rewarded) {
}
};
RewardedVideoAd.instance.load(adUnitId: Platform.isIOS ? ios_ads : android_ads,
targetingInfo: targetingInfo).then((v){
print("log "+v.toString());
if(v){
RewardedVideoAd.instance.show();
}
});
【问题讨论】:
-
任何人都可以帮助我仍然找不到解决方案....
标签: flutter admob in-app-purchase