Show your customer’s profile including all details and progress on your Android app. 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 is describing is using the Android SDK to show the Gameball customer widget.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.
Showing Gameball Customer Profile
To show the Gameball customer profile that contains the customer details, available reward campaigns, and the leaderboard use theshowProfile() SDK method.
Using the SDK, you can open the Gameball customer profile with the magic of a press of button in your app, programmatically when someone does a specific action, or from a persistent button (ex: FAB) that sits over your app’s UI.
When you trigger the Gameball customer profile, your customer is presented with a default screen that is configurable inside Gameball to change the look and feel of it.
From there, your customer can check their progress across different Gameball programs as per your configurations.
Use showProfile with a button and call this method in the onClick() method of this button to show the customer profile.
Current activity instance holding the GameballApp which will be used in showing the customer’s profile.
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.
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
Change Customer Profile Widget language
changeLanguage(String language)
Use changeLanguage SDK method to change the widget language. The language provided should be as per configured languages in your account. If not provided the Gameball profile widget will be shown with your account default language.
Example: "en", "fr", "ar"
Register/Update Customer
To register your customers with Gameball, useregisterCustomer method which can be used to create or update the customer details at Gameball. Ideally, it is called when your login or register network call is successful.
Current activity instance holding the GameballApp which will be used in showing the customer’s profile.
An intent instance that will be used in combination with the Activity to detect the referral code from the dynamic link.
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.
Additional customer-specific attributes. Includes attributes such as the customer’s name, contact details, and purchase history.
Customer’s referrer’s referral code
Flag indicating the customer is guest or not (if null, isGuest is set to false by default)
Callback is used for providing the developer with the response status and payload.
You can find the complete list of Customer Attributes here, if its not included in the CustomerAttributes builder you can add them as Key/Value pairs using withAdditionalAttribute builder method and it will automatically added upon request.
An example to create CustomerAttributes object
Register the Customer
Using the previously created GameballApp instance or by creating a new one, call the registerCustomer() method as shown belowSince Firebase Dynamic Links will soon be deprecated, we’ve deprecated its usage on our side, and started depending on either Branch.io or Adjust providers to provide for referral links, depending on your implementation, you should be able to fetch the referralCode from the sent query param
GBReferral and provide it to the register customer method.