Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to deep link my android app to paytm and freecharge app?

I am creating an android application for browsing plans and tariff of mobile recharges. What I want is that when the user selects a plan from my app, then on clicking either of the one option ie paytm or freecharge:

  1. The mobile recharge screen of the respective app gets open.
  2. User's phone number and amount of recharge gets prefilled.

As far as I know this is possible either through Intends or Deeplinking. But the problem is that:

  1. If I use intends and open paytm/freecharge using their package names it will open the home screen of those apps. Now how to open the recharge mobile screen and prefill the numbers and recharge amount??

  2. If I follow the deeplink approach, for either of the apps what url to call and what parameters to pass?? I got a deeplink url of paytm in their api docs but that too opens only the home screen.

Once this is done, user can proceed to recharge via both these apps. I have seen this feature in a similar app ireff and thats excatly what I want to implement.

Mobile recharge screen of freecharge app Mobile recharge screen of paytm app

Above are the screen on which I want to reach and fill in the phone number and amount which user has filled on my app. Please let me know how to do this I couldn't find anything useful about this on the internet. Thanks.

like image 246
Ashwani Kumar Avatar asked Aug 08 '16 06:08

Ashwani Kumar


People also ask

Can you deep link to another app?

Mobile app deep linking is a technology that launches an app and opens a specific page once a user clicks a URL on a web page or in another app. Implementing deep links is a sure way to optimize user experience and increase your conversion rates.

How do I create a deep link for an app?

To use the tool, log in to your Adjust dashboard and open the Menu, where you'll see the 'Deeplink Generator' as an option. Click to open, and you'll find a page to input the information required to create your deep link. Then simply copy and paste into whichever campaign you've set up.


1 Answers

I have done for paytm in kotlin

fun paytm(amount:String,contact_number:String){
val intent = Intent()
val bundle = Bundle()
bundle.putString(PaytmConstants.TRANSACTION_AMOUNT, amount)
bundle.putString(
PaytmConstants.PAYEE_MOBILE_NUMBER,
contact_number
)
bundle.putBoolean(PaytmConstants.IS_MOBILE_NUMBER_EDITABLE, false)
bundle.putBoolean(PaytmConstants.IS_AMOUNT_EDITABLE, false)
intent.component = ComponentName("net.one97.paytm", "net.one97.paytm.AJRJarvisSplash")
intent.putExtra(PaytmConstants.PAYMENT_MODE, 1)
intent.putExtra(PaytmConstants.MERCHANT_DATA, bundle)
startActivityForResult(intent, 103)
}
like image 153
Subham Kumar Singh Avatar answered Nov 15 '22 01:11

Subham Kumar Singh