Simple Payment UI call, no onActivityResult

I am working on a game in unity and with aar including android and samsung blockchain keystore stuff. And I call from unity side, which triggers the function startActivityForResult(intent, 0) with the intent shows in the sdk document, Samsung Blockchain | Samsung Developers
and I also set the onActivityResult() in the same class as startActivityForResult(). The class extends Fragment.
The problem is I can trigger the payment UI popup, but it wont give me any response, which means it didn’t call onActivityResult().

Could you tell me if you have encounter the same problem and hope someone can help me out?

Thank you !!!

Hello yumizhtch,

Thank you for your interest in Samsung Blockchain Platform SDK.
In Unity projects, onActivityResult is handled by UnityPlayerActivity by default.
So you need to override this default behaviour to get the result in your app.
You can learn more about how to override this behaviour from Unity Forum posts like this and other articles on the matter.

PS: If you find this answer helpful please press the “like” button so that others can find it more easily.

Best Regards,
Samsung Developer Program

Thank you for replying to me, your solution perfectly solved me problem! Thank you again.

1 Like