我正在用php做项目。对于电子邮件验证,我发送一封电子邮件给用户,
Hi,
We need to make sure you are human. Please verify your email and get started using your Website account.
http://siteurl/email-verification/cc6560387c1111558bf5424046f2dc2b当用户单击给定的链接时,他将重定向到带有消息的浏览器页,
Your account is actived.
Click here to go back to application.但是现在我在重定向到我的android应用程序时遇到了麻烦。我不知道如何将用户重定向回我的应用程序。现在,我尝试使用代码将用户重定向到facebook,
<a href="https://facebook.com/me" data-applink="fb://profile">Click here</a> to go back to application.
<script>
$('a[data-applink]').applink();
</script>但它在浏览器中打开facebook,而不是facebook应用程序。有办法这样做吗?
我做了一些类似的事情,其中EngageV1是我的应用程序名
<div id="main" style="text-align: center; color: #787878">
<h2><?php echo $msg; ?></h2>
<a href="https://play.google.com/store/apps/details?id=engage.app.v1&ah=yIEhKqv-vh5CnjQrIULLeVouxkA" class="large-screen">Click here</a> to go back to application.
<a href="EngageV1://" class="small-screen">Click here</a> to go back to application.
</div>
<script>
setTimeout(function () { window.location = "https://play.google.com/store/apps/details?id=engage.app.v1&ah=yIEhKqv-vh5CnjQrIULLeVouxkA"; }, 25);
window.location = "EngageV1://";
</script>发布于 2016-06-08 06:48:36
您需要使用应用程序链接。
您需要做的是创建一个与活动和Android应用程序相关联的URL,因此当用户打开该链接时,可以在应用程序本身中打开该链接。
要了解有关如何添加应用程序链接并将它们与web URL连接起来的详细信息,请参阅android文档。
https://developer.android.com/training/app-links/index.html
Android6.0(APILevel23)及更高级别允许应用程序将自己指定为给定类型链接的默认处理程序. 因此,API级别低于23的用户将不得不选择Web的开放应用程序。至少一次。
https://stackoverflow.com/questions/37694948
复制相似问题