jose luis gudino Active Member Licensed User Longtime User Dec 1, 2024 #1 I have this information from the Binance page, and I need to integrate the SDK into a B4A application. On the other hand, they provide a library called: binance_pay_sdk_v1.0.0.aar. Is it possible to integrate an .aar library into B4A? This is the information provided on the page.Integrate SDK for AndroidRequirements Android 4.1+ Support AndroidX Import SDK Download binance_pay_sdk_v1.0.0.aar Add binance_pay_sdk_v1.0.0.aar into libs directory Add dependence for app module, just like this: android{ repositories { flatDir { dirs 'libs' } } } dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs') implementation (name: 'binance_pay_sdk_v1.0.0', ext: 'aar') Create BinancePayListenerclass PayListener : BinancePayListener { override fun onSuccess() { // When the payment is successful, this will be called } override fun onCancel() { // When the payment is canceled, this will be called } override fun onError(exception: BinancePayException) { // When there is an error in the payment process,this will be called } } val listener = PayListener() 2. To Pay2.1 Crypto payments(C2B) val param = BinancePayParam(merchantId, prepayId, timeStamp, nonceStr, certSn, sign) val binancePay = BinancePayFactory.getBinancePay(context) binancePay.pay(param, listener)
I have this information from the Binance page, and I need to integrate the SDK into a B4A application. On the other hand, they provide a library called: binance_pay_sdk_v1.0.0.aar. Is it possible to integrate an .aar library into B4A? This is the information provided on the page.Integrate SDK for AndroidRequirements Android 4.1+ Support AndroidX Import SDK Download binance_pay_sdk_v1.0.0.aar Add binance_pay_sdk_v1.0.0.aar into libs directory Add dependence for app module, just like this: android{ repositories { flatDir { dirs 'libs' } } } dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs') implementation (name: 'binance_pay_sdk_v1.0.0', ext: 'aar') Create BinancePayListenerclass PayListener : BinancePayListener { override fun onSuccess() { // When the payment is successful, this will be called } override fun onCancel() { // When the payment is canceled, this will be called } override fun onError(exception: BinancePayException) { // When there is an error in the payment process,this will be called } } val listener = PayListener() 2. To Pay2.1 Crypto payments(C2B) val param = BinancePayParam(merchantId, prepayId, timeStamp, nonceStr, certSn, sign) val binancePay = BinancePayFactory.getBinancePay(context) binancePay.pay(param, listener)
Erel B4X founder Staff member Licensed User Longtime User Dec 2, 2024 #2 jose luis gudino said: Is it possible to integrate an .aar library into B4A? Click to expand... Yes. #AdditionalJar works with AARs. You can use JavaObject to access this SDK. Example: https://www.b4x.com/android/forum/t...h-additionaljar-and-javaobject-picasso.40904/ Upvote 0
jose luis gudino said: Is it possible to integrate an .aar library into B4A? Click to expand... Yes. #AdditionalJar works with AARs. You can use JavaObject to access this SDK. Example: https://www.b4x.com/android/forum/t...h-additionaljar-and-javaobject-picasso.40904/