Rewarded video is a full-screen video ad. Users can get rewards after watching the video. At present, the forms of Pangle rewarded video ads can:
Create an app and reward video ad placement on Pangle platform
Orienation: Select the orientation of the video.
Reward amount: Enter the number of reward items the user will receive. Must be a whole number.
Reward item: Enter the name of reward item the user will receive. Examples: Coins, extra lives
Reward deliver setting：Validate each completed rewarded video ad view by the third-party server and ensure you're only rewarding users who have actually finished watching the video in your app.
Loading an ad is accomplished using the
load() method on the
PAGRewardedAd class. The
load() method requires an ad slot id, an instance object of
PAGRewardedRequest, and a
PAGRewardedAdLoadListener to be notified when ad loading succeeds or fails. The loaded
PAGRewardedAd object is provided as a parameter in the success callback.
PAGRewardedRequest is a Ad Loading Manager. It is recommended to be the member variable of the Activity.
Use the method of PAGRewardedAd to load the ad, and register the PAGRewardedAdLoadListener callback.
This method is invoked when an ad fails to load. It includes an error parameter of type Error that indicates what type of failure occurred. For more information, refer to the ErrorCode section
This method is executed when an ad material is loaded successfully.
Ad event callbacks need to be registered before displaying an ad. Each method in the event callback corresponds to an event in the ad lifecycle.
This method is invoked when the ad is displayed, covering the device's screen.
This method is invoked when the ad is clicked by the user.
This method is invoked when the ad disappears.
The method is invoked when the user should be rewarded.
The method is invoked when the user rewarded failed.
An instance of the PAGRewardedAd object will be returned when the ad is loaded successfully. Call the
show()method of PAGRewardedAd to render the ad and it needs to pass in activity, and it must should be called in the main thread.
Now you have finished the integration. If you wanna test your apps, make sure you use test ads rather than live, production ads. The easiest way to load test ads is to use test mode. It's been specially configured to return test ads for every request, and you're free to use it in your own apps while coding, testing, and debugging.
Refer to the How to add a test device? to add your device to the test devices on Pangle platform.
Note：The Server-side verification is not necessary. Server-side verification acts as an additional layer of validation for rewarded ad views in your app. It’s performed in addition to the standard client-side callback. You can use server-side verification to validate each completed rewarded video ad view and ensure you're only rewarding users who have actually finished watching the video in your app.
The server-side verification callback will append query parameters to your postback url describing the rewarded video interaction:
signSignature of the request
Signature of the request guarantees security
Unique transaction ID for completing viewing the ad
number of rewards
Pangle platform configuration
Name of rewards
Pangle platform configuration
Call SDK input and pass-through，leave it empty if not needed.
appSecurityKey: The key you get for adding rewarded video ad code bit on the Pangle Network
transId: transaction id
Returns json data with the following fields:
determines the result, whether to award or not