Reputation: 21
I am trying to implement referral links in my react ionic 5 application.
Hello you have been invited, join this link to use my refer code - https://example.com/.../?refCode=Jack31
And once someone downloads the app from above url, the data of refCode i.e. Jack31 should be added in the referral code input field.
We don't host our application on Google playstore or app store, so I searching for the solution without Google Play referrer API.
Upvotes: 2
Views: 922
Reputation: 493
According to my knowledge there are two ways you can do this , I am explaining below.
1)Modification of APK Once you get request on api for downloading the apk with referral code , you can modify the current apk and add any value to string.xml , sign it ,generate and push to user downloads .When application will install and run there will already an key in string.xml with the referral code and you can use it accordingly. This is a bit difficult way where you may need to use and setup different SDK tools like jar tool and sign tool on server side but this is accurate way.
2)Push one config file also with APK When user downloads apk , another file should also be downloaded which will have mentioned the referral code , when apk will be installed and run it will read that file , definitely that will be in public downloads folder , once read is complete that file will be deleted by APK and you will get the referral code in the apk.
let me know if you did not understand any of the way.
Upvotes: 0