public static interface

Control.Intents

Class Overview

Intents sent between Control extensions and Accessory Host Applications.

Summary

Constants
java.lang.String CONTROL_START_REQUEST_INTENT Intent sent by the extension when it wants to take control of the accessory display.
java.lang.String CONTROL_STOP_REQUEST_INTENT Intent sent by the extension when it wants to stop controlling the accessory display.
java.lang.String CONTROL_START_INTENT Intent sent by the Host Application when it grants control of the accessory display to the extension.
java.lang.String CONTROL_STOP_INTENT Intent sent by the Host Application when it takes back control of the accessory display from the extension.
java.lang.String CONTROL_PAUSE_INTENT Intent sent by the Host Application when the extension is no longer visible on the display.
java.lang.String CONTROL_RESUME_INTENT Intent sent by the Host Application when the extension is visible on the display.
java.lang.String CONTROL_ERROR_INTENT Intent sent by the Host Application when a error occurs
java.lang.String CONTROL_SET_SCREEN_STATE_INTENT Intent sent by the extension when it wants to set the state of the accessory display.
java.lang.String CONTROL_LED_INTENT Intent sent by the extension when it wants to control one of the LEDs available on the accessory.
java.lang.String CONTROL_STOP_LED_INTENT Intent sent by the extension when it wants to stop an ongoing LED sequence on the accessory.
java.lang.String CONTROL_VIBRATE_INTENT Intent sent by the extension when it wants to control the vibrator available on the accessory.
java.lang.String CONTROL_STOP_VIBRATE_INTENT Intent sent by the extension when it wants to stop an ongoing vibration on the accessory.
java.lang.String CONTROL_DISPLAY_DATA_INTENT Intent sent by the extension whenever it wants to update the accessory display.
java.lang.String CONTROL_CLEAR_DISPLAY_INTENT Intent sent by the extension whenever it wants to clear the accessory display.
java.lang.String CONTROL_KEY_EVENT_INTENT Intent sent by the Host Application to the controlling extension whenever an hardware key is pressed/released.
java.lang.String CONTROL_TAP_EVENT_INTENT
java.lang.String CONTROL_TOUCH_EVENT_INTENT Intent sent by the Host Application to the controlling extension whenever an touch event is detected.
java.lang.String CONTROL_SWIPE_EVENT_INTENT Intent sent by the Host Application to the controlling extension whenever an swipe event is detected.
java.lang.String CONTROL_PROCESS_LAYOUT_INTENT Intent sent by the extension whenever it wants to update the Accessory display by sending an XML layout.
java.lang.String CONTROL_SEND_IMAGE_INTENT Intent sent by the Control extension whenever it wants to update an image in an ImageView on the accessory.
java.lang.String CONTROL_SEND_TEXT_INTENT Intent sent by the Control extension whenever it wants to update a text in a TextView on the accessory.
java.lang.String CONTROL_ACTIVE_POWER_SAVE_MODE_STATUS_CHANGED_INTENT Intent sent by the Host Application to the controlling extension whenever the active low power mode status changed.
java.lang.String CONTROL_OBJECT_CLICK_EVENT_INTENT Intent sent by the Host Application to the controlling extension whenever a click event is detected on a graphical object referenced from a layout.
java.lang.String CONTROL_LIST_COUNT_INTENT Intent sent by the Control extension when it wants to set the number of items in a ListView.
java.lang.String CONTROL_LIST_MOVE_INTENT Intent sent by the Control extension when it wants to move to a certain position in a list.
java.lang.String CONTROL_LIST_REQUEST_ITEM_INTENT Intent sent the by the Host Application to the Control extension as a request for a list item.
java.lang.String CONTROL_LIST_ITEM_INTENT Intent sent by the Control extension to update a list item in a ListView.
java.lang.String CONTROL_LIST_ITEM_CLICK_INTENT Intent sent by the Host Application to the Control extension when a list item has been clicked.
java.lang.String CONTROL_LIST_ITEM_SELECTED_INTENT Intent sent by the Host Application to the Control extension when a list item is selected.
java.lang.String CONTROL_LIST_REFRESH_REQUEST_INTENT Intent sent by the Host Application to the Control extension when a list refresh request is detected.
java.lang.String CONTROL_MENU_SHOW Intent sent by the Control extension when it wants to show a menu.
java.lang.String CONTROL_MENU_ITEM_SELECTED Intent sent by the Host Application to the Control extension when a menu item has been selected.
java.lang.String EXTRA_AHA_PACKAGE_NAME The name of the Intent-extra used to identify the Host Application.
java.lang.String EXTRA_AEA_PACKAGE_NAME The name of the Intent-extra used to identify the extension.
java.lang.String EXTRA_SCREEN_STATE The name of the Intent-extra carrying the state of the display
java.lang.String EXTRA_LED_ID The name of the Intent-extra carrying the ID of the LED to be controlled
java.lang.String EXTRA_LED_COLOR The name of the Intent-extra carrying the color you want the LED to blink with
java.lang.String EXTRA_ON_DURATION The name of the Intent-extra carrying the "on" duration in milliseconds
java.lang.String EXTRA_OFF_DURATION The name of the Intent-extra carrying the "off" duration in milliseconds
java.lang.String EXTRA_REPEATS The name of the Intent-extra carrying the number of repeats of the on/off pattern.
java.lang.String EXTRA_DATA_URI The name of the Intent-extra used to identify the URI of the image to be displayed on the accessory display.
java.lang.String EXTRA_DATA The name of the Intent-extra used to identify the data to be displayed on the accessory display.
java.lang.String EXTRA_X_OFFSET The name of the Intent-extra used to identify the pixel offset from the left side of the accessory display
java.lang.String EXTRA_Y_OFFSET The name of the Intent-extra used to identify the pixel offset from the top of the accessory display
java.lang.String EXTRA_KEY_ACTION The name of the Intent-extra used to identify the type of key event
java.lang.String EXTRA_TIMESTAMP The name of the Intent-extra used to carry the time stamp of the key or touch event
java.lang.String EXTRA_KEY_CODE The name of the Intent-extra used to identify the keycode.
java.lang.String EXTRA_TAP_ACTION
java.lang.String EXTRA_TOUCH_ACTION The name of the Intent-extra used to indicate the touch action
java.lang.String EXTRA_SWIPE_DIRECTION The name of the Intent-extra used to indicate the direction
java.lang.String EXTRA_X_POS The name of the Intent-extra used to carry the X coordinate of the touch event
java.lang.String EXTRA_Y_POS The name of the Intent-extra used to carry the Y coordinate of the touch event
java.lang.String EXTRA_ERROR_CODE The name of the Intent-extra used to carry the error code
java.lang.String EXTRA_EXTENSION_KEY The name of the Intent-extra containing the key set by the extension.
java.lang.String EXTRA_DATA_XML_LAYOUT The name of the Intent-extra used to identify the data XML layout to be processed by the host application and displayed by the accessory.
java.lang.String EXTRA_LAYOUT_REFERENCE The name of the Intent-extra used to identify a reference within a layout.
java.lang.String EXTRA_TEXT The name of the Intent-extra used when sending a text (String) from the extension to the accessory.
java.lang.String EXTRA_ACTIVE_POWER_MODE_STATUS The name of the Intent-extra used for indicating the status of the Active Power State Mode.
java.lang.String EXTRA_LAYOUT_DATA Data used to populate the views in a XML layout with dynamic info.
java.lang.String EXTRA_LIST_CONTENT Data to populate a ListView with initial content.
java.lang.String EXTRA_CLICK_TYPE The type of a click.
java.lang.String EXTRA_LIST_ITEM_ID A unique identity of a list item assigned by the extension.
java.lang.String EXTRA_LIST_ITEM_POSITION The position in a list.
java.lang.String EXTRA_LIST_COUNT The number of items in a list.
java.lang.String EXTRA_LIST_ITEM_LAYOUT_REFERENCE Reference to a view in a list item layout.
java.lang.String EXTRA_LIST_REFRESH_ALLOWED If true then the user is allowed to initiate a refresh of the list content.
java.lang.String EXTRA_DISPLAY_ID The id of the display.
java.lang.String EXTRA_MENU_ITEM_ICON The URI of an icon (40x40 pixels) for a menu item.
java.lang.String EXTRA_MENU_ITEM_TEXT The text for a menu item.
java.lang.String EXTRA_MENU_ITEM_ID A unique identity of a menu item assigned by the extension.
java.lang.String EXTRA_MENU_ITEMS Items for a menu.
int TOUCH_ACTION_PRESS The touch action is a press event.
int TOUCH_ACTION_LONGPRESS The touch action is a long press event
int TOUCH_ACTION_RELEASE The touch action is a release event
int SWIPE_DIRECTION_UP The direction of the swipe event is up
int SWIPE_DIRECTION_DOWN The direction of the swipe event is down
int SWIPE_DIRECTION_LEFT The direction of the swipe event is left
int SWIPE_DIRECTION_RIGHT The direction of the swipe event is right
int SCREEN_STATE_OFF The screen off state
int SCREEN_STATE_DIM The screen dim state
int SCREEN_STATE_ON The screen on state
int SCREEN_STATE_AUTO The screen state is automatically handled by the host application
int KEY_ACTION_PRESS The key event is a key press event
int KEY_ACTION_RELEASE The key event is a key release event
int KEY_ACTION_REPEAT The key event is a key repeat event
int CONTROL_ACTION_ON The control action is turned on
int CONTROL_ACTION_OFF The control action is turned off
int REPEAT_UNTIL_STOP_INTENT Vibration or LED is repeated until explicitly stopped
int ACTIVE_POWER_SAVE_MODE_OFF Constant defining active power safe mode OFF.
int ACTIVE_POWER_SAVE_MODE_ON Constant defining active power safe mode ON.
int CLICK_TYPE_SHORT A click is a short click.
int CLICK_TYPE_LONG The click is a long click.

