AuthorizeNet / inperson-sdk-android

Mobile SDK for Android point-of-sale applications
Other
23 stars 38 forks source link

How to pass a transaction result value between activities #78

Closed cmcfatter closed 3 years ago

cmcfatter commented 3 years ago

I am wanting to pass the result value of a transaction to another activity. I am pretty new to java and don't know how I would do this with a custom value such as a net.authorize.aim.emv.Result value. I was trying to pass it as a bundle through the putExtra method of intent but once I'm in the other activity I'm not sure how to convert this value from a bundle to net.authorize.aim.emv.Result. Would anyone be able to help point me in the right direction?

Here is my code where I am trying to retrieve the transaction result value:

    Bundle bundleResult;
    net.authorize.aim.emv.Result result;

    Intent i = getIntent();
    if (i != null){
        if (i.hasExtra("result")){
            bundleResult = i.getBundleExtra("result");
            result = bundleResult; //this is where I am receiving the error since the bundle needs to be converted
        }
    }