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