Name | Description |
---|---|
Action | com.symbol.wfc.pttpro.ACTION_PTT_PRO_MESSAGE |
Intent Type | broadcast |
Extra 0 | This extra defines whether the call is targeted to a group or a user. This is a mandatory parameter |
Type | Integer |
Name | recipientType |
Value | 1 to target the call to a group.0 to target the call to 1 or more users. |
Extra 1 | |
Type | String |
Name | recipientName |
Value | If the extra name is group
|
Extra 2 | |
Type | String |
Name | message |
Value | Any message if string format. This is used configure the message to be sent to the Group/User. |
Extra 3 | |
Type | String |
Name | userToken |
Value | Zems User Token. Configures the Zems Token to the WS50 device. |
Extra 4 | |
Type | String |
Name | encodedAudio |
Value | Encoded Audio as a String. This is used to configure the audio message to be sent to the Group/User. |
adb shell am broadcast -a com.symbol.wfc.pttpro.ACTION_PTT_PRO_MESSAGE --ei recipientType 1 --es recipientName staff_admin' --es message 'Team meeting at 4pm'
adb shell am broadcast -a com.symbol.wfc.pttpro.ACTION_PTT_PRO_MESSAGE --ei recipientType 1 --es recipientName 'hardware_admin' --es message 'Hi! This is a test message.' --es userToken 'zems user token' --es encodedAudio 'audio stream'
adb shell am broadcast -a com.symbol.wfc.pttpro.ACTION_PTT_PRO_MESSAGE --ei recipientType 0 --es recipientName 'john' --es message 'Hi! This is a test message.' --es userToken 'zems user token' --es encodedAudio 'audio stream'
adb shell am broadcast -a com.symbol.wfc.pttpro.ACTION_PTT_PRO_MESSAGE --ei recipientType 0 --es recipientName 'john,steve' --es message 'Hi! This is a test message.' --es userToken 'zems user token' --es encodedAudio 'audio stream'
adb shell am broadcast -a com.symbol.wfc.pttpro.ACTION_PTT_PRO_MESSAGE --ei recipientType 0 --es recipientName 'george.shaw' --es message 'Review tomorrow is cancelled'
adb shell am broadcast -a com.symbol.wfc.pttpro.ACTION_PTT_PRO_MESSAGE --ei recipientType 0 --es recipientName 'george.shaw,ira.gershwin,cole.porter' --es message 'Review tomorrow is cancelled'
Name | Definition |
---|---|
Action | com.symbol.wfc.pttpro.PTTPRO_MESSAGE_STATUS |
Extra 0 | |
Type | Integer |
Name | PTT_PRO_MESSAGE_STATUS |
Value |
|
Extra 1 | |
Type | String |
Name | PTT_PRO_MESSAGE_ERROR_REASON |
Value |
|
Extra 2 | |
Type | String |
Name | recipientName |
Value | Returns the recipientName passed as part of the com.symbol.wfc.pttpro.ACTION_PTT_PRO_MESSAGE intent. |
Intent intent = new Intent(); intent.setAction("com.symbol.wfc.pttpro.ACTION_PTT_PRO_MESSAGE"); intent.putExtra("recipientType", 0); intent.putExtra("recipientName", "Aryan01"); intent.putExtra("message", "Hi this is from VAI"); intent.putExtra("encodedAudio", encodedAudio); intent.putExtra("userToken", "userToken"); sendBroadcast(intent);
IntentFilter message_intent= new IntentFilter(); message_intent.addAction("com.symbol.wfc.pttpro.PTTPRO_MESSAGE_STATUS"); registerReceiver(mReceiver,message_intent); public void onReceive(Context context, Intent intent) { String action= intent.getAction(); if(action.equals("com.symbol.wfc.pttpro.PTTPRO_MESSAGE_STATUS")) { int message_status = intent.getIntExtra("PTT_PRO_MESSAGE_STATUS" , 0); if ( message_status == 0) { String message_error_reason = intent.getStringExtra("PTT_PRO_MESSAGE_ERROR_REASON"); Log.i(TAG, " message_error_reason : "+ message_error_reason ); } String recipient_name = intent.getStringExtra("recipientName"); Log.i(TAG, " recipient_name : "+ recipient_name ); } } }