public class

Constants

extends Object
java.lang.Object
   ↳ de.auerswald.functions.Constants

Summary

Constants
String ACTION_KEY_BIND

A Broadcast with the ACTION_KEY_BIND is send in case a key was assigned or removed, and after the boot of the phone.

String ACTION_KEY_PRESS

A Broadcast with the ACTION_KEY_PRESS is send in case a key was pressed.

String ACTION_SET_LED

The ACTION_SET_LED is used to bind to a Service, which will set a LED according to the given Extras.

String CATEGORY_CONFIGURE CATEGORY used for the mandatory Configuration Activities intent filter

When a key was assigned, the phone system tries to invoke an Activity using an Intent with the action MAIN and the category KEY_CONFIGURE.

String EXTRA_BIND Boolean parameter of the ACTION_BIND Intent, shows if a key was binded or unbinded
String EXTRA_KEY_ID General identifier for the used key
String EXTRA_KEY_LONG_PRESS boolean parameter that indicates a long press event
String EXTRA_KEY_NAME Return value of the ACTION_CONFIGURE Intent, controls the name of the key in the phone
String EXTRA_LED_COLOR Int parameter that should contain one of the Constants.LED_COLOR_* elements
String EXTRA_LED_MODE Int parameter that should contain one of the Constants.LED_MODE_* elements
int KEY_INVALID This constant describes a invalid key_id
int LED_COLOR_GREEN Constant for the LED-Color Green
int LED_COLOR_RED Constant for the LED-Color Red
int LED_COLOR_YELLOW Constant for the LED-Color Yellow
int LED_MODE_BLINK Constant that is used to set a LED to Flash
int LED_MODE_OFF Constant that is used to disable a LED
int LED_MODE_ON Constant that is used to activate a LED
Public Constructors
Constants()
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final String ACTION_KEY_BIND

A Broadcast with the ACTION_KEY_BIND is send in case a key was assigned or removed, and after the boot of the phone.

EXTRA_KEY_ID: mandatory int field, shows which Key was assigned/removed.

Constant Value: "auerswald.intent.action.KEY_BIND"

public static final String ACTION_KEY_PRESS

A Broadcast with the ACTION_KEY_PRESS is send in case a key was pressed.

EXTRA_KEY_ID: mandatory int field, indicates which Key was pressed.

Constant Value: "auerswald.intent.action.KEY_PRESSED"

public static final String ACTION_SET_LED

The ACTION_SET_LED is used to bind to a Service, which will set a LED according to the given Extras.

EXTRA_KEY_ID: mandatory int parameter, describes which Key to modify
EXTRA_LED_MODE: mandatory int parameter, using the Constants.LED_MODE_*, decides which mode to set
EXTRA_LED_COLOR: optional int parameter, using the Constants.LED_COLOR_*, decides which color to choose
(best effort, depends on the Hardware, if none given LED_COLOR_RED can be expected)

Constant Value: "auerswald.intent.action.SET_LED"

public static final String CATEGORY_CONFIGURE

CATEGORY used for the mandatory Configuration Activities intent filter

When a key was assigned, the phone system tries to invoke an Activity using an Intent with the action MAIN and the category KEY_CONFIGURE. This Activity is started using startActivityForResult(android.content.Intent, int). If the Activity returns RESULT_OK, a bind Intent is invoked and the connection is ready. When RESULT_CANCELED is returned, an unbind Intent is send and the connection is revoked. This Intent is supplied to allow the application to configure a mapping from a pressed key to function.

EXTRA_KEY_ID: int parameter, indicates which Key was assigned
EXTRA_KEY_NAME optional String parameter, used in the result Intent, specifies which name to use for the key. If not set, the Phone will use a generic name for the key.

Constant Value: "auerswald.intent.category.KEY_CONFIGURE"

public static final String EXTRA_BIND

Boolean parameter of the ACTION_BIND Intent, shows if a key was binded or unbinded

Constant Value: "bind"

public static final String EXTRA_KEY_ID

General identifier for the used key

Constant Value: "key_id"

public static final String EXTRA_KEY_LONG_PRESS

boolean parameter that indicates a long press event

Constant Value: "logn_press"

public static final String EXTRA_KEY_NAME

Return value of the ACTION_CONFIGURE Intent, controls the name of the key in the phone

Constant Value: "key_name"

public static final String EXTRA_LED_COLOR

Int parameter that should contain one of the Constants.LED_COLOR_* elements

Constant Value: "led_color"

public static final String EXTRA_LED_MODE

Int parameter that should contain one of the Constants.LED_MODE_* elements

Constant Value: "led_mode"

public static final int KEY_INVALID

This constant describes a invalid key_id

Constant Value: -1 (0xffffffff)

public static final int LED_COLOR_GREEN

Constant for the LED-Color Green

Constant Value: 2 (0x00000002)

public static final int LED_COLOR_RED

Constant for the LED-Color Red

Constant Value: 1 (0x00000001)

public static final int LED_COLOR_YELLOW

Constant for the LED-Color Yellow

Constant Value: 3 (0x00000003)

public static final int LED_MODE_BLINK

Constant that is used to set a LED to Flash

Constant Value: 2 (0x00000002)

public static final int LED_MODE_OFF

Constant that is used to disable a LED

Constant Value: 0 (0x00000000)

public static final int LED_MODE_ON

Constant that is used to activate a LED

Constant Value: 1 (0x00000001)

Public Constructors

public Constants ()