question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

🐛 No way to set user ID for Rewarded Ads

See original GitHub issue

Bug report

I’m trying to migrate from firebase_admob to this new plugin. I’m only using RewardedAds & handle rewards on server side. It seems that there is no way to set the userId to give the reward on server side.

Expected behavior

We could do this on the previous version :

RewardedAd.instance.userId = [...]

I didn’t find any reference to the field “userId” in the codebase nor in any example.

Flutter doctor

Run flutter doctor and paste the output below:

Click To Expand
[✓] Flutter (Channel stable, 2.0.1, on macOS 11.2.2 20D80 darwin-x64, locale en-FR)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.1)
[✓] Xcode - develop for iOS and macOS
[✓] Chrome - develop for the web
[✓] Android Studio (version 3.4)
[✓] VS Code (version 1.54.1)
[✓] Connected device (1 available)

• No issues found!

Flutter dependencies

Run flutter pub deps -- --style=compact and paste the output below:

Click To Expand
Dart SDK 2.12.0
Flutter SDK 2.0.1
[hidden] 1.3.2

dependencies:
- app_review 2.1.0-nullsafety.0 [http intl package_info url_launcher flutter]
- audioplayers 0.17.4 [uuid path_provider flutter flutter_web_plugins]
- cached_network_image 2.5.1 [flutter flutter_cache_manager octo_image]
- device_info 2.0.0 [flutter device_info_platform_interface]
- firebase_analytics 7.1.1 [firebase_analytics_platform_interface firebase_analytics_web firebase_core flutter meta]
- firebase_core 1.0.1 [firebase_core_platform_interface firebase_core_web flutter meta]
- firebase_messaging 9.0.0 [firebase_core firebase_core_platform_interface firebase_messaging_platform_interface firebase_messaging_web flutter meta]
- flare_flutter 2.0.6 [flutter flare_dart meta]
- flutter 0.0.0 [characters collection meta typed_data vector_math sky_engine]
- flutter_facebook_login 3.0.0 [flutter collection]
- flutter_local_notifications 5.0.0-nullsafety.1 [flutter flutter_local_notifications_platform_interface platform timezone]
- flutter_localizations 0.0.0 [flutter intl characters clock collection meta path typed_data vector_math]
- flutter_mobx 1.1.0+2 [mobx flutter]
- flutter_svg 0.21.0-nullsafety.0 [flutter meta path_drawing vector_math xml]
- google_mobile_ads 0.11.0+2 [meta flutter]
- google_sign_in 4.5.9 [google_sign_in_platform_interface flutter meta google_sign_in_web]
- http 0.13.0 [http_parser meta path pedantic]
- in_app_purchase 0.3.5+1 [async collection flutter json_annotation meta]
- launch_review 2.0.0 [flutter]
- mobx 1.2.1+4 [meta]
- package_info 0.5.0-nullsafety [flutter]
- provider 4.3.3 [collection flutter nested]
- rubber 0.4.0 [flutter after_layout]
- sentry 4.1.0-nullsafety.0 [http meta stack_trace uuid]
- share 0.6.5+4 [meta mime flutter]
- shared_preferences 2.0.3 [meta flutter shared_preferences_platform_interface shared_preferences_linux shared_preferences_macos shared_preferences_web shared_preferences_windows]
- sign_in_with_apple 2.5.4 [meta flutter]
- socket_io_client 0.9.12 [logging socket_io_common]
- timeago 2.0.30
- uni_links 0.4.0 [flutter]
- url_launcher 6.0.2 [flutter url_launcher_platform_interface url_launcher_linux url_launcher_macos url_launcher_windows url_launcher_web]

dev dependencies:
- build_runner 1.11.5 [args async build build_config build_daemon build_resolvers build_runner_core code_builder collection crypto dart_style glob graphs http_multi_server io js logging meta mime path pedantic pool pub_semver pubspec_parse shelf shelf_web_socket stack_trace stream_transform timing watcher web_socket_channel yaml]
- flutter_launcher_icons 0.9.0 [args image path yaml]
- flutter_native_splash 1.0.3 [yaml image xml]
- flutter_test 0.0.0 [flutter test_api path fake_async clock stack_trace vector_math async boolean_selector characters charcode collection matcher meta source_span stream_channel string_scanner term_glyph typed_data]
- mobx_codegen 1.1.2 [analyzer build build_resolvers meta mobx path source_gen]

