Reference of PTTClient

Description of PTTClient

PTTChannel Group VideoChannel

PTTClient Class

readonly
nametypeattributesdescription
SDKVersionstringreadonlySDK version information. "1.0.0"
appVersionstringApp version information.
deviceModelNamestringDevice Model information.(Windows, Linux only)
AudioInDevicestringAudio-in Device. (Linux only), Default is "plug:dsnoop"
AudioOutDevicestringAudio-out Device. (Linux only), Default is "plug:dmix"
micTypeint10:Default, 20:VOIP Mic (Android only), VOIP Mic could be used for only testing.
playModeint10: VOIP, 20:MP3, default 10 (Android only)
playVolumeint0~100, default 100
micAmplificationint0~100, default 0
playAmplificationint0~100, default 0
inputDenoiserEnabledboolean0 : off, 1 : on, default 0
outputDenoiserEnabledboolean0 : off, 1 : on, default 0
inputLPFEnabledboolean0 : off, 1 : on, default 0
inputLPFCutoffint0~4000, default 1000
outputLPFEnabledboolean0 : off, 1 : on, default 0
outputLPFCutoffint0~4000, default 1000
outputSpeakerAutoOffEnabledint0 : off, 1 : on, default 0 (Android only)
accountNamestringreadonlyUser account name. After OnConnected, this is possible.
locationEnabledbooleanreadonlyUse location servie
useLocationboolean Whether to use location
multicastEnabledboolean Use multicast transport. default : false
voxEnabledboolean Use VOX. This is depended on PTTClient's VoxSensitivity. default : false
voxSensitivityint vox sensitivity ( 0 ~ 100 ), default 0(Auto)
bluetoothStatusintreadonly0: Unavailable, 10:Available, 20:Headset Enabled, 23:Button Enabled, 29:Headset+Button Enabled
pushToTalkButtonTypeint 0 : Press And Hold, 1 : Toggle
bluetoothButtonTypeint 0 : Auto Connect. 1 : CODA Wheel/CODA Click, 2 : SHP-612, 3 : Blu-PTT, 4 : R2Gear, 5 : PTT-U1/U2/U3, 6 : Ahead_1122
iOS support: 0/1/3/4/5/6, Android support: 0/1/2
bluetoothButtonNamestring Bluetooth button name. No implemented
bluetoothButtonID string Bluetooth button ID to be found. No implemented
languagestring ISO 639-1 alpha-2
passwordTokenstring Password policy token value receviced from server
0: First, Reserved
1~2: Minimum length. (dd)
3~4: PasswordWrongCount. (dd)
7: Password reset is required. 0:No required, 1: Required
8: Catcha is required. 0:No required, 1: Required
9: Online login is required. 0:No required, 1: Required
11: Minimum upper case count.
12: Minimum lower case count.
13: Minimum alpha case count.
14: Minimum number count.
15: Minimum symbol count.
16: Maximum repeated character count.
17: Maximum repeated qwerty character count.
18: Maximum repeated same character count.
20: ID can be included. 0:false, 1: true
21: "password" can be included. 0:false, 1: true
30: Password custom code. Password Custom definition
31: Last, Reserved
speakerStatusbooleanreadonly0 : off, 1 : on
micToSpeakerEnabledboolean 0 : off, 1 : on (Android only)
TCPOnlyEnabledboolean 0 : off, 1 : on, it is only applyed at connect
locationSensitivityint 0 : High 1 : Medium 2 : Low, (Android only)
autoLocationSendingEnabledboolean 0 : off, 1 : on, (Android only)
videoHWRenderingEnabledboolean 0 : off, 1 : on, (Windows only)
Methods
Events

Methods

initialize

int initialize(string LicenseKey)
LicenseKeyLicenseKey. It can be generated at https://dev.proptt2.com/account-licenses.php
Return0: Possible ID, 0<Fail
DescriptionInitialize PTTClient
Android SDK2.1.1
iOS SDK2.1.1
Windows SDK2.1.1
Linux SDK3.0.1
SampleInitialize("S0000000-C7A378675F4D002E887191FB22DF65EC-81B195BB");

uninitialize

void uninitialize()
DescriptionUninitialize PTTClient
Android SDK2.1.1
iOS SDK2.1.1
Windows SDK2.1.1
Linux SDK3.0.1
SampleUninitialize();

connect

