Skip to content

Android SDK Integration

Choose your mobile platform to view the native SDK integration guide.

Use the native Android SDK when you want to host the embedded Ria experience inside your own WebView. Make sure you have already completed the Framework Setup so you understand the SSO token lifecycle, and apply the Android App Configuration settings to grant camera/microphone access.


We provide riassoandroidsdk-release.aar to you directly. You do not need to build it yourself.

Place the AAR in your app’s libs/ directory and add it as a local dependency:

// app/build.gradle.kts (module-level)
dependencies {
implementation(files("libs/riassoandroidsdk-release.aar"))
}

Sync Gradle after adding the file so the SDK classes resolve in your project.

Add a WebView to your layout and initialize the wrapper. Provide user data to prefill registration, and reuse a stored SSO token to auto-login returning users.

import android.content.Context
import android.content.SharedPreferences
import android.webkit.WebView
import androidx.fragment.app.Fragment
import com.ria.rmtwrapper.TokenListener
import com.ria.rmtwrapper.UserInfo
import com.ria.rmtwrapper.WebViewWrapper
class MoneyTransferFragment : Fragment(), TokenListener {
private val wrapper = WebViewWrapper.getInstance()
private val prefs: SharedPreferences by lazy {
requireContext().getSharedPreferences("ria_prefs", Context.MODE_PRIVATE)
}
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
val webView = view.findViewById<WebView>(R.id.riaWebView)
// Register to receive fresh SSO tokens
wrapper.setTokenListener(this)
// (Optional) force a specific package name for theming before init
wrapper.setPackageName(requireContext().packageName)
val payload = UserInfo(
email = "user@email.com",
phoneNumberCountry = "1",
phoneNumber = "5551234567",
firstName = "Jane",
lastName = "Doe"
)
wrapper.initializeWebViewWrapper(
payload = payload, // null starts a simple flow
webView = webView,
context = requireContext(),
ssoToken = loadSavedToken(), // use a stored token to auto-login
packageNameOverride = null // or set to override theme per load
)
}
override fun onTokenReceived(token: String?) {
token?.let { saveToken(it) } // persist securely for the next session
}
private fun saveToken(token: String) {
prefs.edit().putString("sso_token", token).apply()
}
private fun loadSavedToken(): String? = prefs.getString("sso_token", null)
fun clearSession() {
prefs.edit().remove("sso_token").apply()
wrapper.clearToken() // also clears token inside the wrapper
}
}
ComponentDescription
UserInfoFields are optional; supply whatever you already know (email/phone at minimum is recommended)
TokenListenerFires when a new token is issued; store it securely and pass it back via ssoToken next time
MethodDescription
WebViewWrapper.getInstance()Obtain the singleton instance
setTokenListener(listener)Register to receive new SSO tokens
setPackageName(name)Set the package used for theming before initialization
initializeWebViewWrapper(...)Start the flow (payload and token are optional)
clearToken()Wipe any token stored in the wrapper (e.g., on logout)

With the dependency in place and the WebView initialized, the SDK loads the Ria Money Transfer UI directly inside your app, handling authentication and token refresh through the callbacks you implement.