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?
schemeis not the scheme.contentis the scheme, following the rules for URI values. What you have asschemeis what in an Androidcontent://Uriis referred to as the authority.It is the authority. It needs to be in
android:authoritiesattribute for your<provider>in your manifest, and it is used by Android to find the one trueContentProviderfor anyUri.They are the same, because you are misusing the term "scheme".