Android Programming Guide
1.8. CALLBACK
When the callback function is enabled, the intent is then disabled.
1.8.1. SETREADERCALLBACK
SetReaderCallback
Purpose
Set the reader callback function.
void SetReaderCallback(ReaderCallback readerCallback);
Syntax
Example
interface ReaderCallback
{
}
See Also
GetReaderCallbackStatus
1.8.2. GETREADERCALLBACK
GetReaderCallbackStatus
Purpose
Verify whether the callback function is enabled.
Syntax
boolean GetReaderCallbackStatus();
Return Value
If the callback function is enabled, it returns true.
Otherwise, it returns false.
See Also
SetReaderCallback
1.8.3. SAMPLE CODE
public class MainActivity extends Activity implements ReaderCallback {
private ReaderCallback mReaderCallback = null;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
e1 = (EditText)findViewById(R.id.editText1);
// ***************************************************//
// Need to get ReaderManager instance first,or you can't call any APIs of ReaderManager
// ***************************************************//
mReaderManager = ReaderManager.InitInstance(this);
mReaderCallback = this;
// ***************************************************//
// Register an IntentFilter
// Add GeneralString.Intent_READERSERVICE_CONNECTED for knowing apk is connected with
// Barcode Reader Service
// ***************************************************//
filter = new IntentFilter();
70
void onDecodeComplete(in String strDecodeData);
Need help?
Do you have a question about the RK25 and is the answer not in the manual?