从链接启动应用程序时,Android Messaging,电子邮件应用程序行为 [英] Android Messaging, Email app behavior when starting app from a link

查看:101
本文介绍了从链接启动应用程序时,Android Messaging,电子邮件应用程序行为的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在努力通过SMS链接或电子邮件启动应用程序.一切正常.自定义链接不会在Android手机上解析,但这是另一回事了.我的http样式链接很好用.但是问题在于消息传递,Android GMail应用程序,Android Mail应用程序,Android Outlook应用程序,Whatsapp等应用程序的行为.(以下是这种情况:

I am working on the capability of starting an app via an SMS link or an email. It is all working fine. Custom links don't parse on Android phones, but that is another story. My http style link works great. But the issue is the behavior of apps like Messaging, Android GMail App, Android Mail app, Android Outlook app, Whatsapp, etc. ( Here is the scenario:

  1. 转到应用程序,例如消息传递,Gmail等.
  2. 单击链接以启动我的应用程序(应用程序正确启动)
  3. 点击主页"按钮
  4. 点击我用来启动自己的应用的应用图标

在Samsung手机上,当我执行上述第4步时,消息和Outlook"应用程序显示的是我的应用程序,而不是消息或电子邮件列表. Gmail和Android电子邮件应用程序运行正常(我认为).这些应用会将您带回到您在该应用中的位置.在我的LG手机上,信息"应用正常运行. Whatsapp似乎总是表现不佳.

On Samsung phones, when I do step 4 (above), the Messaging and Outlook apps show my app, not the message or email list. The Gmail and Android Email apps behave correctly (in my opinion). These apps bring you back to where you were in that app. On my LG phone, the Messaging app behaves correctly. Whatsapp always seems to behave badly.

我主要关心的是消息传递应用程序,因为我想使用SMS作为启动应用程序的一种方式.我认为Messaging应用程序应该像我的LG手机一样返回到消息列表.

My main concern are messaging apps, as I want to use SMS as a way to start up my app. I think that the Messaging app should go back to the message list like my LG phone.

有解决方案吗?谢谢

推荐答案

因此,本例的答案是将android:launchMode ="singleTask"添加到清单中的活动属性.然后,所有邮件,Outlook,邮件和Gmail应用程序都将正常运行.

So the answer in this case is to add android:launchMode="singleTask" to the activity attribute in the manifest. Then all Messaging, Outlook, Mail, and Gmail apps all behave correctly.

现在必须弄清楚如何防止用户尝试多次打开此应用程序.

Now have to figure out how to prevent the user from trying to open this app multiple times.

这篇关于从链接启动应用程序时,Android Messaging,电子邮件应用程序行为的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