using ContentProviderClient vs ContentResolver to access content provider

前端 未结 5 1759
广开言路
广开言路 2020-12-07 11:09

The documentation on Android content providers describes using a ContentResolver, obtained from getContentResolver(), to access the content.

<
5条回答
  •  粉色の甜心
    2020-12-07 11:18

    Ok, but be aware that it works only when ContentProvider running in this same process as Activity.

    Note from documentation for method getLocalContentProvider():

    If the ContentProvider is running in a different process then null will be returned. This can be used if you know you are running in the same process as a provider, and want to get direct access to its implementation details.

提交回复
热议问题