The Scrimmage Rewards Widget can be integrated into your Android application using a WebView.

  1. Add the following

    AndroidView(factory = { context ->
        WebView(context).apply {
            settings.javaScriptEnabled = true
            webViewClient = WebViewClient()
            loadUrl("$url?token=$token")
        }
    })
    
    • Replace $url with https://<your org id>.apps.scrimmage.co.
    • Replace $token with the user token. Check out the Getting Started page for more information.
  2. Make sure to add the following permissions to your AndroidManifest.xml file:

    <uses-permission android:name="android.permission.INTERNET" />
    
  3. Make sure to add the following dependency to your build.gradle file:

    implementation 'androidx.webkit:webkit:1.4.0'
    

Example

See the scrimmage-rewards-android repository for an example.