Comments (37)
try debugged onUserEarnedReward event
case 'onUserEarnedReward':
try {
onEventController.add({
RewardedAdEvent.earnedReward: RewardItem.fromJson(call.arguments)
});
} catch(e) {
print(e);
}
I found amount
field is double, but try to parse it with int
I don't know wether amount
always is double, so I try fix it like this.
because I only care whether user skip video or not
try {
onEventController.add({
RewardedAdEvent.earnedReward: RewardItem.fromJson(call.arguments)
});
} catch (e) {
onEventController.add({RewardedAdEvent.earnedReward: null});
}
from native_admob_flutter.
Published v1.2.1 with the fix for it.
from native_admob_flutter.
Can you guys try the latest master and see if it works?
dependencies: native_admob_flutter: git: url: https://github.com/bdlukaa/native_admob_flutter.git
I tried just now but it is still doesn't work.
I still go from loaded
, then I watch, then it fire showed
then once I close it only fire closed
.
flutter: *** Ad Loaded!
flutter: *** Ad showed
flutter: *** Ad closed
I also get this message, not sure if this relevant or not:
Could not signal service com.apple.WebKit.WebContent: 113: Could not find specified service
from native_admob_flutter.
@bdlukaa i am facing this issue on IOS with the test reward ad (version ^1.2.4), same exact code works ok on Android. RewardedAdEvent.closed is called without issues but case RewardedAdEvent.earnedReward is not called.
from native_admob_flutter.
ooh wow. I'll investigate
from native_admob_flutter.
Can you guys try the latest master and see if it works?
dependencies:
native_admob_flutter:
git:
url: https://github.com/bdlukaa/native_admob_flutter.git
from native_admob_flutter.
And if I understand the behavior correctly. In Android, when I finished watching a video Ad and then I close it, it fires
rewarded
first before firingclose
. Is it supposed to be the same behavior in iOS ?
Yes its a correct behavior, rewarded trigger before close event .
from native_admob_flutter.
Sorry but I won't be able to work on this today, only tomorrow!
from native_admob_flutter.
Any update on this issue? I got a bad review for this.
from native_admob_flutter.
Hey, thanks for reporting this issue! Does this happen on Android too? Are you using Rewarded Ads
or Rewarded Interstitial Ads
?
from native_admob_flutter.
Reward Ads - no not on android.
I no just did something like this because I dont want my users to be mad on me:
case RewardedAdEvent.closed: loadNext(); if (Platform.isIOS) onRewarded(); onEvent(); break;
from native_admob_flutter.
Hey! I could not reproduce this issue. What version of the plugin are you using?
from native_admob_flutter.
native_admob_flutter: ^1.2.0
from native_admob_flutter.
I can confirm this is also happening on Android with the latest version!
from native_admob_flutter.
Okay I managed to fix it. Nothing wrong on the platform side. It was just a casting error on the dart side. I'll release a new version with the fix for it soon
from native_admob_flutter.
Thanks man I appreciate it very much 😍💕
Please let me know when new version is out
from native_admob_flutter.
Published v1.2.1 with the fix for it.
I'm facing same issue now , I'm using last version native_admob_flutter: ^1.2.4
from native_admob_flutter.
I don't know what's wrong on the iOS side. It seems to be everything good.
Swift code:
rewardedAd.present(fromRootViewController: (UIApplication.shared.keyWindow?.rootViewController)!) { () in
self.channel.invokeMethod("onUserEarnedReward", arguments: [
"amount": self.rewardedAd.adReward.amount,
"type": self.rewardedAd.adReward.type,
])
}
https://developers.google.com/admob/ios/rewarded-ads#display_the_ad_and_handle_the_reward_event
Kotlin code:
rewardedAd!!.show(activity) { reward ->
channel.invokeMethod("onUserEarnedReward", hashMapOf<String, Any>(
"amount" to reward.amount,
"type" to reward.type
))
}
Dart code:
case 'onUserEarnedReward':
onEventController.add({
RewardedAdEvent.earnedReward: RewardItem.fromJson(call.arguments)
});
break;
Anyone with experience knows what's wrong?
from native_admob_flutter.
What was the wrong at first time you have known about this issue?
I think at version 1.2.1
from native_admob_flutter.
What was the wrong at first time you have known about this issue?
The data parsing from RewardItem.fromJson(call.arguments)
. It was not working on Android too, but I fixed it an it's now working on Android. Idk why it doesn't work on iOS since the implementation is basically the same.
I can't test it on iOS since all the iOS implementation is made from the community. It'd be very helpful someone to help me out.
from native_admob_flutter.
So , can you disabled any data return like data of award , just trigger a event and see if the event trigger or not
from native_admob_flutter.
The fix for it may be vishwajit76@96189d8, can you try his fork? Still, I can't test it because I don't have an Apple env.
from native_admob_flutter.
The fix for it may be vishwajit76@96189d8, can you try his fork? Still, I can't test it because I don't have an Apple env.
okay , give me a full fork repo url.
from native_admob_flutter.
https://github.com/vishwajit76/native_admob_flutter
from native_admob_flutter.
I can't test this fork,
it's gives to me when try initialize MobileAds.initialize
Unhandled Exception: 'package:native_admob_flutter/src/utils.dart': Failed assertion: line 23 pos 10: 'Platform.isAndroid': Android is the only supported platform for now
and also the initialize function refuse this argument rewardedInterstitialAdUnitId
The named parameter 'rewardedInterstitialAdUnitId' isn't defined.
Try correcting the name to an existing named parameter's name, or defining a named parameter with the name 'rewardedInterstitialAdUnitId'.
from native_admob_flutter.
I think I know where this error is coming from. GADAdReward#amount is NSDecimalNumber. It's probably just a parsing issue. I'll keep investigating
from native_admob_flutter.
https://stackoverflow.com/a/28268951/11622876 should be the fix for it.
https://flutter.dev/docs/development/platform-integration/platform-channels#codec
from native_admob_flutter.
Can you guys try the latest master and see if it works?
dependencies: native_admob_flutter: git: url: https://github.com/bdlukaa/native_admob_flutter.git
Okay I will try it today, thanks
from native_admob_flutter.
Hi. Sorry don't mean to push, but any update? I'm behind on a deadline.
from native_admob_flutter.
And if I understand the behavior correctly. In Android, when I finished watching a video Ad and then I close it, it fires rewarded
first before firing close
. Is it supposed to be the same behavior in iOS ?
from native_admob_flutter.
No Problem. Thanks for the reply.
Sorry but I won't be able to work on this today, only tomorrow!
from native_admob_flutter.
Please see #58
from native_admob_flutter.
Any update !! In this issue?
from native_admob_flutter.
@genox-wang thanks for your info. It'll be very helpful
from native_admob_flutter.
@genox-wang thanks for your info. It'll be very helpful
Any plans on including the fix from @genox-wang in the next release?
from native_admob_flutter.
Is there any update to this issue? Any idea when this fix will be released?
from native_admob_flutter.
Published version 1.4.1 that is supposed to fix this issue. Thanks @zhengbomo for the fix for it #85
from native_admob_flutter.
Related Issues (20)
- Native Ad not working - MissingPluginException HOT 35
- MobileAds.initialize issue HOT 3
- The ads I implemented do not show up in AppReview. HOT 2
- Fatal Exception: java.lang.StackOverflowError (Android 9)
- Doesn't work on android 12
- Error MissingPluginException on Android 11 HOT 1
- Banner ads issue HOT 5
- Blinking in Flutter 2.8 HOT 6
- Cancel/reset rewardAd events listener HOT 1
- [iOS] Cannot find an ad network adapter with the name(s): com.google.DummyAdapter.
- Using Interstitial ad with AppOpen ad HOT 2
- [Feature Request] Mute ads at app level HOT 2
- Native Ads are not working anymore
- [QUESTION] Is it necessary to show the openAppAd from the splash screen? HOT 2
- Adaptive banner not getting size properly HOT 2
- Issue: Violation of Families Policy Requirements HOT 3
- Cannot find 'kGADAdSizeBanner' in scope HOT 17
- Not Working on Android 12
- Initializing failed
- Cannot find 'kGADAdSizeBanner' in scope
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from native_admob_flutter.