2
我正在开发应用程序,因为我必须获取过去10天的所有通话和短信记录。现在,我只能找出所有向我发送短信和所有手机通讯录的联系人。所以,请大家帮我展示一下如何从我的应用程序中查找或获取最近10天的通话和短信详细信息?如何从我的应用程序中查找过去10天的通话和短信详细信息
我的代码是这样的:
final Uri SMS_INBOX = Uri.parse("content://sms/inbox");
Cursor c = getContentResolver().query(SMS_INBOX, null, "read", null, null);
int readMessagesCount = c.getCount();
Toast.makeText(getApplicationContext(),
"Read massage info"+readMessagesCount, 2000).show();
c.deactivate();
while (c.moveToNext()) {
String asd = new String(c.getBlob(c.getColumnIndex("address")));
Toast.makeText(getApplicationContext(), asd, Toast.LENGTH_SHORT).show();
我可以在哪里提到获得记录的天数? – Kutbi
嗨bindal..can你请给我一些关于短信日志的提示.... – Kutbi
@bindal嗨我从android消息应用程序中键入一条消息,并发送给你。我写一个应用程序,并从我的code.how检索你的号码这是可能的吗?请你帮我解决这个问题。请给我发邮件[email protected] – Maidul