int connect(boolean UseSSL, string UserID, string Password, string SecondAuthKey, int LastNewsID, string PushToken, PTTClientEvent* EventHandler)
int connect(string ServerIP, int ServerPort, boolean UseSSL, string UserID, string Password, string SecondAuthKey, int LastNewsID, string PushToken, PTTClientEvent* EventHandler)
int connect(boolean UseSSL, string UserID, string Password, string SecondAuthKey, int LastNewsID, int LastOTACustomID, int LastDeviceCustomID, string PushToken, PTTClientEvent* EventHandler)
int connect(string ServerIP, int ServerPort, boolean UseSSL, string UserID, string Password, string SecondAuthKey, int LastNewsID, int LastOTACustomID, int LastDeviceCustomID, string PushToken, PTTClientEvent* EventHandler)
ServerIPProPTT2 server's IP
ServerPortProPTT2 server's port. It must be 8080 or 8088. if UseSSL is true, it is 8080, else 8088
UseSSLIMPTT server's SSL option. default TRUE
UserIDUser ID
PasswordSha512(User's password)
SecondAuthKeyIf "", no used. ex IMEI or Phone number.
LastNewsIDClient's last News ID, default is 0.
LastOTACustomIDClient's last OTACustom ID, default is 0.
LastDeviceCustomIDClient's last DeviceCustom ID, default is 0. (Server 5.x~)
PushTokenPush Token in App(iOS, Android). Windows is "".
EventHandlerEvent Handler to receive events
ReturnAndroid/iOS - 0:Call Success, 0<ErrorCode
PC/Linux - 200:Call Success or Result Code
Expected EventsonProvisioned()->onConnected()->onSetup()->onChannels->onMembers()->onGroups()->onBuddies()->onPresenceUpdated()->onPresenceUpdated()
DescriptionConnect to ProPTT2 server system
Android SDK2.1.1
iOS SDK2.1.1
Windows SDK2.1.1
Linux SDK3.0.1

disconnect

int disconnect(boolean Logout)
Logoutif true, the login session will be logged out.
Return0:Call Success, 0<ErrorCode
Expected EventsonDisconnected()
DescriptionDisconnect from ProPTT2 server system
Android SDK2.1.1
iOS SDK2.1.1
Windows SDK2.1.1
Linux SDK3.0.1

updateProfile

int updateProfile(string ProfileAttributesJson)
ProfileAttributesJsonProfile's Attributes.
ReturnRequest Sequence ID. If less then 0, ErrorCode
Expected EventsonProfileUpdated
DescriptionUpdate user's profile attributes
Android SDK2.1.1
iOS SDK2.1.1
Windows SDK2.1.1
Linux SDK3.0.1
< ProfileAttributesJson >
fieldtypeDescriptionDefaultCRUD
UserIDstringUser's ID MM
NamestringUser's name MMO
PasswordstringSha512(password). It is for just update. M O
Typestring'N'ormal, 'A'sp, 'P'ackage MO
EmailstringUser's email MOO
ExpireDatestringPaid datetime O
PhoneNumberstringex)821012341234 OOO
NicknamestringURLEncode(User’s Nickname) (MAX 255char). OMO
StatusTextstirngURLEncode(User’s StatusText) (MAX 255char) MO
VASstirngUser's Option of the Value-Added Service
set to a digits of string
if value is "1", the option is enabled. otherwise disabled. if empty is all enable.
(0:AwakeUser, 1: InviteUser, 2: SubscribeChannel, 3: AddBuddy, 4:VideoPTT, 5: AwakeChannel)
OO
VisibleintWhether to allow for searching by another user OO
LanguagestringISO 639-1 alpha-2 OOO

getProfile

int getProfile(string UserID)
UserIDUser ID
ReturnRequest Sequence ID. If less then 0, ErrorCode
Expected EventsonProfile()
Descriptionget user's profile
Android SDK2.1.1
iOS SDK2.1.1
Windows SDK2.1.1
Linux SDK3.0.1

searchProfile

int searchProfile(string Keyword)
KeywordSearch keyword, "" is not possible.
ReturnRequest Sequence ID. If less then 0, ErrorCode
Expected EventsonProfileSearched()
DescriptionSearch profiles by keyword.
Android SDK2.1.1
iOS SDK2.1.1
Windows SDK2.1.1
Linux SDK3.0.1

updateProvision

int updateProvision(string ProvisionAttributesJson)
ProvisionAttributesJsonProvision's attributes
ReturnRequest Sequence ID. If less then 0, ErrorCode
DescriptionUpdate user's provision
Android SDK2.1.1
iOS SDK2.1.1
Windows SDK2.1.1
Linux SDK3.0.1
< ProvisionAttributesJson >
fieldtypeDescriptionDefaultCRUD
EnableVideoPTTbooleanUse video on PTT OO
EnableHDAudioPTTbooleanUse HD audio on PTT OO

updatePresence

int updatePresonce(string PresenceAttributesJson)
PresenceAttributesJsonPresence's attributes
ReturnRequest Sequence ID. If less then 0, ErrorCode
Expected EventsonUpdatePresence()
DescriptionUpdate user's presence
Android SDK2.1.1
iOS SDK2.1.1
Windows SDK2.1.1
Linux SDK3.0.1
< PresencenAttributesJson >
fieldtypeDescriptionDefaultCRUD
Statusint0:Offline,1:Online,2:Busy OO

updatePhoto

int updatePhoto(int PhotoType, int PhotoDataLength, byte[] PhotoDataBuffer)
int updatePhoto(string FilePath)
PhotoTypePhoto Type (20: BMP, 31: JPEG, 32 PNG)
PhotoDataLengthData size
PhotoDataBufferBuffer of data
FilePathPath of photo
ReturnRequest Sequence ID. If less then 0, ErrorCode.
Expected EventsonPhotoUpdated
DescriptionUpdate own photo
picture size should be less than 320 x 320
Android SDK2.1.1
iOS SDK2.1.1
Windows SDK2.1.1
Linux SDK3.0.1

getBuddyPhoto

int getBuddyPhoto(string UserID)
UserIDUser ID to get photo.
ReturnRequest Sequence ID. If less then 0, ErrorCode.
Expected EventsonBuddyPhotoReceived
DescriptionRequest to get photo
Android SDK2.1.1
iOS SDK2.1.1
Windows SDK2.1.1
Linux SDK3.0.1

getChannels

int getChannels()
ReturnRequest Sequence ID. If less then 0, ErrorCode.
Expected EventsonChannels
DescriptionRequest channel list
Android SDK2.1.1
iOS SDK2.1.1
Windows SDK2.1.1
Linux SDK3.0.1

getChannelInfo

int getChannelInfo(int ChannelID)
ChannelIDChannel's ID
ReturnRequest Sequence ID. If less then 0, ErrorCode.
Expected EventsonChannel
DescriptionRequest channel info
Android SDK2.1.1
iOS SDK2.1.1
Windows SDK2.1.1
Linux SDK3.0.1

searchChannel

int searchChannel(string Keyword, string Code)
KeywordSearch keyword, "" is not possible.
CodeSearch Code, "" is not possible.
ReturnRequest Sequence ID. If less then 0, ErrorCode.
Expected EventsonChannelSearched
DescriptionSearch channels by keyword or code.
Android SDK2.1.1
iOS SDK2.1.1
Windows SDK2.1.1
Linux SDK3.0.1

getMembers

int getMembers()
int getMembers(int ChannelID)
ChannelIDChannel's ID to get members
Return Request Sequence ID. If less then 0, ErrorCode.
Expected EventsonMembers
DescriptionRequest members of channels
Android SDK2.1.1
iOS SDK2.1.1
Windows SDK2.1.1
Linux SDK3.0.1

getGroups

