a standard for letting the 3rd party app know how to get them from my Contract class..
That's called "a Web page", or some other form of documentation.
For example, the reason you know the column names for the SDK-supplied providers is because that's (somewhat) documented in the JavaDocs.
You need to document:
the
Uri
pattern(s) that you are expecting, particularly for keyUri
values (e.g.,CONTENT_URI
values for queries)the column names that can be requested in a projection
the "rules of the game" for how you are interpreting the
selection
,selectionArgs
, andsortOrder
parameters toquery
(e.g., can these be considered ordinary SQL using your column names?)etc.
Whether you supply this documentation in the form of Web pages, a PDF file, a training video, or something else, is up to you.
UPDATE based upon edit:
What I want to do in particular is to let the user to share data (file - images and pdfs) from my app to other apps
Then you need a ContentProvider
that supports openFile()
or openAssetFile()
. Ideally, it also supports query()
, but specifically for the OpenableColumns
projection, not arbitrary stuff.
This sample project demonstrates what your ContentProvider
would need to do, though you would need to replace my read-the-file-from-assets logic with your read-the-encrypted-file-and-decrypt-it logic.