Constants

Added in API level 1.0 public static final java.lang.String CONTROL_START_REQUEST_INTENT

Intent sent by the extension when it wants to take control of the accessory display.

When using the broadcast queue, this intent should be sent with enforced security by supplying the host application permission to sendBroadcast(Intent, String). HOSTAPP_PERMISSION

Intent-extra data:



Constant Value: "com.sonyericsson.extras.aef.control.START_REQUEST"

Added in API level 1.0 public static final java.lang.String CONTROL_STOP_REQUEST_INTENT

Intent sent by the extension when it wants to stop controlling the accessory display.

When using the broadcast queue, this intent should be sent with enforced security by supplying the host application permission to sendBroadcast(Intent, String). HOSTAPP_PERMISSION

Intent-extra data:



Constant Value: "com.sonyericsson.extras.aef.control.STOP_REQUEST"

Added in API level 1.0 public static final java.lang.String CONTROL_START_INTENT

Intent sent by the Host Application when it grants control of the accessory display to the extension. This Intent might be sent when the Host Application wants to start the extension or as a result of the extensions sending a CONTROL_START_REQUEST_INTENT Intent.

Intent-extra data:



Constant Value: "com.sonyericsson.extras.aef.control.START"

Added in API level 1.0 public static final java.lang.String CONTROL_STOP_INTENT