int getGroups()
Return Request Sequence ID. If less then 0, ErrorCode.
Expected Events OnGroups()->onBuddies()
DescriptionRequest BuddyGroups
Android SDK2.1.1
iOS SDK2.1.1
Windows SDK2.1.1
Linux SDK3.0.1

getBuddies

int getBuddies()
int getBuddies(int GroupID)
GroupIDGroup's ID to get buddies
ReturnRequest Sequence ID. If less then 0, ErrorCode.
Expected EventsonBuddies()
DescriptionRequest Buddy list
Android SDK2.1.1
iOS SDK2.1.1
Windows SDK2.1.1
Linux SDK3.0.1

getOrganizations

int getOrganization()
Return Request Sequence ID. If less then 0, ErrorCode.
Expected EventsonOrganizations
DescriptionRequest organizations
Android SDK2.1.1
iOS SDK2.1.1
Windows SDK2.1.1
Linux SDK3.0.1

getChildOrganizationsUsers

int getChildOrganizationsUsers(int organizationID)
organizationIDsparent organization ID
Return Request Sequence ID. If less then 0, ErrorCode.
Expected EventsonChildOrganizationsUsers
DescriptionRequest child organizations and users. (Server 5.x~)
Android SDK3.0.1
iOS SDK3.0.1
Windows SDK3.0.1
Linux SDK3.0.1

getUsers

int getUsers()
int getUsers(int OrganizationID)
OrganizationIDOrganization's ID to get users.
ReturnRequest Sequence ID. If less then 0, ErrorCode.
Expected EventsonUsers
Description(*Depreciated) Request user list. * Server 5.x don't support getUsers, please use getChildOrganizationsUsers.
Android SDK2.1.1
iOS SDK2.1.1
Windows SDK2.1.1
Linux SDK3.0.1

createPTTChannel

int createPTTChannel(string ChannelAttributesJson)
ChannelAttributesJsonChannel's attributes
ReturnRequest Sequence ID. If less then 0, ErrorCode.
Expected EventsonChannelCreated
DescriptionCreate PTTChannel
This method is for only app srvice. You can not use it for server package and cloud service.
Don't use it. System could be broken.
Android SDK2.1.1
iOS SDK2.1.1
Windows SDK2.1.1
Linux SDK3.0.1
< ChannelAttributesJson >
fieldtypeDescriptionDefaultCRUD
NostringChannel number or code MO
ChannelNamestringURLEncode(Channel name)MMO
ChannelTypestring'G'roup,'1':1MM
IsRecordablebooleanIs RecordabletrueMOO
TOTintChannel’s TOT30MOO
IsOwnerbooleanChannel’s owner O
IsEncryptedbooleanIs EncryptedfalseOOO
ShareLocationbooleanIs Shared LocationfalseO
DescriptionstringURLEncode(DescriptionOOO
NotificationstringURLEncode(Notification)OOO
FunctionstringFunction name O
Statusint Status joined the Channel

subscribePTTChannel

int subscribePTTChannel(int ChannelID)
int subscribe(int ChannelID, string InvitationCode)
ChannelID Channel ID to subscribe
InvitationCodeIf user is invited, user has the invitation code.
ReturnRequest Sequence ID. If less then 0, ErrorCode.
Expected Events
DescriptionSubscribe to channel.
This method is for only app srvice. You can not use it for server package and cloud service.
Don't use it. System could be broken.
Android SDK2.1.1
iOS SDK2.1.1
Windows SDK2.1.1
Linux SDK3.0.1

openPTTChannel

int openPTTChannel(int ChannelID, PTTChannelEvent EventHandler)
ChannelIDChannel ID to open
EventHandlerEvent handler to receive events
ReturnRequest Sequence ID. If less then 0, ErrorCode.
Expected EventsonChannelOpened
DescriptionOpen PTT channel instance
Android SDK2.1.1
iOS SDK2.1.1
Windows SDK2.1.1
Linux SDK3.0.1

closePTTChannel

int closePTTChannel(PTTChannel PTTChannelInstance)
PTTChannelInstancePTTChannel Instance to close
ReturnRequest Sequence ID. If less then 0, ErrorCode.
DescriptionClose PTT channel instance
Android SDK2.1.1
iOS SDK2.1.1
Windows SDK2.1.1
Linux SDK3.0.1

openGroup

int openGroup(int GroupID, GroupEvent EventHandler)
GroupIDGroup's ID to open
EventHandlerEvent handler to receive events
ReturnRequest Sequence ID. If less then 0, ErrorCode.
Expected EventsonGroupOpened
DescriptionOpen Buddy Group
Android SDK2.1.1
iOS SDK2.1.1
Windows SDK2.1.1
Linux SDK3.0.1

closeGroup

int closeGroup(Group GroupInstance)
GroupInstanceGroup instance to be closed
ReturnRequest Sequence ID. If less then 0, ErrorCode.
DescriptionClose Group
Android SDK2.1.1
iOS SDK2.1.1
Windows SDK2.1.1
Linux SDK3.0.1

getNotices

int getNotices(int NewsID, int Count)
NewsIDFirst Notice(News)'s ID to get
CountCount to get
ReturnRequest Sequence ID. If less then 0, ErrorCode.
Expected EventsonNotices
DescriptionRequest Notice list
Android SDK2.1.1
iOS SDK2.1.1
Windows SDK2.1.1
Linux SDK3.0.1

awakeUser

int awakeUser(string UserID)
UserIDUser ID to receive notify
ReturnRequest Sequence ID. If less then 0, ErrorCode.
Expected Events
DescriptionRequest to send Awake notify
Android SDK2.1.1
iOS SDK2.1.1
Windows SDK2.1.1
Linux SDK3.0.1

awakeChannelUser

int awakeUser(int ChannelID, string UserID)
ChannelIDChannel ID to request
UserIDUser ID to receive notify
ReturnRequest Sequence ID. If less then 0, ErrorCode.
Expected Events
DescriptionRequest to send Awake notify to Channel User
Android SDK2.1.1
iOS SDK2.1.1
Windows SDK2.1.1
Linux SDK3.0.1

setActive

int setActive(boolean IsActive)
IsActiveIs Active
Return0:Success, 0<ErrorCode
Expected Events
Descriptionset app staus. default active
Android SDK2.1.1
iOS SDK2.1.1
Windows SDK2.1.1
Linux SDK3.0.1

setSpeakerPhone

int setSpeakerPhone(boolean Enable)
EnableUse speaker phone
Return0:Success, 0<ErrorCode
DescriptionUse speaker phone. default false
Android SDK2.1.1
iOS SDK2.1.1
Windows SDKNot supported yet
Linux SDKNot supported yet

getCameraList

string getCameraList()
Returncamera list seperated by ','
Expected Events
Descriptionget camera list
Android SDK2.1.1
iOS SDK2.1.1
Windows SDK2.1.1
Linux SDKNot supported yet

setCamera

int setCamera(string CameraName)
CameraNameCamera Name to be used
Return0:Success, 0<ErrorCode
Expected Events
DescriptionUse camera. default face camera
Android SDK2.1.1
iOS SDK2.1.1
Windows SDK2.1.1
Linux SDKNot supported yet
Sample(Android)
private boolean isCameraFront = false;
cameraList = client.getCameraList();
list = cameraList.split(","); 
if(list.length == 1) {
    client.setCamera(list[0]);
} else if(list.length > 0) {
    if (!isCameraFront) {
          client.setCamera(list[0]);
    } else {
          client.setCamera(list[1]);
    }
}

enableBluetooth

int enableBluetooth(type DeviceType)
DeviceTypeAndroid, IOS : int
20:Headset, 23:Button, 29:Headset+Button

Windows : string, bluetooth Port Name
Return0:Success, 0<ErrorCode
Expected EventsonBluetoothStatusChanged
DescriptionUse bluetooth device
Android SDK2.1.1
iOS SDK2.1.1
Windows SDK2.1.1
Linux SDKNot supported yet

disableBluetooth

int disableBluetooth(type DeviceType)
DeviceTypeAndroid, IOS : int
20:Headset, 23:Button, 29:Headset+Button

Windows : string, bluetooth Port Name
Return0:Success, 0<ErrorCode
Expected EventsonBluetoothStatusChanged
DescriptionDisable bluetooth device
Android SDK2.1.1
iOS SDK2.1.1
Windows SDK2.1.1
Linux SDKNot supported yet

setBluetoothMode

int setBluetoothMode(int Mode)
Mode0 : None (default)
10 : Battery Save Mode
Return0:Success, 0<ErrorCode
Expected Events
DescriptionChange Bluetooth Mode

default 0 mode always works bluetooth Headset
if you enableBluetooth "Heaset" or "Headset + Button"

If you set Battery Save Mode, Bluetooth Headset only works
in channel Locked if you enableBluetooth "Heaset" or "Headset + Button"
Android SDK2.1.1
iOS SDKNot supported
Windows SDKNot supported
Linux SDKNot supported yet

getBluetoothMode

int getBluetoothMode()
Return0:Success, 0<ErrorCode
Expected Events
Descriptionget current Bluetooth mode
Android SDK2.1.1
iOS SDKNot supported
Windows SDKNot supported
Linux SDKNot supported yet

startTestVox

int startTestVox()
Return0:Success, 0<ErrorCode
DescriptionUse bluetooth device
Android SDK2.1.1
iOS SDK2.1.1
Windows SDKNot implemented
Linux SDKNot supported yet

stopTestVox

int stopTestVox()
Return0:Success, 0<ErrorCode
Expected Events
DescriptionDisable bluetooth device
Android SDK2.1.1
iOS SDK2.1.1
Windows SDKNot implemented
Linux SDKNot supported yet

openVideoAnnouncerChannel

VideoChannel openVideoAnnouncerChannel(VideoChannelEvent EventHandler)
EventHandlerEvent handler to receive events
ReturnOpened Video Channel's Instance
Expected Events
DescriptionOpen Video channel instance for announcer
Android SDK2.1.1
iOS SDK2.1.1
Windows SDK2.1.1
Linux SDKNot supported yet

openVideoPlayerChannel

VideoChannel openVideoPlayerChannel(int VideoChannelID, VideoChannelEvent EventHandler)
VideoChannelIDVideo Channel's ID to join
EventHandlerEvent handler to receive events
ReturnOpened Video Channel's Instance
Expected Events
DescriptionOpen Video channel instance to join
Android SDK2.1.1
iOS SDK2.1.1
Windows SDK2.1.1
Linux SDKNot supported yet

closeVideoChannel

int closeVideoChannel(VideoChannel VideoChannelInstance)
VideoChannelInstanceVideo Channel Instance to close
ReturnRequest Sequence ID. If less then 0, ErrorCode.
Expected Events
DescriptionClose Video channel instance
Android SDK2.1.1
iOS SDK2.1.1
Windows SDK2.1.1
Linux SDKNot supported yet

sendPrivateMessage

int sendPrivateMessage(string ReceiverID, string Message)
ReceiverID Receiver ID to be received a message.
Message Max 200 characters
ReturnRequest Sequence ID. If less then 0, ErrorCode.
Expected Events
DescriptionSend Message to Receiver
Server version1.2.x~
Android SDK2.1.1
iOS SDK2.1.1
Windows SDK2.1.1
Linux SDK3.0.1

sendPrivateCustomMessage

int sendPrivateCustomMessage(string ReceiverID, byte[] DataBuffer, int DataLength)
ReceiverID Receiver ID to be received a message.
DataBuffer Buffer of data
DataLength Data size ( Max 30k )
ReturnRequest Sequence ID. If less then 0, ErrorCode.
Expected Events
DescriptionSend a CustomMessage to Receiver.
Server version1.2.x~
Android SDK2.1.1
iOS SDK2.1.1
Windows SDK2.1.1
Linux SDK3.0.1

setLocationManager

void setLocationManager(ILocationManager LocationManager)
LocationManager LocationManager instance.
Expected Events
DescriptionCan be use for external location device.
Android SDK2.1.1
iOS SDKNot supported
Windows SDK3.0.1
Linux SDK3.0.1

sendLocationToServer

int sendLocationToServer()
ReturnRequest Sequence ID. If less then 0, ErrorCode.
Expected Events
DescriptionCan be Send location information to server.
Android SDK2.1.1
iOS SDKNot supported
Windows SDK2.1.1 (C++ only)
Linux SDK3.0.1

enableLogging

void enableLogging(boolean Net)
NetNet logging on/off
Expected Events
DescriptionEnable logging.
Android SDK2.1.1
iOS SDKNot supported
Windows SDKNot implemented
Linux SDKNot implemented

getMyLocation

Location getMyLocation()
DescriptionGet current device's location.
Android SDK2.1.3
iOS SDKNot supported
Windows SDKNot supported
Linux SDKNot supported

Events

onError

void onError(int ErrorCode, string ErrorMesssage)
ErrorCodeError code. see Main 6
ErrorMesssageError message
DescriptionErrer event
Android SDK2.1.1
iOS SDK2.1.1
Windows SDK2.1.1
Linux SDK3.0.1

onResult

void onResult(int Seq, int ResultCode, string ResultMesssage)
SeqRequested Sequence ID
ResultCodeError code. see Main 7
ResultMesssageError message
DescriptionResult event for request
Android SDK2.1.1
iOS SDK2.1.1
Windows SDK2.1.1
Linux SDK3.0.1

onProvisioned

void onProvisioned(string InitialJson)
InitialJson
DescriptionConnected to server.
Android SDK2.1.1
iOS SDK2.1.1
Windows SDK2.1.1
Linux SDK3.0.1
< InitialJson >
fieldtypeDescriptionDefault
UserDBIDintUser's ID in DB.
UserNamestringUser's name.
UserEmailstringUser's email
UserTypeintUser's type
NationCodestringUser's nation
ServerVersionstringServer's version
ExpireTimestringExpire Time(GMT0) , ex) 2015-05-21 20:10:12Unlimit
NewsCountintNotification count after LastNotificationID
LastAppVersionstringLast App version
RecommendAppVersionstringRecommended App version
MinAppVersionstringMinimum App version1.0.0
UpgradeURLstringURLEncoded(URL)
"store" : app store
URL : visit web
store
EnableVideoSharingbooleanenable video sharingfalse
EnableDispatchingbooleanenable dispatching service for Dispatcherfalse
EnableHDAudiobooleanenable HD quality audiofalse
EnableMicroAudiobooleanenable MicroNB quality audiofalse
EnableAllUserMapbooleanenable map of all users for dispatcherfalse
EnableLocationDevicebooleanenable location device(Android only)false
RequiredLocationbooleanenable location sendingfalse
LockSetupstringUnlock password for defaulr menu lock""
FAQURLstringURL : visit webPC: https://www.proptt2.com/xx/faq.htm
smart device https://www.proptt2.com/xx/mfaq.htm
xx means language code. ex) 'en', 'ko', 'zh'
HomepagestringURL : visit webwww.proptt.com
LogoIDintIf it is not 0 and not same with local LogoID, must download itProPTT logo
LogoURLstringProPTT logo's URL(UrlEncoded)
ProvisionToken string(64)User's permission value
* This is below.
LastOTACustomID intLast OTACustom ID
LastOTACustomContentstringURLEncoded(content), Last OTA custom content
LastDeviceCustomID intLast DeviceCustom ID
LastDeviceCustomContentstringURLEncoded(content), Last Device custom content
ExtMenustringExtended menu for app
< ProvisionToken >
< PTT >
0: First index, reserved
2: VideoPTT, 0:Disable(Receiving available), 1:Sending/Receiving available(Receiver can only receive)
3: 1:1PTT, 0:Disable(Receiving available), 1:Sending/Receiving available
4: MasterPTT: 1:Disable(Receiving available),2:Sending/Receiving available(Owner/Dispatcher can send it)
< VideoShare >
10: VideoShare, 0:Disable, 2:Receiving only, 3:Sending only,1:Sending/Receiving available
11: VideoRecord, 0:Disable, 1:Enable
30: VideoShareTOT, 0:Unlimited, 1:2min 2:5min, 3:10min, 4:20min, 5:30min, 6:1hour, 7:2hour, 8:6hour, 9:12hour 
< Chat >
20: UseChat, 0:Disable, 2:Receiving only,1:Sending/Receiving available
21: UsePicture, 0:Receiving only,1:Sending/Receiving available
22: UseLocationSending, 0:Receiving only,1:Sending/Receiving available
< Main >
26: Show locations: 0:Disable, 1:Enable
27: Use function: 0:Disable, 1:Enable
28: LockSetup: 1:Open, 2:Disable all, 3:2:Disable all(except Profile), 4:Default lock(Default menu only)
< Setup >
33: Use interception: 1:All available(Default OFF),3:All available(Default ON, Owner/Operator only possible)
34: AudioPTT Quality: 1:All available(Default Middle), 3:All available(Default High), 4:All available(Default Low), 8:All available(Default Highest), 9:All available(Default HD), a:All available(Default Full HD), 5:High only, 6:Middle only, 7:Low only, c:Highest only, d:HD only, e:Full HD only, g:MicroNB only
35: VideoPTT Quality: 1:All available(Default Low), 3:All available(Default High), 4:All available(Default Middle), 5:High only, 6:Middle only, 7:Low only
40: VideoShare Quality: 1:All available(Default Middle), 2:All available(Default Highest), 3:All available(Default High), 4:All available(Default Low), f:All available(Default MicroNB), 5:High only, 6:High only, 7:Middle only, 8:Low only
45: Record received PTT: 1:All available(Default ON),3:All available(Default OFF), 4:ON only, 5:Off only
46: Record sent PTT: 1:All available(Default OFF),3:All available(Default ON), 4:ON only, 5:Off only
47: Cycle PTT deletion: 1:Capacity, 2:1Hour, 3:2Hour, 4:6Hour, 5:12Hour, 6:1일, 7:1Hour only, 8:6Hour only, 9:1Day only, a:10count, b:20count, c:50count, d:100count, e:200count, f:10count only, g:20count only, h:50count only, i:100count only, j:200count only
50: Use location: 1:All available(Default ON),3:All available(Default OFF), 4:Enable only, 5:Disable only
51: Location sensitivity: 1:All available(Default Middle), 3:All available(Default High), 4:All available(Default Low), 5:High only, 6:Middle only, 7:Low only
52: Location interval: 1:All available(System Default), 3:All available(30second), 4:All available(15second), 5:Default  only, 6:30second only, 7:15second only
55: Emergency detection: 1:All available(Default OFF),3:All available(Default ON)
56: Use man-down: 1:All available(Default OFF),3:All available(Default ON)
63: Last index, reserved

