`fakeForAdDebugLog` 在 AdMob RewardedAd 的 ServerSideVerification 中。

huangapple go评论130阅读模式
英文:

fakeForAdDebugLog on ServerSideVerification for AdMob RewardedAd

问题

以下是翻译好的内容:

悬赏广告的SSV URL回调在UserId和CustomData上都被调用了假数据,而且它始终是"fakeForAdDebugLog"。

首先,我使用以下代码加载了悬赏广告:

  1. Log.e("SDL-Ads", "SETTING UP REWARDED");
  2. rewardedAd = new RewardedAd(mSpawner, adid);
  3. ServerSideVerificationOptions serverSideVerificationOptions = new ServerSideVerificationOptions.Builder().setUserId(user).build();
  4. rewardedAd.setServerSideVerificationOptions(serverSideVerificationOptions);
  5. AdRequest adRequest = new AdRequest.Builder()
  6. .addTestDevice("F3E00308CE83B95F00BF326CB047EBDD")
  7. .build();
  8. Log.e("SDL-Ads", "UserID: "+serverSideVerificationOptions.getUserId());
  9. rewardedAd.loadAd(adRequest, new RewardedAdLoadCallback() {
  10. @Override
  11. public void onRewardedAdLoaded() {
  12. Log.e("SDL-Ads", "REWARDED LOADED");
  13. me.Firebase_RewardedLoaded(1);
  14. }
  15. @Override
  16. public void onRewardedAdFailedToLoad(LoadAdError adError) {
  17. Log.e("SDL-Ads", "REWARDED FAILED");
  18. me.rewardedAd = null;
  19. me.Firebase_RewardedLoaded(0);
  20. }
  21. });

然后,我使用以下代码显示广告:

  1. Log.e("SDL-Ads", "WILL SHOW REWARDED");
  2. me.rewardedAd.show(mSpawner, new RewardedAdCallback() {
  3. @Override
  4. public void onUserEarnedReward(RewardItem ri) {
  5. Log.e("SDL-Ads", "onUserEarnedReward");
  6. }
  7. @Override
  8. public void onRewardedAdClosed() {
  9. Log.e("SDL-Ads", "onRewardedAdClosed() RELOAD");
  10. me.rewardedAd = null;
  11. me.Firebase_RewardedLoaded(-1);
  12. }
  13. });

应用端的工作非常顺利,onUserEarnedReward得到了适当的调用,一切正常。然而,当URL被调用时,无论上面的user的值是什么,userId字段始终如下:

  1. [user_id] => fakeForAdDebugLog

有什么线索吗?

英文:

The SSV URL Callback for my rewarded ads gets called with fake data on both UserId and CustomData, and its always "fakeForAdDebugLog".

First I load the rewardedAd with this code

  1. Log.e("SDL-Ads", "SETTING UP REWARDED");
  2. rewardedAd = new RewardedAd(mSpawner, adid);
  3. ServerSideVerificationOptions serverSideVerificationOptions = new ServerSideVerificationOptions.Builder().setUserId(user).build();
  4. rewardedAd.setServerSideVerificationOptions(serverSideVerificationOptions);
  5. AdRequest adRequest = new AdRequest.Builder()
  6. .addTestDevice("F3E00308CE83B95F00BF326CB047EBDD")
  7. .build();
  8. Log.e("SDL-Ads", "UserID: "+serverSideVerificationOptions.getUserId());
  9. rewardedAd.loadAd(adRequest, new RewardedAdLoadCallback() {
  10. @Override
  11. public void onRewardedAdLoaded() {
  12. Log.e("SDL-Ads", "REWARDED LOADED");
  13. me.Firebase_RewardedLoaded(1);
  14. }
  15. @Override
  16. public void onRewardedAdFailedToLoad(LoadAdError adError) {
  17. Log.e("SDL-Ads", "REWARDED FAILED");
  18. me.rewardedAd = null;
  19. me.Firebase_RewardedLoaded(0);
  20. }
  21. });

Then I show it with this one

  1. Log.e("SDL-Ads", "WILL SHOW REWARDED");
  2. me.rewardedAd.show(mSpawner, new RewardedAdCallback() {
  3. @Override
  4. public void onUserEarnedReward(RewardItem ri) {
  5. Log.e("SDL-Ads", "onUserEarnedReward");
  6. }
  7. @Override
  8. public void onRewardedAdClosed() {
  9. Log.e("SDL-Ads", "onRewardedAdClosed() RELOAD");
  10. me.rewardedAd = null;
  11. me.Firebase_RewardedLoaded(-1);
  12. }
  13. });

The app side of things works like a charm, onUserEarnedReward gets properly called and everything. However, when the url gets called, this is what the userId field is regardless of the value of user above:

  1. [user_id] => fakeForAdDebugLog

Any clues?

答案1

得分: 1

我们遇到了相同的问题。原来(假设您已经启用了开发者选项),设备已启用了网络跟踪功能,因此用户 ID 和 custom_data 已更改为 fakeForAdDebugLog。这是为了隐私保护而设计的。请禁用网络跟踪,然后您应该可以正常运行。

英文:

We had the same issue. Turns out (assuming you have developer options enabled) the device is enabled with Network Tracing feature , so user id and custom_data changed to fakeForAdDebugLog. It is by design for privacy protection. Please disable the Network Tracing and you should be good to go

huangapple
  • 本文由 发表于 2020年10月17日 05:05:01
  • 转载请务必保留本文链接:https://go.coder-hub.com/64396379.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定