Hardware Button Events/Intents (PTT, LWP, etc.)
Several android devices have custom buttons added by the manufacturer. This opens new possibilities for the developer in handling those buttons especially when making Apps targeted for Hardware Devices.
This topic documents buttons which have intents attached to them which you can listen for via intent-receivers.
Sonim Devices
Section titled “Sonim Devices”Sonim devices have varying by model a lot of different custom buttons:
PTT_KEY
Section titled “PTT_KEY”com.sonim.intent.action.PTT_KEY_DOWNcom.sonim.intent.action.PTT_KEY_UPYELLOW_KEY
Section titled “YELLOW_KEY”com.sonim.intent.action.YELLOW_KEY_DOWNcom.sonim.intent.action.YELLOW_KEY_UPSOS_KEY
Section titled “SOS_KEY”com.sonim.intent.action.SOS_KEY_DOWNcom.sonim.intent.action.SOS_KEY_UPGREEN_KEY
Section titled “GREEN_KEY”com.sonim.intent.action.GREEN_KEY_DOWNcom.sonim.intent.action.GREEN_KEY_UPRegistering the buttons
Section titled “Registering the buttons”To receive those intents you will have to assign the buttons to your app in the Phone-Settings. Sonim has a possibilty to auto-register the buttons to the App when it is installed. In order to do that you will have to contact them and get a package-specific key to include in your Manifest like this:
<meta-data android:name="app_key_green_data" android:value="your-key-here" />RugGear Devices
Section titled “RugGear Devices”PTT Button
Section titled “PTT Button”android.intent.action.PTT.downandroid.intent.action.PTT.upConfirmed on: RG730, RG740A