Home

Sections

Theme switcher

Initializing the SDK

Was this section helpful?
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 class MainActivity : ComponentActivity() { private lateinit var sdk: PaymentSdk override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) // Initialize SDK sdk = PaymentSdk(this) sdk.bindAidlRequestService( onConnected = { Log.d("SDK", "Connected to payment service") }, onError = { Log.e("SDK", "Connection failed", it) } ) } override fun onDestroy() { super.onDestroy() sdk.release() } }
Was this section helpful?