I am new to Android. Currently, I am developing an application which performs credit card transaction where each time the payment is made, phone will be connected to the card reader through the audio jack port. In order to make payment successful, credit card will be authorized where user needs to enter PIN(pin will be entered from card reader). At this stage, application will prompt a dialog box where it request user to enter the PIN. So, here is the hardest part. When the dialog box appears, user shall enter their PIN number from the pin pad(from the card reader that is connected to the phone) instead of entering from the soft keypad(from phone).I have been googled around but seems I haven't met what I looked for and I noticed that in order to do this, I need to implement the Input Method Manager. I am still figuring out how this can be done and I really appreciate if any of you could help me for the solution. Thanks in advance
Here is the code where the dialog box appears
final EditText et = new EditText(ICCardActivity.this);
new AlertDialog.Builder(ICCardActivity.this)
.setTitle(title)
.setView(et)
.setPositiveButton("OK",
new DialogInterface.OnClickListener() {
@Override
public void onClick(
DialogInterface arg0,
int arg1) {
_pin = et.getText().toString();
}
})
.setNegativeButton("Cancel",
new DialogInterface.OnClickListener() {
@Override
public void onClick(
DialogInterface arg0,
int arg1) {
_pin = "";
}
}).show();
sendMessage(title + " with pinpad! try count=" + ucPinTryCnt);