Device I'm Using: Morpho Device
Issue:
When I am trying to capture fingerprint, device getting disconnected automatically and shows error code 100 Invalid PidOptions input. XML should strictly adhere to spec. and after changing values of it shows error code 140 and error code 999
this is xml String which Im sending to the Intent
String responseXml =
"<PidOptions ver=\"1.0\"> " +
"<Opts env = \"P\" fCount=\"1\" fType=\"0\"|fType=\"1\"|fType=\"2\"" +
" iCount=\"\" iType=\"\" pCount=\"\" pType=\"\" pTimeout=\"\" format=\"0\"" +
" pidVer=\"2.0\" timeout=\"10000\" otp=\"\" wadh=\"\" posh=\"\"/><Demo></Demo><CustOpts>" +
"<!-- no application should hard code these and should be configured on app or AUA servers. \n" +
"These parameters can be used for any custom application authentication or for other \n" +
"configuration parameters. Device providers can differentiate their service in the market by \n" +
"enabling advanced algorithms that applications can take advantage of. --> <Param \n" +
"name=\"\" value=\"\" /></CustOpts></PidOptions>";
private static final int AUTHENTICATION_REQUEST = 0;
This is Intent
Intent intent = new
Intent("in.gov.uidai.rdservice.fp.CAPTURE");
intent.setPackage("com.scl.rdservice");
intent.putExtra("PID_OPTIONS",responseXml);
startActivityForResult(intent,
AUTHENTICATION_REQUEST);
and this is Activity result
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data); if
(requestCode == AUTHENTICATION_REQUEST) {
if (resultCode == RESULT_OK) {
Bundle b = data.getExtras();
if (b != null) {
String pidData = b.getString("PID_DATA");
Toast.makeText(this, "pidData"+pidData, Toast.LENGTH_SHORT).show();
// in this varaible you will get Pid data
String dnc = b.getString("DNC", "");
Toast.makeText(this, "disconnected"+dnc, Toast.LENGTH_SHORT).show();// you will get value in this variable when your finger
// print device not connected
String dnr = b.getString("DNR", "");
//Toast.makeText(this, "connected"+dnr, Toast.LENGTH_SHORT).show();
// you will get value in this variable when
//your finger print device not registered.
txt.setText(pidData);
}
}
}
}