Intent sent by the Host Application when it takes back control of the accessory display from the extension. This Intent might be sent when the Host Application wants to stop the extension or as a result of the extensions sending a CONTROL_STOP_REQUEST_INTENT Intent.

Intent-extra data:



Constant Value: "com.sonyericsson.extras.aef.control.STOP"

Added in API level 1.0 public static final java.lang.String CONTROL_PAUSE_INTENT

Intent sent by the Host Application when the extension is no longer visible on the display.

Intent-extra data:



Constant Value: "com.sonyericsson.extras.aef.control.PAUSE"

Added in API level 1.0 public static final java.lang.String CONTROL_RESUME_INTENT

Intent sent by the Host Application when the extension is visible on the display.

Intent-extra data:



Constant Value: "com.sonyericsson.extras.aef.control.RESUME"

Added in API level 1.0 public static final java.lang.String CONTROL_ERROR_INTENT

Intent sent by the Host Application when a error occurs

Intent-extra data:



Constant Value: "com.sonyericsson.extras.aef.control.ERROR"

Added in API level 1.0 public static final java.lang.String CONTROL_SET_SCREEN_STATE_INTENT

Intent sent by the extension when it wants to set the state of the accessory display. If the extension does not set the state explicitly it will by default be controlled by the Host Application (Display Auto) for optimal power consumption.

When using the broadcast queue, this intent should be sent with enforced security by supplying the host application permission to sendBroadcast(Intent, String). HOSTAPP_PERMISSION

Intent-extra data:



Constant Value: "com.sonyericsson.extras.aef.control.SET_SCREEN_STATE"

Added in API level 1.0 public static final java.lang.String CONTROL_LED_INTENT

Intent sent by the extension when it wants to control one of the LEDs available on the accessory. Every Host Application will expose information about its LEDs in the Registration API.

When using the broadcast queue, this intent should be sent with enforced security by supplying the host application permission to sendBroadcast(Intent, String). HOSTAPP_PERMISSION

Intent-extra data:



Constant Value: "com.sonyericsson.extras.aef.control.LED"

Added in API level 1.0 public static final java.lang.String CONTROL_STOP_LED_INTENT

Intent sent by the extension when it wants to stop an ongoing LED sequence on the accessory. If the LED specified in the Intent-extra if off, this Intent will be ignored by the Host Application.

This intent should be sent with enforced security by supplying the host application permission to sendBroadcast(Intent, String). HOSTAPP_PERMISSION

Intent-extra data:



Constant Value: "com.sonyericsson.extras.aef.control.STOP_LED"

Added in API level 1.0 public static final java.lang.String CONTROL_VIBRATE_INTENT

Intent sent by the extension when it wants to control the vibrator available on the accessory. Every Host Application will expose information about the vibrator if it has one in the Registration API.

When using the broadcast queue, this intent should be sent with enforced security by supplying the host application permission to sendBroadcast(Intent, String). HOSTAPP_PERMISSION

Intent-extra data:



Constant Value: "com.sonyericsson.extras.aef.control.VIBRATE"

Added in API level 1.0 public static final java.lang.String CONTROL_STOP_VIBRATE_INTENT

Intent sent by the extension when it wants to stop an ongoing vibration on the accessory. If no vibration is ongoing, this Intent will be ignored by the Host Application.

When using the broadcast queue, this intent should be sent with enforced security by supplying the host application permission to sendBroadcast(Intent, String). HOSTAPP_PERMISSION

Intent-extra data:



Constant Value: "com.sonyericsson.extras.aef.control.STOP_VIBRATE"

