Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allows to send an user identifier to be used in Validating Server-Side Verification (SSV) Callbacks #657

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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
1 participant