I'm receiving a nullpointerexception here at:
and I don't know what is causes it. (what is null.)
I should been using Ionactivityresult correctly I think:
Edit:
FOund the problem
I didn't edited the Manifest fileAttached is the library file.
Tomas
B4X:
public void ResultArrived(int resultCode, Intent data) {
and I don't know what is causes it. (what is null.)
I should been using Ionactivityresult correctly I think:
B4X:
/**
* Starts the check out.
* @param v
*/
public void Checkout() {
Log.i("B4A","declared.");
Log.i("B4A","intent: " + intent.toString());
ion = new IOnActivityResult() {
@Override
public void ResultArrived(int resultCode, Intent data) {
Log.i("B4A","result arriveed" + resultCode + " " + data.toString());
switch (resultCode) {
case -1:
Log.i(TAG, "Succefuly paid. Your transaction id is: " + data.getStringExtra(CheckoutActivity.ZOOZ_TRX_ID));
ba.raiseEvent(this, eventName + "_success", new Object[] { data.getStringExtra(CheckoutActivity.ZOOZ_TRX_ID) } );
break;
case 0:
if (data != null)
Log.e(TAG,"Error, cannot complete payment with ZooZ. " + "Error code: " + data.getIntExtra(CheckoutActivity.ZOOZ_ERROR_CODE, 0) + "; Error Message: "+ data.getStringExtra(CheckoutActivity.ZOOZ_ERROR_MSG));
ba.raiseEvent(this, eventName + "_error", new Object[] { data.getIntExtra(CheckoutActivity.ZOOZ_ERROR_CODE, 0), data.getStringExtra(CheckoutActivity.ZOOZ_ERROR_MSG) } );
break;
default:
break;
}
}
};
Log.i("B4A","Checkout started.");
ba.startActivityForResult(ion, intent);
Log.i("B4A","Started activity for result");
}
Edit:
FOund the problem
I didn't edited the Manifest fileAttached is the library file.
Tomas
Attachments
Last edited: