TileProviderService

public abstract class TileProviderService


Base class for a service providing data for an app tile.

A provider service must implement onTileRequest and onResourcesRequest to respond to requests for updates from the system.

The manifest declaration of this service must include an intent filter for .

The manifest entry should also include {@code * android:permission="com.google.android.wearable.permission.BIND_TILE_PROVIDER"} to ensure that only the system can bind to it.

Summary

Constants

static final @NonNull String

The intent action used to send update requests to the provider.

static final @NonNull String

The ID for the Intent extra containing the ID of the Clickable.

static final @NonNull String

The name of the metadata key that should contain a drawable to be presented as a Tile preview.

Public methods

static @NonNull TileUpdateRequester

Gets an instance of TileUpdateRequester to allow a Tile Provider to notify the tile's renderer that it should request a new Timeline from this TileProviderService.

@Override @Nullable IBinder

Inherited methods

From class Context
From class ContextWrapper
@NonNull boolean
bindIsolatedService(
    @NonNull Intent service,
    @NonNull int flags,
    @NonNull String instanceName,
    @NonNull Executor executor,
    @NonNull ServiceConnection conn
)
@NonNull boolean
bindService(
    @NonNull Intent service,
    @NonNull ServiceConnection conn,
    @NonNull int flags
)
@NonNull boolean
bindServiceAsUser(
    @NonNull Intent service,
    @NonNull ServiceConnection conn,
    @NonNull int flags,
    @NonNull UserHandle user
)
@NonNull int
@NonNull int
@NonNull int
@NonNull int
checkCallingUriPermission(@NonNull Uri uri, @NonNull int modeFlags)
@NonNull int
checkPermission(
    @NonNull String permission,
    @NonNull int pid,
    @NonNull int uid
)
@NonNull int
@NonNull int
checkUriPermission(
    @NonNull Uri uri,
    @NonNull int pid,
    @NonNull int uid,
    @NonNull int modeFlags
)
@NonNull void

This method is deprecated.

@NonNull Context
@NonNull Context
@NonNull Context
@NonNull Context
@NonNull Context
@NonNull Context
createPackageContext(@NonNull String packageName, @NonNull int flags)
@NonNull Context
createWindowContext(@NonNull int type, @NonNull Bundle options)
@NonNull Array<@NonNull String>
@NonNull boolean
@NonNull boolean
@NonNull boolean
@NonNull void
enforceCallingOrSelfPermission(
    @NonNull String permission,
    @NonNull String message
)
@NonNull void
enforceCallingOrSelfUriPermission(
    @NonNull Uri uri,
    @NonNull int modeFlags,
    @NonNull String message
)
@NonNull void
enforceCallingPermission(
    @NonNull String permission,
    @NonNull String message
)
@NonNull void
enforceCallingUriPermission(
    @NonNull Uri uri,
    @NonNull int modeFlags,
    @NonNull String message
)
@NonNull void
enforcePermission(
    @NonNull String permission,
    @NonNull int pid,
    @NonNull int uid,
    @NonNull String message
)
@NonNull void
enforceUriPermission(
    @NonNull Uri uri,
    @NonNull int pid,
    @NonNull int uid,
    @NonNull int modeFlags,
    @NonNull String message
)
@NonNull Array<@NonNull String>
@NonNull Context
@NonNull ApplicationInfo
@NonNull AssetManager
@NonNull String
@NonNull Context
@NonNull File
@NonNull ClassLoader
@NonNull File
@NonNull ContentResolver
@NonNull File
@NonNull File
@NonNull File
getDir(@NonNull String name, @NonNull int mode)
@NonNull Display
@NonNull File
@NonNull Array<@NonNull File>
@NonNull File
@NonNull Array<@NonNull File>
@NonNull Array<@NonNull File>

This method is deprecated.

@NonNull File
@NonNull File
@NonNull Executor
@NonNull Looper
@NonNull File
@NonNull File
@NonNull Array<@NonNull File>
@NonNull String
@NonNull String
@NonNull PackageManager
@NonNull String
@NonNull String
@NonNull Resources
@NonNull SharedPreferences
@NonNull Object
@NonNull String
@NonNull Resources.Theme
@NonNull Drawable

This method is deprecated.

@NonNull int

This method is deprecated.

@NonNull int

This method is deprecated.

