1

I am working on an android project where I needed to use contentprovider for thread safe database related operations inside a service. But loadermanager with callbacks is not available to use in service. What is the best replacement for loadermanager inside service that will have callbacks and contentprovider?

pratsJ
  • 3,369
  • 3
  • 22
  • 41

1 Answers1

1

You don't need LoaderManager, as your Service don't have configuration changes and restart Activities and Fragments have cause of rotation changes, or user changing tasks. Just use the Loader. Also, see this answer : Can you use a LoaderManager from a Service?

Community
  • 1
  • 1
Louis CAD
  • 10,965
  • 2
  • 39
  • 58