Callback url for Android intent


Callback url for Android intent



I'm working with a payment solution with another company, and in their API i have to send my callback url for when the transaction is complete. Are there any way to find the url to my application? My application is opening the payment application with an url, and after it's dont it should redirect to my application.



Any ideas on how i can solve this?



Some sample code bellow on how i open the payment application:


Intent vippsIntent = openVipps(getContext(), finalURL);
startActivity(vippsIntent);


public static Intent openVipps(Context context, String url){
try{
context.getPackageManager().getLaunchIntentForPackage("no.dnb.vipps");
return new Intent(Intent.ACTION_VIEW, Uri.parse(url));

}catch (Exception e){
return new Intent(Intent.ACTION_VIEW, Uri.parse(url));
}
}





developer.android.com/training/app-links/deep-linking
– Tim Castelijns
Jun 29 at 12:14




1 Answer
1



So you need a result from the second application when it's done, you can use the startActivityForResult and onActivityResult, the first launch the second application with all the extra info (also the info to return to your application) the second handles the result, for more info look at the documentation and at this Answer.





in their API i have to send my callback url for when the transaction is complete. Are there any way to find the url to my application? - your answer does not match the question
– Tim Castelijns
Jun 29 at 12:14





uhm right, i misunderstood the question
– Norman
Jun 29 at 13:50






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Comments

Popular posts from this blog

paramiko-expect timeout is happening after executing the command

Export result set on Dbeaver to CSV

Opening a url is failing in Swift