Added in API level 1.0 public static final java.lang.String CONTROL_DISPLAY_DATA_INTENT

Intent sent by the extension whenever it wants to update the accessory display. The display size is accessory dependent and can be found using the Registration API.

The Accessory may support several displays. The displays can be real displays or emulated displays to provide compatibility for extensions written for other Accessories. If several displays are supported, the extension can use EXTRA_DISPLAY_ID to specify the target display. If EXTRA_DISPLAY_ID is absent the Host Application will make a selection of target display and if necessary scale the image.

When using the broadcast queue, this intent should be sent with enforced security by supplying the host application permission to sendBroadcast(Intent, String). HOSTAPP_PERMISSION

Intent-extra data:



Constant Value: "com.sonyericsson.extras.aef.control.DISPLAY_DATA"

Added in API level 1.0 public static final java.lang.String CONTROL_CLEAR_DISPLAY_INTENT

Intent sent by the extension whenever it wants to clear the accessory display.

When using the broadcast queue, this intent should be sent with enforced security by supplying the host application permission to sendBroadcast(Intent, String). HOSTAPP_PERMISSION

Intent-extra data:



Constant Value: "com.sonyericsson.extras.aef.control.CLEAR_DISPLAY"

Added in API level 1.0 public static final java.lang.String CONTROL_KEY_EVENT_INTENT

Intent sent by the Host Application to the controlling extension whenever an hardware key is pressed/released.

Intent-extra data:



Constant Value: "com.sonyericsson.extras.aef.control.KEY_EVENT"

public static final java.lang.String CONTROL_TAP_EVENT_INTENT

Constant Value: "com.sonyericsson.extras.aef.control.TAP_EVENT"

Added in API level 1.0 public static final java.lang.String CONTROL_TOUCH_EVENT_INTENT

Intent sent by the Host Application to the controlling extension whenever an touch event is detected.

Intent-extra data:



Constant Value: "com.sonyericsson.extras.aef.control.TOUCH_EVENT"

Added in API level 1.0 public static final java.lang.String CONTROL_SWIPE_EVENT_INTENT

Intent sent by the Host Application to the controlling extension whenever an swipe event is detected.

Intent-extra data:



Constant Value: "com.sonyericsson.extras.aef.control.SWIPE_EVENT"

Added in API level 2.0 public static final java.lang.String CONTROL_PROCESS_LAYOUT_INTENT

Intent sent by the extension whenever it wants to update the Accessory display by sending an XML layout. Note that the extension must always send a layout covering the full screen according to the display screen size. This means that even though the extension wants to update a portion of the screen a full screen layout must be supplied anyway. Objects that should be displayed in the layout are sent separately.

EXTRA_LAYOUT_DATA can be used to populate views in the layout with initial values. The content of the view in the layout can also be updated using CONTROL_SEND_TEXT_INTENT and CONTROL_SEND_IMAGE_INTENT.

When using the broadcast queue, this intent should be sent with enforced security by supplying the host application permission to sendBroadcast(Intent, String). HOSTAPP_PERMISSION

Intent-extra data:



Constant Value: "com.sonyericsson.extras.aef.control.PROCESS_LAYOUT"

Added in API level 2.0 public static final java.lang.String CONTROL_SEND_IMAGE_INTENT

Intent sent by the Control extension whenever it wants to update an image in an ImageView on the accessory. The image can be a URI or an array of a raw image, like JPEG The image will replace any previous sent image with the same reference.

When using the broadcast queue, this intent should be sent with enforced security by supplying the host application permission to sendBroadcast(Intent, String). HOSTAPP_PERMISSION

Intent-extra data:



Constant Value: "com.sonyericsson.extras.aef.control.SEND_IMAGE"

Added in API level 2.0 public static final java.lang.String CONTROL_SEND_TEXT_INTENT

Intent sent by the Control extension whenever it wants to update a text in a TextView on the accessory. The text will replace any previous sent text with the same reference.

When using the broadcast queue, this intent should be sent with enforced security by supplying the host application permission to sendBroadcast(Intent, String). HOSTAPP_PERMISSION

Intent-extra data:



Constant Value: "com.sonyericsson.extras.aef.control.SEND_TEXT"

Added in API level 2.0 public static final java.lang.String CONTROL_ACTIVE_POWER_SAVE_MODE_STATUS_CHANGED_INTENT

Intent sent by the Host Application to the controlling extension whenever the active low power mode status changed. This intent is only sent to control extensions that support active low power mode.

Intent-extra data:



Constant Value: "com.sonyericsson.extras.aef.control.ACTIVE_POWER_SAVE_MODE_STATUS_CHANGED"

Added in API level 2.0 public static final java.lang.String CONTROL_OBJECT_CLICK_EVENT_INTENT

Intent sent by the Host Application to the controlling extension whenever a click event is detected on a graphical object referenced from a layout.

Intent-extra data:



Constant Value: "com.sonyericsson.extras.aef.control.OBJECT_CLICK_EVENT"

Added in API level 2.0 public static final java.lang.String CONTROL_LIST_COUNT_INTENT

