Client

A client opens the Game Client from a URL Received by Game-ox.com

The Client App should pass the following parameters to the Game Client URL.

Parameters:

Param
Val
Required
Description

token

String

YES

The User API Authoriaztion Token

lang

String

NO

The Game Lang Default: ar

Example:

https://1231example.cloudfront.net/game/index.html
?token=xxxxx&lang=en

Once you passed a valid parameters you should see the game started.

Android API

The webview may need to interact with the application for example the webview may send you message in order a player how need to re-charge or it needs the web-view background to be transparent or close the webview

webView.addJavascriptInterface(WebAppInterface(view.context), "Android")
inner class WebAppInterface(private val mContext: Context) {
    @JavascriptInterface
    /** 
     The following methods is called by the Web-View
    */
    fun closeWindow() {
        // close webview
        // dismiss()
    }
    @JavascriptInterface
    fun openChargePage() {
        // start charge page activity
    }
    @JavascriptInterface
    fun backgroundTransparent() {
        // set webview background transparent
    }
    
     @JavascriptInterface
    fun orientationLandscape() {
        // set webview background transparent
    }
}

IOS API

Last updated