Reply
Contributor
Posts: 11
Registered: ‎04-10-2021

How to pass a transaction result value between activities (android in-person sdk)

[ Edited ]

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 attempting to retrieve the 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
}
}

 

Contributor
Posts: 11
Registered: ‎04-10-2021

Re: How to pass a transaction result value between activities (android in-person sdk)

I ended up just doing what the sample app did where they assign the result to a variable in the AppManager activity and then access that variable from other activities to get the result data.

New Member
Posts: 4
Registered: ‎06-14-2021

Re: How to pass a transaction result value between activities (android in-person sdk)

I ended up doing exactly what the example app did, which was to assign the result to a variable in the AppManager, activity, and then access that variable from other activities to obtain the data.