SGS-3的错误有关的短信会话列表? [英] SGS-3 bug related to SMS conversations list?

查看:165
本文介绍了SGS-3的错误有关的短信会话列表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这个问题已经提交了几次,但还没有解决呢。我读了所有的邮件/线程这在某种程度上与此相关的话题无论是在的三星开发者网站在计算器

This issue was reported several times, but still not resolved yet. I read all messages/thread which somehow related to this topic either in Samsung's developers site or in StackOverflow

让我再次介绍只是几句话整个问题:

Let me again describe whole problem just in few words:

  1. 开发用于通过像简单的查询来获取短信会话列表:

  1. Developers used to get list of SMS conversations through simple query like:

Uri.parse(内容://彩信,短信/通话/); 光标光标= context.getApplicationContext()getContentResolver()查询(URI,NULL,NULL,NULL,NULL);

Uri.parse("content://mms-sms/conversations/"); Cursor cursor = context.getApplicationContext().getContentResolver().query(uri, null, null, null, null);

或者这样的事情。这里的关键点是URI地址:内容://彩信,短信/通话

or something like this. Key point here's URI address: content://mms-sms/conversations

大家都知道,它是非官方的,一个在做它自己的风险 - 的看到这里证明链接

Everyone knows that it's unofficial and one's doing it on his own risk - see proof link here

不过,关键的一点这里有一个简单的事实,仅在三星Galaxy S3这个code不能正常工作,Galaxy Tab的2部分车型它产生 NullPointerException异常与堆栈跟踪:

But, critical point here's a simple fact this code doesn't work properly only in Samsung Galaxy S3 and some models of Galaxy Tab 2. It produces NullPointerException with stacktrace:

显示java.lang.NullPointerException     在android.os.Parcel.readException(Parcel.java:1431)     在android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:188)     在android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:140)     在android.content.ContentProviderProxy.query(ContentProviderNative.java:366)     在android.content.ContentResolver.query(ContentResolver.java:372)     在android.content.ContentResolver.query(ContentResolver.java:315)

java.lang.NullPointerException at android.os.Parcel.readException(Parcel.java:1431) at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:188) at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:140) at android.content.ContentProviderProxy.query(ContentProviderNative.java:366) at android.content.ContentResolver.query(ContentResolver.java:372) at android.content.ContentResolver.query(ContentResolver.java:315)

在世界/宇宙的其余它的工作原理以及所有其它设备!奇怪了,是吧?

In all other devices of the rest of the World/Universe it works well! Strange, huh?

我知道答案,如:嘿伙计,这是你的问题,因为presence /上述URI的正确性没有保证,不过,确实有人有更高效的想法

I know answers like: hey dude, it's your problem, since presence/correctness of aforementioned URI doesn't guaranteed, nevertheless, does someone has more productive idea?

我已经通过他们的论坛已经发布的问题,以三星的开发。

I have already posted question to Samsung's developers through their forum.

推荐答案

在最后,我想通了如何克服上述问题,(我不知道它的错误,但无论如何,它看起来像一个bug)。

In the end I've figured how to overcome aforementioned issue (I am not sure that it's bug, but anyway it looks like a bug).

可以通过这个查询检索会话列表:

List of conversations can be retrieved through this query:

Uri.parse("content://mms-sms/conversations?simple=true"); 
Cursor cursor = context.getApplicationContext().getContentResolver().query(uri, null, null, null, null);

关键点位置的URI 内容://彩信,短信/通话简单= TRUE

这篇关于SGS-3的错误有关的短信会话列表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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