How many database columns associated with a SMS in android?

前端 未结 6 907
野的像风
野的像风 2020-12-04 20:15

I want to read all the messages and their respective details from my phone. For this I am using the Uri like this:

Uri sms = Uri.parse(\"content://sms/\");
<         


        
6条回答
  •  春和景丽
    2020-12-04 20:46

    You should be able to rotate through the Cursor and look for yourself:

    mCursor = managedQuery(sms, null, null, null, null);
    
    StringBuffer info = new StringBuffer();
    for( int i = 0; i < mCursor.getColumnCount(); i++) {
        info.append("Column: " + mCursor.getColumnName(i) + "\n");
    }
    Toast.makeText(getApplicationContext(), info.toString(), Toast.LENGTH_LONG).show();
    

提交回复
热议问题