Refresh/Reload database reference in custom ContentProvider after restore

前端 未结 4 1459
失恋的感觉
失恋的感觉 2020-12-16 21:57

I use a ContentProvider in my app and everything works great except for one little issue. I have a backup and restore function that backs up the database to a file on the SD

4条回答
  •  甜味超标
    2020-12-16 22:38

    You can also simply use the delete method without a selection:

    context.getContentResolver().delete(YourProvider.CONTENT_URI, null, null);
    

提交回复
热议问题