UI Elements
#
Progress DialogBharatX SDK automatically shows a progress dialog when the user wants to make a BharatX transaction during the BharatXCommonUtilManager.confirmTransactionWithUser
flow. However, it is your responsibility to show/hide the progress bar once the user confirms the transaction.
To close the progress dialog:
- Java
- Kotlin
- React Native
- Flutter
Your Android App
// show the progress dialogBharatXCommonUtilManager.showBharatXProgressDialog(this);// close the progress dialogBharatXCommonUtilManager.closeBharatXProgressDialog();
Your Android App
// show the progress dialogBharatXCommonUtilManager.showBharatXProgressDialog(this)// close the progress dialogBharatXCommonUtilManager.closeBharatXProgressDialog()
React Native App
import BharatXCommonUtilManager from '@bharatx/bharatx-reactnative-common';
// show the progress dialogBharatXCommonUtilManager.showBharatXProgressDialog();// close the progress dialogBharatXCommonUtilManager.closeBharatXProgressDialog();
Flutter App
import 'package:bharatx_flutter_common/bharatx_flutter_common.dart';
// show the progress dialog - can be awaitedBharatXCommonUtilManager.showBharatXProgressDialog();// close the progress dialog - can be awaitedBharatXCommonUtilManager.closeBharatXProgressDialog();
#
Transaction Success/Failure Dialognote
Showing this dialog is optional. However, we recommend it to ensure the user has a consistent experience with BharatX, resulting an improvement in the UX of your app.
When your app checks with your server (which makes an S2S call to our server) about the status of the transaction, and the status is a definite success or failure, you can use the following method to show the Transaction Success/Failure Dialog.
- Java
- Kotlin
- React Native
- Flutter
Your Android App
boolean isTransactionSuccessful = // from your server; type booleanBharatXCommonUtilManager.showTransactionStatusDialog(this, isTransactionSuccessful, new BharatXCommonUtilManager.TransactionStatusShowListener() { void onStatusDialogClose() { // transaction status dialog closed. your app has control now. } });
Your Android App
val isTransactionSuccessful = // from your server; type BooleanBharatXCommonUtilManager.showTransactionStatusDialog(this, isTransactionSuccessful, object : BharatXCommonUtilManager.TransactionStatusShowListener { override fun onStatusDialogClose() { // transaction status dialog closed. your app has control now. } })
React Native App
import BharatXCommonUtilManager from '@bharatx/bharatx-reactnative-common';
// ...
const isTransactionSuccessful = // from your server; type booleanBharatXCommonUtilManager.showTransactionStatusDialog(isTransactionSuccessful, () => { // transaction status dialog closed. your app has control now.});
Flutter App
import 'package:bharatx_flutter_common/bharatx_flutter_common.dart';
// ...
var isTransactionSuccessful = // from your server; type booleanBharatXCommonUtilManager.showTransactionStatusDialog(isTransactionSuccessful, () { // transaction status dialog closed. your app has control now.});