Android
The Scrimmage Rewards Widget can be integrated into your Android application using a WebView.
-
Add the following
AndroidView(factory = { context -> WebView(context).apply { settings.javaScriptEnabled = true webViewClient = WebViewClient() loadUrl("$url?token=$token") } })
- Replace
$url
withhttps://<your org id>.apps.scrimmage.co
. - Replace
$token
with the user token. Check out the Getting Started page for more information. - All configuration options can be found here.
- Replace
-
Make sure to add the following permissions to your
AndroidManifest.xml
file:<uses-permission android:name="android.permission.INTERNET" />
-
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.
Updated about 1 month ago