android - Can multiple ContentProvider's serve the same URI? -


when querying contentprovider on android, 1 specifies contentprovider of interest providing "content uri" contentprovider. happens when multiple contentprovider's serve same uri, either intentionally? or maliciously?

when trying open pic on phone, i've seen prompt apps can "handle" image. same kind of thing happen here?

multiple contentproviders can't this. first application registers content provider using element in manifest has control on uri pattern. i'm pretty sure you'll installation error if try add provider uses same uri pattern. android keeps track of providers , uris.

when see prompt multiple apps handling file or situation, that's because apps have specified child includes android.intent.category.category_alternative or android.intent-category.category_selected_alternatve. in essence, app or apps declaring alternatives action specified in child. allows user have multiple choices handling type of data.

it makes sense provide alternatives: user might want edit picture, share via twitter, or e-mail it.

note 2 content providers can same thing, can't use same uri. app has make conscious choice of 1 use, or provide mechanism of choosing between two.


Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -