Android 短信上下文菜单
我在谷歌上做了一些搜索,认为我在提问之前就知道了这个问题的答案,但是我在互联网上找到的大部分内容可以追溯到近一年前。
是否可以在短信上下文菜单中添加额外的菜单项,例如我正在开发的应用程序,如果您按下它,它可以从该消息中打开您的应用程序。
否则,是否可以向短信添加一个“标志”,以便在设备上收到短信时,它会尝试在与库存短信不同的应用程序中打开它(如果存在)。
*编辑详细说明:
我目前正在编写一个应用程序,它基本上是一个自定义短信应用程序(它是一个uni项目)我想要找出的是是否有可能实现以下两件事之一:
1,添加一个上下文菜单项标准应用程序中的短信 - 此菜单的想法是链接它以在我的应用程序中打开它,
如果不是的话
2,添加某种标志?到短信,以便当手机上收到该消息时,服务或其他东西会检查该标志是否存在,如果存在,则在我的应用程序上打开该短信(如果已安装),否则在标准默认短信应用程序中打开它
I have done a little but of looking around on google and think i know the answer to this before asking, however most of what i found on the internet dates back almost a year so.
Is it possible to add an extra menu item to the SMS context menu so for example an app i am working on, if you press it it can open you app from that message.
otherwise is it possible to add a "flag" to an SMS so then when it is recieved on a device it would try to open it in a different application than the stock SMS one if it exsists.
*edit to elaborate:
I am currently writing an app which is basically a custom SMS app (its a uni project) What i am trying to find out is if it is possible to 1 of 2 things:
1, add a context menu item to a SMS in the standard app - the idea of this menu is to link it to open it in my app
if not then
2, add somesort of flag? to the text message so that when its recived on the phone a service or something checks to see if the flag exists, if it does then opens that SMS on my app (if its installed) else opens it in the standard default SMS application
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
对于第二种方法,我建议您应该使用 BroadcastReceiver。
当需要对特定
事件执行任何操作(例如 onIncomingVoiceCall 或传入短信)时,将使用 BroadcastReceiver。
我认为这将达到你的目的。
如果您觉得我的回答有用请标记。
此致,
~阿努普
For the second approach I will suggest you should use BroadcastReceiver.
BroadcastReceiver is used when there will any action which needs to happens on a particular
event let's say onIncomingVoiceCall or incomingSMS.
I think this will serve your purpose.
If you find my answer useful please mark it.
Best Regards,
~Anup