transitive dependencies:
- _fe_analyzer_shared 14.0.0 [meta]
- after_layout 1.0.7+2 [flutter]
- analyzer 0.41.2 [_fe_analyzer_shared args cli_util collection convert crypto glob meta package_config path pub_semver source_span watcher yaml]
- archive 3.1.2 [crypto path]
- args 2.0.0
- async 2.5.0 [collection]
- boolean_selector 2.1.0 [source_span string_scanner]
- build 1.6.2 [analyzer async convert crypto glob logging meta path]
- build_config 0.4.6 [checked_yaml json_annotation meta path pubspec_parse yaml]
- build_daemon 2.1.9 [built_collection built_value http_multi_server logging pedantic path pool shelf shelf_web_socket stream_transform watcher web_socket_channel]
- build_resolvers 1.5.3 [analyzer build crypto graphs logging meta path package_config pool pub_semver]
- build_runner_core 6.1.10 [async build build_config build_resolvers collection convert crypto glob graphs logging meta path package_config pedantic pool timing watcher yaml]
- built_collection 5.0.0
- built_value 8.0.2 [built_collection collection fixnum]
- characters 1.1.0
- charcode 1.2.0
- checked_yaml 1.0.4 [json_annotation source_span yaml]
- cli_util 0.3.0 [meta path]
- clock 1.1.0
- code_builder 3.6.0 [built_collection built_value collection matcher meta]
- collection 1.15.0
- convert 2.1.1 [charcode typed_data]
- crypto 3.0.0 [collection typed_data]
- dart_style 1.3.12 [analyzer args path pub_semver source_span]
- device_info_platform_interface 2.0.1 [flutter meta plugin_platform_interface]
- fake_async 1.2.0 [clock collection]
- ffi 1.0.0
- file 6.1.0 [meta path]
- firebase 9.0.0 [http http_parser js]
- firebase_analytics_platform_interface 1.1.0 [flutter meta]
- firebase_analytics_web 0.2.0+1 [firebase firebase_analytics_platform_interface flutter flutter_web_plugins meta]
- firebase_core_platform_interface 4.0.0 [flutter meta plugin_platform_interface]
- firebase_core_web 1.0.1 [firebase_core_platform_interface flutter flutter_web_plugins js meta]
- firebase_messaging_platform_interface 2.0.0 [firebase_core flutter meta plugin_platform_interface]
- firebase_messaging_web 1.0.1 [firebase_core firebase_core_web firebase_messaging_platform_interface flutter flutter_web_plugins js meta]
- fixnum 1.0.0
- flare_dart 2.3.4
- flutter_blurhash 0.5.0 [flutter meta]
- flutter_cache_manager 2.1.2 [flutter path_provider uuid http path sqflite pedantic clock file rxdart image]
- flutter_local_notifications_platform_interface 3.0.0-nullsafety.4 [flutter plugin_platform_interface]
- flutter_web_plugins 0.0.0 [flutter js characters collection meta typed_data vector_math]
- glob 2.0.0 [async collection file path pedantic string_scanner]
- google_sign_in_platform_interface 1.1.2 [flutter meta quiver]
- google_sign_in_web 0.9.2 [google_sign_in_platform_interface flutter flutter_web_plugins meta js]
- graphs 0.2.0
- http_multi_server 2.2.0 [async]
- http_parser 4.0.0 [charcode collection source_span string_scanner typed_data]
- image 3.0.1 [archive meta xml]
- intl 0.17.0 [clock path]
- io 0.3.5 [meta path string_scanner]
- js 0.6.3
- json_annotation 3.1.1
- logging 0.11.4
- matcher 0.12.10 [stack_trace]
- meta 1.3.0
- mime 0.9.7
- nested 1.0.0 [flutter]
- octo_image 0.3.0 [flutter flutter_blurhash]
- package_config 1.9.3 [path charcode]
- path 1.8.0
- path_drawing 0.5.0-nullsafety.0 [vector_math meta path_parsing flutter]
- path_parsing 0.2.0-nullsafety.0 [vector_math meta]
- path_provider 2.0.1 [flutter path_provider_platform_interface path_provider_macos path_provider_linux path_provider_windows]
- path_provider_linux 2.0.0 [path xdg_directories path_provider_platform_interface flutter]
- path_provider_macos 2.0.0 [flutter]
- path_provider_platform_interface 2.0.1 [flutter meta platform plugin_platform_interface]
- path_provider_windows 2.0.0 [path_provider_platform_interface meta path flutter ffi win32]
- pedantic 1.11.0
- petitparser 4.0.2 [meta]
- platform 3.0.0
- plugin_platform_interface 2.0.0 [meta]
- pool 1.5.0 [async stack_trace]
- process 4.1.0 [file path platform]
- pub_semver 2.0.0 [collection]
- pubspec_parse 0.1.8 [checked_yaml json_annotation pub_semver yaml]
- quiver 2.1.5 [matcher meta]
- rxdart 0.25.0
- shared_preferences_linux 2.0.0 [flutter file meta path path_provider_linux shared_preferences_platform_interface]
- shared_preferences_macos 2.0.0 [shared_preferences_platform_interface flutter]
- shared_preferences_platform_interface 2.0.0 [flutter]
- shared_preferences_web 2.0.0 [shared_preferences_platform_interface flutter flutter_web_plugins meta]
- shared_preferences_windows 2.0.0 [shared_preferences_platform_interface flutter file meta path path_provider_platform_interface path_provider_windows]
- shelf 1.0.0 [async collection http_parser path stack_trace stream_channel]
- shelf_web_socket 0.2.4+1 [shelf stream_channel web_socket_channel]
- sky_engine 0.0.99
- socket_io_common 0.9.2 [logging]
- source_gen 0.9.10+3 [analyzer async build dart_style glob meta path pedantic source_span]
- source_span 1.8.0 [charcode collection path term_glyph]
- sqflite 2.0.0+2 [flutter sqflite_common path]
- sqflite_common 2.0.0+1 [synchronized path meta]
- stack_trace 1.10.0 [path]
- stream_channel 2.1.0 [async]
- stream_transform 2.0.0
- string_scanner 1.1.0 [charcode source_span]
- synchronized 3.0.0
- term_glyph 1.2.0
- test_api 0.2.19 [async boolean_selector collection meta path source_span stack_trace stream_channel string_scanner term_glyph matcher]
- timezone 0.7.0-nullsafety.0 [path]
- timing 0.1.1+3 [json_annotation]
- typed_data 1.3.0 [collection]
- url_launcher_linux 2.0.0 [flutter]
- url_launcher_macos 2.0.0 [flutter]
- url_launcher_platform_interface 2.0.2 [flutter plugin_platform_interface]
- url_launcher_web 2.0.0 [url_launcher_platform_interface meta flutter flutter_web_plugins]
- url_launcher_windows 2.0.0 [flutter]
- uuid 3.0.1 [crypto]
- vector_math 2.1.0
- watcher 1.0.0 [async path pedantic]
- web_socket_channel 1.2.0 [async crypto stream_channel]
- win32 2.0.0 [ffi]
- xdg_directories 0.2.0 [meta path process]
- xml 5.0.2 [collection meta petitparser]
- yaml 3.1.0 [collection source_span string_scanner]

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:4
  • Comments:7

