从我自己的应用程序启动SMS活动@ ConversarionList.class [英] start sms Activity @ ConversarionList.class from my own app

查看:201
本文介绍了从我自己的应用程序启动SMS活动@ ConversarionList.class的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经做了我的研究,发现许多人从发射意图的短信应用程序,问题是,人们通常倾向于做这仅用于传出消息。

I've done my research and found plenty of people launching the sms application from an intent, The thing is that people usually tend to do this only for outgoing messages.

我目前显示未读短信计数在我的应用程序,但它接缝我不能得到适当的意图工作。

I'm currently displaying a Unread Sms Count on my app, but it seams I cant get the proper intent to work.

在每一个尝试,我得到了相同的结果,它启动应用程序,但一个新的短信......

On every try I get the same result, It launches the app but for a new sms...

我目前的意图看起来像这样

My current intent looks like this

Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(Uri.parse("sms:"));
startActivity(intent);

和它的结果是:

  • 编辑:帕拉 - >到
  • Escribir mensaje - >填写留言
  • 在投递 - >发送

我希望我足够清楚这一点。

I hope I'm clear enough about this.

现在的问题是:

如何我可以通过一个Intent到Android上的应用程序短信的收件箱中?

编辑:我只是想复制这样的:

I just want to replicate this:

startActivity(new Intent(this, ConversationList.class));

至极我从:<一href="http://www.google.com/$c$csearch/p?hl=en#dpDz7Q08o9c/src/com/android/mms/ui/ComposeMessageActivity.java" rel="nofollow">http://www.google.com/$c$csearch/p?hl=en#dpDz7Q08o9c/src/com/android/mms/ui/ComposeMessageActivity.java @LINE:2028

Wich I took from: http://www.google.com/codesearch/p?hl=en#dpDz7Q08o9c/src/com/android/mms/ui/ComposeMessageActivity.java @LINE: 2028

在我自己的应用程序。但我似乎无法得到它的工作。

On my own app. But I cant seem to get it to work.

在先进的感谢。

推荐答案

什么是SetClassName?

What is SetClassName?

为了启动位于我们需要声明的东西像一个完整路径,以它目前的应用程序之外的一类...

In order to start a class located outside the current application we need to declare something like a "Full Path" to it...

为了打开,我们需要做的这个默认的SMS应用@ConversationList:

In order to open the default sms Application @ConversationList we need to do this:

Intent intent = new Intent(Intent.ACTION_MAIN);
intent.addCategory(Intent.CATEGORY_LAUNCHER);
intent.setClassName("com.android.mms", "com.android.mms.ui.ConversationList");

来源:

  • http://mylifewithandroid.blogspot.com/2007/12/playing-with-intents.html
  • http://javasdn.cn/viewthread.php?action=printable&tid=204

这篇关于从我自己的应用程序启动SMS活动@ ConversarionList.class的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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