ion = new IOnActivityResult() {
@Override
public void ResultArrived(int resultCode, Intent intent) {
BA.Log("ResultArrived 1");
if (resultCode == Activity.RESULT_OK) {
BA.Log("ResultArrived");
}
ion = null;
}
};
try {
ba.startActivityForResult(ion, null); //<-- passing null instead of an intent
} catch (NullPointerException npe) {
//required...
}
BA.SharedProcessBA sba = ba.sharedProcessBA;
try {
Field f = BA.SharedProcessBA.class.getDeclaredField("onActivityResultCode");
f.setAccessible(true);
int requestCode = f.getInt(sba) - 1;
//requestCode holds the value that should be used to send the intent.
} catch (Exception e) {
throw new RuntimeException(e);
}
// Start the transaction
MyPOSAPI.openPaymentActivity(ba, payment, 11);