This guide is a high level walkthrough on how to integrate Gameball with any mobile development framework that supports in-app Webviews for example flutter, ionic, etc...
In order to pass player's data from your APP to Webview\Gameball's widget, there are two options depending on your framework capabilties.
If the used framework supports passing params\variables to Webview you can pass logged in user profile data directly to the Webview and inject them to Gameball widget loading script.
The other option is to pass players data to Gameball loading script via query strings while loading Webview like
and the loading script will look similar to the below:
<script>
window.GbLoadInit=function(){
GbSdk.init({
playerUniqueId:{{playerUniqueId}},
mobile:true,
playerAttributes:{
displayName:{{displayName}}
},
lang:'en',
APIKey:'{{Your_API_Key}}'
});
};
</script>
Notifications
Gameball webhooks can be used to avail push notifications for mobile users. This can be done by webhook subscriptions to receive notifications for particular events in Gameball. After you have subscribed to a webhook, your app can execute a specific code immediately after specific events occur in Gameball. Common webhook use cases include sending notifications to IM clients and pagers.