Android SDK
Introduction:
If you want to integrate our service into your Android app, you can use the Android SDK provided here.
Usage Instructions
Step 1: Import the SDK
Add this repository to your build.gradle
or build.gradle.kts
file:
repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
}
You can install the SDK by adding the following line in the dependencies section of your build.gradle
file:
implementation 'com.github.Alchemy-Pay:RampPaySdk:1.0.3' // Current version 1.0.3
Step 2: Initialize
val config = RampPaySdkConfig(
debug = true, // true or false
environment = RampPayEnvironment.Sandbox, // Sandbox or Production
params = "" // Concatenated URL parameters
)
val rampPaySdk = RampPaySdk(this, config)
rampPaySdk.show(RampPayRenderingOption.WebViewOverlay) // WebViewOverlay or InAppBrowser
- The
environment
configuration specifies whether to use the sandbox or production environment. - The
params
need to include the complete concatenated URL parameters, Click Here For Details
for example:appId=f83Is2y7L425rxl8&crypto=USDT&network=ETH&showTable=buy&fiat=USD&fiatAmount=30×tamp=1538054050234&sign=JY9JcOwBosncT19Nn9DIfTH%2BvfSt6xL%2BI%2BRVCl9YGgE%3D
. rampWebView.show
has two configuration modes: WebViewOverlay and InAppBrowser.
Difference between WebViewOverlay and InAppBrowser
InAppBrowser: Allows you to use native features such as Google Pay, social logins, and pop-ups.
WebViewOverlay: Allows you to use a communication layer between the widget and your application, enabling specific actions in your app when certain events occur in the widget.
This method also supports Google Pay; please contact us if needed.
Updated 4 months ago