0

I've been trying to work on a custom content provider and I have a few questions.

  1. How is the Android framework using Authority property? Why is it required to declare it in the manifest, shouldn't the class name be enough?

  2. Who/what process calls the getType() method in the ContentProvider implementation?

  3. What is the need of the urimatcher? Should it be used if the underlying database has only a handful of tables?

Cœur
  • 37,241
  • 25
  • 195
  • 267
zerayaqob
  • 426
  • 1
  • 6
  • 12

1 Answers1

1

You are required to declare it in the manifest because data access permissions are listed in the Market entry. I.E. "Has permission to read contact information".

getType() is called when you want to get the MIMETYPE of a column accessed by a ContentProvider. This is called when you use MyContentProvider.getType(myUri)

Hope this helps!

Codeman
  • 12,157
  • 10
  • 53
  • 91