* if ProvisionToken's length is not 64, default must be "1111111111111111111111111111110011111111111111111111111111111100"

onConnected

void onConnected()
DescriptionConnected to server.
Android SDK2.1.1
iOS SDK2.1.1
Windows SDK2.1.1
Linux SDK3.0.1

onSetup

void onSetup()
Descriptionsetup to server.
Android SDK2.1.1
iOS SDK2.1.1
Windows SDK2.1.1
Linux SDK3.0.1

onDisconnected

void onDisconnected(int Reason)
ReasonWhether the session log out.
0: Network Error
1: Log-out
2: Duplicate Log-in
3: Upgrade
4: Invalid License
5: Invalid Account
6 :Disconnected By User
DescriptionDisconnected to server.
Android SDK2.1.1
iOS SDK2.1.1
Windows SDK2.1.1
Linux SDK3.0.1

onProfileUpdated

void onProfileUpdated(string ProfileAttributesJson)
ProfileAttributesJsonUpdated attributes
DescriptionProfile is updated.
Android SDK2.1.1
iOS SDK2.1.1
Windows SDK2.1.1
Linux SDK3.0.1

onProfile

void onProfile(string ProfileAttributeJson)
ProfileAttributeJsonProfile attributes
DescriptionResponse of GetProfile.
Android SDK2.1.1
iOS SDK2.1.1
Windows SDK2.1.1
Linux SDK3.0.1

