我需要支持以下场景:
用户收到带有我的应用程序链接的电子邮件.
如果用户已经安装了应用程序,则链接应该打开应用程序将意图中的一些数据传递给启动程序活动.
如果尚未安装该应用,则电子邮件链接应充当广告系列引荐来源:将用户引导至Google Play以安装具有引荐来源网址的应用,该引用网址在引用广播接收器中安装后传递到我的应用.
我想为我的应用创建促销链接 - 我可以通过电子邮件分发.当用户点击电子邮件中的链接时,网页会执行以下操作:
我尝试使用AppLinks(applinks.org) - 但我无法让它工作.浏览器如何理解"al:xx:xxx .."标签?它只适用于facebook/twitter吗?
<html>
<head>
<meta property="al:ios:url" content="applinks://docs" />
<meta property="al:ios:app_store_id" content="12345" />
<meta property="al:ios:app_name" content="App Links" />
<meta property="al:android:url" content="applinks://docs" />
<meta property="al:android:app_name" content="App Links" />
<meta property="al:android:package" content="org.applinks" />
<meta property="al:web:url" content="http://applinks.org/documentation" />
</head>
Run Code Online (Sandbox Code Playgroud)
我还尝试了另一篇文章中的一些javascript - 但如果未安装该应用程序,浏览器会显示错误:
<script>
window.onload = function() {
window.location = 'http://www.launchMyApp';
setTimeout("window.location = 'http://play.google.com/someApp';", 1000);
}
</script>
Run Code Online (Sandbox Code Playgroud)
请帮忙.谢谢.
我在哪里可以查看完整的应用列表及其相应的"深层链接"URI方案?(例如,Twitter是twitter://和Facebook的fb://.)
还有谁监督这些注册?
我已经阅读了有关Android应用程序的App Indexin g和Deep Linking的信息.
据我所知,两者都是相同的,深度链接更容易,因为它只需要在Manifest.xml文件中添加一个intent过滤器.
那么为什么我需要使用应用程序索引?
是什么让它与深层链接不同?
需要一种不同的编码方式(android)来实现
Fire Base应用程序索引
这是一个指导Fire Base应用程序索引的链接:
https://firebase.google.com/docs/app-indexing/
这有必要吗?
我试图在iOS 11.0开发者预览版上调用以下网址:
<html>
<body>
<a href="sms:+24321&body=This%20is%20the%20body">Click Me!</a>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
单击上面的链接时,iOS会成功打开本机iOS消息应用程序.如果用户以前在手机的后台打开了iOS消息应用程序,则iOS会正确传递链接中包含的查询参数,例如to:(24321)和body:(这是正文),但如果用户尚未拥有iOS消息打开,然后iOS打开消息,但不打开消息to并body填写.
这不是iOS 10上的问题,似乎已经在iOS 11中引入.
我有一个Web应用程序,由于PWA标准,它可以作为独立应用程序安装在主屏幕中。
当用户忘记密码时,将向其发送一封电子邮件,其中包含用于重置密码的链接。
问题是:
我可以深链接到已安装的独立版本,而不是chrome浏览器中的Web应用程序吗?我想实现以下行为:
提前致谢!
干杯
我正在构建一个具有react-native和react-navigation库的移动应用程序,用于管理我的应用程序中的导航。现在,我的应用看起来像这样:
App [SwitchNavigator]
Splash [Screen]
Auth [Screen]
MainApp [StackNavigator]
Home [Screen] (/home)
Profile [Screen] (/profile)
Notifications [Screen] (/notifications)
Run Code Online (Sandbox Code Playgroud)
我已经将“深层链接”与上述屏幕Home,Profile和的模式集成在一起Notifications,并且按预期工作。我面临的问题是使用深层链接时如何管理用户的身份验证。现在,无论何时打开深层链接(myapp://profile例如),无论我是否通过身份验证,该应用程序都会将我带到屏幕上。我想要它做的是先检查AsyncStorage是否有一个userToken,如果没有,或者它不再有效,然后在Auth屏幕上重定向。
我以与此处所述几乎完全相同的方式设置了身份验证流程。因此,当我的应用程序启动时,Splash屏幕会检查用户电话中是否存在有效令牌,然后将其发送到Auth屏幕或Home屏幕上。
我目前想出的唯一解决方案是将每个深层链接指向,对Splash用户进行身份验证,然后解析该链接以导航至正确的屏幕。例如,当用户打开时myapp://profile,我打开应用程序Splash,验证令牌,然后解析url(/profile),最后重定向到Auth或Profile。
这是这样做的好方法,还是反应导航提供了更好的方法?他们网站上的“ 深层链接”页面有点亮。
谢谢您的帮助 !
给出了这三个 url:
1) https://example.com
2) https://example.com/app
3) https://example.com/app?param=hello
Run Code Online (Sandbox Code Playgroud)
假设我在 gmail-app 中收到一封包含这三个链接的邮件,我需要以下行为:
1) Should not open the app
2) Should open the app
3) Should open the app and extract the parameter's value
Run Code Online (Sandbox Code Playgroud)
到目前为止我所取得的成就:
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:host="example.com"
android:pathPrefix="/app"
android:scheme="https" />
</intent-filter>
Run Code Online (Sandbox Code Playgroud)
1)此代码片段对于以下情况工作正常2):第一个网址未在应用程序中打开,第二个网址是。但遗憾的是第三个链接我没有被应用程序打开。
我还尝试了path、pathPrefix和的一些不同变体pathPattern,但我没有运气实现所有三种给定的行为。
所以我需要你们的帮助,你们能提供一个满足给定要求的片段或一些我可以测试的提示吗?
更新:
更改android:pathPrefix为android:pathPattern现在可以正常工作:系统的意图选择器仅在 case 中显示2),3)case1)直接打开浏览器。
但
我还想实现的是在进入应用程序或触发意图选择器之前检查特定参数。仅当参数param保存值hello …
我通过这种方式添加了一个到我的 Android 应用程序的深层链接:
<activity
android:name=".views.DeepLinkingActivity"
android:exported="true">
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:scheme="https"
android:host="example.com"/>
</intent-filter>
</activity>
Run Code Online (Sandbox Code Playgroud)
当我点击https://example.com我被重定向到网站。
当我更改它时android:scheme="https",android:scheme="appscheme"它会工作并将我重定向到我的应用程序。
如何强制通过https方案打开我的应用程序?
更新
我添加了一个子域,但它仍然不起作用。
<activity
android:name=".views.DeepLinkActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:scheme="https"
android:host="www.example.ru"/>
</intent-filter>
</activity>
Run Code Online (Sandbox Code Playgroud) 我正在开发两个应用程序 A 和 B,我希望将它们与深层链接相互关联。
应用 B 有一个像下面这样的深层链接: myApp://open/myAction?param=123
看起来像:
<!-- Update myAction deep link -->
<intent-filter android:label="@string/launcherName">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE />
<data
android:host="open/*"
android:scheme="myApp" />
</intent-filter>
Run Code Online (Sandbox Code Playgroud)
如果我使用 adb 启动应用程序,它就完美无缺。
现在,当用户单击 Activity A 中的按钮时,我正在尝试启动应用程序 B。
单击按钮时,我尝试了此操作(在:GoogleDeveloper 中找到)(OnClickListener)
// Build the intent
Uri myAction = Uri.parse(mEditText.getText().ToString()); // is something like: `myApp://open/myAction?param=1AD231XAs`
Intent mapIntent = new Intent(Intent.ACTION_VIEW, myAction);
// Verify it resolves
PackageManager packageManager = getPackageManager();
List<ResolveInfo> activities = packageManager.queryIntentActivities(mapIntent, 0);
boolean isIntentSafe = …Run Code Online (Sandbox Code Playgroud) deep-linking ×10
android ×6
ios ×2
applinks ×1
ios11 ×1
progressive ×1
react-native ×1
redirect ×1
uri ×1
web ×1