Java – Android – how to delete an item from a cursor?
•
Java
Suppose I use the following cursor to get someone's call record:
String[] strFields = { android.provider.CallLog.Calls.NUMBER,android.provider.CallLog.Calls.TYPE,android.provider.CallLog.Calls.CACHED_NAME,android.provider.CallLog.Calls.CACHED_NUMBER_TYPE }; String strOrder = android.provider.CallLog.Calls.DATE + " DESC"; Cursor mCallCursor = getContentResolver().query( android.provider.CallLog.Calls.CONTENT_URI,strFields,null,strOrder );
Now, how do I delete item I in this cursor? It may also be a cursor to get a music list, etc So I have to ask – is this even possible? I can understand that some cursors do not allow third-party applications to delete
thank you.
Solution
Sorry, you can't delete it from the cursor
You must use contentresolver or some type of SQL call
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码