简体   繁体   English

深层链接 - 从 Play 商店安装应用时获取数据

[英]Deep linking - Fetch data when app installed from play store

How can we get data for the below situations:我们如何获取以下情况的数据:

1) Click on deep linking url. 1) 点击深层链接网址。

2) That app is not installed in a device. 2) 该应用程序未安装在设备中。 So, It redirects to the play store.因此,它重定向到 Play 商店。

3) Then we install app from the play store. 3)然后我们从Play商店安装应用程序。

4) We want data when we open the application that is installed from the play store. 4) 当我们打开从 Play 商店安装的应用程序时,我们需要数据。

How can we get data in application when it comes from play store?当数据来自Play商店时,我们如何在应用程序中获取数据?

you can use firebase dynamic URLs here is the link您可以在此处使用 firebase 动态网址,这是链接

it will give you everything that you needed.它会给你你需要的一切。

Here is the code snippet:这是代码片段:

Below this how it works.下面是它是如何工作的。

https://domain/?link=your_deep_link&apn=package_name[&amv=minimum_version][&ad=1][&al=android_link][&afl=fallback_link] https://domain/?link=your_deep_link&apn=package_name[&amv=minimum_version][&ad=1][&al=android_link][&afl=fallback_link]

Here's the example of the link after filling in the parameters.下面是填写参数后的链接示例。

https://example.app.goo.gl/?link=https://www.example.com/someresource&apn=com.example.android&amv=3&al=exampleapp://someresource&ibi=com.example.ios&isi=1234567&ius=exampleapp https://example.app.goo.gl/?link=https://www.example.com/someresource&apn=com.example.android&amv=3&al=exampleapp://someresource&ibi=com.example.ios&isi=1234567&ius=exampleapp

you can also shorten the link directly at Firebase console.您也可以直接在 Firebase 控制台缩短链接。

Inside Activity, you can call AppInvite.AppInviteApi.getInvitation(mGoogleApiClient, this, false) to retrieve link information.在Activity内部,可以调用AppInvite.AppInviteApi.getInvitation(mGoogleApiClient, this, false)来获取链接信息。

More information can be found here https://firebase.google.com/docs/dynamic-links/可以在此处找到更多信息https://firebase.google.com/docs/dynamic-links/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM