AppWidgetProviderWithCallbacks


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


Version of AppWidgetProvider that implements a CallbackReceiver.

Parameters
<T extends CallbackReceiver>

Should be specified as the root class (e.g. class X extends AppWidgetProviderWithCallbacks\)

Summary

Public constructors

This method is deprecated. Deprecated in Java

Public methods

@NonNull T

This method is deprecated. Deprecated in Java

void
onReceive(Context context, Intent intent)

This method is deprecated. Deprecated in Java

Inherited methods

From android.appwidget.AppWidgetProvider
void
onAppWidgetOptionsChanged(
    Context context,
    AppWidgetManager appWidgetManager,
    int appWidgetId,
    Bundle newOptions
)

This method is deprecated. Deprecated in Java

void
onDeleted(Context context, int[] appWidgetIds)

This method is deprecated. Deprecated in Java

void

This method is deprecated. Deprecated in Java

void
onEnabled(Context context)

This method is deprecated. Deprecated in Java

void
onRestored(Context context, int[] oldWidgetIds, int[] newWidgetIds)

This method is deprecated. Deprecated in Java

void
onUpdate(
    Context context,
    AppWidgetManager appWidgetManager,
    int[] appWidgetIds
)

This method is deprecated. Deprecated in Java

From android.content.BroadcastReceiver
final void

This method is deprecated. Deprecated in Java

final void

This method is deprecated. Deprecated in Java

final boolean

This method is deprecated. Deprecated in Java

final boolean

This method is deprecated. Deprecated in Java

final int

This method is deprecated. Deprecated in Java

final String

This method is deprecated. Deprecated in Java

final Bundle
getResultExtras(boolean makeMap)

This method is deprecated. Deprecated in Java

String

This method is deprecated. Deprecated in Java

int

This method is deprecated. Deprecated in Java

final BroadcastReceiver.PendingResult

This method is deprecated. Deprecated in Java

final boolean

This method is deprecated. Deprecated in Java

final boolean

This method is deprecated. Deprecated in Java

IBinder
peekService(Context myContext, Intent service)

This method is deprecated. Deprecated in Java

final void
setDebugUnregister(boolean debug)

This method is deprecated. Deprecated in Java

final void
setOrderedHint(boolean isOrdered)

This method is deprecated. Deprecated in Java

final void
setResult(int code, String data, Bundle extras)

This method is deprecated. Deprecated in Java

final void
setResultCode(int code)

This method is deprecated. Deprecated in Java

final void

This method is deprecated. Deprecated in Java

final void

This method is deprecated. Deprecated in Java

Public constructors

AppWidgetProviderWithCallbacks

Added in 1.0.0-alpha03
Deprecated in 1.0.0-alpha03
public AppWidgetProviderWithCallbacks()

Public methods

createRemoteCallback

public @NonNull T createRemoteCallback(@NonNull 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;
    }

onReceive

public void onReceive(Context context, Intent intent)