Google PAL
The fl-google-pal library integrates with Google PAL library to enable publishers make a direct call to monetize Roku Applications.
Setup
To load the framework, add the following to manifest
:
bs_libs_required=roku_ads_lib,googleima3
Usage
Create Google PAL
In order to create the Google PAL intance you need to use the factory.
Create googlePal instance
m.googlePal = FLGooglePALFactory().googlePAL()
Get Nonce
In order to get the Nonce from Google PAL you need to call the method getNonce
from the googlePal
instance, and pass it the context and the callback function that will be used to return the value of Nonce once Google PAL return it.
Get Google PAL Nonce
m.googlePal.getNonce(m.top, "onNonceChange")
sub onNonceChange(nonce as String)
? 'Nonce: ', nonce
end sub
Send Playback Start
In order to notify to Google server that playback is started you need to call the method sendPlaybackStart
without any parameters.
Send Playback Start
m.googlePal.sendPlaybackStart()
Send Playback End
In order to notify to Google server that playback is ended you need to call the method sendPlaybackEnd
without any parameters.
Send Playback End
m.googlePal.sendPlaybackEnd()