cordova-plugin-csb-upi-sdk-cz
v1.0.0
Published
Cordova plugin to integrate CSB UPI SDK (React Native) into Cordova Android apps
Maintainers
Readme
Cordova Plugin CSB UPI SDK
Cordova plugin to integrate CSB UPI SDK (React Native) into Cordova Android apps.
Installation
cordova plugin add cordova-plugin-csb-upi-sdkOr install from npm:
npm install cordova-plugin-csb-upi-sdk
cordova plugin add node_modules/cordova-plugin-csb-upi-sdkUsage
JavaScript
// Wait for device ready
document.addEventListener('deviceready', function() {
// Launch the SDK
CSBUPISDK.launch(
function(success) {
console.log('SDK launched successfully:', success);
},
function(error) {
console.error('Error launching SDK:', error);
}
);
}, false);HTML Example
<button onclick="launchSDK()">Launch UPI SDK</button>
<script>
function launchSDK() {
CSBUPISDK.launch(
function(success) {
alert('SDK launched successfully!');
},
function(error) {
alert('Error: ' + error);
}
);
}
</script>Requirements
- Cordova >= 9.0.0
- cordova-android >= 10.0.0
- Android SDK with API level 21+
Building
After installing the plugin, build your Android app:
cordova build androidOr run directly:
cordova run androidHow It Works
- The plugin automatically includes the React Native SDK as a Gradle module
- React Native JavaScript is bundled during the build process
- The plugin provides a simple JavaScript API to launch the SDK
- All dependencies are automatically configured
Troubleshooting
Build Errors
If you encounter build errors:
Clean the project:
cordova clean androidRemove and re-add the plugin:
cordova plugin remove cordova-plugin-csb-upi-sdk cordova plugin add cordova-plugin-csb-upi-sdkRebuild:
cordova build android
License
Apache 2.0
Support
For issues and questions, please visit: https://github.com/CodeZyngRepo/csb-upi-sdk/issues
