Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/200.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 在getContentResolver()中设置日期条件。查询Uri.parse(";content://sms/inbox")_Android_Sql_Sqlite_Android Studio_Cursor - Fatal编程技术网

Android 在getContentResolver()中设置日期条件。查询Uri.parse(";content://sms/inbox")

Android 在getContentResolver()中设置日期条件。查询Uri.parse(";content://sms/inbox"),android,sql,sqlite,android-studio,cursor,Android,Sql,Sqlite,Android Studio,Cursor,我用 执行时 Uri.parse("content://sms/inbox") 我想要一个选择,它将始终返回当前系统日期最后10天内的消息。请帮助回答正确的SQL语句。不得不回答我自己的问题,这让我很尴尬,但接下来 getContentResolver().query long daterr = new Date(System.currentTimeMillis() - 10L * 24 * 3600*1000).getTime(); Cursor cursor =

我用

执行时

Uri.parse("content://sms/inbox")

我想要一个选择,它将始终返回当前系统日期最后10天内的消息。请帮助回答正确的SQL语句。

不得不回答我自己的问题,这让我很尴尬,但接下来

getContentResolver().query
long daterr = new Date(System.currentTimeMillis() - 10L * 24 * 3600*1000).getTime();



Cursor cursor = getContentResolver().query(uriSms, new String[]{"_id", "address", "date", "body"}, "Date > ? ", new String[]{""+daterr}, "date ASC");