@NonNull void
grantUriPermission(
    @NonNull String toPackage,
    @NonNull Uri uri,
    @NonNull int modeFlags
)
@NonNull boolean
@NonNull boolean
@NonNull boolean
moveDatabaseFrom(@NonNull Context sourceContext, @NonNull String name)
@NonNull boolean
moveSharedPreferencesFrom(
    @NonNull Context sourceContext,
    @NonNull String name
)
@NonNull FileInputStream
@NonNull FileOutputStream
openFileOutput(@NonNull String name, @NonNull int mode)
@NonNull SQLiteDatabase
openOrCreateDatabase(
    @NonNull String name,
    @NonNull int mode,
    @NonNull SQLiteDatabase.CursorFactory factory
)
@NonNull Drawable

This method is deprecated.

@NonNull Intent
registerReceiver(
    @NonNull BroadcastReceiver receiver,
    @NonNull IntentFilter filter
)
@NonNull void

This method is deprecated.

@NonNull void

This method is deprecated.

@NonNull void
revokeUriPermission(@NonNull Uri uri, @NonNull int modeFlags)
@NonNull void
@NonNull void
@NonNull void
sendOrderedBroadcast(
    @NonNull Intent intent,
    @NonNull String receiverPermission
)
@NonNull void
sendOrderedBroadcastAsUser(
    @NonNull Intent intent,
    @NonNull UserHandle user,
    @NonNull String receiverPermission,
    @NonNull BroadcastReceiver resultReceiver,
    @NonNull Handler scheduler,
    @NonNull int initialCode,
    @NonNull String initialData,
    @NonNull Bundle initialExtras
)
@NonNull void

This method is deprecated.

@NonNull void

This method is deprecated.

@NonNull void
sendStickyOrderedBroadcast(
    @NonNull Intent intent,
    @NonNull BroadcastReceiver resultReceiver,
    @NonNull Handler scheduler,
    @NonNull int initialCode,
    @NonNull String initialData,
    @NonNull Bundle initialExtras
)

This method is deprecated.

@NonNull void
sendStickyOrderedBroadcastAsUser(
    @NonNull Intent intent,
    @NonNull UserHandle user,
    @NonNull BroadcastReceiver resultReceiver,
    @NonNull Handler scheduler,
    @NonNull int initialCode,
    @NonNull String initialData,
    @NonNull Bundle initialExtras
)

This method is deprecated.

@NonNull void
setTheme(@NonNull int resid)
@NonNull void

This method is deprecated.

@NonNull void
@NonNull void
@NonNull ComponentName
@NonNull boolean
startInstrumentation(
    @NonNull ComponentName className,
    @NonNull String profileFile,
    @NonNull Bundle arguments
)
@NonNull void
startIntentSender(
    @NonNull IntentSender intent,
    @NonNull Intent fillInIntent,
    @NonNull int flagsMask,
    @NonNull int flagsValues,
    @NonNull int extraFlags
)
@NonNull ComponentName
@NonNull boolean
@NonNull void
@NonNull void
@NonNull void
updateServiceGroup(
    @NonNull ServiceConnection conn,
    @NonNull int group,
    @NonNull int importance
)
From class Service
final @NonNull Application
final @NonNull int
@NonNull void
@NonNull void
@NonNull void
@NonNull void
@NonNull void
@NonNull void
onStart(@NonNull Intent intent, @NonNull int startId)

This method is deprecated.

@NonNull int
onStartCommand(
    @NonNull Intent intent,
    @NonNull int flags,
    @NonNull int startId
)
@NonNull void
@NonNull void
onTrimMemory(@NonNull int level)
@NonNull boolean
final @NonNull void
startForeground(@NonNull int id, @NonNull Notification notification)
final @NonNull void
stopForeground(@NonNull boolean removeNotification)
final @NonNull void
final @NonNull boolean
stopSelfResult(@NonNull int startId)

Constants

ACTION_BIND_TILE_PROVIDER

@NonNull
public static final @NonNull String ACTION_BIND_TILE_PROVIDER

The intent action used to send update requests to the provider. Tile provider services must declare an intent filter for this action in the manifest.

EXTRA_CLICKABLE_ID

@NonNull
public static final @NonNull String EXTRA_CLICKABLE_ID

The ID for the Intent extra containing the ID of the Clickable.

METADATA_PREVIEW_KEY

@NonNull
public static final @NonNull String METADATA_PREVIEW_KEY

The name of the metadata key that should contain a drawable to be presented as a Tile preview.

Public methods

getUpdater

@NonNull
public static TileUpdateRequester getUpdater(@NonNull Context context)

Gets an instance of TileUpdateRequester to allow a Tile Provider to notify the tile's renderer that it should request a new Timeline from this TileProviderService.

Parameters
@NonNull Context context

The application context.