github_iconTop GitHub Comments

1reaction
jjliu15commented, Mar 30, 2021

@Vardiak I just sent #142 out for review. Hope to get it merged in by the end of this week.

0reactions
Hwan-seokcommented, May 25, 2021

Is there any way to set userId dynamically after the ad is initialized? For instance, setUserId

Read more comments on GitHub >

github_iconTop Results From Across the Web

Create a rewarded ad unit - Google AdMob Help
Create a rewarded ad unit · Click Apps in the sidebar. · Select the name of the app you're creating this ad unit...
Read more >
Rewarded ads | iOS - Google Developers
This guide shows you how to integrate rewarded ads from AdMob into an ... ads is to use our dedicated test ad unit...
Read more >
Some of Rewarded Video SSV callback has no user_id
Our server receives SSV callback from Google's servers, and we use user_id which is set in SDK to reward users. We have 2...
Read more >
Rewarded Video Ads - Audience Network - Meta for Developers
Overview · Audience Network SDK requests a rewarded video ad with the following parameters: Unique User ID - an attribute you use to...
Read more >
Rewarded ads - Unity Documentation
To instantiate a rewarded ad, create a new UMSRewardedAd object with your Ad Unit ID. Objective-C#. UMSRewardedAd *rewardedAdUnit = [[UMSRewardedAd ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found