【问题标题】:How to display android sms inbox如何显示安卓短信收件箱
【发布时间】:2012-02-15 22:59:36
【问题描述】:
Notification notifyDetails = new Notification(R.drawable.msg,"message received",System.currentTimeMillis());
                    PendingIntent myIntent = PendingIntent.getActivity(context, 0, new Intent(Intent.ACTION_VIEW), 0);

我正在使用广播接收器来通知传入消息。收到消息时,我可以在通知栏中显示我自己的通知。当用户点击它时,我需要它转到收件箱或当前收到的消息。

PendingIntent myIntent = PendingIntent.getActivity(context, 0, new Intent(Intent.ACTION_VIEW, People.CONTENT_URI), 0);
//          notifyDetails.setLatestEventInfo(context, "Time has been Reset", "Click on me to view Contacts", myIntent);

就像这里,当用户点击它会转到 android 中的联系人。所以我传递的意图是当用户点击它时它会进入收件箱。

【问题讨论】:

    标签: android sms


    【解决方案1】:

    http://www.anddev.org/open_sms_activity-t6375.html的回答:

            String SMS_MIME_TYPE = "vnd.android-dir/mms-sms";
    
            Intent defineIntent = new Intent(Intent.ACTION_MAIN);                
    
            defineIntent.setType(SMS_MIME_TYPE);                
    
            PendingIntent pendingIntent = PendingIntent.getActivity(context, 0 , defineIntent, 0);
    

    【讨论】:

    • 此技术未记录,不受支持,可能不适用于某些当前的 Android 设备,可能不适用于未来的 Android 设备,因此不推荐。
    • 哦。刚刚签入我的代码,现在让我们看看是否有另一个选项。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-05-25
    • 2012-07-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多