Can I use downloaders without a content provider or combination?

  • Can I use downloaders without a content provider or combination?

  • Is it better to use a content provider only when it is intended? is it recommended for use by other applications or for local use of content as well?

  • If the data is updated in SQLite, will the loader load the updated data if it is not used with the content provider?

I tried to find convincing answers to the above questions, but could not find them. Please help.

+5
source share
1 answer
  • Loader is a way to load information for your activity / fragment without performing calculations in the user interface thread. It can be used with a content provider or you can use a subclass of Loader / AsyncTaskLoader to access the data of your choice. You can find more information on how and when to use Loader here .
  • It is best to use a content provider to access data when a content provider is available. They are maintained by the system and are a good way to ensure the consistency of the data provided. You can create your own content provider to provide data from one application to another. More information can be found here .
  • You can create a bootloader for the sqlite database by specifying the information in this guide in section 7 here .
+2
source

Source: https://habr.com/ru/post/1236121/


All Articles