Google은 흑인 공동체를 위한 인종 간 평등을 진전시키기 위해 노력하고 있습니다. Google에서 어떤 노력을 하고 있는지 확인하세요.

AppWidgetProviderWithCallbacks

public class AppWidgetProviderWithCallbacks
extends AppWidgetProvider implements CallbackReceiver<T extends CallbackReceiver>

java.lang.Object
   ↳ android.content.BroadcastReceiver
     ↳ android.appwidget.AppWidgetProvider
       ↳ androidx.remotecallback.AppWidgetProviderWithCallbacks<T extends androidx.remotecallback.CallbackReceiver>


Version of AppWidgetProvider that implements a CallbackReceiver.

Summary

Public constructors

AppWidgetProviderWithCallbacks()

Public methods

T createRemoteCallback(Context context)

Creates a RemoteCallback that will call the method with method specified with the arguments specified when triggered.

void onReceive(Context context, Intent intent)

Inherited methods

Public constructors

AppWidgetProviderWithCallbacks

public AppWidgetProviderWithCallbacks ()

Public methods

createRemoteCallback

public T createRemoteCallback (Context context)

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;
     }
 

Parameters
context Context

Returns
T

onReceive

public void onReceive (Context context, 
                Intent intent)

Parameters
context Context

intent Intent