我需要比较此类代码中电话号码的最后 10 位数字:
String selectionClause = ContactsContract.CommonDataKinds.Phone.NUMBER+ " = ?";
String[] selectionClauseArgs = { callerId };
Cursor people = resolver.query(
ContactsContract.CommonDataKinds.Phone.CONTENT_URI, projections,
selectionClause, selectionClauseArgs, null);
所以selectionClause
应该像
String selectionClauseArgs = "substr("+CommonDataKinds.Phone.NUMBER+",-1,10) = ?";
但我不确定在SQLLite
查询时是否可以使用此类查询ContentProviders
。