IME Pay QR Code Scanner SDK for Android
"IME Pay QR Scanner SDK" is designed to be used by the Third Party Apps, to scan the QR Code issued By IME Pay to its Merchants.
- Scan QR Code of IME Pay's Merchants
- Return the Merchant Code to the App implementing the SDK after Scanning
- Easy Integration with few lines of code
compile 'ib.swifttechnology.merchantscanner:IMEMerchantScanner:1.0.0'
<uses-permission android:name="android.permission.CAMERA" />
<activity android:name="lib.swifttechnology.merchantscanner.BarcodeCaptureActivity"
android:configChanges="orientation" android:screenOrientation="portrait"
android:theme="@style/Theme.AppCompat.Light.NoActionBar"
android:windowSoftInputMode="adjustPan|stateHidden" />
IMEPayScannerHandler scannerHandler;
scannerHandler = new IMEPayScannerHandler(MainActivity.this);
scannerHandler.openScannerActivity(100);
5. Override the onActivityResult and check for your request code. On ResultOk, you can get the MerchantCode from intent with key name “BarCode”
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
if (requestCode == 100 && resultCode == RESULT_OK) {
if (data != null) {
String merchantCode = data.getStringExtra(IMEPayScannerConstant.BARCODE);
} else {
// FAILED
}
} else {
super.onActivityResult(requestCode, resultCode, data);
}
}
Note:
- For Invalid QR, SDK returns -1 as Merchant Code. App should ignore this value.
- Make sure NDK is enabled and properly integrated in the App
V 1.0.0
- Initial Release