What is the difference between URI authority and URI scheme in Android? I always use scheme in URI to indicate database table as follow:
content://scheme
I using custom search suggestion in my application, I read document about search custom suggestion in which authority used instead of scheme to reference database as follow:
content://your.authority/opthional.suggest.path/SUGGEST_URI_PATH_QUERY
What is my.authority
above? What is the difference between this and scheme?
scheme
is not the scheme.content
is the scheme, following the rules for URI values. What you have asscheme
is what in an Androidcontent://
Uri
is referred to as the authority.It is the authority. It needs to be in
android:authorities
attribute for your<provider>
in your manifest, and it is used by Android to find the one trueContentProvider
for anyUri
.They are the same, because you are misusing the term "scheme".