Intent sent by the Control extension when it wants to set the number of items in a ListView. EXTRA_LAYOUT_REFERENCE refers to the ListView to be updated. This intent is used both to specify the initial size of the list and to update the size of the list.

EXTRA_LIST_REFRESH_ALLOWED specifies if the user is allowed to manually initiate a refresh of the list content. The default behavior is that the user is not allowed to initiate a refresh. The extension is notified about a refresh request through the CONTROL_LIST_REFRESH_REQUEST_INTENT intent.

When using the broadcast queue, this intent should be sent with enforced security by supplying the host application permission to sendBroadcast(Intent, String). HOSTAPP_PERMISSION

Intent-extra data:



Constant Value: "com.sonyericsson.extras.aef.control.LIST_COUNT"

Added in API level 2.0 public static final java.lang.String CONTROL_LIST_MOVE_INTENT

Intent sent by the Control extension when it wants to move to a certain position in a list. The position to move to can either be specified using EXTRA_LIST_ITEM_POSITION or EXTRA_LIST_ITEM_ID.

When using the broadcast queue, this intent should be sent with enforced security by supplying the host application permission to sendBroadcast(Intent, String). HOSTAPP_PERMISSION

Intent-extra data:



Constant Value: "com.sonyericsson.extras.aef.control.LIST_MOVE"

Added in API level 2.0 public static final java.lang.String CONTROL_LIST_REQUEST_ITEM_INTENT

Intent sent the by the Host Application to the Control extension as a request for a list item. The extension is expected to respond with a CONTROL_LIST_ITEM_INTENT.

Intent-extra data:



Constant Value: "com.sonyericsson.extras.aef.control.LIST_REQUEST_ITEM"

Added in API level 2.0 public static final java.lang.String CONTROL_LIST_ITEM_INTENT

Intent sent by the Control extension to update a list item in a ListView. This can be a response to CONTROL_LIST_REQUEST_ITEM_INTENT, but it can also be sent unsolicited to refresh an individual list item. To refresh an entire list a new CONTROL_LIST_COUNT_INTENT can be used.

EXTRA_LAYOUT_REFERENCE specifies the ListView and EXTRA_LIST_ITEM_POSITION specifies the position to update. EXTRA_DATA_XML_LAYOUT specifies the layout of the list item. EXTRA_LAYOUT_DATA can be used to update views in the list item layout with new values.

When using the broadcast queue, this intent should be sent with enforced security by supplying the host application permission to sendBroadcast(Intent, String). HOSTAPP_PERMISSION

Intent-extra data:



Constant Value: "com.sonyericsson.extras.aef.control.LIST_ITEM"

Added in API level 2.0 public static final java.lang.String CONTROL_LIST_ITEM_CLICK_INTENT

Intent sent by the Host Application to the Control extension when a list item has been clicked. If the list item contains any views where android:clickable or android:longClickable is true and one of these views were clicked the android:id of that view is returned in EXTRA_LIST_ITEM_LAYOUT_REFERENCE.

Intent-extra data:



Constant Value: "com.sonyericsson.extras.aef.control.LIST_ITEM_CLICK"

Added in API level 2.0 public static final java.lang.String CONTROL_LIST_ITEM_SELECTED_INTENT

Intent sent by the Host Application to the Control extension when a list item is selected.

Intent-extra data:



Constant Value: "com.sonyericsson.extras.aef.control.LIST_ITEM_SELECTED"

Added in API level 2.0 public static final java.lang.String CONTROL_LIST_REFRESH_REQUEST_INTENT

Intent sent by the Host Application to the Control extension when a list refresh request is detected.

Intent-extra data:



Constant Value: "com.sonyericsson.extras.aef.control.LIST_REFERESH_REQUEST"

Added in API level 2.0 public static final java.lang.String CONTROL_MENU_SHOW

Intent sent by the Control extension when it wants to show a menu. The CONTROL_MENU_ITEM_SELECTED intent is sent to the Control extension when a menu item has been selected.

When using the broadcast queue, this intent should be sent with enforced security by supplying the host application permission to sendBroadcast(Intent, String). HOSTAPP_PERMISSION

Intent-extra data:



Constant Value: "com.sonyericsson.extras.aef.control.MENU_SHOW"

Added in API level 2.0 public static final java.lang.String CONTROL_MENU_ITEM_SELECTED

Intent sent by the Host Application to the Control extension when a menu item has been selected. EXTRA_MENU_ITEM_ID identifies the selected menu item.

Intent-extra data:



Constant Value: "com.sonyericsson.extras.aef.control.MENU_ITEM_SELECTED"

Added in API level 1.0 public static final java.lang.String EXTRA_AHA_PACKAGE_NAME

The name of the Intent-extra used to identify the Host Application. The Host Application will send its package name

TYPE: TEXT

Constant Value: "aha_package_name"

Added in API level 1.0 public static final java.lang.String EXTRA_AEA_PACKAGE_NAME

The name of the Intent-extra used to identify the extension. The extension will send its package name

TYPE: TEXT

Constant Value: "aea_package_name"

Added in API level 1.0 public static final java.lang.String EXTRA_SCREEN_STATE

The name of the Intent-extra carrying the state of the display

TYPE: INTEGER (int)

ALLOWED VALUES:



Constant Value: "screen_state"

Added in API level 1.0 public static final java.lang.String EXTRA_LED_ID

The name of the Intent-extra carrying the ID of the LED to be controlled

TYPE: INTEGER (int)

Constant Value: "led_id"

Added in API level 1.0 public static final java.lang.String EXTRA_LED_COLOR

The name of the Intent-extra carrying the color you want the LED to blink with

TYPE: INTEGER (int)

Constant Value: "led_color"

Added in API level 1.0 public static final java.lang.String EXTRA_ON_DURATION

The name of the Intent-extra carrying the "on" duration in milliseconds

TYPE: INTEGER (int)

Constant Value: "on_duration"

Added in API level 1.0 public static final java.lang.String EXTRA_OFF_DURATION

The name of the Intent-extra carrying the "off" duration in milliseconds

TYPE: INTEGER (int)

Constant Value: "off_duration"

Added in API level 1.0 public static final java.lang.String EXTRA_REPEATS

The name of the Intent-extra carrying the number of repeats of the on/off pattern. Note, the value REPEAT_UNTIL_STOP_INTENT means that the on/off pattern is repeated until the CONTROL_STOP_VIBRATE_INTENT or CONTROL_STOP_LED_INTENT intent is received

TYPE: INTEGER (int)

Constant Value: "repeats"

Added in API level 1.0 public static final java.lang.String EXTRA_DATA_URI

The name of the Intent-extra used to identify the URI of the image to be displayed on the accessory display. If the image is in raw data (e.g. an array of bytes) use EXTRA_DATA instead

TYPE: TEXT

Constant Value: "data_uri"

Added in API level 1.0 public static final java.lang.String EXTRA_DATA

The name of the Intent-extra used to identify the data to be displayed on the accessory display. This Intent-extra should be used if the image is in raw data (e.g. an array of bytes)

TYPE: BYTE ARRAY

Constant Value: "data"

Added in API level 1.0 public static final java.lang.String EXTRA_X_OFFSET

The name of the Intent-extra used to identify the pixel offset from the left side of the accessory display

TYPE: INTEGER (int)

Constant Value: "x_offset"

Added in API level 1.0 public static final java.lang.String EXTRA_Y_OFFSET

The name of the Intent-extra used to identify the pixel offset from the top of the accessory display

TYPE: INTEGER (int)

Constant Value: "y_offset"

Added in API level 1.0 public static final java.lang.String EXTRA_KEY_ACTION

The name of the Intent-extra used to identify the type of key event

TYPE: INTEGER (int)

ALLOWED VALUES:



Constant Value: "event_type"

Added in API level 1.0 public static final java.lang.String EXTRA_TIMESTAMP

The name of the Intent-extra used to carry the time stamp of the key or touch event

TYPE: INTEGER (long)

Constant Value: "timestamp"

Added in API level 1.0 public static final java.lang.String EXTRA_KEY_CODE

The name of the Intent-extra used to identify the keycode. Information about what type of keypad a accessory has can be found using the Registration API

ALLOWED VALUES: Any key code defined in the Control.KeyCodes interface.

TYPE: INTEGER (int)

Constant Value: "key_code"

public static final java.lang.String EXTRA_TAP_ACTION

Constant Value: "tap_action"

Added in API level 1.0 public static final java.lang.String EXTRA_TOUCH_ACTION

The name of the Intent-extra used to indicate the touch action

TYPE: INTEGER (int)

ALLOWED VALUES:



Constant Value: "action"

Added in API level 1.0 public static final java.lang.String EXTRA_SWIPE_DIRECTION

The name of the Intent-extra used to indicate the direction

TYPE: INTEGER (int)

ALLOWED VALUES:



Constant Value: "direction"

Added in API level 1.0 public static final java.lang.String EXTRA_X_POS

The name of the Intent-extra used to carry the X coordinate of the touch event

TYPE: INTEGER (int)

Constant Value: "x_pos"

Added in API level 1.0 public static final java.lang.String EXTRA_Y_POS

The name of the Intent-extra used to carry the Y coordinate of the touch event

TYPE: INTEGER (int)

Constant Value: "y_pos"

Added in API level 1.0 public static final java.lang.String EXTRA_ERROR_CODE

The name of the Intent-extra used to carry the error code

TYPE: INTEGER (int)

ALLOWED VALUES:

  • 0: 'Registration information missing'
  • 1: 'Accessory not connected'
  • 2: 'Host Application busy'


Constant Value: "error_code"

Added in API level 1.0 public static final java.lang.String EXTRA_EXTENSION_KEY

The name of the Intent-extra containing the key set by the extension. This Intent-data is present in all Intents sent by accessory host application, except where startActivity(android.content.Intent) is used. See section Security for more information

Constant Value: "extension_key"

Added in API level 2.0 public static final java.lang.String EXTRA_DATA_XML_LAYOUT

The name of the Intent-extra used to identify the data XML layout to be processed by the host application and displayed by the accessory. The layout resource id is used to identify the layout.

This is a standard Android layout, where a subset of the Android views are supported.

Dimensions

The px dimensions is the only dimension supported.

ViewGroups

The following ViewGroups are supported:

  • AbsoluteLayout
  • FrameLayout
  • LinearLayout
  • RelativeLayout
All XML attributes are supported for the supported ViewGroups.

Views

The following Views are supported:

  • View
  • ImageView
  • TextView
  • ListView
  • Gallery
An accessory may support only a subset of these layouts. LAYOUT_SUPPORT specifies which Views that are supported for a certain accessory.

The following View XML attributes are supported

  • android:background - can be a solid color such as "#ff000000" (black) or a StateListDrawable with solid colors. Only the android:state_pressed attribute of the StateListDrawable is supported. Using a StateListDrawable requires that the view has at least one of android:clickable or android:longClickable set to true.
  • android:clickable - if true the extension will receive CONTROL_OBJECT_CLICK_EVENT_INTENT (or for a list item CONTROL_LIST_ITEM_CLICK_INTENT) intents for short clicks on the view.
  • android:longClickable - if true the extension will receive CONTROL_OBJECT_CLICK_EVENT_INTENT (or for a list item CONTROL_LIST_ITEM_CLICK_INTENT) intents for long clicks on the view.
  • android:id
  • android:layout_height
  • android:layout_width
  • android:padding
  • android:paddingBottom
  • android:paddingLeft
  • android:paddingRight
  • android:paddingTop


ImageView

For an ImageView the following XML attributes are supported

  • android:src - can be a BitmapDrawable or a NinePatchDrawable
  • android:scaleType


TextView

For a TextView the following XML attributes are supported

  • android:ellipsize - can be none, start, middle or end
  • android:gravity
  • android:lines
  • android:maxLines
  • android:singleLine
  • android:text
  • android:textColor
  • android:textSize - Not all text sizes are supported by all accessories. If a not supported text size is used the accessory will select the closest available text size. See the accessory white paper for a list of supported text sizes.
  • android:textStyle


ListView and Gallery

For a ListView and a Gallery there are some additional limitations. These views always have to fill the entire display width. The items in these views also have to fill the entire display width. The height of an item may not be larger than the height of the parent view.

TYPE: INTEGER

Constant Value: "data_xml_layout"

Added in API level 2.0 public static final java.lang.String EXTRA_LAYOUT_REFERENCE

The name of the Intent-extra used to identify a reference within a layout. Corresponds to the android:id XML attribute in the layout.

TYPE: INTEGER

Constant Value: "layout_reference"

Added in API level 2.0 public static final java.lang.String EXTRA_TEXT

The name of the Intent-extra used when sending a text (String) from the extension to the accessory. The accessory will map the text to a layout reference.

TYPE: STRING

Constant Value: "text_from extension"

Added in API level 2.0 public static final java.lang.String EXTRA_ACTIVE_POWER_MODE_STATUS

The name of the Intent-extra used for indicating the status of the Active Power State Mode.

TYPE: INTEGER (int)

ALLOWED VALUES:

  • ACTIVE_POWER_SAVE_MODE_OFF
  • ACTIVE_POWER_SAVE_MODE_ON


Constant Value: "active_power_mode_status"

Added in API level 2.0 public static final java.lang.String EXTRA_LAYOUT_DATA

Data used to populate the views in a XML layout with dynamic info. For example updating a TextView with a new text or setting a new image in an ImageView. EXTRA_LAYOUT_REFERENCE specifies the view to be updated and one of EXTRA_TEXT, EXTRA_DATA_URI and EXTRA_DATA specifies the new information in the view.

TYPE: Array of BUNDLEs with following information in each BUNDLE.



Constant Value: "layout_data"

Added in API level 2.0 public static final java.lang.String EXTRA_LIST_CONTENT

Data to populate a ListView with initial content.

TYPE: Array of BUNDLEs with following information in each BUNDLE.



Constant Value: "list_content"

Added in API level 2.0 public static final java.lang.String EXTRA_CLICK_TYPE

The type of a click.

TYPE: INTEGER (int)

ALLOWED VALUES:



Constant Value: "click_type"

Added in API level 2.0 public static final java.lang.String EXTRA_LIST_ITEM_ID

A unique identity of a list item assigned by the extension. This can for example be the row id from a database.

TYPE: INTEGER

Constant Value: "list_item_id"

Added in API level 2.0 public static final java.lang.String EXTRA_LIST_ITEM_POSITION

The position in a list. The position is in the range from 0 to the EXTRA_LIST_COUNT-1.

TYPE: INTEGER

Constant Value: "list_item_position"

Added in API level 2.0 public static final java.lang.String EXTRA_LIST_COUNT

