Android Integration Guide
π± Installation guide for Android
Jetpack Compose
implementation 'androidx.browser:browser:<version>'class MainActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContent {
BcPaySampleTheme {
Box(
modifier = Modifier.fillMaxSize(),
contentAlignment = Alignment.Center
) {
val context = LocalContext.current
Button(onClick = ::launchBcPay) {
Text("Launch Blockchain.com Pay")
}
}
}
}
}
private fun launchBcPay() {
val widgetUrl = "https://www.blockchain.com/pay/widget?apiKey=[your-api-key]"
val intent = CustomTabsIntent.Builder().build()
intent.launchUrl(
this@MainActivity,
Uri.parse(widgetUrl)
)
}
}Android View System
React Native
Customizing a Chrome Custom Tab (Android View System and Jetpack Compose)
Last updated