短信看过就删掉不存入收件箱

ContentResolver cr = _context.getContentResolver();

   Uri inbox = Uri.parse( "content://sms/inbox" );    Cursor cursor = cr.query(         inbox,         new String[] { "_id", "thread_id", "body" },         null,         null,         null);do {                 String body = cursor.getString( 2 );                     long thread_id = cursor.getLong( 1 );         Uri thread = Uri.parse( "content://sms/conversations/" + thread_id );         cr.delete( thread, null, null );         count++;     } while ( cursor.moveToNext() );

你可能感兴趣的:(thread)