onProfileSearched

void onProfileSearched(string ProfilesJson)
ProfilesJsonProfile list
DescriptionResponse of SearchProfile.
Android SDK2.1.1
iOS SDK2.1.1
Windows SDK2.1.1
Linux SDK3.0.1
< ProfilesJson >
fieldtypeDescriptionDefaultR
Profilestring O
  ProfileAttributesstringProfileAttributesJson M

onProvisionUpdated

void onProvisionUpdated(string ProvisionAttributeJson)
ProvisionAttributeJsonUpdated attributes
DescriptionProvision is updated.
Android SDK2.1.1
iOS SDK2.1.1
Windows SDK2.1.1
Linux SDK3.0.1

onPresenceUpdated

void onPresenceUpdated(string PresenceAttributesJson)
PresenceAttributesJsonAttributes
DescriptionPresence is updated
Android SDK2.1.1
iOS SDK2.1.1
Windows SDK2.1.1
Linux SDK3.0.1

onPhotoUpdated

void onPhotoUpdated(int PhotoChangeNumber)
PhotoChangeNumberPhoto's change number
DescriptionPhoto is updated
Android SDK2.1.1
iOS SDK2.1.1
Windows SDK2.1.1
Linux SDK3.0.1

onBuddyPhotoReceived

void onBuddyPhotoReceived(string UserID, int PhotoType, int PhotoDataLength, byte[] PhotoDataBuffer)
void onBuddyPhotoReceived(string UserID, string PhotoURL)
UserIDUser ID of photo
PhotoTypePhoto Type (20: BMP, 31: JPEG, 32 PNG)
PhotoDataLengthData size
PhotoDataBufferBuffer of data
PhotoURLURL to receive photo
DescriptionResponse of GetBuddyPhoto
Android SDK2.1.1
iOS SDK2.1.1
Windows SDK2.1.1
Linux SDK3.0.1

onChannelCreated

void onChannelCreated(int ChannelID)
ChannelIDCreated Channel's ID
DescriptionPTTChannel is created.
Android SDK2.1.1
iOS SDK2.1.1
Windows SDK2.1.1
Linux SDK3.0.1

onChannelUpdated

void onChannelUpdated(string ChannelAttributesJson)
ChannelAttributesJsonAttributes
DescriptionPTTChannel is updated by owner.
Android SDK2.1.1
iOS SDK2.1.1
Windows SDK2.1.1
Linux SDK3.0.1

onChannelDeleted

void onChannelDeleted(int ChannelID)
ChannelIDDeleted Channel's ID
DescriptionPTTChannel is deleted.
Android SDK2.1.1
iOS SDK2.1.1
Windows SDK2.1.1
Linux SDK3.0.1

onChannelOpened

void onChannelOpened(PTTChannel PTTChannelInstance)
PTTChannelInstanceOpened Channel's Instance
DescriptionPTTChannel Instance is opened.
Android SDK2.1.1
iOS SDK2.1.1
Windows SDK2.1.1
Linux SDK3.0.1

onChannels

void onChannels(string ChannelsJson)
ChannelsJson
DescriptionResponse of GetChannels
Android SDK2.1.1
iOS SDK2.1.1
Windows SDK2.1.1
Linux SDK3.0.1
< ChannelsJson >
fieldtypeDescriptionDefaultR
ChannelstringO
  ChannelAttributesstringChannelAttributesJsonM

onChannel

void onChannel(string ChannelAttributesJson)
ChannelAttributesJson
DescriptionResponse of GetChannelInfo
Android SDK2.1.1
iOS SDK2.1.1
Windows SDK2.1.1
Linux SDK3.0.1

onChannelSearched

void onChannelSearched(string ChannelsJson)
ChannelsJsonChannel list
DescriptionResponse of SearchChannel.
Android SDK2.1.1
iOS SDK2.1.1
Windows SDK2.1.1
Linux SDK3.0.1

onMembers

