ContentProviderWithCallbacks
abstract class ContentProviderWithCallbacks<T : ContentProviderWithCallbacks?> : ContentProvider, CallbackReceiver
Version of ContentProvider that can be used as a CallbackReceiver. Be sure to call the super of call when unhandled to ensure callbacks are triggered.
| Parameters | |
|---|---|
<T : ContentProviderWithCallbacks?> |
Should be specified as the root class (e.g. class X extends ContentProviderWithCallbacks\) |
Summary
Public constructors |
|---|
Public functions |
|
|---|---|
Unit |
|
Bundle? |
|
T |
Creates a |
Inherited Constants |
||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Public constructors
ContentProviderWithCallbacks
ContentProviderWithCallbacks()Public functions
createRemoteCallback
funcreateRemoteCallback(context: Context): T
Creates a RemoteCallback that will call the method with method specified with the arguments specified when triggered. Only methods tagged with RemoteCallable can be used here. This method returns a stub implementation of the class calling it to record the arguments/method being used. This should only be used in a chain of 2 calls, starting with createRemoteCallback(), then followed up with a call to any method tagged with RemoteCallable.
createRemoteCallback().callMyMethod("My arguments", 43, 2.4) .toPendingIntent(context);
\@RemoteCallable public RemoteCallback callMyMethod(String argStr, int argInt, double argDouble) { ... return RemoteCallback.LOCAL; }