SMS被复制为通话(Samsung galaxy S II) [英] SMS are duplicated as Calls(Samsung galaxy S II)

查看:58
本文介绍了SMS被复制为通话(Samsung galaxy S II)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好的,伙计们,这是我获取短信的代码:

Ok, guys, here's my code for getting SMS:

Cursor cursor = getContentResolver().query(Uri.parse(uri),
                null, CallLog.Calls.DATE + " > " + lastSmsTime, null,
                CallLog.Calls.DATE + " ASC");

类型为:

"content://sms/inbox"
"content://sms/sent"

通话:

String[] projection = new String[] { CallLog.Calls.NUMBER,
                CallLog.Calls.TYPE, CallLog.Calls.DURATION, CallLog.Calls.DATE };
Cursor managedCursor = getContentResolver().query(
                CallLog.Calls.CONTENT_URI, projection,
                CallLog.Calls.DATE + " > " + lastCallTime, null,
                CallLog.Calls.DATE + " ASC");

首先,我知道这是未记录的提供程序(如您所见,我使用来自另一个变量的列常量).

First of all, I know that this is undocumented provider(as you see, I use column constants from different one).

有趣的是,这在几个2.3.x设备上都可以正常工作.但是现在我在Galaxy S II(ICS 4.0.3)上尝试了此操作.现在,所有短信在呼叫提供商中都是重复的.

Funny thing is that this is working ok on several 2.3.x devices. But now I tried this on Galaxy S II(ICS 4.0.3). Now all SMS are duplicated in calls provider.

有人遇到这个问题吗?

UPD 我在此处找到了相同的问题,请保留寻找解决方案.

UPD I found the same question here, keep looking for the solution.

UDD 2 据我所知,三星现在将所有内容存储在一个日志中,因此我将尝试找到一种对日志应用程序进行反向工程的方法.

UDD 2 from what I know now, Samsung now stores everything in one log, so I'll try to find a way to reverse-engineer log application.

无论如何,仍在寻找解决方案来单独的短信和通话.

Anyway, still looking for solution to separate sms and calls.

推荐答案

好的,这可能是解决方案,所以我将其发布: 三星日志提供商有很多专栏,其中

Ok, that's might be the solution, so I'm posting it: Samsung logs provider has lot's of columns, among them is

logtype

据我所知,电话是100,SMS是300,MMS是200.

which, as far as I see, for calls is 100, for SMS is 300 and for MMS is 200.

还可以检测到制造商:

String man = android.os.Build.MANUFACTURER;

String man = android.os.Build.MANUFACTURER;

因此,对于三星设备,应该有单独的代码来检查 logtype .

So, for samsung devices there should be separate code which will check the logtype.

这篇关于SMS被复制为通话(Samsung galaxy S II)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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