-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug: Deferred Deeplink not working and App.getLaunchUrl()
return undefined.
#6480
Comments
It is very disappointing that nobody has responded to this at all. The implication is that "deferred" deeplinks are not possible without a third party like AppsFlyer or Branch.io or some other home made solution. @Saqib92 did you reach a conclusion yourself? |
I ended up using AppsFlyer SDK. |
Out of interest did the vanilla capacitor solution work correctly when a "normal" deeplink was clicked and the app was not already installed? I mean did it automatically take the user to the relevant store to install the app even though the app had no clue what the details of the deeplink were when it started up? |
I have no idea as i already had a website ready. If user have no app installed it will go to website version of that link. You can add install app link on your website. |
Oh I see - no I am referring to the type of deferred deep-link that the likes of AppFlyer and branch.io provide where, if clicked on a mobile device, will open the app if installed or go to the store (for the app to be installed) before doing so. It sounds like you have implemented something different. |
I hadn't heard of this, but it seems like those services are using https://developer.android.com/google/play/installreferrer/library / https://developers.google.com/analytics/devguides/collection/android/v4/campaigns for Android at least. I would not classify this as a bug, because deep links don't imply deferred links which need cooperation from the device's app store to pass whatever parameters caused the install. If there is no communication between the device and the app store (even if it's locally on the device) then there's no way for the app to know how it was installed. Instead this is a feature to support install referrers and you can see if there's a plugin that already exists that does this, or write your own. Collecting the referrer information looks relatively straightforward and could also be done in your main activity, but I'm not sure how trivial it would be to set the launch URL (you may need to expose this as a plugin method yourself). |
Tangent here, but I've noticed this official example here: const checkAppLaunchUrl = async () => {
const { url } = await App.getLaunchUrl();
console.log('App opened with URL: ' + url);
}; Since the result of const checkAppLaunchUrl = async () => {
const launch = await App.getLaunchUrl();
console.log('App opened with URL: ' + launch?.url);
}; |
Hi! Did you found any solution? |
Bug Report
Capacitor Version
Platform(s)
Android
iOS
Current Behavior
App.getLaunchUrl()
return undefined.Expected Behavior
it should return deferred deeplink when coming from playstore or app store after installing application.
Code Reproduction
Other Technical Details
I am implementing deferred deeplink when user clicks on my link it and they dont have app installed it will take them to respective store after installation
App.getLaunchUrl()
is not returning original clicked link.User clicks on this link which takes them to playstore:
https://play.google.com/store/apps/details?id=com.example.myapp&deeplinkdata=mydeeplinkdata
after installation how can i get data in my app?
Normal deeplinks are working. if user have app installed and click any link it open my app and takes them to respective content / page.
npm --version
output: 9.3.1node --version
output: v16.13.1pod --version
output (iOS issues only): 1.11.3Additional Context
i tried to setup
play.google.com
as my intent filter.tried this ADC Command
adb shell am start -W -a android.intent.action.VIEW -d "https://play.google.com/store/apps/details?id=com.example.myapp&ddl=mydeeplinkdata" com.example.myapp
Nothing is working. haven't tried on ios but i need this for iOS Too.
The text was updated successfully, but these errors were encountered: