Showing the Gameball widget on your mobile application is slightly different than showing it on the website. You have two options; first, if you want to design your customer interface, you will use our set of REST APIs. To know more information, you can use the Configurations API 👑. The other option as this section elaborates, is through using our react native SDK. Using the SDK, you can open the Gameball customer profile from a button in your app, programmatically when someone does something, or from a persistent button that sits over your app’s UI. When you trigger the Gameball customer profile, your customer is presented with a home screen. This is configurable inside Gameball to change how it looks and what’s presented. From there, your customer can check his progress across different Gameball programs as per your configurations. To show the Gameball customer profile that contains the customer details, customer reward campaigns, and the leaderboard use the below steps.Documentation Index
Fetch the complete documentation index at: https://docs.gameball.co/llms.txt
Use this file to discover all available pages before exploring further.
Show as Standalone Screen
Show as Modal
Boolean value used to Indicates if you want to show the widget in modal view
Specify if you want the widget to open on a specific view. See available values
Set to true to stop widget navigation otherwise leave as null
Usage
Class component
Functional component
Advanced Techniques: Deep Links
In certain scenarios, where you offer a product as a free reward, you might want to showcase this product within the Gameball widget along with a deep link. When customers click on the deep link, they will be seamlessly redirected to the product page within your app, where they can obtain more information and take further action. To enable this functionality, you need to follow the steps outlined below.- Create a custom Gameball widget that is based on the default widget and implemented as a ForwardRefRenderFunction.
- Override the WebView’s ‘onShouldStartLoadWithRequest’ event with a customized implementation.
- In this implementation, detect URLs that begin with ’://’ to identify deep links specific to your app.
- Handle these deep links using the main app’s action to process and dispatch them, instead of relying on the WebView.
Register Customer
Register player method is used to create or update customers at Gameball. It is called when your login network call is successful. First, import Gameball SDK as follows:Unique identifier for the customer that you can reference across the customer’s whole lifetime. Could be a database ID, random string, email or anything that uniquely identifies the customer.
Customer’s unique Email address.
Customer’s unique Mobile number.
Token used to identify the device.
The referral code of an existing customer who is referring the customer being created. This is required in the create customer request to process the referral. Check Track Referrals for more details
Additional customer-specific attributes. Includes attributes such as the customer’s name, contact details, and purchase history.