My app needs to scan a QR code and depending on its contents it invokes a different web service.
I'm using the ScanCompleted method below:
CodeScanner.getInstance().scanQRCode(new ScanResult() {
public void scanCompleted(String contents, String formatName, byte[] rawBytes) {
Log.p("scanCompleted");
if(contents.equals("22")) {
flag = "22";
Hashtable tab = getJsonResponseHashtable(ip, "os_jme2");
applyServerSettings(tab);
Display.getInstance().callSerially(new Runnable() {
public void run() {
showForm("Main", null);
}
});
}
}
}
The strange thing is that the JsonResponseHashtable(...) and the applyServerSettings(...) methods seem to never getting called!
(I have put some Log.p() messages in order to check that).
In the JsonResponseHashtable I open a new ConnectionRequest().
Any ideas what is going wrong?