Resources | developer.brewmp.com Resources | developer.brewmp.com

Developer

resources

Handling keyguard, screen rotation, and headset events

Describes events handling from the keyguard, screen rotation, and headset features on a mobile device.

Keyguard

When the keyguard on a device is activated, OEMs should send an EVT_KEYGUARD event to Brew MP using the following macro:

AEE_SEND_KEYGUARD_EVT(pAEEDeviceNotify)

Applications are responsible for handling the EVT_KEYGUARD event.

Screen rotation

When the screen is rotated on a device, OEMs should send an EVT_SCR_ROTATE event to Brew MP using the following macro:

AEE_SEND_SCRROTATE_EVT(pAEEDeviceNotify)

Applications are responsible for handling the EVT_SCR_ROTATE event.

Headset

When a headset is plugged into or removed from a device, OEMs should send an EVT_HEADSET event to Brew MP using the following macro:

AEE_SEND_HEADSET_EVT(pAEEDeviceNotify)

Note: The AEE_SEND_FLIP_EVT, AEE_SEND_FLIP_EVT_EX, AEE_SEND_KEYGUARD_EVT, AEE_SEND_SCRROTATE_EVT, and AEE_SEND_HEADSET_EVT macros should only be called from the same task in which Brew MP runs.

Note: In addition to sending these events and notifications, you must also implement the IFlip interface. Additionally, you must set all the right values for the OEM_GetDeviceInfoEx() with the following parameters:

  • AEE_DEVICESTATE_FLIP_OPEN
  • AEE_DEVICESTATE_KEYGUARD_ON
  • AEE_DEVICESTATE_HEADPHONE_ON
  • AEE_DEVICESTATE_SCR_ORIENTATION