Giter Site home page Giter Site logo

imepayqrscanner_android's Introduction

IMEPayQRScanner For Android

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.

Main Objective

  • 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

Screenshot

How to implement IME PAY QR SDK in Android

1.Add the following in your app's build.gradle file:

compile 'ib.swifttechnology.merchantscanner:IMEMerchantScanner:1.0.0'

2. Add following permission in manifest

 	<uses-permission android:name="android.permission.CAMERA" />   

3. Register this Activity in your App Manifest

 <activity android:name="lib.swifttechnology.merchantscanner.BarcodeCaptureActivity"     
   android:configChanges="orientation" android:screenOrientation="portrait"     
   android:theme="@style/Theme.AppCompat.Light.NoActionBar" 
   android:windowSoftInputMode="adjustPan|stateHidden" /> 

4. Initialize the IMESCannerHandler class and call openScannerActivity method with request code

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

Release

V 1.0.0

  • Initial Release

imepayqrscanner_android's People

Contributors

imepay avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.