GithubHelp home page GithubHelp logo

aadharuid's Introduction

AadharUID

AadharUID is an all-purpose scanner app1 for the national Indian Aadhar2 health card.

  1. AadharUID does no scanning itself, but can be used with any popular Android barcode scanner, such as QR Droid or Barcode.
  2. also spelled Aadhaar

Callout interface

AadharUID does not do much as an app by itself, but rather provides an interface through which other applications can call it. It was built for integration with CommCare, but any Android app can access it through the following callout interface.

Making a request

Intent intent = new Intent("org.commcarehq.aadharuid.barcode.LAUNCH");
// optional: specify which field you want returned to you
// as `intent.getExtra("odk_intent_data")`.
// default value is "statusText"
intent.putExtra("odk_intent_data_field", "uid");

Receiving a response

odk_intent_bundle

intent.getBundleExtra("odk_intent_bundle")

This bundle will contain the following fields:

  • Special values:
    • statusCode either "0" (success) or "1" (parse error)
    • statusText either "โœ“" (success) or "โœ—" (any failure)
    • rawString the raw string represented by the QR Code or barcode
  • Values straight from the Aadhar barcode
    • co
    • dist
    • dob normalized to YYYY-MM-DD
    • dobGuess dob if provided or else yob-06-01
    • gender normalized to M or F
    • house
    • lm
    • loc
    • name
    • pc
    • po
    • state
    • street
    • subdist
    • uid
    • vtc
    • yob

Some Aadhar cards use a 2D barcode. On these cards, only the uid is encoded; the rest of the values will be "".

odk_intent_data

intent.getStringExtra("odk_intent_data")

This value will be set to whatever field was requested through the odk_intent_data_field extra. For example, if odk_intent_data_field was set to "uid" in the request intent, then the odk_intent_data extra will be set to the uid value. By default it is set to statusText.

aadharuid's People

Contributors

dannyroberts avatar shubham1g5 avatar ctsims avatar philomates avatar

Stargazers

Roman avatar

Watchers

James Cloos 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.