void onMembers(string MembersJson)
MembersJsonresult(Json)
DescriptionResponse of GetMembers
Android SDK2.1.1
iOS SDK2.1.1
Windows SDK2.1.1
Linux SDK3.0.1
< MembersJson >
fieldtypeDescriptionDefaultR
MemberO
  UserIDstringMember’s IDM
  NamestringURLEncode(Member’s name)M
  JoinedChannelO
    ChannelIDstringJoined Channel IDM
    ChannelRolestringMember Role, 10:Normal(default), 20:Receiver, 90:Operator, SDK 2.1.2O
  WaitedChannelO
    ChannelIDstringWaited ChannelLIDM
    InvitorIDstringM
    InvitorNamestringM

onGroupOpened

void onGroupCreated(Group GroupInstance)
GroupInstanceOpened Group's Instance
DescriptionGroup Instance is opened.
Android SDK2.1.1
iOS SDK2.1.1
Windows SDK2.1.1
Linux SDK3.0.1

onGroups

void onGroups(string GroupsJson)
GroupsJson
DescriptionResponse of GetGroups
Android SDK2.1.1
iOS SDK2.1.1
Windows SDK2.1.1
Linux SDK3.0.1
< GroupsJson >
fieldtypeDescriptionDefaultR
GroupO
  IDintGroup’s IDM
  NamestringURLEncode(Group's Name) M
  Typeint0:Normal M

onBuddies

void onResponseBuddies(string BuddiesJson)
BuddiesJsonresult(Json)
DescriptionResponse of GetBuddies
Android SDK2.1.1
iOS SDK2.1.1
Windows SDK2.1.1
Linux SDK3.0.1
< BuddiesJson >
fieldtypeDescriptionDefaultR
BuddyO
  UserIDstringBuddy IDM
  UserNamestringBuddy NameM
  GroupIDintGroup ID M
  Statusint10: registed, 20: requesting: 30: accepted

onOrganizations

void onOrganizations(string OrganizationsJson)
OrganizationsJson
DescriptionResponse of GetOrganizations
Android SDK2.1.1
iOS SDK2.1.1
Windows SDK2.1.1
Linux SDK3.0.1
< OrganizationJson >
fieldtypeDescriptionDefaultR
OrganizationO
  IDintOrganization’s IDM
  NamestringURLEncode(Organization's Name)M
  Typeint0:NormalM

onChildOrganizationsUsers

void onChildOrganizationsUsers(String childOrganizationsUsersJson)
Return Request Sequence ID. If less then 0, ErrorCode.
DescriptionRequest organizations
Android SDK3.0.1
iOS SDK3.0.1
Windows SDK3.0.1
Linux SDK3.0.1
< childOrganizationsUsersJson >
fieldtypeDescriptionDefaultR
OrganizationO
  IDintOrganization’s IDM
  NamestringURLEncode(Organization's Name)M
  Typeint0:NormalM
UserO
  UserLIDstringUser's IDM
  UserNamestringURLEncode(User's Name)M

onUsers

void onUsers(string UsersJson)
UsersJsonresult(Json)
DescriptionResponse of GetUsers. * Server 5.x don't support this event, please use onChildOrganizationsUsers.
Android SDK2.1.1
iOS SDK2.1.1
Windows SDK2.1.1
Linux SDK3.0.1
< UsersJson >
fieldtypeDescriptionDefaultR
UserO
  UserLIDstringUser's IDM
  UserNamestringUser's NameM
  IncludedGroupsO
    OrganizationIDintOrganization’s IDM

onBuddyRequested

void onBuddyRequested(int GroupID, string RequesterID, string RequesterName)
GroupIDGroup ID of event
RequesterIDUser ID who have added me
RequesterNameUser Name who have added me
DescriptionResponse of GetUsers
Android SDK2.1.1
iOS SDK2.1.1
Windows SDK2.1.1
Linux SDK3.0.1

onBuddyAccepted

void onBuddyAccepted(int GroupID, string UserID, string buddyInfoJson)
GroupIDGroup ID of event
UserIDSubscriber's ID
DescriptionSubscribed into a Buddy Group
Android SDK2.1.1
iOS SDK2.1.1
Windows SDK2.1.1
Linux SDK3.0.1
< BuddyInfoJson >
fieldtypeDescriptionDefaultR
NicknamestringURLEncode(Buddy Nickname) (MAX 255char)
StatusTextstringURLEncode(Buddy StatusText(MAX 255char).
PhotoChangeNumberintServer’s change number.

onBuddyDenied

void onBuddyDenied(int ChannelID, string UserID)
GroupIDGroup ID of event
UserIDSubscriber's ID
DescriptionUser is joined into a Buddy Group
Android SDK2.1.1
iOS SDK2.1.1
Windows SDK2.1.1
Linux SDK3.0.1

onSubscribeRequested

void onSubscribeRequested(int ChannelID, string MemberID, string MemberName)
ChannelIDChannel ID of event
MemberIDSubscriber's ID
MemberNameSubscriber's Name
DescriptionRequested a subscription into a PTT channel.
Android SDK2.1.1
iOS SDK2.1.1
Windows SDK2.1.1
Linux SDK3.0.1

onSubscribeAccepted

void onSubscribeAccepted(int ChannelID, string MemberID, string MemberName)
ChannelIDChannel ID of event
MemberIDSubscriber's ID
MemberNameSubscriber's Name
DescriptionSubscribed into a PTT channel
Android SDK2.1.1
iOS SDK2.1.1
Windows SDK2.1.1
Linux SDK3.0.1

onSubscribeDenied

void onSubscribeDenied(int ChannelID, string MemberID)
ChannelIDChannel ID of event
MemberIDSubscriber's ID
DescriptionUser is joined into a PTT channel.
Android SDK2.1.1
iOS SDK2.1.1
Windows SDK2.1.1
Linux SDK3.0.1

onUnsubscribed

void onUnsubscribed(int ChannelID, string MemberID, string OwnerID)
ChannelIDChannel ID of event
MemberIDUnsubscriber's ID
OwnerIDChannel owner's ID
DescriptionUser is joined into a PTT channel.
Android SDK2.1.1
iOS SDK2.1.1
Windows SDK2.1.1
Linux SDK3.0.1

onSubscribeCanceled

void onSubscribeCanceled(int ChannelID, string MemberID)
ChannelIDChannel ID of event
MemberIDRequester's ID for cancel
DescriptionCanceled to subscribe
Android SDK2.1.1
iOS SDK2.1.1
Windows SDK2.1.1
Linux SDK3.0.1

onInviteRequested

void onInviteRequested(int ChannelID, string channelName, string RequesterID, string RequesterName, string ReceiverID, string ReceiverName)
ChannelIDChannel ID of event
ChannelNameChannel Name
RequesterIDRequester ID
RequesterNameRequester Name
ReceiverIDReceiver ID
ReceiverNameReceiver Name
DescriptionInvited from another peer
Android SDK2.1.1
iOS SDK2.1.1
Windows SDK2.1.1
Linux SDK3.0.1

onInviteAccepted

void onInvitedAccepted(int ChannelID, string SenderID, string ReceiverID, string ReceiverName)
ChannelIDChannel ID of event
SenderIDSender ID
ReceiverIDReceiver ID
ReceiverNameReceiver Name
Descriptionaccepted to invite PTT channel
Android SDK2.1.1
iOS SDK2.1.1
Windows SDK2.1.1
Linux SDK3.0.1

onInviteDenied

void onInvitedDenied(int ChannelID, string RequesterID, string ReceiverID, string ReceiverName)
ChannelIDChannel ID of event
RequesterIDRequester ID
ReceiverIDReceiver ID
Descriptiondenied to invite PTT channel
Android SDK2.1.1
iOS SDK2.1.1
Windows SDK2.1.1
Linux SDK3.0.1

onInviteCanceled

void onInvitedCanceled(int ChannelID, string ReceiverID)
ChannelIDChannel ID of event
ReceiverIDReceiver ID
DescriptionCanceled to invite
Android SDK2.1.1
iOS SDK2.1.1
Windows SDK2.1.1
Linux SDK3.0.1

onNotices

void onNotices(string NoticesJson)
ChannelsJson
DescriptionResponse of GetNotices
Android SDK2.1.1
iOS SDK2.1.1
Windows SDK2.1.1
Linux SDK3.0.1
< NoticesJson >
fieldtypeDescriptionDefaultR
NoticeO
  IdintNotice IDM
  TitlestringTitle of NoticeM
  ContentstringContent of NoticeM
  Typeint10: NormalM
  UpdateDatestringDate to update NoticeM

onAwakeUser

void onAwakeUser(string UserID)
UserIDUser ID to receive notify
DescriptionResponse of AwakeUser
Android SDK2.1.1
iOS SDK2.1.1
Windows SDK2.1.1
Linux SDK3.0.1

onAwakeChannelUser

void onAwakeChannelUser(int ChannelID, string UserID)
ChannelIDChannel ID of event
UserIDUser ID to receive notify
DescriptionResponse of AwakeChannelUser
Android SDK2.1.1
iOS SDK2.1.1
Windows SDK2.1.1
Linux SDK3.0.1

onBluetoothStatusChanged

void onBluetoothStatusChanged(int BluetoothStatus)
BluetoothStatus0: Unavailable, 10:Available, 20:Headset Enabled, 23:Button Enabled, 29:Headset+Button Enabled
DescriptionBluetooth device's status is changed
Android SDK2.1.1
iOS SDK2.1.1
Windows SDK2.1.1
Linux SDK3.0.1

onVoxDataCaptured

void onVoxDataCaptured(byte[] TrackDataBuffer, int DataLength, unsigned int Timestamp)
TrackDataBufferBuffer of data
DataLengthData size
TimestampTimestamp of data
DescriptionVox data is captured from device.
Android SDK2.1.1
iOS SDK2.1.1
Windows SDKNot implemented
Linux SDKNot implemented

onPrivateMessageReceived

void onPrivateMessageReceived(string SenderID, string SenderName, string Message)
SenderIDSender ID
SenderNameSender Name
MessageMessage
DescriptionA private message is received from sender.
Android SDK2.1.1
iOS SDK2.1.1
Windows SDK2.1.1
Linux SDK3.0.1

onPrivateCustomMessageReceived

void onPrivateCustomMessageReceived(string SenderID, string SenderName, byte[] DataBuffer, int DataLength)
SenderIDSender ID
SenderNameSender Name
DataBufferBuffer of data
DataLengthData size
DescriptionPrivate custom message is received.
Android SDK2.1.1
iOS SDK2.1.1
Windows SDK2.1.1
Linux SDK3.0.1

onSysCommandReceived

void onSysCommandReceived(int CMD, string Param1, string ParamsJson)
CMDCMD
Param1Param1
ParamsJsonParamsJson
DescriptionSystem command message is received.
Android SDK3.0.1
iOS SDK3.0.1
Windows SDK3.0.1
Linux SDK3.0.1

onLatency

void onLatency(int MiliLatency)
MiliLatencydelayTime(miliseconds). It is round-trip time, you need to devide by 2.
Descriptioncheck result for Latency.
Android SDK2.1.1
iOS SDK2.1.1
Windows SDK2.1.1
Linux SDK3.0.1

onLogingMessage

void onLogingMessage(String Type, String Message)
Type"NET":Network, "PRT":Protocol
Messagea message to be write
Descriptionwrite log.
Android SDK2.1.1
iOS SDKNot supported
Windows SDKNot implemented
Linux SDKNot implemented

onPreviousChannel

void onPreviousChannel()
DescriptionFired a previous channel event.
Android SDK3.0.1
iOS SDKNot supported
Windows SDKNot supported
Linux SDKNot supported yet

onNextChannel

void onNextChannel()
DescriptionFired a next channel event.
Android SDK3.0.1
iOS SDKNot supported
Windows SDKNot supported
Linux SDKNot supported yet

onSOS

void onSOS()
DescriptionFired a SOS key event by Bluetooth.
Android SDK2.1.2
iOS SDK3.0.1
Windows SDK3.0.1
Linux SDK3.0.1

onMyLocationChanged

void onMyLocationChanged(Location location)
locationMy location
DescriptionFired location event by GPS.
Android SDK3.0.1
iOS SDKNot supported
Windows SDKNot supported
Linux SDKNot supported yet