Class DynamicTileService

All Implemented Interfaces:
ComponentCallbacks, ComponentCallbacks2

public abstract class DynamicTileService extends TileService
A TileService providing the helper methods to update it properly.
  • Constructor Details

    • DynamicTileService

      public DynamicTileService()
  • Method Details

    • onTileAdded

      public void onTileAdded()
      Overrides:
      onTileAdded in class TileService
    • onStartListening

      public void onStartListening()
      Overrides:
      onStartListening in class TileService
    • onStopListening

      public void onStopListening()
      Overrides:
      onStopListening in class TileService
    • getTileServiceClass

      @NonNull protected abstract Class<?> getTileServiceClass()
      Returns the class for this tile service.
      Returns:
      The class for this tile service.
    • onDynamicUpdate

      @CallSuper protected void onDynamicUpdate()
      This method will be called when there is a change in the tile state.

      Override this method to update the tile icon, title, etc.

    • update

      public static void update(@NonNull Context context, @NonNull Class<?> clazz)
      Update the tile service for a given class.
      Parameters:
      context - The context to get the package name.
      clazz - The tile service class to be updated.