SDK Integration
How to setup the Roku Nami SDK
Last updated
How to setup the Roku Nami SDK
Last updated
Please make sure you have completed the setup of your app on the Nami Control Center for all these steps to be successful.
Adding Nami to your Roku channel has a few steps:
Add the SDK to your project
Configure the Nami SDK
Show a paywall
We'll run through each of these below.
The provides a reference example for using the Nami Roku SDK.
Download the file from the GitHub repository. You can put it in the same level as application’s MainScene component file.
Include this file in MainScene component by pasting the following line in the script
section of scene’s XML file:
<script type="text/brightscript" uri="NamiSDKIntegrationHelper.brs" />
Add a appData.json
to your project if you don't have one, with the following keys.
In addition, you can configure the SDK by setting some of the addition namiConfig
parameters.
To show a paywall, launch a campaign.
Provide the Nami SDK your customer identifier for a user to link their devices for cross-platform entitlements, subscriber analytics, audience targeting, and more.
Attach a user's identity when they register or signs-in to their account in your app.
You can disconnect the association between a user's device and a customer identifier.
For example, do this when the user logs out of their account within your app.
In the sample NamiSDKIntegrationHelper.brs
implementation, the Nami SDK is configured using the App Platform ID value(s) found in appData.json
To set up or find your Roku App Platform ID(s), see the the as setup for Roku.
Each app will need a Roku integration . In this scenario, you will end up with two App Platform IDs for each environment that can be put in their respective keys in the appData.json