Skip to content

Conversation

@rafaporci
Copy link

Hello,

This PR proposes a simple change in order to permit providing an user identifier before prepare any reward video in order to AdMob send this value when they call account callback Url. Admob suggests to use SSV callbacks to reward the users securely since they call a custom URL providing some details about the occurence when some user see a video. This way we can reward him/her trusting in a call from Admob rather just than trust in a call to API from JavaScript callback.

If you need some aditional information about SVV, you can find it here: https://developers.google.com/admob/android/rewarded-video-ssv.

I'm not a chinese speaker, so if you plan to accept this PR, please help me adding some content to README_CN.md file.

Regards,

@rafaporci
Copy link
Author

Hello,

When a video is watched until the final, Google calls a callback API with the context: video details, reward and user id (this is the reason why we need to set an user identifier through the SDK). This callback URL can be defined in the AdMob account dashboard. More details can be found here: https://developers.google.com/admob/android/rewarded-video-ssv.

@rafaporci
Copy link
Author

Hello Maz!

Have you tried to use the adPresented callback?

`
this.admob.onAdPresent().subscribe((res) => this.handleAdPresented(res));

handleAdPresented(res)
{
    if (res.adType == 'rewardvideo') {
        // here you can present your reward dialog and even give the reward because as fair I know it will be just called when the video finishes.
        // anyway I would just present the dialog and use the server validation callback to give the reward
    }
}`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant