Constants | ||
---|---|---|
java.lang.String | WIDGET_START_REFRESH_IMAGE_INTENT | Intent sent by the Accessory Host Application whenever it wants the Widget to start updating it's Widget image. |
java.lang.String | WIDGET_STOP_REFRESH_IMAGE_INTENT | Intent sent by the Accessory Host Application whenever it wants the Widget to stop/pause updating it's Widget image. |
java.lang.String | WIDGET_PROCESS_LAYOUT_INTENT | Intent sent by the extension whenever it wants to update the Accessory display by sending an XML layout. |
java.lang.String | WIDGET_IMAGE_UPDATE_INTENT | Intent used by the Widget extension whenever it wants to update its widget image. |
java.lang.String | WIDGET_ENTER_NEXT_LEVEL_INTENT | This intent may be used by the Widget extension as a response to a WIDGET_ONTOUCH_INTENT. |
java.lang.String | WIDGET_ONTOUCH_INTENT | Intent sent by the Host Application to the Widget extension whenever a user interacts with the Widget image. |
java.lang.String | WIDGET_OBJECT_CLICK_EVENT_INTENT | Intent sent by the Host Application to the Widget extension whenever an click event is detected on a graphical object referenced from a layout. |
java.lang.String | WIDGET_SEND_IMAGE_INTENT | Intent sent by the Widget extension whenever it wants to update an image in an ImageView on the accessory. |
java.lang.String | WIDGET_SEND_TEXT_INTENT | Intent sent by the Widget extension whenever it wants to update a text in a TextView on the accessory. |
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_WIDGET_IMAGE_URI | The name of the Intent-extra used to identify the URI of the Widget image. |
java.lang.String | EXTRA_WIDGET_IMAGE_DATA | The name of the Intent-extra used to identify the Widget image. |
java.lang.String | EXTRA_EVENT_TYPE | The name of the Intent-extra used to identify the touch event |
java.lang.String | EXTRA_EVENT_X_POS | The name of the Intent-extra used to carry the X coordinate of the touch event |
java.lang.String | EXTRA_EVENT_Y_POS | The name of the Intent-extra used to carry the Y coordinate of the touch event |
java.lang.String | EXTRA_EXTENSION_KEY | The name of the Intent-extra containing the key set by the extension in EXTENSION_KEY. |
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 an extension. |
java.lang.String | EXTRA_WIDGET_TEXT | The name of the Intent-extra used when sending a text (String) from the extension to the accessory. |
java.lang.String | EXTRA_KEY | The name of the intent extra used to identify a widget in case the extension supports several different widgets. |
java.lang.String | EXTRA_LAYOUT_DATA | Data used to populate the views in a XML layout with dynamic info. |
java.lang.String | EXTRA_ADDITIONAL_LAYOUTS | Data used to add state specific layouts to a widget. |
java.lang.String | EXTRA_ACCESSORY_STATE | Specifies the accessory state that a given resource is applicable for |
java.lang.String | EXTRA_INSTANCE_ID | Specifies the widget instance. |
int | EVENT_TYPE_SHORT_TAP | The event type is a short tap. |
int | EVENT_TYPE_LONG_TAP | The event type is a long tap |
Intent sent by the Accessory Host Application whenever it wants the Widget to start updating it's Widget image. Usually this Intent will be sent out when the accessory just starts and is about to show the Widget menu. The Widget image should be updated as soon as possible and after the initial update the Widget image should be updated occasionally until WIDGET_STOP_REFRESH_IMAGE_INTENT is received.
The EXTRA_INSTANCE_ID specifies the widget instance and is used in all subsequent intents to and from that widget instance.
Intent-extra data:
Constant Value: "com.sonyericsson.extras.aef.widget.START_REFRESH_IMAGE_REQUEST"
Intent sent by the Accessory Host Application whenever it wants the Widget to stop/pause updating it's Widget image. The Widget should resume updating its image when WIDGET_START_REFRESH_IMAGE_INTENT is received.
Intent-extra data:
Constant Value: "com.sonyericsson.extras.aef.widget.STOP_REFRESH_IMAGE_REQUEST"
Intent sent by the extension whenever it wants to update the Accessory display by sending an XML layout.
EXTRA_LAYOUT_DATA can be used to populate views in the layout with initial values. The content of the views in the layout can also be updated using WIDGET_SEND_TEXT_INTENT and WIDGET_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.widget.PROCESS_LAYOUT"
Intent used by the Widget extension whenever it wants to update its widget image. The Widget image should be updated occasionally. If the extension tries to update its Widget image to often, the Host Application will ignore the requests.
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.widget.IMAGE_UPDATE"
This intent may be used by the Widget extension as a response to a WIDGET_ONTOUCH_INTENT. The widget should send this intent when it does not want to perform any action based on the on touch intent. When receiving this intent the host application is free to stop interaction with this widget and enter a new level or state internally.
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.widget.ENTER_NEW_LEVEL"
Intent sent by the Host Application to the Widget extension whenever a user interacts with the Widget image. Usually as a result of this Intent the Widget extension will update its Widget image and take appropriate action
Intent-extra data:
Constant Value: "com.sonyericsson.extras.aef.widget.ONTOUCH"
Intent sent by the Host Application to the Widget extension whenever an click event is detected on a graphical object referenced from a layout.
Intent-extra data:
Constant Value: "com.sonyericsson.extras.aef.widget.OBJECT_CLICK_EVENT"
Intent sent by the Widget 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.widget.SEND_IMAGE"
Intent sent by the Widget 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, his 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.widget.SEND_TEXT"
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"
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"
The name of the Intent-extra used to identify the URI of the Widget image. If the image is in raw data (e.g. an array of bytes) use EXTRA_WIDGET_IMAGE_DATA instead. The image is displayed in the Widget row on the Accessory display. The image can be updated by the extension at a later stage
TYPE: TEXT
Constant Value: "widget_image_uri"
The name of the Intent-extra used to identify the Widget image. This Intent-extra should be used if the image is in raw data (e.g. an array of bytes). The image is displayed in the Widget row on the Accessory display. The image can be updated by the extension at a later stage
TYPE: BYTE ARRAY
Constant Value: "widget_image_data"
The name of the Intent-extra used to identify the touch event
TYPE: INTEGER (int)
ALLOWED VALUES:
Constant Value: "widget_event_type"
The name of the Intent-extra used to carry the X coordinate of the touch event
TYPE: INTEGER (int)
Constant Value: "widget_event_x_pos"
The name of the Intent-extra used to carry the Y coordinate of the touch event
TYPE: INTEGER (int)
Constant Value: "widget_event_y_pos"
The name of the Intent-extra containing the key set by the extension in EXTENSION_KEY. 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"
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.
The px dimensions is the only dimension supported.
The following ViewGroups are supported:
The following Views are supported:
The following View XML attributes are supported
For an ImageView the following XML attributes are supported
For a TextView the following XML attributes are supported
TYPE: INTEGER
Constant Value: "data_xml_layout"
The name of the Intent-extra used to identify a reference within an extension. The extension may use the same reference in multiple layouts. A reference is a text or an image owned by the extension and will be used to map between layouts and images/texts. Corresponds to the android:id XML attribute in the layout.
TYPE: INTEGER
Constant Value: "layout_reference"
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"
The name of the intent extra used to identify a widget in case the extension supports several different widgets. The extension specifies this in KEY.
TYPE: STRING
Constant Value: "key"
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_WIDGET_TEXT, EXTRA_WIDGET_IMAGE_URI and EXTRA_WIDGET_IMAGE_DATA specifies the new information in the view.
TYPE: Array of BUNDLEs with following information in each BUNDLE.
Constant Value: "layout_data"
Data used to add state specific layouts to a widget. EXTRA_DATA_XML_LAYOUT specifies the XML layout and EXTRA_ACCESSORY_STATE specifies the state in which the provided layout is relevant. If no state specific resources are supplied, the resource provided at EXTRA_DATA_XML_LAYOUT is used. If no resource is provided for either POWERSAVE or DISCONNECTED, the DEFAULT resource is used.
TYPE: Array of BUNDLEs with following information in each BUNDLE.
Constant Value: "additional_layouts"
Specifies the accessory state that a given resource is applicable for
TYPE: INTEGER (int), see Widget.AccessoryState.
Constant Value: "display_mode"
Specifies the widget instance.
TYPE: INTEGER
Constant Value: "instance_id"
The event type is a short tap.
Constant Value: 0 (0x00000000)
The event type is a long tap
Constant Value: 1 (0x00000001)
Intents sent between Widget extensions and Accessory Host Applications.