The number of items in a list.

TYPE: INTEGER

Constant Value: "list_count"

Added in API level 2.0 public static final java.lang.String EXTRA_LIST_ITEM_LAYOUT_REFERENCE

Reference to a view in a list item layout. Corresponds to the android:id XML attribute in the layout.

TYPE: INTEGER

Constant Value: "list_item_layout_reference"

Added in API level 2.0 public static final java.lang.String EXTRA_LIST_REFRESH_ALLOWED

If true then the user is allowed to initiate a refresh of the list content. (For example by a pull to refresh gesture.)

TYPE: BOOLEAN

Constant Value: "list_referesh_allowed"

Added in API level 2.0 public static final java.lang.String EXTRA_DISPLAY_ID

The id of the display. Refers to the _ID field of the Registration.DisplayColumns table.

TYPE: INTEGER (int)

Constant Value: "displayId"

Added in API level 2.0 public static final java.lang.String EXTRA_MENU_ITEM_ICON

The URI of an icon (40x40 pixels) for a menu item.

TYPE: TEXT

Constant Value: "menuItemIcon"

Added in API level 2.0 public static final java.lang.String EXTRA_MENU_ITEM_TEXT

The text for a menu item.

TYPE: TEXT

Constant Value: "menuItemText"

Added in API level 2.0 public static final java.lang.String EXTRA_MENU_ITEM_ID

A unique identity of a menu item assigned by the extension.

TYPE: INTEGER

Constant Value: "menuItemId"

Added in API level 2.0 public static final java.lang.String EXTRA_MENU_ITEMS

Items for a menu. Each menu item can either be an icon or a text string. The EXTRA_MENU_ITEM_ID is used to identify the selected menu item. MENU_ITEMS specifies the number of menu items supported by the display.

TYPE: Array of BUNDLEs with following information in each BUNDLE.



Constant Value: "menuItems"

Added in API level 1.0 public static final int TOUCH_ACTION_PRESS

The touch action is a press event.

Constant Value: 0 (0x00000000)

Added in API level 1.0 public static final int TOUCH_ACTION_LONGPRESS

The touch action is a long press event

Constant Value: 1 (0x00000001)

Added in API level 1.0 public static final int TOUCH_ACTION_RELEASE

The touch action is a release event

Constant Value: 2 (0x00000002)

Added in API level 1.0 public static final int SWIPE_DIRECTION_UP

The direction of the swipe event is up

Constant Value: 0 (0x00000000)

Added in API level 1.0 public static final int SWIPE_DIRECTION_DOWN

The direction of the swipe event is down

Constant Value: 1 (0x00000001)

Added in API level 1.0 public static final int SWIPE_DIRECTION_LEFT

The direction of the swipe event is left

Constant Value: 2 (0x00000002)

Added in API level 1.0 public static final int SWIPE_DIRECTION_RIGHT

The direction of the swipe event is right

Constant Value: 3 (0x00000003)

Added in API level 1.0 public static final int SCREEN_STATE_OFF

The screen off state

Constant Value: 0 (0x00000000)

Added in API level 1.0 public static final int SCREEN_STATE_DIM

The screen dim state

Constant Value: 1 (0x00000001)

Added in API level 1.0 public static final int SCREEN_STATE_ON

The screen on state

Constant Value: 2 (0x00000002)

Added in API level 1.0 public static final int SCREEN_STATE_AUTO

The screen state is automatically handled by the host application

Constant Value: 3 (0x00000003)

Added in API level 1.0 public static final int KEY_ACTION_PRESS

The key event is a key press event

Constant Value: 0 (0x00000000)

Added in API level 1.0 public static final int KEY_ACTION_RELEASE

The key event is a key release event

Constant Value: 1 (0x00000001)

Added in API level 1.0 public static final int KEY_ACTION_REPEAT

The key event is a key repeat event

Constant Value: 2 (0x00000002)

Added in API level 1.0 public static final int CONTROL_ACTION_ON

The control action is turned on

Constant Value: 0 (0x00000000)

Added in API level 1.0 public static final int CONTROL_ACTION_OFF

The control action is turned off

Constant Value: 1 (0x00000001)

Added in API level 1.0 public static final int REPEAT_UNTIL_STOP_INTENT

Vibration or LED is repeated until explicitly stopped

Constant Value: -1 (0xffffffffffffffff)

Added in API level 2.0 public static final int ACTIVE_POWER_SAVE_MODE_OFF

Constant defining active power safe mode OFF.

Constant Value: 0 (0x00000000)

Added in API level 2.0 public static final int ACTIVE_POWER_SAVE_MODE_ON

Constant defining active power safe mode ON.

Constant Value: 1 (0x00000001)

Added in API level 2.0 public static final int CLICK_TYPE_SHORT

A click is a short click.

Constant Value: 0 (0x00000000)

Added in API level 2.0 public static final int CLICK_TYPE_LONG

The click is a long click.

Constant Value: 1 (0x00000001)