ContentProvider既可以与调用方处在同一进程,也可以运行在单独进程中,完全取决于ContentProvider所处的aplication的进程信息。因此假如ContentProvider运行在单独的进程中,那么调用ContentProvider将会涉及到IPC通信。
既然涉及到IPC通信,那么ContentProvider一定继承自IInterface,这个IInterface就是IContentProvider,其主要的接口方法如下,
public IBulkCursor bulkQuery(Uri url, String[] projection, String selection, String[] selectionArgs, String sortOrder, IContentObserver observer, CursorWindow window) throws RemoteException; public Cursor query(Uri url, String[] projection, String selection, String[] selectionArgs, String sortOrder) throws RemoteException; public String getType(Uri url) throws RemoteException; public Uri insert(Uri url, ContentValues initialValues) throws RemoteException; public int bulkInsert(Uri url, ContentValues[] initialValues) throws RemoteException; publ
运行在单独进程中的ContentProvider
最新推荐文章于 2020-11-24 04:21:09 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)