Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I open Paytm app from Intent using Android?

I'm creating a food delivery app for restaurants for a university campus. Most of these restaurants accept Paytm as a payment method.

I want to add a button in my app to launch the Paytm app with the mobile number of the vendor and the amount of order filled in. So the user only has to press one button to complete the payment.I don't even need to receive payment confirmation from Paytm.

I can't use the payment API because it'll restrict the payment to only one account for which the API key is generated.

If it's not possible via intents, is it possible via deep linking?

like image 876
Yashovardhan99 Avatar asked Dec 08 '25 10:12

Yashovardhan99


1 Answers

I don't know how to open it directly, but so far I came up with the below code. It opens the browser and it will redirect to the app.

String url = "http://m.p-y.tm";
Intent i = new Intent(Intent.ACTION_VIEW);
i.setData(Uri.parse(url));
startActivity(i);
like image 61
Ankith Reddy Avatar answered Dec 09 '25 22:12

Ankith Reddy



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!