AppWidgetProviderWithCallbacks


class AppWidgetProviderWithCallbacks<T : CallbackReceiver?> : AppWidgetProvider, CallbackReceiver<T!>


Version of AppWidgetProvider that implements a CallbackReceiver.

Parameters
<T : CallbackReceiver?>

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

Summary

Public constructors

This function is deprecated. Deprecated in Java

Public functions

T

This function is deprecated. Deprecated in Java

Unit
onReceive(context: Context!, intent: Intent!)

This function is deprecated. Deprecated in Java

Inherited functions

From android.appwidget.AppWidgetProvider
Unit
onAppWidgetOptionsChanged(
    context: Context!,
    appWidgetManager: AppWidgetManager!,
    appWidgetId: Int,
    newOptions: Bundle!
)

This function is deprecated. Deprecated in Java

Unit
onDeleted(context: Context!, appWidgetIds: IntArray<Int>!)

This function is deprecated. Deprecated in Java

Unit
onDisabled(context: Context!)

This function is deprecated. Deprecated in Java

Unit
onEnabled(context: Context!)

This function is deprecated. Deprecated in Java

Unit
onRestored(
    context: Context!,
    oldWidgetIds: IntArray<Int>!,
    newWidgetIds: IntArray<Int>!
)

This function is deprecated. Deprecated in Java

Unit
onUpdate(
    context: Context!,
    appWidgetManager: AppWidgetManager!,
    appWidgetIds: IntArray<Int>!
)

This function is deprecated. Deprecated in Java

From android.content.BroadcastReceiver
Unit

This function is deprecated. Deprecated in Java

Unit

This function is deprecated. Deprecated in Java

Boolean

This function is deprecated. Deprecated in Java

Boolean

This function is deprecated. Deprecated in Java

Int

This function is deprecated. Deprecated in Java

String!

This function is deprecated. Deprecated in Java

Bundle!

This function is deprecated. Deprecated in Java

String!

This function is deprecated. Deprecated in Java

Int

This function is deprecated. Deprecated in Java

BroadcastReceiver.PendingResult!

This function is deprecated. Deprecated in Java

Boolean

This function is deprecated. Deprecated in Java

Boolean

This function is deprecated. Deprecated in Java

IBinder!
peekService(myContext: Context!, service: Intent!)

This function is deprecated. Deprecated in Java

Unit

This function is deprecated. Deprecated in Java

Unit
setOrderedHint(isOrdered: Boolean)

This function is deprecated. Deprecated in Java

Unit
setResult(code: Int, data: String!, extras: Bundle!)

This function is deprecated. Deprecated in Java

Unit

This function is deprecated. Deprecated in Java

Unit

This function is deprecated. Deprecated in Java

Unit

This function is deprecated. Deprecated in Java

Public constructors

AppWidgetProviderWithCallbacks

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

Public functions

createRemoteCallback

fun createRemoteCallback(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;
    }

onReceive

fun onReceive(context: Context!, intent: Intent!): Unit