summaryrefslogtreecommitdiff
path: root/sdl_android/src/main/java/com/smartdevicelink/proxy
diff options
context:
space:
mode:
authorJoey Grover <joeygrover@gmail.com>2017-03-28 11:45:04 -0400
committerJoey Grover <joeygrover@gmail.com>2017-03-28 11:45:04 -0400
commitc5fa6b4fe1cf33e676482ae99bc449a8b073723e (patch)
treef606a277c37c92facc519e8e91584e61fde9387b /sdl_android/src/main/java/com/smartdevicelink/proxy
parent80ac20cffef4cc37e28d2a4b58d5b44412401569 (diff)
downloadsdl_android-c5fa6b4fe1cf33e676482ae99bc449a8b073723e.tar.gz
Move source files
Diffstat (limited to 'sdl_android/src/main/java/com/smartdevicelink/proxy')
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/IProxyListener.java19
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/LockScreenManager.java126
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/RPCMessage.java86
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/RPCNotification.java29
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/RPCRequest.java41
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/RPCRequestFactory.java994
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/RPCResponse.java181
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/RPCStreamController.java32
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/RPCStruct.java113
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/SdlProxyALM.java1943
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/SdlProxyBase.java5599
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/SdlProxyBuilder.java157
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/SdlProxyConfigurationResources.java34
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/TTSChunkFactory.java39
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/Version.java5
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/callbacks/InternalProxyMessage.java19
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/callbacks/OnError.java25
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/callbacks/OnProxyClosed.java33
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/callbacks/OnProxyOpened.java8
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/callbacks/OnServiceEnded.java21
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/callbacks/OnServiceNACKed.java21
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/constants/Jingles.java15
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/constants/Names.java506
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/interfaces/IProxyListenerALM.java48
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/interfaces/IProxyListenerBase.java338
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/interfaces/IPutFileResponseListener.java9
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/AddCommand.java268
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/AddCommandResponse.java25
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/AddSubMenu.java170
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/AddSubMenuResponse.java23
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/AirbagStatus.java234
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/Alert.java413
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/AlertManeuver.java139
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/AlertManeuverResponse.java35
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/AlertResponse.java44
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/AudioPassThruCapabilities.java143
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/BeltStatus.java385
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/BodyInformation.java195
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/ButtonCapabilities.java156
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/ChangeRegistration.java317
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/ChangeRegistrationResponse.java33
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/Choice.java225
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/ClusterModeStatus.java129
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/Coordinate.java44
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/CreateInteractionChoiceSet.java161
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/CreateInteractionChoiceSetResponse.java25
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/DIDResult.java97
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/DTC.java85
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/DateTime.java251
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/DeleteCommand.java100
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/DeleteCommandResponse.java24
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/DeleteFile.java89
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/DeleteFileResponse.java35
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/DeleteInteractionChoiceSet.java100
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/DeleteInteractionChoiceSetResponse.java21
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/DeleteSubMenu.java90
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/DeleteSubMenuResponse.java24
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/DeviceInfo.java170
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/DeviceStatus.java352
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/DiagnosticMessage.java134
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/DiagnosticMessageResponse.java46
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/DialNumber.java51
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/DialNumberResponse.java23
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/DisplayCapabilities.java290
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/ECallInfo.java117
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/EmergencyEvent.java164
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/EndAudioPassThru.java51
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/EndAudioPassThruResponse.java24
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/GPSData.java535
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/GenericResponse.java57
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/GetDTCs.java115
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/GetDTCsResponse.java62
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/GetVehicleData.java512
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/GetVehicleDataResponse.java481
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/GetWayPoints.java37
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/GetWayPointsResponse.java46
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/HMICapabilities.java49
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/HMIPermissions.java139
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/HeadLampStatus.java93
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/Headers.java159
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/Image.java100
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/ImageField.java140
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/ImageResolution.java87
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/KeyboardProperties.java183
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/ListFiles.java45
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/ListFilesResponse.java57
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/LocationDetails.java150
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/MenuParams.java153
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/MyKey.java66
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/OasisAddress.java254
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/OnAppInterfaceUnregistered.java81
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/OnAudioPassThru.java62
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/OnButtonEvent.java166
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/OnButtonPress.java169
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/OnCommand.java113
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/OnDriverDistraction.java80
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/OnHMIStatus.java171
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/OnHashChange.java68
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/OnKeyboardInput.java106
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/OnLanguageChange.java123
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/OnLockScreenStatus.java89
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/OnPermissionsChange.java98
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/OnSdlChoiceChosen.java172
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/OnStreamRPC.java47
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/OnSystemRequest.java381
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/OnTBTClientState.java80
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/OnTouchEvent.java116
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/OnVehicleData.java697
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/OnWayPointChange.java48
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/ParameterPermissions.java121
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/PerformAudioPassThru.java377
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/PerformAudioPassThruResponse.java33
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/PerformInteraction.java472
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/PerformInteractionResponse.java91
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/PermissionItem.java120
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/PresetBankCapabilities.java62
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/PutFile.java331
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/PutFileResponse.java44
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/ReadDID.java158
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/ReadDIDResponse.java50
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/RegisterAppInterface.java656
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/RegisterAppInterfaceResponse.java585
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/ResetGlobalProperties.java127
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/ResetGlobalPropertiesResponse.java33
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/ScreenParams.java109
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/ScrollableMessage.java187
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/ScrollableMessageResponse.java33
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SdlMsgVersion.java109
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SendLocation.java292
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SendLocationResponse.java22
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SetAppIcon.java91
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SetAppIconResponse.java32
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SetDisplayLayout.java89
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SetDisplayLayoutResponse.java134
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SetGlobalProperties.java373
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SetGlobalPropertiesResponse.java33
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SetMediaClockTimer.java184
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SetMediaClockTimerResponse.java33
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/Show.java623
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/ShowConstantTbt.java356
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/ShowConstantTbtResponse.java23
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/ShowResponse.java33
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SingleTireStatus.java70
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/Slider.java249
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SliderResponse.java52
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SoftButton.java180
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SoftButtonCapabilities.java149
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/Speak.java178
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SpeakResponse.java33
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/StartTime.java112
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/StreamRPCResponse.java41
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SubscribeButton.java120
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SubscribeButtonResponse.java33
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SubscribeVehicleData.java817
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SubscribeVehicleDataResponse.java721
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SubscribeWayPoints.java15
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SubscribeWayPointsResponse.java16
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SystemRequest.java116
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SystemRequestResponse.java21
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/TTSChunk.java96
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/TextField.java173
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/TireStatus.java233
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/TouchCoord.java86
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/TouchEvent.java183
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/TouchEventCapabilities.java91
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/Turn.java101
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/UnregisterAppInterface.java244
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/UnregisterAppInterfaceResponse.java33
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/UnsubscribeButton.java101
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/UnsubscribeButtonResponse.java33
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/UnsubscribeVehicleData.java811
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/UnsubscribeVehicleDataResponse.java721
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/UnsubscribeWayPoints.java15
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/UnsubscribeWayPointsResponse.java16
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/UpdateTurnList.java140
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/UpdateTurnListResponse.java26
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/VehicleDataResult.java91
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/VehicleType.java158
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/VrHelpItem.java108
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/AmbientLightStatus.java34
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/AppHMIType.java58
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/AppInterfaceUnregisteredReason.java98
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/AudioStreamingState.java46
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/AudioType.java32
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/BitsPerSample.java46
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/ButtonEventMode.java36
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/ButtonName.java181
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/ButtonPressMode.java35
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/CarModeStatus.java39
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/CharacterSet.java24
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/CompassDirection.java53
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/ComponentVolumeStatus.java45
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/DeliveryMode.java16
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/DeviceLevelStatus.java45
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/Dimension.java50
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/DisplayType.java95
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/DriverDistractionState.java32
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/ECallConfirmationStatus.java46
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/EmergencyEventType.java41
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/FileType.java44
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/FuelCutoffStatus.java32
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/GlobalProperty.java54
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/HMILevel.java70
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/HmiZoneCapabilities.java34
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/IgnitionStableStatus.java30
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/IgnitionStatus.java45
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/ImageFieldName.java83
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/ImageType.java29
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/InteractionMode.java58
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/Jingle.java31
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/KeyboardEvent.java46
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/KeyboardLayout.java19
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/KeypressMode.java28
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/Language.java163
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/LayoutMode.java36
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/LockScreenStatus.java31
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/MediaClockFormat.java126
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/PRNDL.java70
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/PowerModeQualificationStatus.java42
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/PowerModeStatus.java48
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/PrerecordedSpeech.java26
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/PrimaryAudioSource.java49
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/RequestType.java84
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/Result.java185
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/SamplingRate.java58
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/SdlConnectionState.java6
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/SdlDisconnectedReason.java84
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/SdlInterfaceAvailability.java6
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/SoftButtonType.java46
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/SpeechCapabilities.java47
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/SystemAction.java37
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/SystemContext.java67
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/TBTState.java70
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/TextAlignment.java33
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/TextFieldName.java166
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/TouchType.java37
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/TriggerSource.java47
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/UpdateMode.java42
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/VehicleDataEventStatus.java32
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/VehicleDataNotificationStatus.java41
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/VehicleDataResultCode.java65
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/VehicleDataStatus.java36
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/VehicleDataType.java125
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/VrCapabilities.java42
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/WarningLightStatus.java34
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/WayPointType.java15
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/WiperStatus.java98
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/listeners/OnPutFileUpdateListener.java48
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/listeners/OnRPCNotificationListener.java8
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/listeners/OnRPCResponseListener.java73
250 files changed, 38607 insertions, 0 deletions
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/IProxyListener.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/IProxyListener.java
new file mode 100644
index 000000000..2ef06c3b9
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/IProxyListener.java
@@ -0,0 +1,19 @@
+package com.smartdevicelink.proxy;
+
+import com.smartdevicelink.proxy.interfaces.IProxyListenerBase;
+import com.smartdevicelink.proxy.rpc.OnAppInterfaceUnregistered;
+import com.smartdevicelink.proxy.rpc.RegisterAppInterfaceResponse;
+import com.smartdevicelink.proxy.rpc.UnregisterAppInterfaceResponse;
+
+public interface IProxyListener extends IProxyListenerBase{
+ // Adds Legacy Life-cycle Management call-backs to the IProxyListenerAbstract interface
+
+ public void onProxyOpened();
+
+ public void onRegisterAppInterfaceResponse(RegisterAppInterfaceResponse response);
+
+ public void onOnAppInterfaceUnregistered(OnAppInterfaceUnregistered notification);
+
+ public void onUnregisterAppInterfaceResponse(UnregisterAppInterfaceResponse response);
+
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/LockScreenManager.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/LockScreenManager.java
new file mode 100644
index 000000000..1188d28b9
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/LockScreenManager.java
@@ -0,0 +1,126 @@
+package com.smartdevicelink.proxy;
+
+import java.io.IOException;
+
+import android.graphics.Bitmap;
+
+import com.smartdevicelink.proxy.rpc.OnLockScreenStatus;
+import com.smartdevicelink.proxy.rpc.enums.HMILevel;
+import com.smartdevicelink.proxy.rpc.enums.LockScreenStatus;
+import com.smartdevicelink.util.HttpUtils;
+
+public class LockScreenManager {
+
+ public interface OnLockScreenIconDownloadedListener{
+ public void onLockScreenIconDownloaded(Bitmap icon);
+ public void onLockScreenIconDownloadError(Exception e);
+ }
+
+ private Bitmap lockScreenIcon;
+ private Boolean bUserSelected = false;
+ private Boolean bDriverDistStatus = null;
+ private HMILevel hmiLevel = null;
+ @SuppressWarnings("unused")
+ private int iSessionID;
+
+ public synchronized void setSessionID(int iVal)
+ {
+ iSessionID = iVal;
+ }
+
+ private synchronized void setUserSelectedStatus(boolean bVal)
+ {
+ bUserSelected = bVal;
+ }
+
+ public synchronized void setDriverDistStatus(boolean bVal)
+ {
+ bDriverDistStatus = bVal;
+ }
+
+ public synchronized void setHMILevel(HMILevel hmiVal)
+ {
+ hmiLevel = hmiVal;
+
+ if ( (hmiVal.equals(HMILevel.HMI_FULL)) || (hmiVal.equals(HMILevel.HMI_LIMITED)) )
+ setUserSelectedStatus(true);
+ else if (hmiVal.equals(HMILevel.HMI_NONE))
+ setUserSelectedStatus(false);
+ }
+
+ public synchronized OnLockScreenStatus getLockObj(/*int SessionID*/)
+ {
+ //int iSessionID = SessionID;
+ OnLockScreenStatus myLock = new OnLockScreenStatus();
+ myLock.setDriverDistractionStatus(bDriverDistStatus);
+ myLock.setHMILevel(hmiLevel);
+ myLock.setUserSelected(bUserSelected);
+ myLock.setShowLockScreen(getLockScreenStatus());
+
+ return myLock;
+ }
+
+ private synchronized LockScreenStatus getLockScreenStatus()
+ {
+
+ if ( (hmiLevel == null) || (hmiLevel.equals(HMILevel.HMI_NONE)) )
+ {
+ return LockScreenStatus.OFF;
+ }
+ else if ( hmiLevel.equals(HMILevel.HMI_BACKGROUND) )
+ {
+ if (bDriverDistStatus == null)
+ {
+ //we don't have driver distraction, lockscreen is entirely based on userselection
+ if (bUserSelected)
+ return LockScreenStatus.REQUIRED;
+ else
+ return LockScreenStatus.OFF;
+ }
+ else if (bDriverDistStatus && bUserSelected)
+ {
+ return LockScreenStatus.REQUIRED;
+ }
+ else if (!bDriverDistStatus && bUserSelected)
+ {
+ return LockScreenStatus.OPTIONAL;
+ }
+ else
+ {
+ return LockScreenStatus.OFF;
+ }
+ }
+ else if ( (hmiLevel.equals(HMILevel.HMI_FULL)) || (hmiLevel.equals(HMILevel.HMI_LIMITED)) )
+ {
+ if ( (bDriverDistStatus != null) && (!bDriverDistStatus) )
+ {
+ return LockScreenStatus.OPTIONAL;
+ }
+ else
+ return LockScreenStatus.REQUIRED;
+ }
+ return LockScreenStatus.OFF;
+ }
+
+ public void downloadLockScreenIcon(final String url, final OnLockScreenIconDownloadedListener l){
+ new Thread(new Runnable(){
+ @Override
+ public void run(){
+ try{
+ lockScreenIcon = HttpUtils.downloadImage(url);
+ if(l != null){
+ l.onLockScreenIconDownloaded(lockScreenIcon);
+ }
+ }catch(IOException e){
+ if(l != null){
+ l.onLockScreenIconDownloadError(e);
+ }
+ }
+ }
+ }).start();
+ }
+
+ public Bitmap getLockScreenIcon(){
+ return this.lockScreenIcon;
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/RPCMessage.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/RPCMessage.java
new file mode 100644
index 000000000..9f3fbfbd9
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/RPCMessage.java
@@ -0,0 +1,86 @@
+package com.smartdevicelink.proxy;
+
+import java.util.Hashtable;
+
+public class RPCMessage extends RPCStruct {
+ public static final String KEY_REQUEST = "request";
+ public static final String KEY_RESPONSE = "response";
+ public static final String KEY_NOTIFICATION = "notification";
+ public static final String KEY_FUNCTION_NAME = "name";
+ public static final String KEY_PARAMETERS = "parameters";
+ public static final String KEY_CORRELATION_ID = "correlationID";
+
+ public RPCMessage(String functionName) {
+ this(functionName, "request");
+ }
+
+ protected RPCMessage(RPCMessage rpcm) {
+ this(rpcm.store);
+ }
+
+ protected RPCMessage(RPCStruct rpcs) {
+ this("", "");
+ this.parameters = rpcs.store;
+ }
+
+ public RPCMessage(String functionName, String messageType) {
+ function = new Hashtable<String, Object>();
+ parameters = new Hashtable<String, Object>();
+
+ this.messageType = messageType;
+ function.put(KEY_PARAMETERS, parameters);
+
+ if (messageType != null)
+ store.put(messageType, function);
+ if (functionName != null)
+ function.put(KEY_FUNCTION_NAME, functionName);
+ }
+
+ @SuppressWarnings("unchecked")
+ public RPCMessage(Hashtable<String, Object> hash) {
+ store = hash;
+ messageType = getMessageTypeName(hash.keySet());
+ function = (Hashtable<String, Object>) hash.get(messageType);
+ parameters = (Hashtable<String, Object>) function.get(KEY_PARAMETERS);
+ if (hasKey(hash.keySet(), RPCStruct.KEY_BULK_DATA)) {
+ setBulkData((byte[]) hash.get(RPCStruct.KEY_BULK_DATA));
+ }
+ if (hasKey(hash.keySet(), RPCStruct.KEY_PROTECTED)) {
+ setPayloadProtected((Boolean) hash.get(RPCStruct.KEY_PROTECTED));
+ }
+ }
+
+ protected String messageType;
+ protected Hashtable<String, Object> parameters;
+ protected Hashtable<String, Object> function;
+
+ public String getFunctionName() {
+ return (String)function.get(KEY_FUNCTION_NAME);
+ }
+
+ protected void setFunctionName(String functionName) {
+ function.put(KEY_FUNCTION_NAME, functionName);
+ }
+
+ public String getMessageType() {
+ if (messageType.equals(KEY_REQUEST) ||
+ messageType.equals(KEY_RESPONSE) ||
+ messageType.equals(KEY_NOTIFICATION)) {
+ return messageType;
+ }
+ return null;
+ }
+
+ public void setParameters(String functionName, Object value) {
+ if (value != null) {
+ parameters.put(functionName, value);
+ } else {
+ parameters.remove(functionName);
+ }
+ }
+
+ public Object getParameters(String functionName) {
+ return parameters.get(functionName);
+ }
+
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/RPCNotification.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/RPCNotification.java
new file mode 100644
index 000000000..b9992e78b
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/RPCNotification.java
@@ -0,0 +1,29 @@
+/**
+ *
+ */
+package com.smartdevicelink.proxy;
+
+import java.util.Hashtable;
+
+public class RPCNotification extends RPCMessage {
+
+ public RPCNotification(String functionName) {
+ super(functionName, RPCMessage.KEY_NOTIFICATION);
+ }
+
+ public RPCNotification(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+
+ public RPCNotification(RPCMessage rpcMsg) {
+ super(preprocessMsg(rpcMsg));
+ }
+
+ static RPCMessage preprocessMsg (RPCMessage rpcMsg) {
+ if (rpcMsg.getMessageType() != RPCMessage.KEY_NOTIFICATION) {
+ rpcMsg.messageType = RPCMessage.KEY_NOTIFICATION;
+ }
+
+ return rpcMsg;
+ }
+} \ No newline at end of file
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/RPCRequest.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/RPCRequest.java
new file mode 100644
index 000000000..50493870d
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/RPCRequest.java
@@ -0,0 +1,41 @@
+/**
+ *
+ */
+package com.smartdevicelink.proxy;
+
+import java.util.Hashtable;
+
+import com.smartdevicelink.proxy.rpc.listeners.OnRPCResponseListener;
+
+public class RPCRequest extends RPCMessage {
+
+ protected OnRPCResponseListener onResponseListener;
+
+ public RPCRequest(String functionName) {
+ super(functionName, RPCMessage.KEY_REQUEST);
+ messageType = RPCMessage.KEY_REQUEST;
+ }
+
+ public RPCRequest(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+
+ public Integer getCorrelationID() {
+ return (Integer)function.get(RPCMessage.KEY_CORRELATION_ID);
+ }
+
+ public void setCorrelationID(Integer correlationID) {
+ if (correlationID != null) {
+ function.put(RPCMessage.KEY_CORRELATION_ID, correlationID );
+ } else {
+ function.remove(RPCMessage.KEY_CORRELATION_ID);
+ }
+ }
+ public void setOnRPCResponseListener(OnRPCResponseListener listener){
+ onResponseListener = listener;
+ }
+
+ public OnRPCResponseListener getOnRPCResponseListener(){
+ return this.onResponseListener;
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/RPCRequestFactory.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/RPCRequestFactory.java
new file mode 100644
index 000000000..e249839d5
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/RPCRequestFactory.java
@@ -0,0 +1,994 @@
+package com.smartdevicelink.proxy;
+
+import java.util.Vector;
+
+import android.os.Build;
+
+import com.smartdevicelink.proxy.rpc.AddCommand;
+import com.smartdevicelink.proxy.rpc.AddSubMenu;
+import com.smartdevicelink.proxy.rpc.Alert;
+import com.smartdevicelink.proxy.rpc.ChangeRegistration;
+import com.smartdevicelink.proxy.rpc.Choice;
+import com.smartdevicelink.proxy.rpc.CreateInteractionChoiceSet;
+import com.smartdevicelink.proxy.rpc.DeleteCommand;
+import com.smartdevicelink.proxy.rpc.DeleteFile;
+import com.smartdevicelink.proxy.rpc.DeleteInteractionChoiceSet;
+import com.smartdevicelink.proxy.rpc.DeleteSubMenu;
+import com.smartdevicelink.proxy.rpc.DeviceInfo;
+import com.smartdevicelink.proxy.rpc.EndAudioPassThru;
+import com.smartdevicelink.proxy.rpc.GetVehicleData;
+import com.smartdevicelink.proxy.rpc.Image;
+import com.smartdevicelink.proxy.rpc.ListFiles;
+import com.smartdevicelink.proxy.rpc.MenuParams;
+import com.smartdevicelink.proxy.rpc.PerformAudioPassThru;
+import com.smartdevicelink.proxy.rpc.PerformInteraction;
+import com.smartdevicelink.proxy.rpc.PutFile;
+import com.smartdevicelink.proxy.rpc.RegisterAppInterface;
+import com.smartdevicelink.proxy.rpc.ScrollableMessage;
+import com.smartdevicelink.proxy.rpc.SdlMsgVersion;
+import com.smartdevicelink.proxy.rpc.SetAppIcon;
+import com.smartdevicelink.proxy.rpc.SetDisplayLayout;
+import com.smartdevicelink.proxy.rpc.SetGlobalProperties;
+import com.smartdevicelink.proxy.rpc.SetMediaClockTimer;
+import com.smartdevicelink.proxy.rpc.Show;
+import com.smartdevicelink.proxy.rpc.Slider;
+import com.smartdevicelink.proxy.rpc.SoftButton;
+import com.smartdevicelink.proxy.rpc.Speak;
+import com.smartdevicelink.proxy.rpc.StartTime;
+import com.smartdevicelink.proxy.rpc.SubscribeButton;
+import com.smartdevicelink.proxy.rpc.SubscribeVehicleData;
+import com.smartdevicelink.proxy.rpc.SystemRequest;
+import com.smartdevicelink.proxy.rpc.TTSChunk;
+import com.smartdevicelink.proxy.rpc.UnregisterAppInterface;
+import com.smartdevicelink.proxy.rpc.UnsubscribeButton;
+import com.smartdevicelink.proxy.rpc.UnsubscribeVehicleData;
+import com.smartdevicelink.proxy.rpc.VrHelpItem;
+import com.smartdevicelink.proxy.rpc.enums.AppHMIType;
+import com.smartdevicelink.proxy.rpc.enums.AudioType;
+import com.smartdevicelink.proxy.rpc.enums.BitsPerSample;
+import com.smartdevicelink.proxy.rpc.enums.ButtonName;
+import com.smartdevicelink.proxy.rpc.enums.FileType;
+import com.smartdevicelink.proxy.rpc.enums.ImageType;
+import com.smartdevicelink.proxy.rpc.enums.InteractionMode;
+import com.smartdevicelink.proxy.rpc.enums.Language;
+import com.smartdevicelink.proxy.rpc.enums.RequestType;
+import com.smartdevicelink.proxy.rpc.enums.SamplingRate;
+import com.smartdevicelink.proxy.rpc.enums.TextAlignment;
+import com.smartdevicelink.proxy.rpc.enums.UpdateMode;
+
+public class RPCRequestFactory {
+
+ public static final int SDL_MSG_MAJOR_VERSION = 1;
+ public static final int SDL_MSG_MINOR_VERSION = 0;
+
+ public static SystemRequest buildSystemRequest(
+ String data, Integer correlationID) {
+
+ if(data == null) return null;
+
+ SystemRequest msg = new SystemRequest();
+ msg.setRequestType(RequestType.PROPRIETARY);
+ msg.setCorrelationID(correlationID);
+ msg.setBulkData(data.getBytes());
+ return msg;
+ }
+
+ public static SystemRequest buildSystemRequestLegacy(
+ Vector<String> data, Integer correlationID) {
+
+ if(data == null) return null;
+
+ SystemRequest msg = new SystemRequest(true);
+ msg.setCorrelationID(correlationID);
+ msg.setLegacyData(data);
+ return msg;
+ }
+
+ public static AddCommand buildAddCommand(Integer commandID,
+ String menuText, Integer parentID, Integer position,
+ Vector<String> vrCommands, Image cmdIcon, Integer correlationID) {
+ AddCommand msg = new AddCommand();
+ msg.setCorrelationID(correlationID);
+ msg.setCmdID(commandID);
+ msg.setVrCommands(vrCommands);
+
+ if (cmdIcon != null) msg.setCmdIcon(cmdIcon);
+
+ if(menuText != null || parentID != null || position != null) {
+ MenuParams menuParams = new MenuParams();
+ menuParams.setMenuName(menuText);
+ menuParams.setPosition(position);
+ menuParams.setParentID(parentID);
+ msg.setMenuParams(menuParams);
+ }
+
+ return msg;
+ }
+
+ public static AddCommand buildAddCommand(Integer commandID,
+ String menuText, Integer parentID, Integer position,
+ Vector<String> vrCommands, String IconValue, ImageType IconType,
+ Integer correlationID) {
+ AddCommand msg = new AddCommand();
+ msg.setCorrelationID(correlationID);
+ msg.setCmdID(commandID);
+
+ if (vrCommands != null) msg.setVrCommands(vrCommands);
+
+ Image cmdIcon = null;
+
+ if (IconValue != null && IconType != null)
+ {
+ cmdIcon = new Image();
+ cmdIcon.setValue(IconValue);
+ cmdIcon.setImageType(IconType);
+ }
+
+ if (cmdIcon != null) msg.setCmdIcon(cmdIcon);
+
+ if(menuText != null || parentID != null || position != null) {
+ MenuParams menuParams = new MenuParams();
+ menuParams.setMenuName(menuText);
+ menuParams.setPosition(position);
+ menuParams.setParentID(parentID);
+ msg.setMenuParams(menuParams);
+ }
+
+ return msg;
+ }
+
+ public static AddCommand buildAddCommand(Integer commandID,
+ String menuText, Integer parentID, Integer position,
+ Vector<String> vrCommands, Integer correlationID) {
+ AddCommand msg = new AddCommand();
+ msg.setCorrelationID(correlationID);
+ msg.setCmdID(commandID);
+ msg.setVrCommands(vrCommands);
+
+ if(menuText != null || parentID != null || position != null) {
+ MenuParams menuParams = new MenuParams();
+ menuParams.setMenuName(menuText);
+ menuParams.setPosition(position);
+ menuParams.setParentID(parentID);
+ msg.setMenuParams(menuParams);
+ }
+
+ return msg;
+ }
+
+ public static AddCommand buildAddCommand(Integer commandID,
+ String menuText, Vector<String> vrCommands, Integer correlationID) {
+ AddCommand msg = buildAddCommand(commandID, menuText, null, null,
+ vrCommands, correlationID);
+ return msg;
+ }
+
+ public static AddCommand buildAddCommand(Integer commandID,
+ Vector<String> vrCommands, Integer correlationID) {
+ AddCommand msg = new AddCommand();
+ msg.setCorrelationID(correlationID);
+ msg.setCmdID(commandID);
+ msg.setVrCommands(vrCommands);
+
+ return msg;
+ }
+
+ public static AddSubMenu buildAddSubMenu(Integer menuID, String menuName,
+ Integer correlationID) {
+ AddSubMenu msg = buildAddSubMenu(menuID, menuName, null, correlationID);
+ return msg;
+ }
+
+ public static AddSubMenu buildAddSubMenu(Integer menuID, String menuName,
+ Integer position, Integer correlationID) {
+ AddSubMenu msg = new AddSubMenu();
+ msg.setCorrelationID(correlationID);
+ msg.setMenuName(menuName);
+ msg.setMenuID(menuID);
+ msg.setPosition(position);
+
+ return msg;
+ }
+
+ public static Alert buildAlert(String ttsText, Boolean playTone,
+ Vector<SoftButton> softButtons, Integer correlationID) {
+ Vector<TTSChunk> chunks = TTSChunkFactory
+ .createSimpleTTSChunks(ttsText);
+ Alert msg = buildAlert(chunks, null, null, null, playTone, null, softButtons,
+ correlationID);
+ return msg;
+ }
+
+ public static Alert buildAlert(String alertText1, String alertText2,
+ String alertText3, Integer duration, Vector<SoftButton> softButtons,
+ Integer correlationID) {
+ Alert msg = buildAlert((Vector<TTSChunk>) null, alertText1, alertText2,
+ alertText3, null, duration, softButtons, correlationID);
+ return msg;
+ }
+
+ public static Alert buildAlert(String ttsText, String alertText1,
+ String alertText2, String alertText3, Boolean playTone,
+ Integer duration, Vector<SoftButton> softButtons, Integer correlationID) {
+ Vector<TTSChunk> chunks = TTSChunkFactory
+ .createSimpleTTSChunks(ttsText);
+ Alert msg = buildAlert(chunks, alertText1, alertText2, alertText3,
+ playTone, duration, softButtons, correlationID);
+ return msg;
+ }
+
+ public static Alert buildAlert(Vector<TTSChunk> chunks, Boolean playTone,
+ Vector<SoftButton> softButtons, Integer correlationID) {
+ Alert msg = buildAlert(chunks, null, null, null, playTone, null, softButtons, correlationID);
+ return msg;
+ }
+
+ public static Alert buildAlert(Vector<TTSChunk> ttsChunks,
+ String alertText1, String alertText2, String alertText3,
+ Boolean playTone, Integer duration, Vector<SoftButton> softButtons,
+ Integer correlationID) {
+ Alert msg = new Alert();
+ msg.setCorrelationID(correlationID);
+ msg.setAlertText1(alertText1);
+ msg.setAlertText2(alertText2);
+ msg.setAlertText3(alertText3);
+ msg.setDuration(duration);
+ msg.setPlayTone(playTone);
+ msg.setTtsChunks(ttsChunks);
+ msg.setSoftButtons(softButtons);
+
+ return msg;
+ }
+
+ public static Alert buildAlert(String ttsText, Boolean playTone,
+ Integer correlationID) {
+ Vector<TTSChunk> chunks = TTSChunkFactory
+ .createSimpleTTSChunks(ttsText);
+ Alert msg = buildAlert(chunks, null, null, playTone, null,
+ correlationID);
+ return msg;
+ }
+
+ public static Alert buildAlert(String alertText1, String alertText2,
+ Integer duration, Integer correlationID) {
+ Alert msg = buildAlert((Vector<TTSChunk>) null, alertText1, alertText2,
+ null, duration, correlationID);
+ return msg;
+ }
+
+ public static Alert buildAlert(String ttsText, String alertText1,
+ String alertText2, Boolean playTone, Integer duration,
+ Integer correlationID) {
+ Vector<TTSChunk> chunks = TTSChunkFactory
+ .createSimpleTTSChunks(ttsText);
+ Alert msg = buildAlert(chunks, alertText1, alertText2, playTone,
+ duration, correlationID);
+ return msg;
+ }
+
+ public static Alert buildAlert(Vector<TTSChunk> chunks, Boolean playTone,
+ Integer correlationID) {
+ Alert msg = buildAlert(chunks, null, null, playTone, null,
+ correlationID);
+ return msg;
+ }
+
+ public static Alert buildAlert(Vector<TTSChunk> ttsChunks,
+ String alertText1, String alertText2, Boolean playTone,
+ Integer duration, Integer correlationID) {
+ Alert msg = new Alert();
+ msg.setCorrelationID(correlationID);
+ msg.setAlertText1(alertText1);
+ msg.setAlertText2(alertText2);
+ msg.setDuration(duration);
+ msg.setPlayTone(playTone);
+ msg.setTtsChunks(ttsChunks);
+
+ return msg;
+ }
+
+ public static CreateInteractionChoiceSet buildCreateInteractionChoiceSet(
+ Vector<Choice> choiceSet, Integer interactionChoiceSetID,
+ Integer correlationID) {
+ CreateInteractionChoiceSet msg = new CreateInteractionChoiceSet();
+ msg.setChoiceSet(choiceSet);
+ msg.setInteractionChoiceSetID(interactionChoiceSetID);
+ msg.setCorrelationID(correlationID);
+ return msg;
+ }
+
+ public static DeleteCommand buildDeleteCommand(Integer commandID,
+ Integer correlationID) {
+ DeleteCommand msg = new DeleteCommand();
+ msg.setCmdID(commandID);
+ msg.setCorrelationID(correlationID);
+ return msg;
+ }
+
+ public static DeleteFile buildDeleteFile(String sdlFileName,
+ Integer correlationID) {
+ DeleteFile deleteFile = new DeleteFile();
+ deleteFile.setCorrelationID(correlationID);
+ deleteFile.setSdlFileName(sdlFileName);
+ return deleteFile;
+ }
+
+ public static DeleteInteractionChoiceSet buildDeleteInteractionChoiceSet(
+ Integer interactionChoiceSetID, Integer correlationID) {
+ DeleteInteractionChoiceSet msg = new DeleteInteractionChoiceSet();
+ msg.setInteractionChoiceSetID(interactionChoiceSetID);
+ msg.setCorrelationID(correlationID);
+
+ return msg;
+ }
+
+ public static DeleteSubMenu buildDeleteSubMenu(Integer menuID,
+ Integer correlationID) {
+ DeleteSubMenu msg = new DeleteSubMenu();
+ msg.setCorrelationID(correlationID);
+ msg.setMenuID(menuID);
+
+ return msg;
+ }
+
+ public static ListFiles buildListFiles(Integer correlationID) {
+ ListFiles listFiles = new ListFiles();
+ listFiles.setCorrelationID(correlationID);
+ return listFiles;
+ }
+
+ public static PerformInteraction buildPerformInteraction(
+ Vector<TTSChunk> initChunks, String displayText,
+ Vector<Integer> interactionChoiceSetIDList,
+ Vector<TTSChunk> helpChunks, Vector<TTSChunk> timeoutChunks,
+ InteractionMode interactionMode, Integer timeout,
+ Vector<VrHelpItem> vrHelp, Integer correlationID) {
+ PerformInteraction msg = new PerformInteraction();
+ msg.setInitialPrompt(initChunks);
+ msg.setInitialText(displayText);
+ msg.setInteractionChoiceSetIDList(interactionChoiceSetIDList);
+ msg.setInteractionMode(interactionMode);
+ msg.setTimeout(timeout);
+ msg.setHelpPrompt(helpChunks);
+ msg.setTimeoutPrompt(timeoutChunks);
+ msg.setVrHelp(vrHelp);
+ msg.setCorrelationID(correlationID);
+
+ return msg;
+ }
+
+ public static PerformInteraction buildPerformInteraction(
+ String initPrompt, String displayText,
+ Vector<Integer> interactionChoiceSetIDList,
+ String helpPrompt, String timeoutPrompt,
+ InteractionMode interactionMode, Integer timeout, Vector<VrHelpItem> vrHelp,
+ Integer correlationID) {
+ Vector<TTSChunk> initChunks = TTSChunkFactory
+ .createSimpleTTSChunks(initPrompt);
+ Vector<TTSChunk> helpChunks = TTSChunkFactory
+ .createSimpleTTSChunks(helpPrompt);
+ Vector<TTSChunk> timeoutChunks = TTSChunkFactory
+ .createSimpleTTSChunks(timeoutPrompt);
+ return buildPerformInteraction(initChunks,
+ displayText, interactionChoiceSetIDList, helpChunks,
+ timeoutChunks, interactionMode, timeout, vrHelp, correlationID);
+ }
+
+ public static PerformInteraction buildPerformInteraction(
+ String initPrompt, String displayText,
+ Integer interactionChoiceSetID,
+ String helpPrompt, String timeoutPrompt,
+ InteractionMode interactionMode, Integer timeout, Vector<VrHelpItem> vrHelp,
+ Integer correlationID) {
+ Vector<Integer> interactionChoiceSetIDs = new Vector<Integer>();
+ interactionChoiceSetIDs.add(interactionChoiceSetID);
+
+ return buildPerformInteraction(
+ initPrompt, displayText, interactionChoiceSetIDs,
+ helpPrompt, timeoutPrompt, interactionMode,
+ timeout, vrHelp, correlationID);
+ }
+
+ public static PerformInteraction buildPerformInteraction(String initPrompt,
+ String displayText, Integer interactionChoiceSetID, Vector<VrHelpItem> vrHelp,
+ Integer correlationID) {
+
+ return buildPerformInteraction(initPrompt, displayText,
+ interactionChoiceSetID, null, null,
+ InteractionMode.BOTH, null, vrHelp, correlationID);
+ }
+
+ public static PerformInteraction buildPerformInteraction(
+ Vector<TTSChunk> initChunks, String displayText,
+ Vector<Integer> interactionChoiceSetIDList,
+ Vector<TTSChunk> helpChunks, Vector<TTSChunk> timeoutChunks,
+ InteractionMode interactionMode, Integer timeout,
+ Integer correlationID) {
+ PerformInteraction msg = new PerformInteraction();
+ msg.setInitialPrompt(initChunks);
+ msg.setInitialText(displayText);
+ msg.setInteractionChoiceSetIDList(interactionChoiceSetIDList);
+ msg.setInteractionMode(interactionMode);
+ msg.setTimeout(timeout);
+ msg.setHelpPrompt(helpChunks);
+ msg.setTimeoutPrompt(timeoutChunks);
+ msg.setCorrelationID(correlationID);
+
+ return msg;
+ }
+
+ public static PerformInteraction buildPerformInteraction(
+ String initPrompt, String displayText,
+ Vector<Integer> interactionChoiceSetIDList,
+ String helpPrompt, String timeoutPrompt,
+ InteractionMode interactionMode, Integer timeout,
+ Integer correlationID) {
+ Vector<TTSChunk> initChunks = TTSChunkFactory
+ .createSimpleTTSChunks(initPrompt);
+ Vector<TTSChunk> helpChunks = TTSChunkFactory
+ .createSimpleTTSChunks(helpPrompt);
+ Vector<TTSChunk> timeoutChunks = TTSChunkFactory
+ .createSimpleTTSChunks(timeoutPrompt);
+ return buildPerformInteraction(initChunks,
+ displayText, interactionChoiceSetIDList, helpChunks,
+ timeoutChunks, interactionMode, timeout, correlationID);
+ }
+
+ public static PerformInteraction buildPerformInteraction(
+ String initPrompt, String displayText,
+ Integer interactionChoiceSetID,
+ String helpPrompt, String timeoutPrompt,
+ InteractionMode interactionMode, Integer timeout,
+ Integer correlationID) {
+ Vector<Integer> interactionChoiceSetIDs = new Vector<Integer>();
+ interactionChoiceSetIDs.add(interactionChoiceSetID);
+
+ return buildPerformInteraction(
+ initPrompt, displayText, interactionChoiceSetIDs,
+ helpPrompt, timeoutPrompt, interactionMode,
+ timeout, correlationID);
+ }
+
+ public static PerformInteraction buildPerformInteraction(String initPrompt,
+ String displayText, Integer interactionChoiceSetID,
+ Integer correlationID) {
+
+ return buildPerformInteraction(initPrompt, displayText,
+ interactionChoiceSetID, null, null,
+ InteractionMode.BOTH, null, correlationID);
+ }
+
+ @Deprecated
+ public static PerformInteraction buildPerformInteraction(
+ Vector<TTSChunk> initChunks, String displayText,
+ Vector<Integer> interactionChoiceSetIDList,
+ Vector<TTSChunk> helpChunks, InteractionMode interactionMode,
+ Integer timeout, Integer correlationID) {
+ PerformInteraction msg = new PerformInteraction();
+ msg.setInitialPrompt(initChunks);
+ msg.setInitialText(displayText);
+ msg.setInteractionChoiceSetIDList(interactionChoiceSetIDList);
+ msg.setInteractionMode(interactionMode);
+ msg.setTimeout(timeout);
+ msg.setHelpPrompt(helpChunks);
+ msg.setCorrelationID(correlationID);
+ return msg;
+ }
+
+ @Deprecated
+ public static PerformInteraction buildPerformInteraction(String initPrompt,
+ String displayText, Vector<Integer> interactionChoiceSetIDList,
+ String helpPrompt, InteractionMode interactionMode,
+ Integer timeout, Integer correlationID) {
+ Vector<TTSChunk> initChunks = TTSChunkFactory
+ .createSimpleTTSChunks(initPrompt);
+ Vector<TTSChunk> helpChunks = TTSChunkFactory
+ .createSimpleTTSChunks(helpPrompt);
+ PerformInteraction msg = buildPerformInteraction(initChunks,
+ displayText, interactionChoiceSetIDList, helpChunks,
+ interactionMode, timeout, correlationID);
+ return msg;
+ }
+
+ public static PutFile buildPutFile(String sdlFileName, FileType fileType,
+ Boolean persistentFile, byte[] fileData, Integer correlationID) {
+ PutFile putFile = new PutFile();
+ putFile.setCorrelationID(correlationID);
+ putFile.setSdlFileName(sdlFileName);
+ putFile.setFileType(fileType);
+ putFile.setPersistentFile(persistentFile);
+ putFile.setBulkData(fileData);
+ return putFile;
+ }
+
+ @Deprecated
+ public static PutFile buildPutFile(String sdlFileName, Integer iOffset, Integer iLength) {
+ PutFile putFile = new PutFile();
+ putFile.setCorrelationID(10000);
+ putFile.setSdlFileName(sdlFileName);
+ putFile.setFileType(FileType.BINARY);
+ putFile.setSystemFile(true);
+ putFile.setOffset(iOffset);
+ putFile.setLength(iLength);
+ return putFile;
+ }
+
+ public static PutFile buildPutFile(String sdlFileName, Long iOffset, Long iLength) {
+ PutFile putFile = new PutFile();
+ putFile.setCorrelationID(10000);
+ putFile.setSdlFileName(sdlFileName);
+ putFile.setFileType(FileType.BINARY);
+ putFile.setSystemFile(true);
+ putFile.setOffset(iOffset);
+ putFile.setLength(iLength);
+ return putFile;
+ }
+
+ @Deprecated
+ public static PutFile buildPutFile(String syncFileName, Integer iOffset, Integer iLength, FileType fileType, Boolean bPersistentFile, Boolean bSystemFile) {
+ PutFile putFile = new PutFile();
+ putFile.setCorrelationID(10000);
+ putFile.setSdlFileName(syncFileName);
+ putFile.setFileType(fileType);
+ putFile.setPersistentFile(bPersistentFile);
+ putFile.setSystemFile(bSystemFile);
+ putFile.setOffset(iOffset);
+ putFile.setLength(iLength);
+ return putFile;
+ }
+
+ public static PutFile buildPutFile(String syncFileName, Long iOffset, Long iLength, FileType fileType, Boolean bPersistentFile, Boolean bSystemFile) {
+ PutFile putFile = new PutFile();
+ putFile.setCorrelationID(10000);
+ putFile.setSdlFileName(syncFileName);
+ putFile.setFileType(fileType);
+ putFile.setPersistentFile(bPersistentFile);
+ putFile.setSystemFile(bSystemFile);
+ putFile.setOffset(iOffset);
+ putFile.setLength(iLength);
+ return putFile;
+ }
+
+ @Deprecated
+ public static PutFile buildPutFile(String sdlFileName, Integer iOffset, Integer iLength, FileType fileType, Boolean bPersistentFile, Boolean bSystemFile, Integer iCorrelationID) {
+ PutFile putFile = new PutFile();
+ putFile.setCorrelationID(iCorrelationID);
+ putFile.setSdlFileName(sdlFileName);
+ putFile.setFileType(fileType);
+ putFile.setPersistentFile(bPersistentFile);
+ putFile.setSystemFile(bSystemFile);
+ putFile.setOffset(iOffset);
+ putFile.setLength(iLength);
+ return putFile;
+ }
+
+ public static PutFile buildPutFile(String sdlFileName, Long iOffset, Long iLength, FileType fileType, Boolean bPersistentFile, Boolean bSystemFile, Boolean isPayloadProtected, Integer iCorrelationID) {
+ PutFile putFile = new PutFile();
+ putFile.setCorrelationID(iCorrelationID);
+ putFile.setSdlFileName(sdlFileName);
+ putFile.setFileType(fileType);
+ putFile.setPersistentFile(bPersistentFile);
+ putFile.setSystemFile(bSystemFile);
+ putFile.setOffset(iOffset);
+ putFile.setLength(iLength);
+ putFile.setPayloadProtected(isPayloadProtected);
+ return putFile;
+ }
+
+ public static RegisterAppInterface buildRegisterAppInterface(String appName, String appID) {
+ return buildRegisterAppInterface(appName, false, appID);
+ }
+
+ public static RegisterAppInterface buildRegisterAppInterface(
+ String appName, Boolean isMediaApp, String appID) {
+
+ return buildRegisterAppInterface(null, appName, null, null, null, isMediaApp,
+ null, null, null, appID, null, null);
+ }
+
+ public static RegisterAppInterface buildRegisterAppInterface(
+ SdlMsgVersion sdlMsgVersion, String appName, Vector<TTSChunk> ttsName,
+ String ngnMediaScreenAppName, Vector<String> vrSynonyms, Boolean isMediaApp,
+ Language languageDesired, Language hmiDisplayLanguageDesired, Vector<AppHMIType> appType,
+ String appID, Integer correlationID, DeviceInfo deviceInfo) {
+ RegisterAppInterface msg = new RegisterAppInterface();
+
+ if (correlationID == null) {
+ correlationID = 1;
+ }
+ msg.setCorrelationID(correlationID);
+
+ if (sdlMsgVersion == null) {
+ sdlMsgVersion = new SdlMsgVersion();
+ sdlMsgVersion.setMajorVersion(Integer.valueOf(SDL_MSG_MAJOR_VERSION));
+ sdlMsgVersion.setMinorVersion(Integer.valueOf(SDL_MSG_MINOR_VERSION));
+ }
+ msg.setSdlMsgVersion(sdlMsgVersion);
+ msg.setDeviceInfo(deviceInfo);
+ msg.setAppName(appName);
+
+ msg.setTtsName(ttsName);
+
+ if (ngnMediaScreenAppName == null) {
+ ngnMediaScreenAppName = appName;
+ }
+
+ msg.setNgnMediaScreenAppName(ngnMediaScreenAppName);
+
+ if (vrSynonyms == null) {
+ vrSynonyms = new Vector<String>();
+ vrSynonyms.add(appName);
+ }
+ msg.setVrSynonyms(vrSynonyms);
+
+ msg.setIsMediaApplication(isMediaApp);
+
+ if (languageDesired == null) {
+ languageDesired = Language.EN_US;
+ }
+ msg.setLanguageDesired(languageDesired);
+
+ if (hmiDisplayLanguageDesired == null) {
+ hmiDisplayLanguageDesired = Language.EN_US;
+ }
+
+ msg.setHmiDisplayLanguageDesired(hmiDisplayLanguageDesired);
+
+ msg.setAppHMIType(appType);
+
+ msg.setAppID(appID);
+
+ return msg;
+ }
+
+ public static SetAppIcon buildSetAppIcon(String sdlFileName,
+ Integer correlationID) {
+ SetAppIcon setAppIcon = new SetAppIcon();
+ setAppIcon.setCorrelationID(correlationID);
+ setAppIcon.setSdlFileName(sdlFileName);
+ return setAppIcon;
+ }
+
+ public static SetGlobalProperties buildSetGlobalProperties(
+ String helpPrompt, String timeoutPrompt, Integer correlationID) {
+ return buildSetGlobalProperties(TTSChunkFactory
+ .createSimpleTTSChunks(helpPrompt), TTSChunkFactory
+ .createSimpleTTSChunks(timeoutPrompt), correlationID);
+ }
+
+ public static SetGlobalProperties buildSetGlobalProperties(
+ Vector<TTSChunk> helpChunks, Vector<TTSChunk> timeoutChunks,
+ Integer correlationID) {
+ SetGlobalProperties req = new SetGlobalProperties();
+ req.setCorrelationID(correlationID);
+
+ req.setHelpPrompt(helpChunks);
+ req.setTimeoutPrompt(timeoutChunks);
+
+ return req;
+ }
+
+ public static SetGlobalProperties buildSetGlobalProperties(
+ String helpPrompt, String timeoutPrompt, String vrHelpTitle,
+ Vector<VrHelpItem> vrHelp, Integer correlationID) {
+ return buildSetGlobalProperties(TTSChunkFactory
+ .createSimpleTTSChunks(helpPrompt), TTSChunkFactory
+ .createSimpleTTSChunks(timeoutPrompt), vrHelpTitle, vrHelp, correlationID);
+ }
+
+ public static SetGlobalProperties buildSetGlobalProperties(
+ Vector<TTSChunk> helpChunks, Vector<TTSChunk> timeoutChunks,
+ String vrHelpTitle, Vector<VrHelpItem> vrHelp,
+ Integer correlationID) {
+ SetGlobalProperties req = new SetGlobalProperties();
+ req.setCorrelationID(correlationID);
+
+ req.setHelpPrompt(helpChunks);
+ req.setTimeoutPrompt(timeoutChunks);
+
+ req.setVrHelpTitle(vrHelpTitle);
+ req.setVrHelp(vrHelp);
+
+ return req;
+ }
+
+ public static SetMediaClockTimer buildSetMediaClockTimer(Integer hours,
+ Integer minutes, Integer seconds, UpdateMode updateMode,
+ Integer correlationID) {
+
+ SetMediaClockTimer msg = new SetMediaClockTimer();
+ if (hours != null || minutes != null || seconds != null) {
+ StartTime startTime = new StartTime();
+ msg.setStartTime(startTime);
+ startTime.setHours(hours);
+ startTime.setMinutes(minutes);
+ startTime.setSeconds(seconds);
+ }
+
+ msg.setUpdateMode(updateMode);
+ msg.setCorrelationID(correlationID);
+
+ return msg;
+ }
+
+ @Deprecated
+ public static SetMediaClockTimer buildSetMediaClockTimer(
+ UpdateMode updateMode, Integer correlationID) {
+ Integer hours = null;
+ Integer minutes = null;
+ Integer seconds = null;
+
+ SetMediaClockTimer msg = buildSetMediaClockTimer(hours, minutes,
+ seconds, updateMode, correlationID);
+ return msg;
+ }
+
+ @SuppressWarnings("deprecation")
+ public static Show buildShow(String mainText1, String mainText2,
+ String mainText3, String mainText4,
+ String statusBar, String mediaClock, String mediaTrack,
+ Image graphic, Vector<SoftButton> softButtons, Vector <String> customPresets,
+ TextAlignment alignment, Integer correlationID) {
+ Show msg = new Show();
+ msg.setCorrelationID(correlationID);
+ msg.setMainField1(mainText1);
+ msg.setMainField2(mainText2);
+ msg.setStatusBar(statusBar);
+ msg.setMediaClock(mediaClock);
+ msg.setMediaTrack(mediaTrack);
+ msg.setAlignment(alignment);
+ msg.setMainField3(mainText3);
+ msg.setMainField4(mainText4);
+ msg.setGraphic(graphic);
+ msg.setSoftButtons(softButtons);
+ msg.setCustomPresets(customPresets);
+
+ return msg;
+ }
+
+ public static Show buildShow(String mainText1, String mainText2, String mainText3, String mainText4,
+ TextAlignment alignment, Integer correlationID) {
+ Show msg = buildShow(mainText1, mainText2, mainText3, mainText4, null, null, null, null, null, null, alignment,
+ correlationID);
+ return msg;
+ }
+
+ @SuppressWarnings("deprecation")
+ public static Show buildShow(String mainText1, String mainText2,
+ String statusBar, String mediaClock, String mediaTrack,
+ TextAlignment alignment, Integer correlationID) {
+ Show msg = new Show();
+ msg.setCorrelationID(correlationID);
+ msg.setMainField1(mainText1);
+ msg.setMainField2(mainText2);
+ msg.setStatusBar(statusBar);
+ msg.setMediaClock(mediaClock);
+ msg.setMediaTrack(mediaTrack);
+ msg.setAlignment(alignment);
+
+ return msg;
+ }
+
+ public static Show buildShow(String mainText1, String mainText2,
+ TextAlignment alignment, Integer correlationID) {
+ Show msg = buildShow(mainText1, mainText2, null, null, null, alignment,
+ correlationID);
+ return msg;
+ }
+
+ public static Speak buildSpeak(String ttsText, Integer correlationID) {
+ Speak msg = buildSpeak(TTSChunkFactory.createSimpleTTSChunks(ttsText),
+ correlationID);
+ return msg;
+ }
+
+ public static Speak buildSpeak(Vector<TTSChunk> ttsChunks,
+ Integer correlationID) {
+
+ Speak msg = new Speak();
+ msg.setCorrelationID(correlationID);
+
+ msg.setTtsChunks(ttsChunks);
+
+ return msg;
+ }
+
+ public static SubscribeButton buildSubscribeButton(ButtonName buttonName,
+ Integer correlationID) {
+
+ SubscribeButton msg = new SubscribeButton();
+ msg.setCorrelationID(correlationID);
+ msg.setButtonName(buttonName);
+
+ return msg;
+ }
+
+ public static UnregisterAppInterface buildUnregisterAppInterface(
+ Integer correlationID) {
+ UnregisterAppInterface msg = new UnregisterAppInterface();
+ msg.setCorrelationID(correlationID);
+
+ return msg;
+ }
+
+ public static UnsubscribeButton buildUnsubscribeButton(
+ ButtonName buttonName, Integer correlationID) {
+
+ UnsubscribeButton msg = new UnsubscribeButton();
+ msg.setCorrelationID(correlationID);
+ msg.setButtonName(buttonName);
+
+ return msg;
+ }
+
+ @SuppressWarnings("deprecation")
+ public static SubscribeVehicleData BuildSubscribeVehicleData(boolean gps, boolean speed, boolean rpm, boolean fuelLevel, boolean fuelLevel_State,
+ boolean instantFuelConsumption, boolean externalTemperature, boolean prndl, boolean tirePressure,
+ boolean odometer, boolean beltStatus, boolean bodyInformation, boolean deviceStatus,
+ boolean driverBraking, Integer correlationID)
+ {
+ SubscribeVehicleData msg = new SubscribeVehicleData();
+ msg.setGps(gps);
+ msg.setSpeed(speed);
+ msg.setRpm(rpm);
+ msg.setFuelLevel(fuelLevel);
+ msg.setFuelLevel_State(fuelLevel_State);
+ msg.setInstantFuelConsumption(instantFuelConsumption);
+ msg.setExternalTemperature(externalTemperature);
+ msg.setPrndl(prndl);
+ msg.setTirePressure(tirePressure);
+ msg.setOdometer(odometer);
+ msg.setBeltStatus(beltStatus);
+ msg.setBodyInformation(bodyInformation);
+ msg.setDeviceStatus(deviceStatus);
+ msg.setDriverBraking(driverBraking);
+ msg.setCorrelationID(correlationID);
+
+ return msg;
+ }
+
+ @SuppressWarnings("deprecation")
+ public static UnsubscribeVehicleData BuildUnsubscribeVehicleData(boolean gps, boolean speed, boolean rpm, boolean fuelLevel, boolean fuelLevel_State,
+ boolean instantFuelConsumption, boolean externalTemperature, boolean prndl, boolean tirePressure,
+ boolean odometer, boolean beltStatus, boolean bodyInformation, boolean deviceStatus,
+ boolean driverBraking, Integer correlationID)
+ {
+ UnsubscribeVehicleData msg = new UnsubscribeVehicleData();
+ msg.setGps(gps);
+ msg.setSpeed(speed);
+ msg.setRpm(rpm);
+ msg.setFuelLevel(fuelLevel);
+ msg.setFuelLevel_State(fuelLevel_State);
+ msg.setInstantFuelConsumption(instantFuelConsumption);
+ msg.setExternalTemperature(externalTemperature);
+ msg.setPrndl(prndl);
+ msg.setTirePressure(tirePressure);
+ msg.setOdometer(odometer);
+ msg.setBeltStatus(beltStatus);
+ msg.setBodyInformation(bodyInformation);
+ msg.setDeviceStatus(deviceStatus);
+ msg.setDriverBraking(driverBraking);
+ msg.setCorrelationID(correlationID);
+
+ return msg;
+ }
+
+ @SuppressWarnings("deprecation")
+ public static GetVehicleData BuildGetVehicleData(boolean gps, boolean speed, boolean rpm, boolean fuelLevel, boolean fuelLevel_State,
+ boolean instantFuelConsumption, boolean externalTemperature, boolean vin, boolean prndl, boolean tirePressure,
+ boolean odometer, boolean beltStatus, boolean bodyInformation, boolean deviceStatus,
+ boolean driverBraking, Integer correlationID)
+ {
+ GetVehicleData msg = new GetVehicleData();
+ msg.setGps(gps);
+ msg.setSpeed(speed);
+ msg.setRpm(rpm);
+ msg.setFuelLevel(fuelLevel);
+ msg.setFuelLevel_State(fuelLevel_State);
+ msg.setInstantFuelConsumption(instantFuelConsumption);
+ msg.setExternalTemperature(externalTemperature);
+ msg.setVin(vin);
+ msg.setPrndl(prndl);
+ msg.setTirePressure(tirePressure);
+ msg.setOdometer(odometer);
+ msg.setBeltStatus(beltStatus);
+ msg.setBodyInformation(bodyInformation);
+ msg.setDeviceStatus(deviceStatus);
+ msg.setDriverBraking(driverBraking);
+ msg.setCorrelationID(correlationID);
+
+ return msg;
+ }
+
+ public static ScrollableMessage BuildScrollableMessage(String scrollableMessageBody, Integer timeout, Vector<SoftButton> softButtons, Integer correlationID)
+ {
+ ScrollableMessage msg = new ScrollableMessage();
+ msg.setCorrelationID(correlationID);
+ msg.setScrollableMessageBody(scrollableMessageBody);
+ msg.setTimeout(timeout);
+ msg.setSoftButtons(softButtons);
+
+ return msg;
+ }
+
+ public static Slider BuildSlider(Integer numTicks, Integer position, String sliderHeader, Vector<String> sliderFooter, Integer timeout, Integer correlationID)
+ {
+ Slider msg = new Slider();
+ msg.setCorrelationID(correlationID);
+ msg.setNumTicks(numTicks);
+ msg.setPosition(position);
+ msg.setSliderHeader(sliderHeader);
+ msg.setSliderFooter(sliderFooter);
+ msg.setTimeout(timeout);
+
+ return msg;
+ }
+
+ public static ChangeRegistration BuildChangeRegistration(Language language, Language hmiDisplayLanguage, Integer correlationID)
+ {
+ ChangeRegistration msg = new ChangeRegistration();
+ msg.setCorrelationID(correlationID);
+ msg.setLanguage(language);
+ msg.setHmiDisplayLanguage(hmiDisplayLanguage);
+
+ return msg;
+ }
+
+ public static SetDisplayLayout BuildSetDisplayLayout(String displayLayout, Integer correlationID)
+ {
+ SetDisplayLayout msg = new SetDisplayLayout();
+ msg.setCorrelationID(correlationID);
+ msg.setDisplayLayout(displayLayout);
+
+ return msg;
+ }
+
+ public static PerformAudioPassThru BuildPerformAudioPassThru(String ttsText, String audioPassThruDisplayText1, String audioPassThruDisplayText2,
+ SamplingRate samplingRate, Integer maxDuration, BitsPerSample bitsPerSample,
+ AudioType audioType, Boolean muteAudio, Integer correlationID)
+ {
+ Vector<TTSChunk> chunks = TTSChunkFactory
+ .createSimpleTTSChunks(ttsText);
+
+ PerformAudioPassThru msg = BuildPerformAudioPassThru(chunks, audioPassThruDisplayText1, audioPassThruDisplayText2,
+ samplingRate, maxDuration, bitsPerSample,audioType, muteAudio, correlationID);
+
+ return msg;
+ }
+
+ public static PerformAudioPassThru BuildPerformAudioPassThru(Vector<TTSChunk> initialPrompt, String audioPassThruDisplayText1, String audioPassThruDisplayText2,
+ SamplingRate samplingRate, Integer maxDuration, BitsPerSample bitsPerSample,
+ AudioType audioType, Boolean muteAudio, Integer correlationID)
+ {
+ PerformAudioPassThru msg = new PerformAudioPassThru();
+ msg.setCorrelationID(correlationID);
+ msg.setInitialPrompt(initialPrompt);
+ msg.setAudioPassThruDisplayText1(audioPassThruDisplayText1);
+ msg.setAudioPassThruDisplayText2(audioPassThruDisplayText2);
+ msg.setSamplingRate(samplingRate);
+ msg.setMaxDuration(maxDuration);
+ msg.setBitsPerSample(bitsPerSample);
+ msg.setAudioType(audioType);
+ msg.setMuteAudio(muteAudio);
+
+ return msg;
+ }
+
+ public static EndAudioPassThru BuildEndAudioPassThru(Integer correlationID)
+ {
+ EndAudioPassThru msg = new EndAudioPassThru();
+ msg.setCorrelationID(correlationID);
+
+ return msg;
+ }
+
+ public static DeviceInfo BuildDeviceInfo(String carrierName)
+ {
+ DeviceInfo msg = new DeviceInfo();
+ msg.setHardware(android.os.Build.MODEL);
+ msg.setOs(DeviceInfo.DEVICE_OS);
+ msg.setOsVersion(Build.VERSION.RELEASE);
+ msg.setCarrier(carrierName);
+ return msg;
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/RPCResponse.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/RPCResponse.java
new file mode 100644
index 000000000..0a4dc2a70
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/RPCResponse.java
@@ -0,0 +1,181 @@
+/**
+ *
+ */
+package com.smartdevicelink.proxy;
+
+import java.util.Hashtable;
+
+import com.smartdevicelink.proxy.rpc.enums.Result;
+
+/**
+ * Result sent by SDL after an RPC is processed, consists of four parts:
+ * <ul>
+ * <li>
+ * CorrelationID:
+ * <ul>
+ * An integer value correlating the response to the corresponding request.
+ * </ul>
+ * </li> <li>Success:
+ * <ul>
+ * A Boolean indicating whether the original request was successfully processed.
+ * </ul>
+ * </li> <li>ResultCode:
+ * <ul>
+ *
+ * <p>The result code provides additional information about a response returning a
+ * failed outcome.</p>
+ *
+ *
+ * <p>Any response can have at least one, or possibly more, of the following result
+ * code values: SUCCESS, INVALID_DATA, OUT_OF_MEMORY, TOO_MANY_PENDING_REQUESTS,
+ * APPLICATION_NOT_REGISTERED, GENERIC_ERROR,REJECTED.</p>
+ *
+ *
+ * <p>Any additional result codes for a given operation can be found in related
+ * RPCs</p>
+ *
+ * </ul>
+ * </li> <li>Info:
+ * <ul>
+ * A string of text representing additional information returned from SDL. This
+ * could be useful in debugging.
+ * </ul>
+ * </li>
+ * </ul>
+ */
+public class RPCResponse extends RPCMessage {
+ public static final String KEY_SUCCESS = "success";
+ public static final String KEY_INFO = "info";
+ public static final String KEY_RESULT_CODE = "resultCode";
+ /**
+ *<p>Constructs a newly allocated RPCResponse object using function name</p>
+ *@param functionName a string that indicates the function's name
+ */
+ public RPCResponse(String functionName) {
+ super(functionName, RPCMessage.KEY_RESPONSE);
+ }
+ /**
+ *<p>Constructs a newly allocated RPCResponse object indicated by the Hashtable parameter</p>
+ *@param hash The Hashtable to use
+ */
+ public RPCResponse(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+ /**
+ *<p>Constructs a newly allocated RPCResponse object using a RPCMessage object</p>
+ *@param rpcMsg The {@linkplain RPCMessage} to use
+ */
+ public RPCResponse(RPCMessage rpcMsg) {
+ super(preprocessMsg(rpcMsg));
+ }
+
+ static RPCMessage preprocessMsg (RPCMessage rpcMsg) {
+ if (rpcMsg.getMessageType() != RPCMessage.KEY_RESPONSE) {
+ rpcMsg.messageType = RPCMessage.KEY_RESPONSE;
+ }
+
+ return rpcMsg;
+ }
+
+ /**
+ * <p>
+ * Returns correlationID the ID of the request
+ * </p>
+ *
+ * @return int the ID of the request
+ */
+ public Integer getCorrelationID() {
+ return (Integer)function.get(RPCMessage.KEY_CORRELATION_ID);
+ }
+
+ /**
+ * <p>
+ * Set the correlationID
+ * </p>
+ *
+ * @param correlationID
+ * the ID of the response
+ */
+ public void setCorrelationID(Integer correlationID) {
+ if (correlationID != null) {
+ function.put(RPCMessage.KEY_CORRELATION_ID, correlationID );
+ } else {
+ function.remove(RPCMessage.KEY_CORRELATION_ID);
+ }
+ }
+ /**
+ * <p>
+ * Returns Success whether the request is successfully processed
+ * </p>
+ *
+ * @return Boolean the status of whether the request is successfully done
+ */
+ public Boolean getSuccess() {
+ return (Boolean) parameters.get( RPCResponse.KEY_SUCCESS );
+ }
+ /**
+ * <p>
+ * Set the Success status
+ * </p>
+ *
+ * @param success
+ * whether the request is successfully processed
+ */
+ public void setSuccess( Boolean success ) {
+ if (success != null) {
+ parameters.put(RPCResponse.KEY_SUCCESS, success );
+ }
+ }
+ /**
+ * <p>
+ * Returns ResultCode additional information about a response returning a failed outcome
+ * </p>
+ *
+ * @return {@linkplain Result} the status of whether the request is successfully done
+ */
+ public Result getResultCode() {
+ Object obj = parameters.get(RPCResponse.KEY_RESULT_CODE);
+ if (obj instanceof Result) {
+ return (Result) obj;
+ } else if (obj instanceof String) {
+ return Result.valueForString((String) obj);
+ }
+ return null;
+ }
+ /**
+ * <p>
+ * Set the additional information about a response returning a failed outcome
+ * </p>
+ *
+ * @param resultCode
+ * whether the request is successfully processed
+ */
+ public void setResultCode( Result resultCode ) {
+ if (resultCode != null) {
+ parameters.put(RPCResponse.KEY_RESULT_CODE, resultCode );
+ }
+ }
+ /**
+ * <p>
+ * Returns a string of text representing additional information returned from SDL
+ * </p>
+ *
+ * @return String A string of text representing additional information returned from SDL
+ */
+ public String getInfo() {
+ return (String) parameters.get( RPCResponse.KEY_INFO );
+ }
+ /**
+ * <p>
+ * Set a string of text representing additional information returned from SDL
+ * </p>
+ *
+ * @param info
+ * a string of text representing additional information returned from SDL
+ */
+ public void setInfo( String info ) {
+ if (info != null) {
+ parameters.put(RPCResponse.KEY_INFO, info );
+ }
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/RPCStreamController.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/RPCStreamController.java
new file mode 100644
index 000000000..0e2af0bc6
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/RPCStreamController.java
@@ -0,0 +1,32 @@
+package com.smartdevicelink.proxy;
+
+import com.smartdevicelink.streaming.StreamRPCPacketizer;
+
+public class RPCStreamController {
+ private StreamRPCPacketizer rpcPacketizer;
+ private Integer iCorrelationID;
+
+ public RPCStreamController(StreamRPCPacketizer rpcPacketizer, Integer iCorrelationID)
+ {
+ this.rpcPacketizer = rpcPacketizer;
+ this.iCorrelationID = iCorrelationID;
+ }
+
+ public Integer getCorrelationID()
+ {
+ return iCorrelationID;
+ }
+
+ public void pause()
+ {
+ rpcPacketizer.pause();
+ }
+ public void resume()
+ {
+ rpcPacketizer.resume();
+ }
+ public void stop()
+ {
+ rpcPacketizer.onPutFileStreamError(null, "Stop Putfile Stream Requested");
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/RPCStruct.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/RPCStruct.java
new file mode 100644
index 000000000..4aea8e146
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/RPCStruct.java
@@ -0,0 +1,113 @@
+package com.smartdevicelink.proxy;
+
+import java.util.Hashtable;
+import java.util.Set;
+
+import org.json.JSONException;
+import org.json.JSONObject;
+
+import com.smartdevicelink.marshal.JsonRPCMarshaller;
+
+public class RPCStruct {
+ public static final String KEY_BULK_DATA = "bulkData";
+ public static final String KEY_PROTECTED = "protected";
+
+ private byte[] _bulkData = null;
+ private Boolean protectedPayload = false;
+
+ protected Hashtable<String, Object> store = null;
+
+ public boolean getStoreValue(String key) { // for unit testing
+ return store.contains(key);
+ }
+
+ public Hashtable<String,Object> getStore () { // for unit testing
+ return store;
+ }
+
+ public RPCStruct() {
+ store = new Hashtable<String, Object>();
+ }
+
+ protected RPCStruct(RPCStruct rpcs) {
+ this.store = rpcs.store;
+ }
+
+ public RPCStruct(Hashtable<String, Object> hashtable) {
+ store = hashtable;
+ //store = (Hashtable<String, Object>) ObjectCopier.copy(hashtable);
+ }
+
+ public void deserializeJSON(JSONObject jsonObject) throws JSONException {
+ store = JsonRPCMarshaller.deserializeJSONObject(jsonObject);
+ }
+
+ // deserializeJSONObject method moved to JsonRPCMarshaller for consistency
+ // Keep reference here for backwards compatibility
+ @Deprecated
+ public static Hashtable<String, Object> deserializeJSONObject(JSONObject jsonObject)
+ throws JSONException {
+ return JsonRPCMarshaller.deserializeJSONObject(jsonObject);
+ }
+
+ public JSONObject serializeJSON() throws JSONException {
+ return JsonRPCMarshaller.serializeHashtable(store);
+ }
+
+ @SuppressWarnings("unchecked")
+ public JSONObject serializeJSON(byte version) throws JSONException {
+ if (version > 1) {
+ String messageType = getMessageTypeName(store.keySet());
+ Hashtable<String, Object> function = (Hashtable<String, Object>) store.get(messageType);
+ Hashtable<String, Object> parameters = (Hashtable<String, Object>) function.get(RPCMessage.KEY_PARAMETERS);
+ return JsonRPCMarshaller.serializeHashtable(parameters);
+ } else return JsonRPCMarshaller.serializeHashtable(store);
+ }
+
+ public byte[] getBulkData() {
+ return this._bulkData;
+ }
+
+ public void setBulkData(byte[] bulkData) {
+ if (bulkData != null) {
+ this._bulkData = new byte[bulkData.length];
+ System.arraycopy(bulkData, 0, _bulkData, 0, bulkData.length);
+ }
+ else{
+ this._bulkData = null;
+ }
+ }
+
+ public void setPayloadProtected(Boolean bVal) {
+ protectedPayload = bVal;
+ }
+
+ public Boolean isPayloadProtected() {
+ return protectedPayload;
+ }
+
+ protected String getMessageTypeName(Set<String> keys) {
+ for (String key : keys) {
+ if (key == null) {
+ continue;
+ }
+ if (key.equals(RPCMessage.KEY_REQUEST) || key.equals(RPCMessage.KEY_RESPONSE) ||
+ key.equals(RPCMessage.KEY_NOTIFICATION)) {
+ return key;
+ }
+ }
+ return null;
+ }
+
+ protected boolean hasKey(Set<String> keys, String keyName) {
+ for (String key : keys) {
+ if (key == null) {
+ continue;
+ }
+ if (key.equals(keyName)) {
+ return true;
+ }
+ }
+ return false;
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/SdlProxyALM.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/SdlProxyALM.java
new file mode 100644
index 000000000..2bdbdf82e
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/SdlProxyALM.java
@@ -0,0 +1,1943 @@
+package com.smartdevicelink.proxy;
+
+import java.util.List;
+import java.util.Vector;
+
+import android.app.Service;
+import android.content.Context;
+
+import com.smartdevicelink.exception.SdlException;
+import com.smartdevicelink.exception.SdlExceptionCause;
+import com.smartdevicelink.proxy.interfaces.IProxyListenerALM;
+import com.smartdevicelink.proxy.rpc.AudioPassThruCapabilities;
+import com.smartdevicelink.proxy.rpc.ButtonCapabilities;
+import com.smartdevicelink.proxy.rpc.DisplayCapabilities;
+import com.smartdevicelink.proxy.rpc.HMICapabilities;
+import com.smartdevicelink.proxy.rpc.PresetBankCapabilities;
+import com.smartdevicelink.proxy.rpc.SdlMsgVersion;
+import com.smartdevicelink.proxy.rpc.SoftButtonCapabilities;
+import com.smartdevicelink.proxy.rpc.TTSChunk;
+import com.smartdevicelink.proxy.rpc.VehicleType;
+import com.smartdevicelink.proxy.rpc.enums.AppHMIType;
+import com.smartdevicelink.proxy.rpc.enums.HmiZoneCapabilities;
+import com.smartdevicelink.proxy.rpc.enums.Language;
+import com.smartdevicelink.proxy.rpc.enums.PrerecordedSpeech;
+import com.smartdevicelink.proxy.rpc.enums.SdlDisconnectedReason;
+import com.smartdevicelink.proxy.rpc.enums.SpeechCapabilities;
+import com.smartdevicelink.proxy.rpc.enums.VrCapabilities;
+import com.smartdevicelink.trace.SdlTrace;
+import com.smartdevicelink.transport.BTTransportConfig;
+import com.smartdevicelink.transport.BaseTransportConfig;
+import com.smartdevicelink.transport.MultiplexTransportConfig;
+import com.smartdevicelink.transport.enums.TransportType;
+
+
+public class SdlProxyALM extends SdlProxyBase<IProxyListenerALM> {
+
+ private static final String SDL_LIB_TRACE_KEY = "42baba60-eb57-11df-98cf-0800200c9a66";
+ @SuppressWarnings("unused")
+ private static final String SDL_LIB_PRIVATE_TOKEN = "{DAE1A88C-6C16-4768-ACA5-6F1247EA01C2}";
+ /**
+ * @deprecated
+ * Constructor for the SdlProxy object, the proxy for communicating between the App and SDL
+ *
+ * Takes advantage of the advanced lifecycle management.
+ * @param listener - Reference to the object in the App listening to callbacks from SDL.
+ * @param appName - Name of the application displayed on SDL.
+ * @param isMediaApp - Indicates if the app is a media application.
+ */
+ @Deprecated
+ public SdlProxyALM(IProxyListenerALM listener, String appName, Boolean isMediaApp,
+ Language languageDesired, Language hmiDisplayLanguageDesired, String appID) throws SdlException {
+ super( listener,
+ /*sdl proxy configuration resources*/null,
+ /*enable advanced lifecycle management*/true,
+ appName,
+ /*TTS Name*/null,
+ /*ngn media app*/null,
+ /*vr synonyms*/null,
+ /*is media app*/isMediaApp,
+ /*sdlMsgVersion*/null,
+ /*language desired*/languageDesired,
+ /*HMI Display Language Desired*/hmiDisplayLanguageDesired,
+ /*App Type*/null,
+ /*App ID*/appID,
+ /*autoActivateID*/null,
+ /*callbackToUIThread*/ false,
+ new BTTransportConfig());
+ }
+
+ /**
+ * Constructor for the SdlProxy object, the proxy for communicating between the App and SDL
+ *
+ * Takes advantage of the advanced lifecycle management.
+ * @param context - Used to create a multiplexing transport config
+ * @param listener - Reference to the object in the App listening to callbacks from SDL.
+ * @param appName - Name of the application displayed on SDL.
+ * @param isMediaApp - Indicates if the app is a media application.
+ */
+ public SdlProxyALM(Context context,IProxyListenerALM listener, String appName, Boolean isMediaApp,
+ Language languageDesired, Language hmiDisplayLanguageDesired, String appID) throws SdlException {
+ super( listener,
+ /*sdl proxy configuration resources*/null,
+ /*enable advanced lifecycle management*/true,
+ appName,
+ /*TTS Name*/null,
+ /*ngn media app*/null,
+ /*vr synonyms*/null,
+ /*is media app*/isMediaApp,
+ /*sdlMsgVersion*/null,
+ /*language desired*/languageDesired,
+ /*HMI Display Language Desired*/hmiDisplayLanguageDesired,
+ /*App Type*/null,
+ /*App ID*/appID,
+ /*autoActivateID*/null,
+ /*callbackToUIThread*/ false,
+ new MultiplexTransportConfig(context,appID));
+
+ SdlTrace.logProxyEvent("Application constructed SdlProxyALM (using legacy constructor for BT transport) instance passing in: IProxyListener, appName, and isMediaApp.", SDL_LIB_TRACE_KEY);
+ }
+ /**
+ * @deprecated
+ * Constructor for the SdlProxy object, the proxy for communicating between the App and SDL.
+ *
+ * Takes advantage of the advanced lifecycle management.
+ *
+ * @param listener - Reference to the object in the App listening to callbacks from SDL.
+ * @param appName - Name of the application displayed on SDL.
+ * @param ngnMediaScreenAppName - Name of the application displayed on SDL for Navigation equipped
+ * vehicles. Limited to five characters.
+ * @param vrSynonyms - A vector of strings, all of which can be used as voice commands to
+ * @param isMediaApp - Indicates if the app is a media application.
+ * @param sdlMsgVersion - Indicates the version of SDL SmartDeviceLink Messages desired. Must be less than
+ * or equal to the version of SDL SmartDeviceLink running on the vehicle.
+ * @param languageDesired - Indicates the language desired for the SDL interface.
+ * @param autoActivateID - ID used to re-register previously registered application.
+ * @throws SdlException
+ */
+ @Deprecated
+ public SdlProxyALM(IProxyListenerALM listener, String appName, String ngnMediaScreenAppName,
+ Vector<String> vrSynonyms, Boolean isMediaApp, SdlMsgVersion sdlMsgVersion,
+ Language languageDesired, Language hmiDisplayLanguageDesired, String appID,
+ String autoActivateID) throws SdlException {
+ super( listener,
+ /*sdl proxy configuration resources*/null,
+ /*enable advanced lifecycle management*/true,
+ appName,
+ /*TTS Name*/null,
+ ngnMediaScreenAppName,
+ vrSynonyms,
+ isMediaApp,
+ sdlMsgVersion,
+ languageDesired,
+ /*HMI Display Language Desired*/hmiDisplayLanguageDesired,
+ /*App Type*/null,
+ /*App ID*/appID,
+ autoActivateID,
+ /*callbackToUIThread*/ false,
+ new BTTransportConfig());
+
+ SdlTrace.logProxyEvent("Application constructed SdlProxyALM (using legacy constructor for BT transport) instance passing in: IProxyListener, appName, ngnMediaScreenAppName, " +
+ "vrSynonyms, isMediaApp, sdlMsgVersion, languageDesired, and autoActivateID.", SDL_LIB_TRACE_KEY);
+ }
+ /**
+ * Constructor for the SdlProxy object, the proxy for communicating between the App and SDL.
+ *
+ * Takes advantage of the advanced lifecycle management.
+ *
+ * @param context - Used to create a multiplexing transport config
+ * @param listener - Reference to the object in the App listening to callbacks from SDL.
+ * @param appName - Name of the application displayed on SDL.
+ * @param ngnMediaScreenAppName - Name of the application displayed on SDL for Navigation equipped
+ * vehicles. Limited to five characters.
+ * @param vrSynonyms - A vector of strings, all of which can be used as voice commands to
+ * @param isMediaApp - Indicates if the app is a media application.
+ * @param sdlMsgVersion - Indicates the version of SDL SmartDeviceLink Messages desired. Must be less than
+ * or equal to the version of SDL SmartDeviceLink running on the vehicle.
+ * @param languageDesired - Indicates the language desired for the SDL interface.
+ * @param autoActivateID - ID used to re-register previously registered application.
+ * @throws SdlException
+ */
+ public SdlProxyALM(Context context,IProxyListenerALM listener, String appName, String ngnMediaScreenAppName,
+ Vector<String> vrSynonyms, Boolean isMediaApp, SdlMsgVersion sdlMsgVersion,
+ Language languageDesired, Language hmiDisplayLanguageDesired, String appID,
+ String autoActivateID) throws SdlException {
+ super( listener,
+ /*sdl proxy configuration resources*/null,
+ /*enable advanced lifecycle management*/true,
+ appName,
+ /*TTS Name*/null,
+ ngnMediaScreenAppName,
+ vrSynonyms,
+ isMediaApp,
+ sdlMsgVersion,
+ languageDesired,
+ /*HMI Display Language Desired*/hmiDisplayLanguageDesired,
+ /*App Type*/null,
+ /*App ID*/appID,
+ autoActivateID,
+ /*callbackToUIThread*/ false,
+ new MultiplexTransportConfig(context,appID));
+
+ SdlTrace.logProxyEvent("Application constructed SdlProxyALM (using legacy constructor for BT transport) instance passing in: IProxyListener, appName, ngnMediaScreenAppName, " +
+ "vrSynonyms, isMediaApp, sdlMsgVersion, languageDesired, and autoActivateID.", SDL_LIB_TRACE_KEY);
+ }
+ /**
+ * @deprecated
+ * Constructor for the SdlProxy object, the proxy for communicating between the App and SDL.
+ *
+ * Takes advantage of the advanced lifecycle management.
+ *
+ * @param listener - Reference to the object in the App listening to callbacks from SDL.
+ * @param appName - Name of the application displayed on SDL.
+ * @param ngnMediaScreenAppName - Name of the application displayed on SDL for Navigation equipped
+ * vehicles. Limited to five characters.
+ * @param vrSynonyms - A vector of strings, all of which can be used as voice commands to
+ * @param isMediaApp - Indicates if the app is a media application.
+ * @param sdlMsgVersion - Indicates the version of SDL SmartDeviceLink Messages desired. Must be less than
+ * or equal to the version of SDL SmartDeviceLink running on the vehicle.
+ * @param languageDesired - Indicates the language desired for the SDL interface.
+ * @param autoActivateID - ID used to re-register previously registered application.
+ * @throws SdlException
+ */
+ @Deprecated
+ public SdlProxyALM(IProxyListenerALM listener, SdlProxyConfigurationResources sdlProxyConfigurationResources,
+ String appName, String ngnMediaScreenAppName, Vector<String> vrSynonyms,
+ Boolean isMediaApp, SdlMsgVersion sdlMsgVersion, Language languageDesired,
+ Language hmiDisplayLanguageDesired, String appID, String autoActivateID) throws SdlException {
+ super( listener,
+ sdlProxyConfigurationResources,
+ /*enable advanced lifecycle management*/true,
+ appName,
+ /*TTS Name*/null,
+ ngnMediaScreenAppName,
+ vrSynonyms,
+ isMediaApp,
+ sdlMsgVersion,
+ languageDesired,
+ /*HMI Display Language Desired*/hmiDisplayLanguageDesired,
+ /*App Type*/null,
+ /*App ID*/appID,
+ autoActivateID,
+ /*callbackToUIThread*/ false,
+ new BTTransportConfig());
+
+ SdlTrace.logProxyEvent("Application constructed SdlProxyALM (using legacy constructor for BT transport) instance passing in: IProxyListener, sdlProxyConfigurationResources, " +
+ "appName, ngnMediaScreenAppName, vrSynonyms, isMediaApp, sdlMsgVersion, languageDesired, and autoActivateID.", SDL_LIB_TRACE_KEY);
+ }
+ /**
+ * Constructor for the SdlProxy object, the proxy for communicating between the App and SDL.
+ *
+ * Takes advantage of the advanced lifecycle management.
+ *
+ * @param context - Used to create a multiplexing transport config
+ * @param listener - Reference to the object in the App listening to callbacks from SDL.
+ * @param appName - Name of the application displayed on SDL.
+ * @param ngnMediaScreenAppName - Name of the application displayed on SDL for Navigation equipped
+ * vehicles. Limited to five characters.
+ * @param vrSynonyms - A vector of strings, all of which can be used as voice commands to
+ * @param isMediaApp - Indicates if the app is a media application.
+ * @param sdlMsgVersion - Indicates the version of SDL SmartDeviceLink Messages desired. Must be less than
+ * or equal to the version of SDL SmartDeviceLink running on the vehicle.
+ * @param languageDesired - Indicates the language desired for the SDL interface.
+ * @param autoActivateID - ID used to re-register previously registered application.
+ * @throws SdlException
+ */
+ public SdlProxyALM(Context context,IProxyListenerALM listener, SdlProxyConfigurationResources sdlProxyConfigurationResources,
+ String appName, String ngnMediaScreenAppName, Vector<String> vrSynonyms,
+ Boolean isMediaApp, SdlMsgVersion sdlMsgVersion, Language languageDesired,
+ Language hmiDisplayLanguageDesired, String appID, String autoActivateID) throws SdlException {
+ super( listener,
+ sdlProxyConfigurationResources,
+ /*enable advanced lifecycle management*/true,
+ appName,
+ /*TTS Name*/null,
+ ngnMediaScreenAppName,
+ vrSynonyms,
+ isMediaApp,
+ sdlMsgVersion,
+ languageDesired,
+ /*HMI Display Language Desired*/hmiDisplayLanguageDesired,
+ /*App Type*/null,
+ /*App ID*/appID,
+ autoActivateID,
+ /*callbackToUIThread*/ false,
+ new MultiplexTransportConfig(context,appID));
+
+ SdlTrace.logProxyEvent("Application constructed SdlProxyALM (using legacy constructor for BT transport) instance passing in: IProxyListener, sdlProxyConfigurationResources, " +
+ "appName, ngnMediaScreenAppName, vrSynonyms, isMediaApp, sdlMsgVersion, languageDesired, and autoActivateID.", SDL_LIB_TRACE_KEY);
+ }
+ /**
+ * @deprecated
+ * Constructor for the SdlProxy object, the proxy for communicating between the App and SDL.
+ *
+ * Takes advantage of the advanced lifecycle management.
+ *
+ * @param listener - Reference to the object in the App listening to callbacks from SDL.
+ * @param appName - Name of the application displayed on SDL.
+ * @param ngnMediaScreenAppName - Name of the application displayed on SDL for Navigation equipped
+ * vehicles. Limited to five characters.
+ * @param vrSynonyms - A vector of strings, all of which can be used as voice commands to
+ * @param isMediaApp - Indicates if the app is a media application.
+ * @param sdlMsgVersion - Indicates the version of SDL SmartDeviceLink Messages desired. Must be less than
+ * or equal to the version of SDL SmartDeviceLink running on the vehicle.
+ * @param languageDesired - Indicates the language desired for the SDL interface.
+ * @param autoActivateID - ID used to re-register previously registered application.
+ * @param callbackToUIThread - If true, all callbacks will occur on the UI thread.
+ * @throws SdlException
+ */
+ @Deprecated
+ public SdlProxyALM(IProxyListenerALM listener, String appName, String ngnMediaScreenAppName,
+ Vector<String> vrSynonyms, Boolean isMediaApp, SdlMsgVersion sdlMsgVersion,
+ Language languageDesired, Language hmiDisplayLanguageDesired, String appID,
+ String autoActivateID, boolean callbackToUIThread) throws SdlException {
+ super( listener,
+ /*sdl proxy configuration resources*/null,
+ /*enable advanced lifecycle management*/true,
+ appName,
+ /*TTS Name*/null,
+ ngnMediaScreenAppName,
+ vrSynonyms,
+ isMediaApp,
+ sdlMsgVersion,
+ languageDesired,
+ /*HMI Display Language Desired*/hmiDisplayLanguageDesired,
+ /*App Type*/null,
+ /*App ID*/appID,
+ autoActivateID,
+ callbackToUIThread,
+ new BTTransportConfig());
+
+ SdlTrace.logProxyEvent("Application constructed SdlProxyALM (using legacy constructor for BT transport) instance passing in: IProxyListener, " +
+ "appName, ngnMediaScreenAppName, vrSynonyms, isMediaApp, sdlMsgVersion, languageDesired, autoActivateID, " +
+ "and callbackToUIThread", SDL_LIB_TRACE_KEY);
+ }
+ /**
+ * Constructor for the SdlProxy object, the proxy for communicating between the App and SDL.
+ *
+ * Takes advantage of the advanced lifecycle management.
+ *
+ * @param context - Used to create a multiplexing transport config
+ * @param listener - Reference to the object in the App listening to callbacks from SDL.
+ * @param appName - Name of the application displayed on SDL.
+ * @param ngnMediaScreenAppName - Name of the application displayed on SDL for Navigation equipped
+ * vehicles. Limited to five characters.
+ * @param vrSynonyms - A vector of strings, all of which can be used as voice commands to
+ * @param isMediaApp - Indicates if the app is a media application.
+ * @param sdlMsgVersion - Indicates the version of SDL SmartDeviceLink Messages desired. Must be less than
+ * or equal to the version of SDL SmartDeviceLink running on the vehicle.
+ * @param languageDesired - Indicates the language desired for the SDL interface.
+ * @param autoActivateID - ID used to re-register previously registered application.
+ * @param callbackToUIThread - If true, all callbacks will occur on the UI thread.
+ * @throws SdlException
+ */
+ public SdlProxyALM(Context context,IProxyListenerALM listener, String appName, String ngnMediaScreenAppName,
+ Vector<String> vrSynonyms, Boolean isMediaApp, SdlMsgVersion sdlMsgVersion,
+ Language languageDesired, Language hmiDisplayLanguageDesired, String appID,
+ String autoActivateID, boolean callbackToUIThread) throws SdlException {
+ super( listener,
+ /*sdl proxy configuration resources*/null,
+ /*enable advanced lifecycle management*/true,
+ appName,
+ /*TTS Name*/null,
+ ngnMediaScreenAppName,
+ vrSynonyms,
+ isMediaApp,
+ sdlMsgVersion,
+ languageDesired,
+ /*HMI Display Language Desired*/hmiDisplayLanguageDesired,
+ /*App Type*/null,
+ /*App ID*/appID,
+ autoActivateID,
+ callbackToUIThread,
+ new MultiplexTransportConfig(context,appID));
+
+ SdlTrace.logProxyEvent("Application constructed SdlProxyALM (using legacy constructor for BT transport) instance passing in: IProxyListener, " +
+ "appName, ngnMediaScreenAppName, vrSynonyms, isMediaApp, sdlMsgVersion, languageDesired, autoActivateID, " +
+ "and callbackToUIThread", SDL_LIB_TRACE_KEY);
+ }
+ /**
+ * @deprecated
+ * Constructor for the SdlProxy object, the proxy for communicating between the App and SDL.
+ *
+ * Takes advantage of the advanced lifecycle management.
+ *
+ * @param listener - Reference to the object in the App listening to callbacks from SDL.
+ * @param appName - Name of the application displayed on SDL.
+ * @param ngnMediaScreenAppName - Name of the application displayed on SDL for Navigation equipped
+ * vehicles. Limited to five characters.
+ * @param vrSynonyms - A vector of strings, all of which can be used as voice commands to
+ * @param isMediaApp - Indicates if the app is a media application.
+ * @param sdlMsgVersion - Indicates the version of SDL SmartDeviceLink Messages desired. Must be less than
+ * or equal to the version of SDL SmartDeviceLink running on the vehicle.
+ * @param languageDesired - Indicates the language desired for the SDL interface.
+ * @param autoActivateID - ID used to re-register previously registered application.
+ * @param callbackToUIThread - If true, all callbacks will occur on the UI thread.
+ * @throws SdlException
+ */
+ @Deprecated
+ public SdlProxyALM(IProxyListenerALM listener, SdlProxyConfigurationResources sdlProxyConfigurationResources,
+ String appName, String ngnMediaScreenAppName, Vector<String> vrSynonyms, Boolean isMediaApp,
+ SdlMsgVersion sdlMsgVersion, Language languageDesired, Language hmiDisplayLanguageDesired,
+ String appID, String autoActivateID,
+ boolean callbackToUIThread) throws SdlException {
+ super( listener,
+ sdlProxyConfigurationResources,
+ /*enable advanced lifecycle management*/true,
+ appName,
+ /*TTS Name*/null,
+ ngnMediaScreenAppName,
+ vrSynonyms,
+ isMediaApp,
+ sdlMsgVersion,
+ languageDesired,
+ /*HMI Display Language Desired*/hmiDisplayLanguageDesired,
+ /*App Type*/null,
+ /*App ID*/appID,
+ autoActivateID,
+ callbackToUIThread,
+ new BTTransportConfig());
+
+ SdlTrace.logProxyEvent("Application constructed SdlProxyALM (using legacy constructor for BT transport) instance passing in: IProxyListener, sdlProxyConfigurationResources, " +
+ "appName, ngnMediaScreenAppName, vrSynonyms, isMediaApp, sdlMsgVersion, languageDesired, autoActivateID, " +
+ "and callbackToUIThread", SDL_LIB_TRACE_KEY);
+ }
+ /**
+ * Constructor for the SdlProxy object, the proxy for communicating between the App and SDL.
+ *
+ * Takes advantage of the advanced lifecycle management.
+ *
+ * @param context - Used to create a multiplexing transport config
+ * @param listener - Reference to the object in the App listening to callbacks from SDL.
+ * @param appName - Name of the application displayed on SDL.
+ * @param ngnMediaScreenAppName - Name of the application displayed on SDL for Navigation equipped
+ * vehicles. Limited to five characters.
+ * @param vrSynonyms - A vector of strings, all of which can be used as voice commands to
+ * @param isMediaApp - Indicates if the app is a media application.
+ * @param sdlMsgVersion - Indicates the version of SDL SmartDeviceLink Messages desired. Must be less than
+ * or equal to the version of SDL SmartDeviceLink running on the vehicle.
+ * @param languageDesired - Indicates the language desired for the SDL interface.
+ * @param autoActivateID - ID used to re-register previously registered application.
+ * @param callbackToUIThread - If true, all callbacks will occur on the UI thread.
+ * @throws SdlException
+ */
+ public SdlProxyALM(Context context,IProxyListenerALM listener, SdlProxyConfigurationResources sdlProxyConfigurationResources,
+ String appName, String ngnMediaScreenAppName, Vector<String> vrSynonyms, Boolean isMediaApp,
+ SdlMsgVersion sdlMsgVersion, Language languageDesired, Language hmiDisplayLanguageDesired,
+ String appID, String autoActivateID,
+ boolean callbackToUIThread) throws SdlException {
+ super( listener,
+ sdlProxyConfigurationResources,
+ /*enable advanced lifecycle management*/true,
+ appName,
+ /*TTS Name*/null,
+ ngnMediaScreenAppName,
+ vrSynonyms,
+ isMediaApp,
+ sdlMsgVersion,
+ languageDesired,
+ /*HMI Display Language Desired*/hmiDisplayLanguageDesired,
+ /*App Type*/null,
+ /*App ID*/appID,
+ autoActivateID,
+ callbackToUIThread,
+ new MultiplexTransportConfig(context,appID));
+
+ SdlTrace.logProxyEvent("Application constructed SdlProxyALM (using legacy constructor for BT transport) instance passing in: IProxyListener, sdlProxyConfigurationResources, " +
+ "appName, ngnMediaScreenAppName, vrSynonyms, isMediaApp, sdlMsgVersion, languageDesired, autoActivateID, " +
+ "and callbackToUIThread", SDL_LIB_TRACE_KEY);
+ }
+
+ @Deprecated
+ public SdlProxyALM(IProxyListenerALM listener, SdlProxyConfigurationResources sdlProxyConfigurationResources,
+ String appName, String ngnMediaScreenAppName, Vector<String> vrSynonyms, Boolean isMediaApp,
+ SdlMsgVersion sdlMsgVersion, Language languageDesired, Language hmiDisplayLanguageDesired,
+ String appID, String autoActivateID, boolean callbackToUIThread, boolean preRegister) throws SdlException {
+ super( listener,
+ sdlProxyConfigurationResources,
+ /*enable advanced lifecycle management*/true,
+ appName,
+ /*TTS Name*/null,
+ ngnMediaScreenAppName,
+ vrSynonyms,
+ isMediaApp,
+ sdlMsgVersion,
+ languageDesired,
+ /*HMI Display Language Desired*/hmiDisplayLanguageDesired,
+ /*App Type*/null,
+ /*App ID*/appID,
+ autoActivateID,
+ callbackToUIThread,
+ preRegister,
+ new BTTransportConfig());
+
+ SdlTrace.logProxyEvent("Application constructed SdlProxyALM (using legacy constructor for BT transport) instance passing in: IProxyListener, sdlProxyConfigurationResources, " +
+ "appName, ngnMediaScreenAppName, vrSynonyms, isMediaApp, sdlMsgVersion, languageDesired, autoActivateID, " +
+ "callbackToUIThread and version", SDL_LIB_TRACE_KEY);
+ }
+
+ public SdlProxyALM(Context context,IProxyListenerALM listener, SdlProxyConfigurationResources sdlProxyConfigurationResources,
+ String appName, String ngnMediaScreenAppName, Vector<String> vrSynonyms, Boolean isMediaApp,
+ SdlMsgVersion sdlMsgVersion, Language languageDesired, Language hmiDisplayLanguageDesired,
+ String appID, String autoActivateID, boolean callbackToUIThread, boolean preRegister) throws SdlException {
+ super( listener,
+ sdlProxyConfigurationResources,
+ /*enable advanced lifecycle management*/true,
+ appName,
+ /*TTS Name*/null,
+ ngnMediaScreenAppName,
+ vrSynonyms,
+ isMediaApp,
+ sdlMsgVersion,
+ languageDesired,
+ /*HMI Display Language Desired*/hmiDisplayLanguageDesired,
+ /*App Type*/null,
+ /*App ID*/appID,
+ autoActivateID,
+ callbackToUIThread,
+ preRegister,
+ new MultiplexTransportConfig(context,appID));
+
+ SdlTrace.logProxyEvent("Application constructed SdlProxyALM (using legacy constructor for BT transport) instance passing in: IProxyListener, sdlProxyConfigurationResources, " +
+ "appName, ngnMediaScreenAppName, vrSynonyms, isMediaApp, sdlMsgVersion, languageDesired, autoActivateID, " +
+ "callbackToUIThread and version", SDL_LIB_TRACE_KEY);
+ }
+
+ /********************************************** TRANSPORT SWITCHING SUPPORT *****************************************/
+
+ /**
+ * Constructor for the SdlProxy object, the proxy for communicating between the App and SDL via specified transport.
+ *
+ * Takes advantage of the advanced lifecycle management.
+ *
+ * @param listener Reference to the object in the App listening to callbacks from SDL.
+ * @param appName Name of the application displayed on SDL.
+ * @param isMediaApp Indicates if the app is a media application.
+ * @param transportConfig Initial configuration for transport.
+ * @throws SdlException
+ */
+ public SdlProxyALM(IProxyListenerALM listener, String appName, Boolean isMediaApp,
+ Language languageDesired, Language hmiDisplayLanguageDesired, String appID,
+ BaseTransportConfig transportConfig) throws SdlException {
+ super( listener,
+ /*sdl proxy configuration resources*/null,
+ /*enable advanced lifecycle management*/true,
+ appName,
+ /*TTS Name*/null,
+ /*ngn media app*/null,
+ /*vr synonyms*/null,
+ /*is media app*/isMediaApp,
+ /*sdlMsgVersion*/null,
+ /*language desired*/languageDesired,
+ /*HMI Display Language Desired*/hmiDisplayLanguageDesired,
+ /*App Type*/null,
+ /*App ID*/appID,
+ /*autoActivateID*/null,
+ /*callbackToUIThread*/ false,
+ transportConfig);
+
+ SdlTrace.logProxyEvent("Application constructed SdlProxyALM (using new constructor with specified transport) instance passing in: IProxyListener, appName, and isMediaApp.", SDL_LIB_TRACE_KEY);
+ }
+
+ /**
+ * Constructor for the SdlProxy object, the proxy for communicating between the App and SDL via specified transport.
+ *
+ * Takes advantage of the advanced lifecycle management.
+ *
+ * @param listener Reference to the object in the App listening to callbacks from SDL.
+ * @param appName Name of the application displayed on SDL.
+ * @param ngnMediaScreenAppName Name of the application displayed on SDL for Navigation equipped
+ * vehicles. Limited to five characters.
+ * @param vrSynonyms A vector of strings, all of which can be used as voice commands to
+ * @param isMediaApp Indicates if the app is a media application.
+ * @param sdlMsgVersion Indicates the version of SDL SmartDeviceLink Messages desired. Must be less than
+ * or equal to the version of SDL SmartDeviceLink running on the vehicle.
+ * @param languageDesired Indicates the language desired for the SDL interface.
+ * @param autoActivateID ID used to re-register previously registered application.
+ * @param transportConfig Initial configuration for transport.
+ * @throws SdlException
+ */
+ public SdlProxyALM(IProxyListenerALM listener, String appName, String ngnMediaScreenAppName,
+ Vector<String> vrSynonyms, Boolean isMediaApp, SdlMsgVersion sdlMsgVersion,
+ Language languageDesired, Language hmiDisplayLanguageDesired, String appID,
+ String autoActivateID, TransportType transportType, BaseTransportConfig transportConfig) throws SdlException {
+ super( listener,
+ /*sdl proxy configuration resources*/null,
+ /*enable advanced lifecycle management*/true,
+ appName,
+ /*TTS Name*/null,
+ ngnMediaScreenAppName,
+ vrSynonyms,
+ isMediaApp,
+ sdlMsgVersion,
+ languageDesired,
+ /*HMI Display Language Desired*/hmiDisplayLanguageDesired,
+ /*App Type*/null,
+ /*App ID*/appID,
+ autoActivateID,
+ /*callbackToUIThread*/ false,
+ transportConfig);
+
+ SdlTrace.logProxyEvent("Application constructed SdlProxyALM (using new constructor with specified transport) instance passing in: IProxyListener, appName, ngnMediaScreenAppName, " +
+ "vrSynonyms, isMediaApp, sdlMsgVersion, languageDesired, and autoActivateID.", SDL_LIB_TRACE_KEY);
+ }
+
+ /**
+ * Constructor for the SdlProxy object, the proxy for communicating between the App and SDL via specified transport.
+ *
+ * Takes advantage of the advanced lifecycle management.
+ *
+ * @param listener Reference to the object in the App listening to callbacks from SDL.
+ * @param appName Name of the application displayed on SDL.
+ * @param ngnMediaScreenAppName Name of the application displayed on SDL for Navigation equipped
+ * vehicles. Limited to five characters.
+ * @param vrSynonyms A vector of strings, all of which can be used as voice commands to
+ * @param isMediaApp Indicates if the app is a media application.
+ * @param sdlMsgVersion Indicates the version of SDL SmartDeviceLink Messages desired. Must be less than
+ * or equal to the version of SDL SmartDeviceLink running on the vehicle.
+ * @param languageDesired Indicates the language desired for the SDL interface.
+ * @param autoActivateID ID used to re-register previously registered application.
+ * @param transportConfig Initial configuration for transport.
+ * @throws SdlException
+ */
+ public SdlProxyALM(IProxyListenerALM listener, SdlProxyConfigurationResources sdlProxyConfigurationResources,
+ String appName, String ngnMediaScreenAppName, Vector<String> vrSynonyms,
+ Boolean isMediaApp, SdlMsgVersion sdlMsgVersion, Language languageDesired,
+ Language hmiDisplayLanguageDesired, String appID, String autoActivateID,
+ BaseTransportConfig transportConfig) throws SdlException {
+ super( listener,
+ sdlProxyConfigurationResources,
+ /*enable advanced lifecycle management*/true,
+ appName,
+ /*TTS Name*/null,
+ ngnMediaScreenAppName,
+ vrSynonyms,
+ isMediaApp,
+ sdlMsgVersion,
+ languageDesired,
+ /*HMI Display Language Desired*/hmiDisplayLanguageDesired,
+ /*App Type*/null,
+ /*App ID*/appID,
+ autoActivateID,
+ /*callbackToUIThread*/ false,
+ transportConfig);
+
+ SdlTrace.logProxyEvent("Application constructed SdlProxyALM (using new constructor with specified transport) instance passing in: IProxyListener, sdlProxyConfigurationResources, " +
+ "appName, ngnMediaScreenAppName, vrSynonyms, isMediaApp, sdlMsgVersion, languageDesired, and autoActivateID.", SDL_LIB_TRACE_KEY);
+ }
+
+ /**
+ * Constructor for the SdlProxy object, the proxy for communicating between the App and SDL via specified transport.
+ *
+ * Takes advantage of the advanced lifecycle management.
+ *
+ * @param listener Reference to the object in the App listening to callbacks from SDL.
+ * @param appName Name of the application displayed on SDL.
+ * @param ngnMediaScreenAppName Name of the application displayed on SDL for Navigation equipped
+ * vehicles. Limited to five characters.
+ * @param vrSynonyms A vector of strings, all of which can be used as voice commands to
+ * @param isMediaApp Indicates if the app is a media application.
+ * @param sdlMsgVersion Indicates the version of SDL SmartDeviceLink Messages desired. Must be less than
+ * or equal to the version of SDL SmartDeviceLink running on the vehicle.
+ * @param languageDesired Indicates the language desired for the SDL interface.
+ * @param autoActivateID ID used to re-register previously registered application.
+ * @param callbackToUIThread If true, all callbacks will occur on the UI thread.
+ * @param transportConfig Initial configuration for transport.
+ * @throws SdlException
+ */
+ public SdlProxyALM(IProxyListenerALM listener, String appName, String ngnMediaScreenAppName,
+ Vector<String> vrSynonyms, Boolean isMediaApp, SdlMsgVersion sdlMsgVersion,
+ Language languageDesired, Language hmiDisplayLanguageDesired, String appID,
+ String autoActivateID, boolean callbackToUIThread,
+ BaseTransportConfig transportConfig) throws SdlException {
+ super( listener,
+ /*sdl proxy configuration resources*/null,
+ /*enable advanced lifecycle management*/true,
+ appName,
+ /*TTS Name*/null,
+ ngnMediaScreenAppName,
+ vrSynonyms,
+ isMediaApp,
+ sdlMsgVersion,
+ languageDesired,
+ /*HMI Display Language Desired*/hmiDisplayLanguageDesired,
+ /*App Type*/null,
+ /*App ID*/appID,
+ autoActivateID,
+ callbackToUIThread,
+ transportConfig);
+
+ SdlTrace.logProxyEvent("Application constructed SdlProxyALM (using new constructor with specified transport) instance passing in: IProxyListener, " +
+ "appName, ngnMediaScreenAppName, vrSynonyms, isMediaApp, sdlMsgVersion, languageDesired, autoActivateID, " +
+ "and callbackToUIThread", SDL_LIB_TRACE_KEY);
+ }
+
+ /**
+ * Constructor for the SdlProxy object, the proxy for communicating between the App and SDL via specified transport.
+ *
+ * Takes advantage of the advanced lifecycle management.
+ *
+ * @param listener Reference to the object in the App listening to callbacks from SDL.
+ * @param appName Name of the application displayed on SDL.
+ * @param ngnMediaScreenAppName Name of the application displayed on SDL for Navigation equipped
+ * vehicles. Limited to five characters.
+ * @param vrSynonyms A vector of strings, all of which can be used as voice commands too
+ * @param isMediaApp Indicates if the app is a media application.
+ * @param sdlMsgVersion Indicates the version of SDL SmartDeviceLink Messages desired. Must be less than
+ * or equal to the version of SDL SmartDeviceLink running on the vehicle.
+ * @param languageDesired Indicates the language desired for the SDL interface.
+ * @param autoActivateID ID used to re-register previously registered application.
+ * @param callbackToUIThread If true, all callbacks will occur on the UI thread.
+ * @param transportConfig Initial configuration for transport.
+ * @throws SdlException
+ */
+ public SdlProxyALM(IProxyListenerALM listener, SdlProxyConfigurationResources sdlProxyConfigurationResources,
+ String appName, String ngnMediaScreenAppName, Vector<String> vrSynonyms, Boolean isMediaApp,
+ SdlMsgVersion sdlMsgVersion, Language languageDesired, Language hmiDisplayLanguageDesired,
+ String appID, String autoActivateID,
+ boolean callbackToUIThread, BaseTransportConfig transportConfig) throws SdlException {
+ super( listener,
+ sdlProxyConfigurationResources,
+ /*enable advanced lifecycle management*/true,
+ appName,
+ /*TTS Name*/null,
+ ngnMediaScreenAppName,
+ vrSynonyms,
+ isMediaApp,
+ sdlMsgVersion,
+ languageDesired,
+ /*HMI Display Language Desired*/hmiDisplayLanguageDesired,
+ /*App Type*/null,
+ /*App ID*/appID,
+ autoActivateID,
+ callbackToUIThread,
+ transportConfig);
+
+ SdlTrace.logProxyEvent("Application constructed SdlProxyALM (using new constructor with specified transport) instance passing in: IProxyListener, sdlProxyConfigurationResources, " +
+ "appName, ngnMediaScreenAppName, vrSynonyms, isMediaApp, sdlMsgVersion, languageDesired, autoActivateID, " +
+ "and callbackToUIThread", SDL_LIB_TRACE_KEY);
+ }
+
+ /**
+ * Constructor for the SdlProxy object, the proxy for communicating between the App and SDL via specified transport.
+ *
+ * Takes advantage of the advanced lifecycle management.
+ *
+ * @param listener Reference to the object in the App listening to callbacks from SDL.
+ * @param sdlProxyConfigurationResources Proxy configuration resources.
+ * @param appName Name of the application displayed on SDL.
+ * @param ngnMediaScreenAppName Name of the application displayed on SDL for Navigation equipped
+ * vehicles. Limited to five characters.
+ * @param vrSynonyms A vector of strings, all of which can be used as voice commands too
+ * @param isMediaApp Indicates if the app is a media application.
+ * @param sdlMsgVersion Indicates the version of SDL SmartDeviceLink Messages desired. Must be less than
+ * or equal to the version of SDL SmartDeviceLink running on the vehicle.
+ * @param languageDesired Indicates the language desired for the SDL interface.
+ * @param hmiDisplayLanguageDesired Desired language in HMI.
+ * @param appID Identifier of the client application.
+ * @param autoActivateID ID used to re-register previously registered application.
+ * @param callbackToUIThread If true, all callbacks will occur on the UI thread.
+ * @param preRegister Flag that indicates that client should be pre-registred or not
+ * @param transportConfig Initial configuration for transport.
+ * @throws SdlException
+ */
+ public SdlProxyALM(IProxyListenerALM listener, SdlProxyConfigurationResources sdlProxyConfigurationResources,
+ String appName, String ngnMediaScreenAppName, Vector<String> vrSynonyms, Boolean isMediaApp,
+ SdlMsgVersion sdlMsgVersion, Language languageDesired, Language hmiDisplayLanguageDesired,
+ String appID, String autoActivateID, boolean callbackToUIThread, boolean preRegister,
+ BaseTransportConfig transportConfig) throws SdlException {
+ super( listener,
+ sdlProxyConfigurationResources,
+ /*enable advanced lifecycle management*/true,
+ appName,
+ /*TTS Name*/null,
+ ngnMediaScreenAppName,
+ vrSynonyms,
+ isMediaApp,
+ sdlMsgVersion,
+ languageDesired,
+ /*HMI Display Language Desired*/hmiDisplayLanguageDesired,
+ /*App Type*/null,
+ /*App ID*/appID,
+ autoActivateID,
+ callbackToUIThread,
+ preRegister,
+ transportConfig);
+
+ SdlTrace.logProxyEvent("Application constructed SdlProxyALM (using new constructor with specified transport) instance passing in: IProxyListener, sdlProxyConfigurationResources, " +
+ "appName, ngnMediaScreenAppName, vrSynonyms, isMediaApp, sdlMsgVersion, languageDesired, autoActivateID, " +
+ "callbackToUIThread and version", SDL_LIB_TRACE_KEY);
+ }
+
+ /**
+ * @deprecated
+ * Constructor for the SdlProxy object, the proxy for communicating between the App and SDL via specified transport.
+ *
+ * Takes advantage of the advanced lifecycle management.
+ *
+ * @param listener Reference to the object in the App listening to callbacks from SDL.
+ * @param appName Name of the application displayed on SDL.
+ * @param isMediaApp Indicates if the app is a media application.
+ * @param languageDesired Indicates the language desired for the SDL interface.
+ * @param hmiDisplayLanguageDesired Desired language in HMI.
+ * @param appID Identifier of the client application.
+ * @param callbackToUIThread If true, all callbacks will occur on the UI thread.
+ * @param preRegister Flag that indicates that client should be pre-registred or not
+ * @throws SdlException
+ */
+ @Deprecated
+ public SdlProxyALM(IProxyListenerALM listener, String appName, Boolean isMediaApp,Language languageDesired, Language hmiDisplayLanguageDesired,
+ String appID, boolean callbackToUIThread, boolean preRegister) throws SdlException
+ {
+ super( listener,
+ /*sdlProxyConfigurationResources*/null,
+ /*enable advanced lifecycle management*/true,
+ appName,
+ /*ttsName*/null,
+ /*ngnMediaScreenAppName*/null,
+ /*vrSynonyms*/null,
+ isMediaApp,
+ /*sdlMsgVersion*/null,
+ languageDesired,
+ hmiDisplayLanguageDesired,
+ /*App Type*/null,
+ /*App ID*/appID,
+ /*autoActivateID*/null,
+ callbackToUIThread,
+ preRegister,
+ new BTTransportConfig());
+
+ SdlTrace.logProxyEvent("Application constructed SdlProxyALM (using legacy constructor for BT transport) instance passing in: IProxyListener, " +
+ "appName, isMediaApp, languageDesired, hmiDisplayLanguageDesired" + "callbackToUIThread and version", SDL_LIB_TRACE_KEY);
+ }
+ /**
+ * Constructor for the SdlProxy object, the proxy for communicating between the App and SDL via specified transport.
+ *
+ * Takes advantage of the advanced lifecycle management.
+ *
+ * @param context - Used to create a multiplexing transport config
+ * @param listener Reference to the object in the App listening to callbacks from SDL.
+ * @param appName Name of the application displayed on SDL.
+ * @param isMediaApp Indicates if the app is a media application.
+ * @param languageDesired Indicates the language desired for the SDL interface.
+ * @param hmiDisplayLanguageDesired Desired language in HMI.
+ * @param appID Identifier of the client application.
+ * @param callbackToUIThread If true, all callbacks will occur on the UI thread.
+ * @param preRegister Flag that indicates that client should be pre-registred or not
+ * @throws SdlException
+ */
+ public SdlProxyALM(Context context,IProxyListenerALM listener, String appName, Boolean isMediaApp,Language languageDesired, Language hmiDisplayLanguageDesired,
+ String appID, boolean callbackToUIThread, boolean preRegister) throws SdlException
+ {
+ super( listener,
+ /*sdlProxyConfigurationResources*/null,
+ /*enable advanced lifecycle management*/true,
+ appName,
+ /*ttsName*/null,
+ /*ngnMediaScreenAppName*/null,
+ /*vrSynonyms*/null,
+ isMediaApp,
+ /*sdlMsgVersion*/null,
+ languageDesired,
+ hmiDisplayLanguageDesired,
+ /*App Type*/null,
+ /*App ID*/appID,
+ /*autoActivateID*/null,
+ callbackToUIThread,
+ preRegister,
+ new MultiplexTransportConfig(context,appID));
+
+ SdlTrace.logProxyEvent("Application constructed SdlProxyALM (using legacy constructor for BT transport) instance passing in: IProxyListener, " +
+ "appName, isMediaApp, languageDesired, hmiDisplayLanguageDesired" + "callbackToUIThread and version", SDL_LIB_TRACE_KEY);
+ }
+
+ /**
+ * @deprecated
+ * Constructor for the SdlProxy object, the proxy for communicating between the App and SDL via specified transport.
+ *
+ * Takes advantage of the advanced lifecycle management.
+ *
+ * @param listener Reference to the object in the App listening to callbacks from SDL.
+ * @param appName Name of the application displayed on SDL.
+ * @param isMediaApp Indicates if the app is a media application.
+ * @param appID Identifier of the client application.
+ * @throws SdlException
+ */
+ @Deprecated
+ public SdlProxyALM(IProxyListenerALM listener, String appName, Boolean isMediaApp,String appID) throws SdlException {
+ super( listener,
+ /*sdlProxyConfigurationResources*/null,
+ /*enable advanced lifecycle management*/true,
+ appName,
+ /*ttsName*/null,
+ /*ngnMediaScreenAppName*/null,
+ /*vrSynonyms*/null,
+ isMediaApp,
+ /*sdlMsgVersion*/null,
+ /*languageDesired*/null,
+ /*hmiDisplayLanguageDesired*/null,
+ /*App Type*/null,
+ /*App ID*/appID,
+ /*autoActivateID*/null,
+ false,
+ false,
+ new BTTransportConfig());
+
+ SdlTrace.logProxyEvent("Application constructed SdlProxyALM (using legacy constructor for BT transport) instance passing in: IProxyListener, " +
+ "appName, isMediaApp, appID", SDL_LIB_TRACE_KEY);
+ }
+
+ /**
+ * Constructor for the SdlProxy object, the proxy for communicating between the App and SDL via specified transport.
+ *
+ * Takes advantage of the advanced lifecycle management.
+ *
+ * @param context - Used to create a multiplexing transport config
+ * @param listener Reference to the object in the App listening to callbacks from SDL.
+ * @param appName Name of the application displayed on SDL.
+ * @param isMediaApp Indicates if the app is a media application.
+ * @param appID Identifier of the client application.
+ * @throws SdlException
+ */
+ public SdlProxyALM(Context context,IProxyListenerALM listener, String appName, Boolean isMediaApp,String appID) throws SdlException {
+ super( listener,
+ /*sdlProxyConfigurationResources*/null,
+ /*enable advanced lifecycle management*/true,
+ appName,
+ /*ttsName*/null,
+ /*ngnMediaScreenAppName*/null,
+ /*vrSynonyms*/null,
+ isMediaApp,
+ /*sdlMsgVersion*/null,
+ /*languageDesired*/null,
+ /*hmiDisplayLanguageDesired*/null,
+ /*App Type*/null,
+ /*App ID*/appID,
+ /*autoActivateID*/null,
+ false,
+ false,
+ new MultiplexTransportConfig(context,appID));
+
+ SdlTrace.logProxyEvent("Application constructed SdlProxyALM (using legacy constructor for BT transport) instance passing in: IProxyListener, " +
+ "appName, isMediaApp, appID", SDL_LIB_TRACE_KEY);
+ }
+
+ /**
+ * @deprecated
+ * Constructor for the SdlProxy object, the proxy for communicating between the App and SDL via specified transport.
+ *
+ * Takes advantage of the advanced lifecycle management.
+ *
+ * @param listener Reference to the object in the App listening to callbacks from SDL.
+ * @param sdlProxyConfigurationResources Proxy configuration resources.
+ * @param appName Name of the application displayed on SDL.
+ * @param isMediaApp Indicates if the app is a media application.
+ * @param appID Identifier of the client application.
+ * @throws SdlException
+ */
+ @Deprecated
+ public SdlProxyALM(IProxyListenerALM listener, SdlProxyConfigurationResources sdlProxyConfigurationResources, String appName, Boolean isMediaApp,String appID) throws SdlException {
+ super( listener,
+ sdlProxyConfigurationResources,
+ /*enable advanced lifecycle management*/true,
+ appName,
+ /*ttsName*/null,
+ /*ngnMediaScreenAppName*/null,
+ /*vrSynonyms*/null,
+ isMediaApp,
+ /*sdlMsgVersion*/null,
+ /*languageDesired*/null,
+ /*hmiDisplayLanguageDesired*/null,
+ /*App Type*/null,
+ /*App ID*/appID,
+ /*autoActivateID*/null,
+ false,
+ false,
+ new BTTransportConfig());
+
+ SdlTrace.logProxyEvent("Application constructed SdlProxyALM (using legacy constructor for BT transport) instance passing in: IProxyListener, " +
+ "sdlProxyConfigurationResources, appName, isMediaApp, appID", SDL_LIB_TRACE_KEY);
+ }
+
+ /**
+ * Constructor for the SdlProxy object, the proxy for communicating between the App and SDL via specified transport.
+ *
+ * Takes advantage of the advanced lifecycle management.
+ *
+ * @param context - Used to create a multiplexing transport config
+ * @param listener Reference to the object in the App listening to callbacks from SDL.
+ * @param sdlProxyConfigurationResources Proxy configuration resources.
+ * @param appName Name of the application displayed on SDL.
+ * @param isMediaApp Indicates if the app is a media application.
+ * @param appID Identifier of the client application.
+ * @throws SdlException
+ */
+ public SdlProxyALM(Context context, IProxyListenerALM listener, SdlProxyConfigurationResources sdlProxyConfigurationResources, String appName, Boolean isMediaApp,String appID) throws SdlException {
+ super( listener,
+ sdlProxyConfigurationResources,
+ /*enable advanced lifecycle management*/true,
+ appName,
+ /*ttsName*/null,
+ /*ngnMediaScreenAppName*/null,
+ /*vrSynonyms*/null,
+ isMediaApp,
+ /*sdlMsgVersion*/null,
+ /*languageDesired*/null,
+ /*hmiDisplayLanguageDesired*/null,
+ /*App Type*/null,
+ /*App ID*/appID,
+ /*autoActivateID*/null,
+ false,
+ false,
+ new MultiplexTransportConfig(context,appID));
+
+ SdlTrace.logProxyEvent("Application constructed SdlProxyALM (using legacy constructor for BT transport) instance passing in: IProxyListener, " +
+ "sdlProxyConfigurationResources, appName, isMediaApp, appID", SDL_LIB_TRACE_KEY);
+ }
+
+ public SdlProxyALM(IProxyListenerALM listener, String appName, Boolean isMediaApp,String appID,BaseTransportConfig transportConfig) throws SdlException {
+ super( listener,
+ /*sdlProxyConfigurationResources*/null,
+ /*enable advanced lifecycle management*/true,
+ appName,
+ /*ttsName*/null,
+ /*ngnMediaScreenAppName*/null,
+ /*vrSynonyms*/null,
+ isMediaApp,
+ /*sdlMsgVersion*/null,
+ /*languageDesired*/null,
+ /*hmiDisplayLanguageDesired*/null,
+ /*App Type*/null,
+ /*App ID*/appID,
+ /*autoActivateID*/null,
+ false,
+ false,
+ transportConfig);
+
+ SdlTrace.logProxyEvent("Application constructed SdlProxyALM (using legacy constructor for BT transport) instance passing in: IProxyListener, " +
+ "appName, isMediaApp, appID", SDL_LIB_TRACE_KEY);
+ }
+
+ /**
+ * @deprecated
+ * Constructor for the SdlProxy object, the proxy for communicating between the App and SDL via specified transport.
+ *
+ * Takes advantage of the advanced lifecycle management.
+ *
+ * @param listener Reference to the object in the App listening to callbacks from SDL.
+ * @param appName Name of the application displayed on SDL.
+ * @param isMediaApp Indicates if the app is a media application.
+ * @param appID Identifier of the client application.
+ * @param callbackToUIThread If true, all callbacks will occur on the UI thread.
+ * @param preRegister Flag that indicates that client should be pre-registred or not
+ * @throws SdlException
+ */
+ @Deprecated
+ public SdlProxyALM(IProxyListenerALM listener, String appName, Boolean isMediaApp,String appID,
+ boolean callbackToUIThread, boolean preRegister) throws SdlException {
+ super( listener,
+ /*sdlProxyConfigurationResources*/null,
+ /*enable advanced lifecycle management*/true,
+ appName,
+ /*ttsName*/null,
+ /*ngnMediaScreenAppName*/null,
+ /*vrSynonyms*/null,
+ isMediaApp,
+ /*sdlMsgVersion*/null,
+ /*languageDesired*/null,
+ /*hmiDisplayLanguageDesired*/null,
+ /*App Type*/null,
+ /*App ID*/appID,
+ /*autoActivateID*/null,
+ callbackToUIThread,
+ preRegister,
+ new BTTransportConfig());
+
+ SdlTrace.logProxyEvent("Application constructed SdlProxyALM (using legacy constructor for BT transport) instance passing in: IProxyListener, " +
+ "appName, isMediaApp, " + "callbackToUIThread and version", SDL_LIB_TRACE_KEY);
+ }
+ /**
+ * Constructor for the SdlProxy object, the proxy for communicating between the App and SDL via specified transport.
+ *
+ * Takes advantage of the advanced lifecycle management.
+ *
+ * @param context - Used to create a multiplexing transport config
+ * @param listener Reference to the object in the App listening to callbacks from SDL.
+ * @param appName Name of the application displayed on SDL.
+ * @param isMediaApp Indicates if the app is a media application.
+ * @param appID Identifier of the client application.
+ * @param callbackToUIThread If true, all callbacks will occur on the UI thread.
+ * @param preRegister Flag that indicates that client should be pre-registred or not
+ * @throws SdlException
+ */
+ public SdlProxyALM(Context context,IProxyListenerALM listener, String appName, Boolean isMediaApp,String appID,
+ boolean callbackToUIThread, boolean preRegister) throws SdlException {
+ super( listener,
+ /*sdlProxyConfigurationResources*/null,
+ /*enable advanced lifecycle management*/true,
+ appName,
+ /*ttsName*/null,
+ /*ngnMediaScreenAppName*/null,
+ /*vrSynonyms*/null,
+ isMediaApp,
+ /*sdlMsgVersion*/null,
+ /*languageDesired*/null,
+ /*hmiDisplayLanguageDesired*/null,
+ /*App Type*/null,
+ /*App ID*/appID,
+ /*autoActivateID*/null,
+ callbackToUIThread,
+ preRegister,
+ new MultiplexTransportConfig(context,appID));
+
+ SdlTrace.logProxyEvent("Application constructed SdlProxyALM (using legacy constructor for BT transport) instance passing in: IProxyListener, " +
+ "appName, isMediaApp, " + "callbackToUIThread and version", SDL_LIB_TRACE_KEY);
+ }
+
+ /**
+ * Constructor for the SdlProxy object, the proxy for communicating between the App and SDL via specified transport.
+ *
+ * Takes advantage of the advanced lifecycle management.
+ * @param appService Reference to the apps service object.
+ * @param listener Reference to the object in the App listening to callbacks from SDL.
+ * @param sdlProxyConfigurationResources Proxy configuration resources.
+ * @param appName Name of the application displayed on SDL.
+ * @param ttsName TTS name.
+ * @param ngnMediaScreenAppName Name of the application displayed on SDL for Navigation equipped
+ * vehicles. Limited to five characters.
+ * @param vrSynonyms A vector of strings, all of which can be used as voice commands too
+ * @param isMediaApp Indicates if the app is a media application.
+ * @param sdlMsgVersion Indicates the version of SDL SmartDeviceLink Messages desired. Must be less than
+ * or equal to the version of SDL SmartDeviceLink running on the vehicle.
+ * @param languageDesired Indicates the language desired for the SDL interface.
+ * @param hmiDisplayLanguageDesired Desired language in HMI.
+ * @param appID Identifier of the client application.
+ * @param autoActivateID ID used to re-register previously registered application.
+ * @param callbackToUIThread If true, all callbacks will occur on the UI thread.
+ * @param preRegister Flag that indicates that client should be pre-registred or not
+ * @throws SdlException
+ */
+ public SdlProxyALM(Service appService, IProxyListenerALM listener, SdlProxyConfigurationResources sdlProxyConfigurationResources,
+ String appName, Vector<TTSChunk> ttsName, String ngnMediaScreenAppName, Vector<String> vrSynonyms, Boolean isMediaApp,
+ SdlMsgVersion sdlMsgVersion, Language languageDesired, Language hmiDisplayLanguageDesired,
+ String appID, String autoActivateID, boolean callbackToUIThread, boolean preRegister) throws SdlException {
+ super( listener,
+ sdlProxyConfigurationResources,
+ /*enable advanced lifecycle management*/true,
+ appName,
+ ttsName,
+ ngnMediaScreenAppName,
+ vrSynonyms,
+ isMediaApp,
+ sdlMsgVersion,
+ languageDesired,
+ /*HMI Display Language Desired*/hmiDisplayLanguageDesired,
+ /*App Type*/null,
+ /*App ID*/appID,
+ autoActivateID,
+ callbackToUIThread,
+ preRegister,
+ new MultiplexTransportConfig(appService.getBaseContext(),appID));
+
+ this.setAppService(appService);
+ this.sendTransportBroadcast();
+
+ SdlTrace.logProxyEvent("Application constructed SdlProxyALM (using legacy constructor for BT transport) instance passing in: IProxyListener, sdlProxyConfigurationResources, " +
+ "appName, ngnMediaScreenAppName, vrSynonyms, isMediaApp, sdlMsgVersion, languageDesired, autoActivateID, " +
+ "callbackToUIThread and version", SDL_LIB_TRACE_KEY);
+ }
+
+
+ public SdlProxyALM(Service appService, IProxyListenerALM listener, SdlProxyConfigurationResources sdlProxyConfigurationResources,
+ String appName, Vector<TTSChunk> ttsName, String ngnMediaScreenAppName, Vector<String> vrSynonyms, Boolean isMediaApp,
+ SdlMsgVersion sdlMsgVersion, Language languageDesired, Language hmiDisplayLanguageDesired,
+ String appID, String autoActivateID, boolean callbackToUIThread, boolean preRegister, BaseTransportConfig transportConfig) throws SdlException {
+ super( listener,
+ sdlProxyConfigurationResources,
+ /*enable advanced lifecycle management*/true,
+ appName,
+ ttsName,
+ ngnMediaScreenAppName,
+ vrSynonyms,
+ isMediaApp,
+ sdlMsgVersion,
+ languageDesired,
+ /*HMI Display Language Desired*/hmiDisplayLanguageDesired,
+ /*App Type*/null,
+ /*App ID*/appID,
+ autoActivateID,
+ callbackToUIThread,
+ preRegister,
+ transportConfig);
+
+ this.setAppService(appService);
+ this.sendTransportBroadcast();
+
+ SdlTrace.logProxyEvent("Application constructed SdlProxyALM (using legacy constructor for BT transport) instance passing in: IProxyListener, sdlProxyConfigurationResources, " +
+ "appName, ngnMediaScreenAppName, vrSynonyms, isMediaApp, sdlMsgVersion, languageDesired, autoActivateID, " +
+ "callbackToUIThread and version", SDL_LIB_TRACE_KEY);
+ }
+
+
+
+ /**
+ * @deprecated
+ * Constructor for the SdlProxy object, the proxy for communicating between the App and SDL via specified transport.
+ *
+ * Takes advantage of the advanced lifecycle management.
+ *
+ * @param listener Reference to the object in the App listening to callbacks from SDL.
+ * @param sdlProxyConfigurationResources Proxy configuration resources.
+ * @param appName Name of the application displayed on SDL.
+ * @param ttsName TTS name.
+ * @param ngnMediaScreenAppName Name of the application displayed on SDL for Navigation equipped
+ * vehicles. Limited to five characters.
+ * @param vrSynonyms A vector of strings, all of which can be used as voice commands too
+ * @param isMediaApp Indicates if the app is a media application.
+ * @param sdlMsgVersion Indicates the version of SDL SmartDeviceLink Messages desired. Must be less than
+ * or equal to the version of SDL SmartDeviceLink running on the vehicle.
+ * @param languageDesired Indicates the language desired for the SDL interface.
+ * @param hmiDisplayLanguageDesired Desired language in HMI.
+ * @param appID Identifier of the client application.
+ * @param autoActivateID ID used to re-register previously registered application.
+ * @param callbackToUIThread If true, all callbacks will occur on the UI thread.
+ * @param preRegister Flag that indicates that client should be pre-registred or not
+ * @throws SdlException
+ */
+ @Deprecated
+ public SdlProxyALM(IProxyListenerALM listener, SdlProxyConfigurationResources sdlProxyConfigurationResources,
+ String appName, Vector<TTSChunk> ttsName, String ngnMediaScreenAppName, Vector<String> vrSynonyms, Boolean isMediaApp,
+ SdlMsgVersion sdlMsgVersion, Language languageDesired, Language hmiDisplayLanguageDesired,
+ String appID, String autoActivateID, boolean callbackToUIThread, boolean preRegister) throws SdlException {
+ super( listener,
+ sdlProxyConfigurationResources,
+ /*enable advanced lifecycle management*/true,
+ appName,
+ ttsName,
+ ngnMediaScreenAppName,
+ vrSynonyms,
+ isMediaApp,
+ sdlMsgVersion,
+ languageDesired,
+ /*HMI Display Language Desired*/hmiDisplayLanguageDesired,
+ /*App Type*/null,
+ /*App ID*/appID,
+ autoActivateID,
+ callbackToUIThread,
+ preRegister,
+ new BTTransportConfig());
+
+ SdlTrace.logProxyEvent("Application constructed SdlProxyALM (using legacy constructor for BT transport) instance passing in: IProxyListener, sdlProxyConfigurationResources, " +
+ "appName, ngnMediaScreenAppName, vrSynonyms, isMediaApp, sdlMsgVersion, languageDesired, autoActivateID, " +
+ "callbackToUIThread and version", SDL_LIB_TRACE_KEY);
+ }
+ /**
+ * Constructor for the SdlProxy object, the proxy for communicating between the App and SDL via specified transport.
+ *
+ * Takes advantage of the advanced lifecycle management.
+ *
+ * @param context - Used to create a multiplexing transport config
+ * @param listener Reference to the object in the App listening to callbacks from SDL.
+ * @param sdlProxyConfigurationResources Proxy configuration resources.
+ * @param appName Name of the application displayed on SDL.
+ * @param ttsName TTS name.
+ * @param ngnMediaScreenAppName Name of the application displayed on SDL for Navigation equipped
+ * vehicles. Limited to five characters.
+ * @param vrSynonyms A vector of strings, all of which can be used as voice commands too
+ * @param isMediaApp Indicates if the app is a media application.
+ * @param sdlMsgVersion Indicates the version of SDL SmartDeviceLink Messages desired. Must be less than
+ * or equal to the version of SDL SmartDeviceLink running on the vehicle.
+ * @param languageDesired Indicates the language desired for the SDL interface.
+ * @param hmiDisplayLanguageDesired Desired language in HMI.
+ * @param appID Identifier of the client application.
+ * @param autoActivateID ID used to re-register previously registered application.
+ * @param callbackToUIThread If true, all callbacks will occur on the UI thread.
+ * @param preRegister Flag that indicates that client should be pre-registred or not
+ * @throws SdlException
+ */
+ public SdlProxyALM(Context context,IProxyListenerALM listener, SdlProxyConfigurationResources sdlProxyConfigurationResources,
+ String appName, Vector<TTSChunk> ttsName, String ngnMediaScreenAppName, Vector<String> vrSynonyms, Boolean isMediaApp,
+ SdlMsgVersion sdlMsgVersion, Language languageDesired, Language hmiDisplayLanguageDesired,
+ String appID, String autoActivateID, boolean callbackToUIThread, boolean preRegister) throws SdlException {
+ super( listener,
+ sdlProxyConfigurationResources,
+ /*enable advanced lifecycle management*/true,
+ appName,
+ ttsName,
+ ngnMediaScreenAppName,
+ vrSynonyms,
+ isMediaApp,
+ sdlMsgVersion,
+ languageDesired,
+ /*HMI Display Language Desired*/hmiDisplayLanguageDesired,
+ /*App Type*/null,
+ /*App ID*/appID,
+ autoActivateID,
+ callbackToUIThread,
+ preRegister,
+ new MultiplexTransportConfig(context,appID));
+
+ SdlTrace.logProxyEvent("Application constructed SdlProxyALM (using legacy constructor for BT transport) instance passing in: IProxyListener, sdlProxyConfigurationResources, " +
+ "appName, ngnMediaScreenAppName, vrSynonyms, isMediaApp, sdlMsgVersion, languageDesired, autoActivateID, " +
+ "callbackToUIThread and version", SDL_LIB_TRACE_KEY);
+ }
+
+
+ /**
+ * Constructor for the SdlProxy object, the proxy for communicating between the App and SDL via specified transport.
+ *
+ * Takes advantage of the advanced lifecycle management.
+ *
+ * @param listener Reference to the object in the App listening to callbacks from SDL.
+ * @param sdlProxyConfigurationResources Proxy configuration resources.
+ * @param appName Name of the application displayed on SDL.
+ * @param ttsName TTS name.
+ * @param ngnMediaScreenAppName Name of the application displayed on SDL for Navigation equipped
+ * vehicles. Limited to five characters.
+ * @param vrSynonyms A vector of strings, all of which can be used as voice commands too
+ * @param isMediaApp Indicates if the app is a media application.
+ * @param sdlMsgVersion Indicates the version of SDL SmartDeviceLink Messages desired. Must be less than
+ * or equal to the version of SDL SmartDeviceLink running on the vehicle.
+ * @param languageDesired Indicates the language desired for the SDL interface.
+ * @param hmiDisplayLanguageDesired Desired language in HMI.
+ * @param appID Identifier of the client application.
+ * @param autoActivateID ID used to re-register previously registered application.
+ * @param callbackToUIThread If true, all callbacks will occur on the UI thread.
+ * @param preRegister Flag that indicates that client should be pre-registred or not
+ * @param transportConfig Initial configuration for transport.
+ * @throws SdlException
+ */
+ public SdlProxyALM(IProxyListenerALM listener, SdlProxyConfigurationResources sdlProxyConfigurationResources,
+ String appName, Vector<TTSChunk> ttsName, String ngnMediaScreenAppName, Vector<String> vrSynonyms, Boolean isMediaApp,
+ SdlMsgVersion sdlMsgVersion, Language languageDesired, Language hmiDisplayLanguageDesired,
+ String appID, String autoActivateID, boolean callbackToUIThread, boolean preRegister,
+ BaseTransportConfig transportConfig) throws SdlException {
+ super( listener,
+ sdlProxyConfigurationResources,
+ /*enable advanced lifecycle management*/true,
+ appName,
+ ttsName,
+ ngnMediaScreenAppName,
+ vrSynonyms,
+ isMediaApp,
+ sdlMsgVersion,
+ languageDesired,
+ /*HMI Display Language Desired*/hmiDisplayLanguageDesired,
+ /*App Type*/null,
+ /*App ID*/appID,
+ autoActivateID,
+ callbackToUIThread,
+ preRegister,
+ transportConfig);
+
+ SdlTrace.logProxyEvent("Application constructed SdlProxyALM (using new constructor with specified transport) instance passing in: IProxyListener, sdlProxyConfigurationResources, " +
+ "appName, ngnMediaScreenAppName, vrSynonyms, isMediaApp, sdlMsgVersion, languageDesired, autoActivateID, " +
+ "callbackToUIThread and version", SDL_LIB_TRACE_KEY);
+ }
+ /**
+ * @deprecated
+ * Constructor for the SdlProxy object, the proxy for communicating between the App and SDL via specified transport.
+ *
+ * Takes advantage of the advanced lifecycle management.
+ *
+ * @param listener Reference to the object in the App listening to callbacks from SDL.
+ * @param sdlProxyConfigurationResources Proxy configuration resources.
+ * @param appName Name of the application displayed on SDL.
+ * @param ttsName TTS name.
+ * @param ngnMediaScreenAppName Name of the application displayed on SDL for Navigation equipped
+ * vehicles. Limited to five characters.
+ * @param vrSynonyms A vector of strings, all of which can be used as voice commands too
+ * @param isMediaApp Indicates if the app is a media application.
+ * @param sdlMsgVersion Indicates the version of SDL SmartDeviceLink Messages desired. Must be less than
+ * or equal to the version of SDL SmartDeviceLink running on the vehicle.
+ * @param languageDesired Indicates the language desired for the SDL interface.
+ * @param hmiDisplayLanguageDesired Desired language in HMI.
+ * @param appType Type of application.
+ * @param appID Identifier of the client application.
+ * @param autoActivateID ID used to re-register previously registered application.
+ * @param callbackToUIThread If true, all callbacks will occur on the UI thread.
+ * @param preRegister Flag that indicates that client should be pre-registred or not
+ * @throws SdlException
+ */
+ @Deprecated
+ public SdlProxyALM(IProxyListenerALM listener, SdlProxyConfigurationResources sdlProxyConfigurationResources,
+ String appName, Vector<TTSChunk> ttsName, String ngnMediaScreenAppName, Vector<String> vrSynonyms, Boolean isMediaApp,
+ SdlMsgVersion sdlMsgVersion, Language languageDesired, Language hmiDisplayLanguageDesired,
+ Vector<AppHMIType> appType, String appID, String autoActivateID, boolean callbackToUIThread, boolean preRegister) throws SdlException {
+ super( listener,
+ sdlProxyConfigurationResources,
+ /*enable advanced lifecycle management*/true,
+ appName,
+ ttsName,
+ ngnMediaScreenAppName,
+ vrSynonyms,
+ isMediaApp,
+ sdlMsgVersion,
+ languageDesired,
+ /*HMI Display Language Desired*/hmiDisplayLanguageDesired,
+ /*App Type*/appType,
+ /*App ID*/appID,
+ autoActivateID,
+ callbackToUIThread,
+ preRegister,
+ new BTTransportConfig());
+
+ SdlTrace.logProxyEvent("Application constructed SdlProxyALM (using legacy constructor for BT transport) instance passing in: IProxyListener, sdlProxyConfigurationResources, " +
+ "appName, ngnMediaScreenAppName, vrSynonyms, isMediaApp, sdlMsgVersion, languageDesired, appType, appID, autoActivateID, " +
+ "callbackToUIThread and version", SDL_LIB_TRACE_KEY);
+ }
+ /**
+ * Constructor for the SdlProxy object, the proxy for communicating between the App and SDL via specified transport.
+ *
+ * Takes advantage of the advanced lifecycle management.
+ *
+ * @param context - Used to create a multiplexing transport config
+ * @param listener Reference to the object in the App listening to callbacks from SDL.
+ * @param sdlProxyConfigurationResources Proxy configuration resources.
+ * @param appName Name of the application displayed on SDL.
+ * @param ttsName TTS name.
+ * @param ngnMediaScreenAppName Name of the application displayed on SDL for Navigation equipped
+ * vehicles. Limited to five characters.
+ * @param vrSynonyms A vector of strings, all of which can be used as voice commands too
+ * @param isMediaApp Indicates if the app is a media application.
+ * @param sdlMsgVersion Indicates the version of SDL SmartDeviceLink Messages desired. Must be less than
+ * or equal to the version of SDL SmartDeviceLink running on the vehicle.
+ * @param languageDesired Indicates the language desired for the SDL interface.
+ * @param hmiDisplayLanguageDesired Desired language in HMI.
+ * @param appType Type of application.
+ * @param appID Identifier of the client application.
+ * @param autoActivateID ID used to re-register previously registered application.
+ * @param callbackToUIThread If true, all callbacks will occur on the UI thread.
+ * @param preRegister Flag that indicates that client should be pre-registred or not
+ * @throws SdlException
+ */
+ public SdlProxyALM(Context context,IProxyListenerALM listener, SdlProxyConfigurationResources sdlProxyConfigurationResources,
+ String appName, Vector<TTSChunk> ttsName, String ngnMediaScreenAppName, Vector<String> vrSynonyms, Boolean isMediaApp,
+ SdlMsgVersion sdlMsgVersion, Language languageDesired, Language hmiDisplayLanguageDesired,
+ Vector<AppHMIType> appType, String appID, String autoActivateID, boolean callbackToUIThread, boolean preRegister) throws SdlException {
+ super( listener,
+ sdlProxyConfigurationResources,
+ /*enable advanced lifecycle management*/true,
+ appName,
+ ttsName,
+ ngnMediaScreenAppName,
+ vrSynonyms,
+ isMediaApp,
+ sdlMsgVersion,
+ languageDesired,
+ /*HMI Display Language Desired*/hmiDisplayLanguageDesired,
+ /*App Type*/appType,
+ /*App ID*/appID,
+ autoActivateID,
+ callbackToUIThread,
+ preRegister,
+ new MultiplexTransportConfig(context,appID));
+
+ SdlTrace.logProxyEvent("Application constructed SdlProxyALM (using legacy constructor for BT transport) instance passing in: IProxyListener, sdlProxyConfigurationResources, " +
+ "appName, ngnMediaScreenAppName, vrSynonyms, isMediaApp, sdlMsgVersion, languageDesired, appType, appID, autoActivateID, " +
+ "callbackToUIThread and version", SDL_LIB_TRACE_KEY);
+ }
+ /**
+ * Constructor for the SdlProxy object, the proxy for communicating between the App and SDL via specified transport.
+ *
+ * Takes advantage of the advanced lifecycle management.
+ *
+ * @param listener Reference to the object in the App listening to callbacks from SDL.
+ * @param sdlProxyConfigurationResources Proxy configuration resources.
+ * @param appName Name of the application displayed on SDL.
+ * @param ttsName TTS name.
+ * @param ngnMediaScreenAppName Name of the application displayed on SDL for Navigation equipped
+ * vehicles. Limited to five characters.
+ * @param vrSynonyms A vector of strings, all of which can be used as voice commands too
+ * @param isMediaApp Indicates if the app is a media application.
+ * @param sdlMsgVersion Indicates the version of SDL SmartDeviceLink Messages desired. Must be less than
+ * or equal to the version of SDL SmartDeviceLink running on the vehicle.
+ * @param languageDesired Indicates the language desired for the SDL interface.
+ * @param hmiDisplayLanguageDesired Desired language in HMI.
+ * @param appType Type of application.
+ * @param appID Identifier of the client application.
+ * @param autoActivateID ID used to re-register previously registered application.
+ * @param callbackToUIThread If true, all callbacks will occur on the UI thread.
+ * @param preRegister Flag that indicates that client should be pre-registred or not
+ * @param transportConfig Initial configuration for transport.
+ * @throws SdlException
+ */
+ public SdlProxyALM(IProxyListenerALM listener, SdlProxyConfigurationResources sdlProxyConfigurationResources,
+ String appName, Vector<TTSChunk> ttsName, String ngnMediaScreenAppName, Vector<String> vrSynonyms, Boolean isMediaApp,
+ SdlMsgVersion sdlMsgVersion, Language languageDesired, Language hmiDisplayLanguageDesired, Vector<AppHMIType> appType,
+ String appID, String autoActivateID, boolean callbackToUIThread, boolean preRegister,
+ BaseTransportConfig transportConfig) throws SdlException {
+ super( listener,
+ sdlProxyConfigurationResources,
+ /*enable advanced lifecycle management*/true,
+ appName,
+ ttsName,
+ ngnMediaScreenAppName,
+ vrSynonyms,
+ isMediaApp,
+ sdlMsgVersion,
+ languageDesired,
+ /*HMI Display Language Desired*/hmiDisplayLanguageDesired,
+ /*App Type*/appType,
+ /*App ID*/appID,
+ autoActivateID,
+ callbackToUIThread,
+ preRegister,
+ transportConfig);
+
+ SdlTrace.logProxyEvent("Application constructed SdlProxyALM (using new constructor with specified transport) instance passing in: IProxyListener, sdlProxyConfigurationResources, " +
+ "appName, ngnMediaScreenAppName, vrSynonyms, isMediaApp, sdlMsgVersion, languageDesired, appType, appID, autoActivateID, " +
+ "callbackToUIThread and version", SDL_LIB_TRACE_KEY);
+ }
+ public SdlProxyALM(Service appService, IProxyListenerALM listener, SdlProxyConfigurationResources sdlProxyConfigurationResources,
+ String appName, Vector<TTSChunk> ttsName, String ngnMediaScreenAppName, Vector<String> vrSynonyms, Boolean isMediaApp,
+ SdlMsgVersion sdlMsgVersion, Language languageDesired, Language hmiDisplayLanguageDesired, Vector<AppHMIType> appType,
+ String appID, String autoActivateID, boolean callbackToUIThread, boolean preRegister,
+ BaseTransportConfig transportConfig) throws SdlException {
+ super( listener,
+ sdlProxyConfigurationResources,
+ /*enable advanced lifecycle management*/true,
+ appName,
+ ttsName,
+ ngnMediaScreenAppName,
+ vrSynonyms,
+ isMediaApp,
+ sdlMsgVersion,
+ languageDesired,
+ /*HMI Display Language Desired*/hmiDisplayLanguageDesired,
+ /*App Type*/appType,
+ /*App ID*/appID,
+ autoActivateID,
+ callbackToUIThread,
+ preRegister,
+ transportConfig);
+
+ this.setAppService(appService);
+ this.sendTransportBroadcast();
+
+ SdlTrace.logProxyEvent("Application constructed SdlProxyALM (using new constructor with specified transport) instance passing in: IProxyListener, sdlProxyConfigurationResources, " +
+ "appName, ngnMediaScreenAppName, vrSynonyms, isMediaApp, sdlMsgVersion, languageDesired, appType, appID, autoActivateID, " +
+ "callbackToUIThread and version", SDL_LIB_TRACE_KEY);
+ }
+ /**
+ * Constructor for the SdlProxy object, the proxy for communicating between the App and SDL via specified transport.
+ *
+ * Takes advantage of the advanced lifecycle management.
+ *
+ * @param listener Reference to the object in the App listening to callbacks from SDL.
+ * @param sdlProxyConfigurationResources Proxy configuration resources.
+ * @param appName Name of the application displayed on SDL.
+ * @param ttsName TTS name.
+ * @param ngnMediaScreenAppName Name of the application displayed on SDL for Navigation equipped
+ * vehicles. Limited to five characters.
+ * @param vrSynonyms A vector of strings, all of which can be used as voice commands too
+ * @param isMediaApp Indicates if the app is a media application.
+ * @param sdlMsgVersion Indicates the version of SDL SmartDeviceLink Messages desired. Must be less than
+ * or equal to the version of SDL SmartDeviceLink running on the vehicle.
+ * @param languageDesired Indicates the language desired for the SDL interface.
+ * @param hmiDisplayLanguageDesired Desired language in HMI.
+ * @param appType Type of application.
+ * @param appID Identifier of the client application.
+ * @param autoActivateID ID used to re-register previously registered application.
+ * @param callbackToUIThread If true, all callbacks will occur on the UI thread.
+ * @param preRegister Flag that indicates that client should be pre-registred or not
+ * @param sHashID HashID used for app resumption
+ * @param transportConfig Initial configuration for transport.
+ * @throws SdlException
+ */
+ public SdlProxyALM(IProxyListenerALM listener, SdlProxyConfigurationResources sdlProxyConfigurationResources,
+ String appName, Vector<TTSChunk> ttsName, String ngnMediaScreenAppName, Vector<String> vrSynonyms, Boolean isMediaApp,
+ SdlMsgVersion sdlMsgVersion, Language languageDesired, Language hmiDisplayLanguageDesired, Vector<AppHMIType> appType,
+ String appID, String autoActivateID, boolean callbackToUIThread, boolean preRegister, String sHashID,
+ BaseTransportConfig transportConfig) throws SdlException {
+ super( listener,
+ sdlProxyConfigurationResources,
+ /*enable advanced lifecycle management*/true,
+ appName,
+ ttsName,
+ ngnMediaScreenAppName,
+ vrSynonyms,
+ isMediaApp,
+ sdlMsgVersion,
+ languageDesired,
+ /*HMI Display Language Desired*/hmiDisplayLanguageDesired,
+ /*App Type*/appType,
+ /*App ID*/appID,
+ autoActivateID,
+ callbackToUIThread,
+ preRegister,
+ /*sHashID*/sHashID,
+ true,
+ transportConfig);
+
+ SdlTrace.logProxyEvent("Application constructed SdlProxyALM (using new constructor with specified transport) instance passing in: IProxyListener, sdlProxyConfigurationResources, " +
+ "appName, ngnMediaScreenAppName, vrSynonyms, isMediaApp, sdlMsgVersion, languageDesired, appType, appID, autoActivateID, " +
+ "callbackToUIThread and version", SDL_LIB_TRACE_KEY);
+ }
+ public SdlProxyALM(Service appService, IProxyListenerALM listener, SdlProxyConfigurationResources sdlProxyConfigurationResources,
+ String appName, Vector<TTSChunk> ttsName, String ngnMediaScreenAppName, Vector<String> vrSynonyms, Boolean isMediaApp,
+ SdlMsgVersion sdlMsgVersion, Language languageDesired, Language hmiDisplayLanguageDesired, Vector<AppHMIType> appType,
+ String appID, String autoActivateID, boolean callbackToUIThread, boolean preRegister, String sHashID,
+ BaseTransportConfig transportConfig) throws SdlException {
+ super( listener,
+ sdlProxyConfigurationResources,
+ /*enable advanced lifecycle management*/true,
+ appName,
+ ttsName,
+ ngnMediaScreenAppName,
+ vrSynonyms,
+ isMediaApp,
+ sdlMsgVersion,
+ languageDesired,
+ /*HMI Display Language Desired*/hmiDisplayLanguageDesired,
+ /*App Type*/appType,
+ /*App ID*/appID,
+ autoActivateID,
+ callbackToUIThread,
+ preRegister,
+ /*sHashID*/sHashID,
+ /*bEnableResume*/true,
+ transportConfig);
+
+ this.setAppService(appService);
+ this.sendTransportBroadcast();
+
+ SdlTrace.logProxyEvent("Application constructed SdlProxyALM (using new constructor with specified transport) instance passing in: IProxyListener, sdlProxyConfigurationResources, " +
+ "appName, ngnMediaScreenAppName, vrSynonyms, isMediaApp, sdlMsgVersion, languageDesired, appType, appID, autoActivateID, " +
+ "callbackToUIThread and version", SDL_LIB_TRACE_KEY);
+ }
+ /***************************************** END OF TRANSPORT SWITCHING SUPPORT ***************************************/
+
+ // Allow applications using ALM to reset the proxy (dispose and reinstantiate)
+ /**
+ * Disconnects the application from SDL, then recreates the transport such that
+ * the next time a SDL unit discovers applications, this application will be
+ * available.
+ */
+ public void resetProxy() throws SdlException {
+ super.cycleProxy(SdlDisconnectedReason.APPLICATION_REQUESTED_DISCONNECT);
+ }
+
+ /********* Getters for values returned by RegisterAppInterfaceResponse **********/
+
+ /**
+ * Gets buttonCapabilities set when application interface is registered.
+ *
+ * @return buttonCapabilities
+ * @throws SdlException
+ */
+ public List<ButtonCapabilities> getButtonCapabilities() throws SdlException{
+ // Test if proxy has been disposed
+ if (_proxyDisposed) {
+ throw new SdlException("This object has been disposed, it is no long capable of executing methods.", SdlExceptionCause.SDL_PROXY_DISPOSED);
+ }
+
+ // Test SDL availability
+ if (!_appInterfaceRegisterd) {
+ throw new SdlException("SDL is unavailable. Unable to get the buttonCapabilities.", SdlExceptionCause.SDL_UNAVAILABLE);
+ }
+ return _buttonCapabilities;
+ }
+
+ /**
+ * Gets getSoftButtonCapabilities set when application interface is registered.
+ *
+ * @return softButtonCapabilities
+ * @throws SdlException
+ */
+ public List<SoftButtonCapabilities> getSoftButtonCapabilities() throws SdlException {
+ // Test if proxy has been disposed
+ if (_proxyDisposed) {
+ throw new SdlException("This object has been disposed, it is no long capable of executing methods.", SdlExceptionCause.SDL_PROXY_DISPOSED);
+ }
+
+ // Test SDL availability
+ if (!_appInterfaceRegisterd) {
+ throw new SdlException("SDL is not connected. Unable to get the softButtonCapabilities.", SdlExceptionCause.SDL_UNAVAILABLE);
+ }
+ return _softButtonCapabilities;
+ }
+
+ /**
+ * Gets getPresetBankCapabilities set when application interface is registered.
+ *
+ * @return presetBankCapabilities
+ * @throws SdlException
+ */
+ public PresetBankCapabilities getPresetBankCapabilities() throws SdlException {
+ // Test if proxy has been disposed
+ if (_proxyDisposed) {
+ throw new SdlException("This object has been disposed, it is no long capable of executing methods.", SdlExceptionCause.SDL_PROXY_DISPOSED);
+ }
+
+ // Test SDL availability
+ if (!_appInterfaceRegisterd) {
+ throw new SdlException("SDL is not connected. Unable to get the presetBankCapabilities.", SdlExceptionCause.SDL_UNAVAILABLE);
+ }
+ return _presetBankCapabilities;
+ }
+
+ /**
+ * Gets the current version information of the proxy.
+ *
+ * @return String
+ * @throws SdlException
+ */
+ public String getProxyVersionInfo() throws SdlException {
+ // Test if proxy has been disposed
+ if (_proxyDisposed) {
+ throw new SdlException("This object has been disposed, it is no long capable of executing methods.", SdlExceptionCause.SDL_PROXY_DISPOSED);
+ }
+
+ if (Version.VERSION != null)
+ return Version.VERSION;
+
+ return null;
+ }
+
+
+
+ /**
+ * Gets displayCapabilities set when application interface is registered.
+ *
+ * @return displayCapabilities
+ * @throws SdlException
+ */
+ public DisplayCapabilities getDisplayCapabilities() throws SdlException {
+ // Test if proxy has been disposed
+ if (_proxyDisposed) {
+ throw new SdlException("This object has been disposed, it is no long capable of executing methods.", SdlExceptionCause.SDL_PROXY_DISPOSED);
+ }
+
+ // Test SDL availability
+ if (!_appInterfaceRegisterd) {
+ throw new SdlException("SDL is unavailable. Unable to get the displayCapabilities.", SdlExceptionCause.SDL_UNAVAILABLE);
+ }
+ return _displayCapabilities;
+ }
+
+ /**
+ * Gets hmiZoneCapabilities set when application interface is registered.
+ *
+ * @return hmiZoneCapabilities
+ * @throws SdlException
+ */
+ public List<HmiZoneCapabilities> getHmiZoneCapabilities() throws SdlException {
+ // Test if proxy has been disposed
+ if (_proxyDisposed) {
+ throw new SdlException("This object has been disposed, it is no long capable of executing methods.", SdlExceptionCause.SDL_PROXY_DISPOSED);
+ }
+
+ // Test SDL availability
+ if (!_appInterfaceRegisterd) {
+ throw new SdlException("SDL is unavailable. Unable to get the hmiZoneCapabilities.", SdlExceptionCause.SDL_UNAVAILABLE);
+ }
+ return _hmiZoneCapabilities;
+ }
+
+ /**
+ * Gets speechCapabilities set when application interface is registered.
+ *
+ * @return speechCapabilities
+ * @throws SdlException
+ */
+ public List<SpeechCapabilities> getSpeechCapabilities() throws SdlException {
+ // Test if proxy has been disposed
+ if (_proxyDisposed) {
+ throw new SdlException("This object has been disposed, it is no long capable of executing methods.", SdlExceptionCause.SDL_PROXY_DISPOSED);
+ }
+
+ // Test SDL availability
+ if (!_appInterfaceRegisterd) {
+ throw new SdlException("SDL is unavailable. Unable to get the speechCapabilities.", SdlExceptionCause.SDL_UNAVAILABLE);
+ }
+
+ return _speechCapabilities;
+ }
+ /**
+ * Gets PrerecordedSpeech set when application interface is registered.
+ *
+ * @return PrerecordedSpeech
+ * @throws SdlException
+ */
+ public List<PrerecordedSpeech> getPrerecordedSpeech() throws SdlException {
+ // Test if proxy has been disposed
+ if (_proxyDisposed) {
+ throw new SdlException("This object has been disposed, it is no long capable of executing methods.", SdlExceptionCause.SDL_PROXY_DISPOSED);
+ }
+
+ // Test SDL availability
+ if (!_appInterfaceRegisterd) {
+ throw new SdlException("SDL is unavailable. Unable to get the PrerecordedSpeech.", SdlExceptionCause.SDL_UNAVAILABLE);
+ }
+
+ return _prerecordedSpeech;
+ }
+ /**
+ * Gets sdlLanguage set when application interface is registered.
+ *
+ * @return sdlLanguage
+ * @throws SdlException
+ */
+ public Language getSdlLanguage() throws SdlException {
+ // Test if proxy has been disposed
+ if (_proxyDisposed) {
+ throw new SdlException("This object has been disposed, it is no long capable of executing methods.", SdlExceptionCause.SDL_PROXY_DISPOSED);
+ }
+
+ // Test SDL availability
+ if (!_appInterfaceRegisterd) {
+ throw new SdlException("SDL is unavailable. Unable to get the sdlLanguage.", SdlExceptionCause.SDL_UNAVAILABLE);
+ }
+ return _sdlLanguage;
+ }
+
+ /**
+ * Gets getHmiDisplayLanguage set when application interface is registered.
+ *
+ * @return hmiDisplayLanguage
+ * @throws SdlException
+ */
+ public Language getHmiDisplayLanguage() throws SdlException {
+ // Test if proxy has been disposed
+ if (_proxyDisposed) {
+ throw new SdlException("This object has been disposed, it is no long capable of executing methods.", SdlExceptionCause.SDL_PROXY_DISPOSED);
+ }
+
+ // Test SDL availability
+ if (!_appInterfaceRegisterd) {
+ throw new SdlException("SDL is not connected. Unable to get the hmiDisplayLanguage.", SdlExceptionCause.SDL_UNAVAILABLE);
+ }
+ return _hmiDisplayLanguage;
+ }
+
+ /**
+ * Gets sdlMsgVersion set when application interface is registered.
+ *
+ * @return sdlMsgVersion
+ * @throws SdlException
+ */
+ public SdlMsgVersion getSdlMsgVersion() throws SdlException {
+ // Test if proxy has been disposed
+ if (_proxyDisposed) {
+ throw new SdlException("This object has been disposed, it is no long capable of executing methods.", SdlExceptionCause.SDL_PROXY_DISPOSED);
+ }
+
+ // Test SDL availability
+ if (!_appInterfaceRegisterd) {
+ throw new SdlException("SDL is unavailable. Unable to get the sdlMsgVersion.", SdlExceptionCause.SDL_UNAVAILABLE);
+ }
+ return _sdlMsgVersion;
+ }
+
+ /**
+ * Gets vrCapabilities set when application interface is registered.
+ *
+ * @return vrCapabilities
+ * @throws SdlException
+ */
+ public List<VrCapabilities> getVrCapabilities() throws SdlException {
+ // Test if proxy has been disposed
+ if (_proxyDisposed) {
+ throw new SdlException("This object has been disposed, it is no long capable of executing methods.", SdlExceptionCause.SDL_PROXY_DISPOSED);
+ }
+
+ // Test SDL availability
+ if (!_appInterfaceRegisterd) {
+ throw new SdlException("SDL is unavailable. Unable to get the vrCapabilities.", SdlExceptionCause.SDL_UNAVAILABLE);
+ }
+ return _vrCapabilities;
+ }
+
+ /**
+ * Gets getVehicleType set when application interface is registered.
+ *
+ * @return vehicleType
+ * @throws SdlException
+ */
+ public VehicleType getVehicleType() throws SdlException {
+ // Test if proxy has been disposed
+ if (_proxyDisposed) {
+ throw new SdlException("This object has been disposed, it is no long capable of executing methods.", SdlExceptionCause.SDL_PROXY_DISPOSED);
+ }
+
+ // Test SDL availability
+ if (!_appInterfaceRegisterd) {
+ throw new SdlException("SDL is not connected. Unable to get the vehicleType.", SdlExceptionCause.SDL_UNAVAILABLE);
+ }
+ return _vehicleType;
+ }
+
+ /**
+ * Gets AudioPassThruCapabilities set when application interface is registered.
+ *
+ * @return AudioPassThruCapabilities
+ * @throws SdlException
+ */
+ public List<AudioPassThruCapabilities> getAudioPassThruCapabilities() throws SdlException {
+ // Test if proxy has been disposed
+ if (_proxyDisposed) {
+ throw new SdlException("This object has been disposed, it is no long capable of executing methods.", SdlExceptionCause.SDL_PROXY_DISPOSED);
+ }
+
+ // Test SDL availability
+ if (!_appInterfaceRegisterd) {
+ throw new SdlException("SDL is not connected. Unable to get the vehicleType.", SdlExceptionCause.SDL_UNAVAILABLE);
+ }
+ return _audioPassThruCapabilities;
+ }
+
+ public List<Integer> getSupportedDiagModes() throws SdlException {
+ // Test if proxy has been disposed
+ if (_proxyDisposed) {
+ throw new SdlException("This object has been disposed, it is no long capable of executing methods.", SdlExceptionCause.SDL_PROXY_DISPOSED);
+ }
+
+ // Test SDL availability
+ if (!_appInterfaceRegisterd) {
+ throw new SdlException("SDL is not connected. Unable to get SupportedDiagModes.", SdlExceptionCause.SDL_UNAVAILABLE);
+ }
+ return _diagModes;
+ }
+
+ public HMICapabilities getHmiCapabilities() throws SdlException {
+ // Test if proxy has been disposed
+ if (_proxyDisposed) {
+ throw new SdlException("This object has been disposed, it is no long capable of executing methods.", SdlExceptionCause.SDL_PROXY_DISPOSED);
+ }
+
+ // Test SDL availability
+ if (!_appInterfaceRegisterd) {
+ throw new SdlException("SDL is not connected. Unable to get the HMICapabilities.", SdlExceptionCause.SDL_UNAVAILABLE);
+ }
+ return _hmiCapabilities;
+ }
+
+
+ public String getSystemSoftwareVersion() throws SdlException {
+ // Test if proxy has been disposed
+ if (_proxyDisposed) {
+ throw new SdlException("This object has been disposed, it is no long capable of executing methods.", SdlExceptionCause.SDL_PROXY_DISPOSED);
+ }
+
+ // Test SDL availability
+ if (!_appInterfaceRegisterd) {
+ throw new SdlException("SDL is not connected. Unable to get the SystemSoftwareVersion.", SdlExceptionCause.SDL_UNAVAILABLE);
+ }
+ return _systemSoftwareVersion;
+ }
+
+ public boolean isAppResumeSuccess() throws SdlException {
+ // Test if proxy has been disposed
+ if (_proxyDisposed) {
+ throw new SdlException("This object has been disposed, it is no long capable of executing methods.", SdlExceptionCause.SDL_PROXY_DISPOSED);
+ }
+
+ // Test SDL availability
+ if (!_appInterfaceRegisterd) {
+ throw new SdlException("SDL is not connected. Unable to get isResumeSuccess.", SdlExceptionCause.SDL_UNAVAILABLE);
+ }
+ return _bResumeSuccess;
+ }
+
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/SdlProxyBase.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/SdlProxyBase.java
new file mode 100644
index 000000000..8f6e60756
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/SdlProxyBase.java
@@ -0,0 +1,5599 @@
+package com.smartdevicelink.proxy;
+
+import java.io.BufferedReader;
+import java.io.DataOutputStream;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.OutputStream;
+import java.io.UnsupportedEncodingException;
+import java.net.HttpURLConnection;
+import java.net.MalformedURLException;
+import java.net.ProtocolException;
+import java.net.URL;
+import java.util.Hashtable;
+import java.util.List;
+import java.util.Vector;
+import java.util.concurrent.Callable;
+import java.util.concurrent.CopyOnWriteArrayList;
+import java.util.concurrent.Executors;
+import java.util.concurrent.FutureTask;
+import java.util.concurrent.ScheduledExecutorService;
+
+import org.json.JSONArray;
+import org.json.JSONException;
+import org.json.JSONObject;
+
+import android.app.Service;
+import android.content.Context;
+import android.content.Intent;
+import android.graphics.Bitmap;
+import android.os.Handler;
+import android.os.Looper;
+import android.telephony.TelephonyManager;
+import android.util.Log;
+import android.util.SparseArray;
+import android.view.Surface;
+
+import com.smartdevicelink.Dispatcher.IDispatchingStrategy;
+import com.smartdevicelink.Dispatcher.ProxyMessageDispatcher;
+import com.smartdevicelink.SdlConnection.ISdlConnectionListener;
+import com.smartdevicelink.SdlConnection.SdlConnection;
+import com.smartdevicelink.SdlConnection.SdlSession;
+import com.smartdevicelink.exception.SdlException;
+import com.smartdevicelink.exception.SdlExceptionCause;
+import com.smartdevicelink.marshal.JsonRPCMarshaller;
+import com.smartdevicelink.protocol.ProtocolMessage;
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.protocol.enums.MessageType;
+import com.smartdevicelink.protocol.enums.SessionType;
+import com.smartdevicelink.protocol.heartbeat.HeartbeatMonitor;
+import com.smartdevicelink.proxy.LockScreenManager.OnLockScreenIconDownloadedListener;
+import com.smartdevicelink.proxy.callbacks.InternalProxyMessage;
+import com.smartdevicelink.proxy.callbacks.OnError;
+import com.smartdevicelink.proxy.callbacks.OnProxyClosed;
+import com.smartdevicelink.proxy.callbacks.OnServiceEnded;
+import com.smartdevicelink.proxy.callbacks.OnServiceNACKed;
+import com.smartdevicelink.proxy.interfaces.IProxyListenerALM;
+import com.smartdevicelink.proxy.interfaces.IProxyListenerBase;
+import com.smartdevicelink.proxy.interfaces.IPutFileResponseListener;
+import com.smartdevicelink.proxy.rpc.*;
+import com.smartdevicelink.proxy.rpc.enums.AppHMIType;
+import com.smartdevicelink.proxy.rpc.enums.AudioStreamingState;
+import com.smartdevicelink.proxy.rpc.enums.AudioType;
+import com.smartdevicelink.proxy.rpc.enums.BitsPerSample;
+import com.smartdevicelink.proxy.rpc.enums.ButtonName;
+import com.smartdevicelink.proxy.rpc.enums.DriverDistractionState;
+import com.smartdevicelink.proxy.rpc.enums.FileType;
+import com.smartdevicelink.proxy.rpc.enums.GlobalProperty;
+import com.smartdevicelink.proxy.rpc.enums.HMILevel;
+import com.smartdevicelink.proxy.rpc.enums.HmiZoneCapabilities;
+import com.smartdevicelink.proxy.rpc.enums.ImageType;
+import com.smartdevicelink.proxy.rpc.enums.InteractionMode;
+import com.smartdevicelink.proxy.rpc.enums.Language;
+import com.smartdevicelink.proxy.rpc.enums.PrerecordedSpeech;
+import com.smartdevicelink.proxy.rpc.enums.RequestType;
+import com.smartdevicelink.proxy.rpc.enums.Result;
+import com.smartdevicelink.proxy.rpc.enums.SamplingRate;
+import com.smartdevicelink.proxy.rpc.enums.SdlConnectionState;
+import com.smartdevicelink.proxy.rpc.enums.SdlDisconnectedReason;
+import com.smartdevicelink.proxy.rpc.enums.SdlInterfaceAvailability;
+import com.smartdevicelink.proxy.rpc.enums.SpeechCapabilities;
+import com.smartdevicelink.proxy.rpc.enums.SystemContext;
+import com.smartdevicelink.proxy.rpc.enums.TextAlignment;
+import com.smartdevicelink.proxy.rpc.enums.UpdateMode;
+import com.smartdevicelink.proxy.rpc.enums.VrCapabilities;
+import com.smartdevicelink.proxy.rpc.listeners.OnPutFileUpdateListener;
+import com.smartdevicelink.proxy.rpc.listeners.OnRPCNotificationListener;
+import com.smartdevicelink.proxy.rpc.listeners.OnRPCResponseListener;
+import com.smartdevicelink.security.SdlSecurityBase;
+import com.smartdevicelink.streaming.StreamRPCPacketizer;
+import com.smartdevicelink.trace.SdlTrace;
+import com.smartdevicelink.trace.TraceDeviceInfo;
+import com.smartdevicelink.trace.enums.InterfaceActivityDirection;
+import com.smartdevicelink.transport.BaseTransportConfig;
+import com.smartdevicelink.transport.SiphonServer;
+import com.smartdevicelink.transport.enums.TransportType;
+import com.smartdevicelink.util.DebugTool;
+
+public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase> {
+ // Used for calls to Android Log class.
+ public static final String TAG = "SdlProxy";
+ private static final String SDL_LIB_TRACE_KEY = "42baba60-eb57-11df-98cf-0800200c9a66";
+ private static final int PROX_PROT_VER_ONE = 1;
+ private static final int RESPONSE_WAIT_TIME = 2000;
+
+ private SdlSession sdlSession = null;
+ private proxyListenerType _proxyListener = null;
+
+ protected Service _appService = null;
+ private String sPoliciesURL = ""; //for testing only
+
+ // Protected Correlation IDs
+ private final int REGISTER_APP_INTERFACE_CORRELATION_ID = 65529,
+ UNREGISTER_APP_INTERFACE_CORRELATION_ID = 65530,
+ POLICIES_CORRELATION_ID = 65535;
+
+ // Sdlhronization Objects
+ private static final Object CONNECTION_REFERENCE_LOCK = new Object(),
+ INCOMING_MESSAGE_QUEUE_THREAD_LOCK = new Object(),
+ OUTGOING_MESSAGE_QUEUE_THREAD_LOCK = new Object(),
+ INTERNAL_MESSAGE_QUEUE_THREAD_LOCK = new Object(),
+ ON_UPDATE_LISTENER_LOCK = new Object(),
+ ON_NOTIFICATION_LISTENER_LOCK = new Object();
+
+ private Object APP_INTERFACE_REGISTERED_LOCK = new Object();
+
+ private int iFileCount = 0;
+
+ private boolean navServiceStartResponseReceived = false;
+ private boolean navServiceStartResponse = false;
+ private boolean pcmServiceStartResponseReceived = false;
+ private boolean pcmServiceStartResponse = false;
+ private boolean navServiceEndResponseReceived = false;
+ private boolean navServiceEndResponse = false;
+ private boolean pcmServiceEndResponseReceived = false;
+ private boolean pcmServiceEndResponse = false;
+ private boolean rpcProtectedResponseReceived = false;
+ private boolean rpcProtectedStartResponse = false;
+
+ // Device Info for logging
+ private TraceDeviceInfo _traceDeviceInterrogator = null;
+
+ // Declare Queuing Threads
+ private ProxyMessageDispatcher<ProtocolMessage> _incomingProxyMessageDispatcher;
+ private ProxyMessageDispatcher<ProtocolMessage> _outgoingProxyMessageDispatcher;
+ private ProxyMessageDispatcher<InternalProxyMessage> _internalProxyMessageDispatcher;
+
+ // Flag indicating if callbacks should be called from UIThread
+ private Boolean _callbackToUIThread = false;
+ // UI Handler
+ private Handler _mainUIHandler = null;
+ final int HEARTBEAT_CORRELATION_ID = 65531;
+
+ // SdlProxy Advanced Lifecycle Management
+ protected Boolean _advancedLifecycleManagementEnabled = false;
+ // Parameters passed to the constructor from the app to register an app interface
+ private String _applicationName = null;
+ private long instanceDateTime = System.currentTimeMillis();
+ private String sConnectionDetails = "N/A";
+ private Vector<TTSChunk> _ttsName = null;
+ private String _ngnMediaScreenAppName = null;
+ private Boolean _isMediaApp = null;
+ private Language _sdlLanguageDesired = null;
+ private Language _hmiDisplayLanguageDesired = null;
+ private Vector<AppHMIType> _appType = null;
+ private String _appID = null;
+ private String _autoActivateIdDesired = null;
+ private String _lastHashID = null;
+ private SdlMsgVersion _sdlMsgVersionRequest = null;
+ private Vector<String> _vrSynonyms = null;
+ private boolean _bAppResumeEnabled = false;
+ private OnSystemRequest lockScreenIconRequest = null;
+ private TelephonyManager telephonyManager = null;
+ private DeviceInfo deviceInfo = null;
+
+ /**
+ * Contains current configuration for the transport that was selected during
+ * construction of this object
+ */
+ private BaseTransportConfig _transportConfig = null;
+ // Proxy State Variables
+ protected Boolean _appInterfaceRegisterd = false;
+ protected Boolean _preRegisterd = false;
+ @SuppressWarnings("unused")
+ private Boolean _haveReceivedFirstNonNoneHMILevel = false;
+ protected Boolean _haveReceivedFirstFocusLevel = false;
+ protected Boolean _haveReceivedFirstFocusLevelFull = false;
+ protected Boolean _proxyDisposed = false;
+ protected SdlConnectionState _sdlConnectionState = null;
+ protected SdlInterfaceAvailability _sdlIntefaceAvailablity = null;
+ protected HMILevel _hmiLevel = null;
+ private HMILevel _priorHmiLevel = null;
+ protected AudioStreamingState _audioStreamingState = null;
+ private AudioStreamingState _priorAudioStreamingState = null;
+ protected SystemContext _systemContext = null;
+ // Variables set by RegisterAppInterfaceResponse
+ protected SdlMsgVersion _sdlMsgVersion = null;
+ protected String _autoActivateIdReturned = null;
+ protected Language _sdlLanguage = null;
+ protected Language _hmiDisplayLanguage = null;
+ protected DisplayCapabilities _displayCapabilities = null;
+ protected List<ButtonCapabilities> _buttonCapabilities = null;
+ protected List<SoftButtonCapabilities> _softButtonCapabilities = null;
+ protected PresetBankCapabilities _presetBankCapabilities = null;
+ protected List<HmiZoneCapabilities> _hmiZoneCapabilities = null;
+ protected List<SpeechCapabilities> _speechCapabilities = null;
+ protected List<PrerecordedSpeech> _prerecordedSpeech = null;
+ protected List<VrCapabilities> _vrCapabilities = null;
+ protected VehicleType _vehicleType = null;
+ protected List<AudioPassThruCapabilities> _audioPassThruCapabilities = null;
+ protected HMICapabilities _hmiCapabilities = null;
+ protected String _systemSoftwareVersion = null;
+ protected List<Integer> _diagModes = null;
+ protected Boolean firstTimeFull = true;
+ protected String _proxyVersionInfo = null;
+ protected Boolean _bResumeSuccess = false;
+ protected List<Class<? extends SdlSecurityBase>> _secList = null;
+
+ private CopyOnWriteArrayList<IPutFileResponseListener> _putFileListenerList = new CopyOnWriteArrayList<IPutFileResponseListener>();
+
+ protected byte _wiproVersion = 1;
+
+ protected SparseArray<OnRPCResponseListener> rpcResponseListeners = null;
+ protected SparseArray<OnRPCNotificationListener> rpcNotificationListeners = null;
+
+ // Interface broker
+ private SdlInterfaceBroker _interfaceBroker = null;
+
+ private void notifyPutFileStreamError(Exception e, String info)
+ {
+ for (IPutFileResponseListener _putFileListener : _putFileListenerList) {
+ _putFileListener.onPutFileStreamError(e, info);
+ }
+ }
+
+ private void notifyPutFileStreamResponse(PutFileResponse msg)
+ {
+ for (IPutFileResponseListener _putFileListener : _putFileListenerList) {
+ _putFileListener.onPutFileResponse(msg);
+ }
+ }
+
+ public void addPutFileResponseListener(IPutFileResponseListener _putFileListener)
+ {
+ _putFileListenerList.addIfAbsent(_putFileListener);
+ }
+
+ public void remPutFileResponseListener(IPutFileResponseListener _putFileListener)
+ {
+ _putFileListenerList.remove(_putFileListener);
+ }
+
+ // Private Class to Interface with SdlConnection
+ private class SdlInterfaceBroker implements ISdlConnectionListener {
+
+ @Override
+ public void onTransportDisconnected(String info) {
+ // proxyOnTransportDisconnect is called to alert the proxy that a requested
+ // disconnect has completed
+ notifyPutFileStreamError(null, info);
+
+ if (_advancedLifecycleManagementEnabled) {
+ // If ALM, nothing is required to be done here
+ } else {
+ // If original model, notify app the proxy is closed so it will delete and reinstanciate
+ notifyProxyClosed(info, new SdlException("Transport disconnected.", SdlExceptionCause.SDL_UNAVAILABLE), SdlDisconnectedReason.TRANSPORT_DISCONNECT);
+ }
+ }
+
+ @Override
+ public void onTransportError(String info, Exception e) {
+ DebugTool.logError("Transport failure: " + info, e);
+
+ notifyPutFileStreamError(e, info);
+
+ if (_advancedLifecycleManagementEnabled) {
+ // Cycle the proxy
+ if(SdlConnection.isLegacyModeEnabled()){
+ cycleProxy(SdlDisconnectedReason.LEGACY_BLUETOOTH_MODE_ENABLED);
+
+ }else{
+ cycleProxy(SdlDisconnectedReason.TRANSPORT_ERROR);
+ }
+ } else {
+ notifyProxyClosed(info, e, SdlDisconnectedReason.TRANSPORT_ERROR);
+ }
+ }
+
+ @Override
+ public void onProtocolMessageReceived(ProtocolMessage msg) {
+
+ // AudioPathThrough is coming WITH BulkData but WITHOUT JSON Data
+ // Policy Snapshot is coming WITH BulkData and WITH JSON Data
+ if ((msg.getData() != null && msg.getData().length > 0) ||
+ (msg.getBulkData() != null && msg.getBulkData().length > 0)) {
+ queueIncomingMessage(msg);
+ }
+ }
+
+ @Override
+ public void onProtocolSessionStarted(SessionType sessionType,
+ byte sessionID, byte version, String correlationID, int hashID, boolean isEncrypted) {
+
+ Intent sendIntent = createBroadcastIntent();
+ updateBroadcastIntent(sendIntent, "FUNCTION_NAME", "onProtocolSessionStarted");
+ updateBroadcastIntent(sendIntent, "COMMENT1", "SessionID: " + sessionID);
+ updateBroadcastIntent(sendIntent, "COMMENT2", " ServiceType: " + sessionType.getName());
+ updateBroadcastIntent(sendIntent, "COMMENT3", " Encrypted: " + isEncrypted);
+ sendBroadcastIntent(sendIntent);
+
+ setWiProVersion(version);
+
+ if (sessionType.eq(SessionType.RPC)) {
+
+ if (!isEncrypted)
+ {
+ if ( (_transportConfig.getHeartBeatTimeout() != Integer.MAX_VALUE) && (version > 2))
+ {
+ HeartbeatMonitor outgoingHeartbeatMonitor = new HeartbeatMonitor();
+ outgoingHeartbeatMonitor.setInterval(_transportConfig.getHeartBeatTimeout());
+ sdlSession.setOutgoingHeartbeatMonitor(outgoingHeartbeatMonitor);
+
+ HeartbeatMonitor incomingHeartbeatMonitor = new HeartbeatMonitor();
+ incomingHeartbeatMonitor.setInterval(_transportConfig.getHeartBeatTimeout());
+ sdlSession.setIncomingHeartbeatMonitor(incomingHeartbeatMonitor);
+ }
+
+ startRPCProtocolSession(sessionID, correlationID);
+ }
+ else
+ {
+ RPCProtectedServiceStarted();
+ }
+ } else if (sessionType.eq(SessionType.NAV)) {
+ NavServiceStarted();
+ } else if (sessionType.eq(SessionType.PCM)) {
+ AudioServiceStarted();
+ } else if (sessionType.eq(SessionType.RPC)){
+ cycleProxy(SdlDisconnectedReason.RPC_SESSION_ENDED);
+ }
+ else if (_wiproVersion > 1) {
+ //If version is 2 or above then don't need to specify a Session Type
+ startRPCProtocolSession(sessionID, correlationID);
+ } else {
+ // Handle other protocol session types here
+ }
+ }
+
+ @Override
+ public void onProtocolSessionStartedNACKed(SessionType sessionType,
+ byte sessionID, byte version, String correlationID) {
+ OnServiceNACKed message = new OnServiceNACKed(sessionType);
+ queueInternalMessage(message);
+
+ if (sessionType.eq(SessionType.NAV)) {
+
+ Intent sendIntent = createBroadcastIntent();
+ updateBroadcastIntent(sendIntent, "FUNCTION_NAME", "onProtocolSessionStartedNACKed");
+ updateBroadcastIntent(sendIntent, "COMMENT1", "SessionID: " + sessionID);
+ updateBroadcastIntent(sendIntent, "COMMENT2", " NACK ServiceType: " + sessionType.getName());
+ sendBroadcastIntent(sendIntent);
+
+ NavServiceStartedNACK();
+ }
+ else if (sessionType.eq(SessionType.PCM)) {
+ Intent sendIntent = createBroadcastIntent();
+ updateBroadcastIntent(sendIntent, "FUNCTION_NAME", "onProtocolSessionStartedNACKed");
+ updateBroadcastIntent(sendIntent, "COMMENT1", "SessionID: " + sessionID);
+ updateBroadcastIntent(sendIntent, "COMMENT2", " NACK ServiceType: " + sessionType.getName());
+ sendBroadcastIntent(sendIntent);
+
+ AudioServiceStartedNACK();
+ }
+ }
+
+ @Override
+ public void onProtocolSessionEnded(SessionType sessionType,
+ byte sessionID, String correlationID) {
+ OnServiceEnded message = new OnServiceEnded(sessionType);
+ queueInternalMessage(message);
+
+ if (sessionType.eq(SessionType.NAV)) {
+
+ Intent sendIntent = createBroadcastIntent();
+ updateBroadcastIntent(sendIntent, "FUNCTION_NAME", "onProtocolSessionEnded");
+ updateBroadcastIntent(sendIntent, "COMMENT1", "SessionID: " + sessionID);
+ updateBroadcastIntent(sendIntent, "COMMENT2", " End ServiceType: " + sessionType.getName());
+ sendBroadcastIntent(sendIntent);
+
+ NavServiceEnded();
+ }
+ else if (sessionType.eq(SessionType.PCM)) {
+ Intent sendIntent = createBroadcastIntent();
+ updateBroadcastIntent(sendIntent, "FUNCTION_NAME", "onProtocolSessionEnded");
+ updateBroadcastIntent(sendIntent, "COMMENT1", "SessionID: " + sessionID);
+ updateBroadcastIntent(sendIntent, "COMMENT2", " End ServiceType: " + sessionType.getName());
+ sendBroadcastIntent(sendIntent);
+
+ AudioServiceEnded();
+ }
+ }
+
+ @Override
+ public void onProtocolError(String info, Exception e) {
+ notifyPutFileStreamError(e, info);
+ passErrorToProxyListener(info, e);
+ }
+
+ @Override
+ public void onHeartbeatTimedOut(byte sessionID) {
+ final String msg = "Heartbeat timeout";
+ DebugTool.logInfo(msg);
+
+ Intent sendIntent = createBroadcastIntent();
+ updateBroadcastIntent(sendIntent, "FUNCTION_NAME", "onHeartbeatTimedOut");
+ updateBroadcastIntent(sendIntent, "COMMENT1", "Heartbeat timeout for SessionID: " + sessionID);
+ sendBroadcastIntent(sendIntent);
+
+ notifyProxyClosed(msg, new SdlException(msg, SdlExceptionCause.HEARTBEAT_PAST_DUE), SdlDisconnectedReason.HB_TIMEOUT);
+
+ }
+
+ @Override
+ public void onProtocolSessionEndedNACKed(SessionType sessionType,
+ byte sessionID, String correlationID) {
+ if (sessionType.eq(SessionType.NAV)) {
+
+ Intent sendIntent = createBroadcastIntent();
+ updateBroadcastIntent(sendIntent, "FUNCTION_NAME", "onProtocolSessionEndedNACKed");
+ updateBroadcastIntent(sendIntent, "COMMENT1", "SessionID: " + sessionID);
+ updateBroadcastIntent(sendIntent, "COMMENT2", " End NACK ServiceType: " + sessionType.getName());
+ sendBroadcastIntent(sendIntent);
+
+ NavServiceEndedNACK();
+ }
+ else if (sessionType.eq(SessionType.PCM)) {
+ Intent sendIntent = createBroadcastIntent();
+ updateBroadcastIntent(sendIntent, "FUNCTION_NAME", "onProtocolSessionEndedNACKed");
+ updateBroadcastIntent(sendIntent, "COMMENT1", "SessionID: " + sessionID);
+ updateBroadcastIntent(sendIntent, "COMMENT2", " End NACK ServiceType: " + sessionType.getName());
+ sendBroadcastIntent(sendIntent);
+
+ AudioServiceEndedNACK();
+ }
+
+ }
+ public void onProtocolServiceDataACK(SessionType sessionType, final int dataSize,
+ byte sessionID) {
+ if (_callbackToUIThread) {
+ // Run in UI thread
+ _mainUIHandler.post(new Runnable() {
+ @Override
+ public void run() {
+ _proxyListener.onServiceDataACK(dataSize);
+ }
+ });
+ } else {
+ _proxyListener.onServiceDataACK(dataSize);
+ }
+ }
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param listener Type of listener for this proxy base.
+ * @param sdlProxyConfigurationResources Configuration resources for this proxy.
+ * @param enableAdvancedLifecycleManagement Flag that ALM should be enabled or not.
+ * @param appName Client application name.
+ * @param ttsName TTS name.
+ * @param ngnMediaScreenAppName Media Screen Application name.
+ * @param vrSynonyms List of synonyms.
+ * @param isMediaApp Flag that indicates that client application if media application or not.
+ * @param sdlMsgVersion Version of Sdl Message.
+ * @param languageDesired Desired language.
+ * @param hmiDisplayLanguageDesired Desired language for HMI.
+ * @param appType Type of application.
+ * @param appID Application identifier.
+ * @param autoActivateID Auto activation identifier.
+ * @param callbackToUIThread Flag that indicates that this proxy should send callback to UI thread or not.
+ * @param transportConfig Configuration of transport to be used by underlying connection.
+ * @throws SdlException
+ */
+ protected SdlProxyBase(proxyListenerType listener, SdlProxyConfigurationResources sdlProxyConfigurationResources,
+ boolean enableAdvancedLifecycleManagement, String appName, Vector<TTSChunk> ttsName,
+ String ngnMediaScreenAppName, Vector<String> vrSynonyms, Boolean isMediaApp, SdlMsgVersion sdlMsgVersion,
+ Language languageDesired, Language hmiDisplayLanguageDesired, Vector<AppHMIType> appType, String appID,
+ String autoActivateID, boolean callbackToUIThread, BaseTransportConfig transportConfig)
+ throws SdlException {
+
+ performBaseCommon(listener, sdlProxyConfigurationResources, enableAdvancedLifecycleManagement, appName, ttsName, ngnMediaScreenAppName, vrSynonyms, isMediaApp,
+ sdlMsgVersion, languageDesired, hmiDisplayLanguageDesired, appType, appID, autoActivateID, callbackToUIThread, null, null, null, transportConfig);
+ }
+
+ private void performBaseCommon(proxyListenerType listener, SdlProxyConfigurationResources sdlProxyConfigurationResources,
+ boolean enableAdvancedLifecycleManagement, String appName, Vector<TTSChunk> ttsName,
+ String ngnMediaScreenAppName, Vector<String> vrSynonyms, Boolean isMediaApp, SdlMsgVersion sdlMsgVersion,
+ Language languageDesired, Language hmiDisplayLanguageDesired, Vector<AppHMIType> appType, String appID,
+ String autoActivateID, boolean callbackToUIThread, Boolean preRegister, String sHashID, Boolean bAppResumeEnab,
+ BaseTransportConfig transportConfig) throws SdlException
+ {
+ setWiProVersion((byte)PROX_PROT_VER_ONE);
+
+ if (preRegister != null && preRegister)
+ {
+ _appInterfaceRegisterd = preRegister;
+ _preRegisterd = preRegister;
+ }
+
+ if (bAppResumeEnab != null && bAppResumeEnab)
+ {
+ _bAppResumeEnabled = true;
+ _lastHashID = sHashID;
+ }
+ _interfaceBroker = new SdlInterfaceBroker();
+
+ _callbackToUIThread = callbackToUIThread;
+
+ if (_callbackToUIThread) {
+ _mainUIHandler = new Handler(Looper.getMainLooper());
+ }
+
+ // Set variables for Advanced Lifecycle Management
+ _advancedLifecycleManagementEnabled = enableAdvancedLifecycleManagement;
+ _applicationName = appName;
+ _ttsName = ttsName;
+ _ngnMediaScreenAppName = ngnMediaScreenAppName;
+ _isMediaApp = isMediaApp;
+ _sdlMsgVersionRequest = sdlMsgVersion;
+ _vrSynonyms = vrSynonyms;
+ _sdlLanguageDesired = languageDesired;
+ _hmiDisplayLanguageDesired = hmiDisplayLanguageDesired;
+ _appType = appType;
+ _appID = appID;
+ _autoActivateIdDesired = autoActivateID;
+ _transportConfig = transportConfig;
+
+ // Test conditions to invalidate the proxy
+ if (listener == null) {
+ throw new IllegalArgumentException("IProxyListener listener must be provided to instantiate SdlProxy object.");
+ }
+ if (_advancedLifecycleManagementEnabled) {
+ /* if (_applicationName == null ) {
+ throw new IllegalArgumentException("To use SdlProxyALM, an application name, appName, must be provided");
+ }
+ if (_applicationName.length() < 1 || _applicationName.length() > 100) {
+ throw new IllegalArgumentException("A provided application name, appName, must be between 1 and 100 characters in length.");
+ }*/
+ if (_isMediaApp == null) {
+ throw new IllegalArgumentException("isMediaApp must not be null when using SdlProxyALM.");
+ }
+ }
+
+ _proxyListener = listener;
+
+ // Get information from sdlProxyConfigurationResources
+ if (sdlProxyConfigurationResources != null) {
+ telephonyManager = sdlProxyConfigurationResources.getTelephonyManager();
+ }
+
+ // Use the telephonyManager to get and log phone info
+ if (telephonyManager != null) {
+ // Following is not quite thread-safe (because m_traceLogger could test null twice),
+ // so we need to fix this, but vulnerability (i.e. two instances of listener) is
+ // likely harmless.
+ if (_traceDeviceInterrogator == null) {
+ _traceDeviceInterrogator = new TraceDeviceInfo(sdlProxyConfigurationResources.getTelephonyManager());
+ } // end-if
+
+ } // end-if
+
+ // Setup Internal ProxyMessage Dispatcher
+ synchronized(INTERNAL_MESSAGE_QUEUE_THREAD_LOCK) {
+ // Ensure internalProxyMessageDispatcher is null
+ if (_internalProxyMessageDispatcher != null) {
+ _internalProxyMessageDispatcher.dispose();
+ _internalProxyMessageDispatcher = null;
+ }
+
+ _internalProxyMessageDispatcher = new ProxyMessageDispatcher<InternalProxyMessage>("INTERNAL_MESSAGE_DISPATCHER", new IDispatchingStrategy<InternalProxyMessage>() {
+
+ @Override
+ public void dispatch(InternalProxyMessage message) {
+ dispatchInternalMessage((InternalProxyMessage)message);
+ }
+
+ @Override
+ public void handleDispatchingError(String info, Exception ex) {
+ handleErrorsFromInternalMessageDispatcher(info, ex);
+ }
+
+ @Override
+ public void handleQueueingError(String info, Exception ex) {
+ handleErrorsFromInternalMessageDispatcher(info, ex);
+ }
+ });
+ }
+
+ // Setup Incoming ProxyMessage Dispatcher
+ synchronized(INCOMING_MESSAGE_QUEUE_THREAD_LOCK) {
+ // Ensure incomingProxyMessageDispatcher is null
+ if (_incomingProxyMessageDispatcher != null) {
+ _incomingProxyMessageDispatcher.dispose();
+ _incomingProxyMessageDispatcher = null;
+ }
+
+ _incomingProxyMessageDispatcher = new ProxyMessageDispatcher<ProtocolMessage>("INCOMING_MESSAGE_DISPATCHER",new IDispatchingStrategy<ProtocolMessage>() {
+ @Override
+ public void dispatch(ProtocolMessage message) {
+ dispatchIncomingMessage((ProtocolMessage)message);
+ }
+
+ @Override
+ public void handleDispatchingError(String info, Exception ex) {
+ handleErrorsFromIncomingMessageDispatcher(info, ex);
+ }
+
+ @Override
+ public void handleQueueingError(String info, Exception ex) {
+ handleErrorsFromIncomingMessageDispatcher(info, ex);
+ }
+ });
+ }
+
+ // Setup Outgoing ProxyMessage Dispatcher
+ synchronized(OUTGOING_MESSAGE_QUEUE_THREAD_LOCK) {
+ // Ensure outgoingProxyMessageDispatcher is null
+ if (_outgoingProxyMessageDispatcher != null) {
+ _outgoingProxyMessageDispatcher.dispose();
+ _outgoingProxyMessageDispatcher = null;
+ }
+
+ _outgoingProxyMessageDispatcher = new ProxyMessageDispatcher<ProtocolMessage>("OUTGOING_MESSAGE_DISPATCHER",new IDispatchingStrategy<ProtocolMessage>() {
+ @Override
+ public void dispatch(ProtocolMessage message) {
+ dispatchOutgoingMessage((ProtocolMessage)message);
+ }
+
+ @Override
+ public void handleDispatchingError(String info, Exception ex) {
+ handleErrorsFromOutgoingMessageDispatcher(info, ex);
+ }
+
+ @Override
+ public void handleQueueingError(String info, Exception ex) {
+ handleErrorsFromOutgoingMessageDispatcher(info, ex);
+ }
+ });
+ }
+
+ rpcResponseListeners = new SparseArray<OnRPCResponseListener>();
+ rpcNotificationListeners = new SparseArray<OnRPCNotificationListener>();
+
+ // Initialize the proxy
+ try {
+ initializeProxy();
+ } catch (SdlException e) {
+ // Couldn't initialize the proxy
+ // Dispose threads and then rethrow exception
+
+ if (_internalProxyMessageDispatcher != null) {
+ _internalProxyMessageDispatcher.dispose();
+ _internalProxyMessageDispatcher = null;
+ }
+ if (_incomingProxyMessageDispatcher != null) {
+ _incomingProxyMessageDispatcher.dispose();
+ _incomingProxyMessageDispatcher = null;
+ }
+ if (_outgoingProxyMessageDispatcher != null) {
+ _outgoingProxyMessageDispatcher.dispose();
+ _outgoingProxyMessageDispatcher = null;
+ }
+ throw e;
+ }
+
+ // Trace that ctor has fired
+ SdlTrace.logProxyEvent("SdlProxy Created, instanceID=" + this.toString(), SDL_LIB_TRACE_KEY);
+ }
+
+ protected SdlProxyBase(proxyListenerType listener, SdlProxyConfigurationResources sdlProxyConfigurationResources,
+ boolean enableAdvancedLifecycleManagement, String appName, Vector<TTSChunk> ttsName,
+ String ngnMediaScreenAppName, Vector<String> vrSynonyms, Boolean isMediaApp, SdlMsgVersion sdlMsgVersion,
+ Language languageDesired, Language hmiDisplayLanguageDesired, Vector<AppHMIType> appType, String appID,
+ String autoActivateID, boolean callbackToUIThread, boolean preRegister, String sHashID, Boolean bEnableResume, BaseTransportConfig transportConfig)
+ throws SdlException
+ {
+ performBaseCommon(listener, sdlProxyConfigurationResources, enableAdvancedLifecycleManagement, appName, ttsName, ngnMediaScreenAppName, vrSynonyms, isMediaApp,
+ sdlMsgVersion, languageDesired, hmiDisplayLanguageDesired, appType, appID, autoActivateID, callbackToUIThread, preRegister, sHashID, bEnableResume, transportConfig);
+ }
+
+
+
+ /**
+ * Constructor.
+ *
+ * @param listener Type of listener for this proxy base.
+ * @param sdlProxyConfigurationResources Configuration resources for this proxy.
+ * @param enableAdvancedLifecycleManagement Flag that ALM should be enabled or not.
+ * @param appName Client application name.
+ * @param ttsName TTS name.
+ * @param ngnMediaScreenAppName Media Screen Application name.
+ * @param vrSynonyms List of synonyms.
+ * @param isMediaApp Flag that indicates that client application if media application or not.
+ * @param sdlMsgVersion Version of Sdl Message.
+ * @param languageDesired Desired language.
+ * @param hmiDisplayLanguageDesired Desired language for HMI.
+ * @param appType Type of application.
+ * @param appID Application identifier.
+ * @param autoActivateID Auto activation identifier.
+ * @param callbackToUIThread Flag that indicates that this proxy should send callback to UI thread or not.
+ * @param preRegister Flag that indicates that this proxy should be pre-registerd or not.
+ * @param transportConfig Configuration of transport to be used by underlying connection.
+ * @throws SdlException
+ */
+ protected SdlProxyBase(proxyListenerType listener, SdlProxyConfigurationResources sdlProxyConfigurationResources,
+ boolean enableAdvancedLifecycleManagement, String appName, Vector<TTSChunk> ttsName,
+ String ngnMediaScreenAppName, Vector<String> vrSynonyms, Boolean isMediaApp, SdlMsgVersion sdlMsgVersion,
+ Language languageDesired, Language hmiDisplayLanguageDesired, Vector<AppHMIType> appType, String appID,
+ String autoActivateID, boolean callbackToUIThread, boolean preRegister, BaseTransportConfig transportConfig)
+ throws SdlException
+ {
+ performBaseCommon(listener, sdlProxyConfigurationResources, enableAdvancedLifecycleManagement, appName, ttsName, ngnMediaScreenAppName, vrSynonyms, isMediaApp,
+ sdlMsgVersion, languageDesired, hmiDisplayLanguageDesired, appType, appID, autoActivateID, callbackToUIThread, preRegister, null, null, transportConfig);
+ }
+
+ private Intent createBroadcastIntent()
+ {
+ Intent sendIntent = new Intent();
+ sendIntent.setAction("com.smartdevicelink.broadcast");
+ sendIntent.putExtra("APP_NAME", this._applicationName);
+ sendIntent.putExtra("APP_ID", this._appID);
+ sendIntent.putExtra("RPC_NAME", "");
+ sendIntent.putExtra("TYPE", "");
+ sendIntent.putExtra("SUCCESS", true);
+ sendIntent.putExtra("CORRID", 0);
+ sendIntent.putExtra("FUNCTION_NAME", "");
+ sendIntent.putExtra("COMMENT1", "");
+ sendIntent.putExtra("COMMENT2", "");
+ sendIntent.putExtra("COMMENT3", "");
+ sendIntent.putExtra("COMMENT4", "");
+ sendIntent.putExtra("COMMENT5", "");
+ sendIntent.putExtra("COMMENT6", "");
+ sendIntent.putExtra("COMMENT7", "");
+ sendIntent.putExtra("COMMENT8", "");
+ sendIntent.putExtra("COMMENT9", "");
+ sendIntent.putExtra("COMMENT10", "");
+ sendIntent.putExtra("DATA", "");
+ sendIntent.putExtra("SHOW_ON_UI", true);
+ return sendIntent;
+ }
+ private void updateBroadcastIntent(Intent sendIntent, String sKey, String sValue)
+ {
+ if (sValue == null) sValue = "";
+ sendIntent.putExtra(sKey, sValue);
+ }
+ private void updateBroadcastIntent(Intent sendIntent, String sKey, boolean bValue)
+ {
+ sendIntent.putExtra(sKey, bValue);
+ }
+ private void updateBroadcastIntent(Intent sendIntent, String sKey, int iValue)
+ {
+ sendIntent.putExtra(sKey, iValue);
+ }
+
+ private Service getService()
+ {
+ Service myService = null;
+ if (_proxyListener != null && _proxyListener instanceof Service)
+ {
+ myService = (Service) _proxyListener;
+ }
+ else if (_appService != null)
+ {
+ myService = _appService;
+ }
+ if (myService != null)
+ {
+ try
+ {
+ return myService;
+ }
+ catch(Exception ex)
+ {
+ return null;
+ }
+
+ }
+ return null;
+ }
+
+ private void sendBroadcastIntent(Intent sendIntent)
+ {
+ Service myService = null;
+ if (_proxyListener != null && _proxyListener instanceof Service)
+ {
+ myService = (Service) _proxyListener;
+ }
+ else if (_appService != null)
+ {
+ myService = _appService;
+ }
+ else
+ {
+ return;
+ }
+ try
+ {
+ Context myContext = myService.getApplicationContext();
+ if (myContext != null) myContext.sendBroadcast(sendIntent);
+ }
+ catch(Exception ex)
+ {
+ //If the service or context has become unavailable unexpectedly, catch the exception and move on -- no broadcast log will occur.
+ }
+ }
+
+ private HttpURLConnection getURLConnection(Headers myHeader, String sURLString, int Timeout, int iContentLen)
+ {
+ String sContentType = "application/json";
+ int CONNECTION_TIMEOUT = Timeout * 1000;
+ int READ_TIMEOUT = Timeout * 1000;
+ boolean bDoOutput = true;
+ boolean bDoInput = true;
+ boolean bUsesCaches = false;
+ String sRequestMeth = "POST";
+
+ boolean bInstFolRed = false;
+ String sCharSet = "utf-8";
+ int iContentLength = iContentLen;
+
+ URL url = null;
+ HttpURLConnection urlConnection = null;
+
+ Intent sendIntent = createBroadcastIntent();
+ updateBroadcastIntent(sendIntent, "FUNCTION_NAME", "getURLConnection");
+ updateBroadcastIntent(sendIntent, "COMMENT1", "Actual Content Length: " + iContentLen);
+
+ if (myHeader != null)
+ {
+ //if the header isn't null, use it and replace the hardcoded params
+ int iTimeout;
+ int iReadTimeout;
+ sContentType = myHeader.getContentType();
+ iTimeout = myHeader.getConnectTimeout();
+ bDoOutput = myHeader.getDoOutput();
+ bDoInput = myHeader.getDoInput();
+ bUsesCaches = myHeader.getUseCaches();
+ sRequestMeth = myHeader.getRequestMethod();
+ iReadTimeout = myHeader.getReadTimeout();
+ bInstFolRed = myHeader.getInstanceFollowRedirects();
+ sCharSet = myHeader.getCharset();
+ iContentLength = myHeader.getContentLength();
+ CONNECTION_TIMEOUT = iTimeout*1000;
+ READ_TIMEOUT = iReadTimeout*1000;
+ updateBroadcastIntent(sendIntent, "COMMENT2", "\nHeader Defined Content Length: " + iContentLength);
+ }
+
+ try
+ {
+ url = new URL(sURLString);
+ urlConnection = (HttpURLConnection) url.openConnection();
+ urlConnection.setConnectTimeout(CONNECTION_TIMEOUT);
+ urlConnection.setDoOutput(bDoOutput);
+ urlConnection.setDoInput(bDoInput);
+ urlConnection.setRequestMethod(sRequestMeth);
+ urlConnection.setReadTimeout(READ_TIMEOUT);
+ urlConnection.setInstanceFollowRedirects(bInstFolRed);
+ urlConnection.setRequestProperty("Content-Type", sContentType);
+ urlConnection.setRequestProperty("charset", sCharSet);
+ urlConnection.setRequestProperty("Content-Length", "" + Integer.toString(iContentLength));
+ urlConnection.setUseCaches(bUsesCaches);
+ return urlConnection;
+ }
+ catch (Exception e)
+ {
+ return null;
+ }
+ finally
+ {
+ sendBroadcastIntent(sendIntent);
+ }
+ }
+
+
+ private void sendOnSystemRequestToUrl(OnSystemRequest msg)
+ {
+ Intent sendIntent = createBroadcastIntent();
+ Intent sendIntent2 = createBroadcastIntent();
+
+ HttpURLConnection urlConnection = null;
+ boolean bLegacy = false;
+
+ String sURLString;
+ if (!getPoliciesURL().equals(""))
+ sURLString = sPoliciesURL;
+ else
+ sURLString = msg.getUrl();
+
+ Integer iTimeout = msg.getTimeout();
+
+ if (iTimeout == null)
+ iTimeout = 2000;
+
+ Headers myHeader = msg.getHeader();
+
+ updateBroadcastIntent(sendIntent, "FUNCTION_NAME", "sendOnSystemRequestToUrl");
+ updateBroadcastIntent(sendIntent, "COMMENT5", "\r\nCloud URL: " + sURLString);
+
+ try
+ {
+ if (myHeader == null)
+ updateBroadcastIntent(sendIntent, "COMMENT7", "\r\nHTTPRequest Header is null");
+
+ String sBodyString = msg.getBody();
+
+ JSONObject jsonObjectToSendToServer;
+ String valid_json = "";
+ int length;
+ if (sBodyString == null)
+ {
+ if(RequestType.HTTP.equals(msg.getRequestType())){
+ length = msg.getBulkData().length;
+ Intent sendIntent3 = createBroadcastIntent();
+ updateBroadcastIntent(sendIntent3, "FUNCTION_NAME", "replace");
+ updateBroadcastIntent(sendIntent3, "COMMENT1", "Valid Json length before replace: " + length);
+ sendBroadcastIntent(sendIntent3);
+
+ }else{
+ List<String> legacyData = msg.getLegacyData();
+ JSONArray jsonArrayOfSdlPPackets = new JSONArray(legacyData);
+ jsonObjectToSendToServer = new JSONObject();
+ jsonObjectToSendToServer.put("data", jsonArrayOfSdlPPackets);
+ bLegacy = true;
+ updateBroadcastIntent(sendIntent, "COMMENT6", "\r\nLegacy SystemRequest: true");
+ valid_json = jsonObjectToSendToServer.toString().replace("\\", "");
+ length = valid_json.getBytes("UTF-8").length;
+ }
+ }
+ else
+ {
+ Intent sendIntent3 = createBroadcastIntent();
+ updateBroadcastIntent(sendIntent3, "FUNCTION_NAME", "replace");
+ updateBroadcastIntent(sendIntent3, "COMMENT1", "Valid Json length before replace: " + sBodyString.getBytes("UTF-8").length);
+ sendBroadcastIntent(sendIntent3);
+ valid_json = sBodyString.replace("\\", "");
+ length = valid_json.getBytes("UTF-8").length;
+ }
+
+ urlConnection = getURLConnection(myHeader, sURLString, iTimeout, length);
+
+ if (urlConnection == null)
+ {
+ Log.i(TAG, "urlConnection is null, check RPC input parameters");
+ updateBroadcastIntent(sendIntent, "COMMENT2", "urlConnection is null, check RPC input parameters");
+ return;
+ }
+
+ DataOutputStream wr = new DataOutputStream(urlConnection.getOutputStream());
+ if(RequestType.HTTP.equals(msg.getRequestType())){
+ wr.write(msg.getBulkData());
+ }else{
+ wr.writeBytes(valid_json);
+ }
+
+ wr.flush();
+ wr.close();
+
+
+ long BeforeTime = System.currentTimeMillis();
+ @SuppressWarnings("unused")
+ String sResponseMsg = urlConnection.getResponseMessage();
+ long AfterTime = System.currentTimeMillis();
+ final long roundtriptime = AfterTime - BeforeTime;
+
+ updateBroadcastIntent(sendIntent, "COMMENT4", " Round trip time: " + roundtriptime);
+ updateBroadcastIntent(sendIntent, "COMMENT1", "Received response from cloud, response code=" + urlConnection.getResponseCode() + " ");
+
+ int iResponseCode = urlConnection.getResponseCode();
+
+ if (iResponseCode != HttpURLConnection.HTTP_OK)
+ {
+ Log.i(TAG, "Response code not HTTP_OK, returning from sendOnSystemRequestToUrl.");
+ updateBroadcastIntent(sendIntent, "COMMENT2", "Response code not HTTP_OK, aborting request. ");
+ return;
+ }
+
+ InputStream is = urlConnection.getInputStream();
+ BufferedReader rd = new BufferedReader(new InputStreamReader(is));
+ String line;
+ StringBuilder response = new StringBuilder();
+ while((line = rd.readLine()) != null)
+ {
+ response.append(line);
+ response.append('\r');
+ }
+ rd.close();
+ //We've read the body
+ if(RequestType.HTTP.equals(msg.getRequestType())){
+ // Create the SystemRequest RPC to send to module.
+ PutFile putFile = new PutFile();
+ putFile.setFileType(FileType.JSON);
+ putFile.setCorrelationID(POLICIES_CORRELATION_ID);
+ putFile.setSdlFileName("response_data");
+ putFile.setFileData(response.toString().getBytes("UTF-8"));
+ updateBroadcastIntent(sendIntent, "DATA", "Data from cloud response: " + response.toString());
+
+ sendRPCRequestPrivate(putFile);
+ Log.i("sendOnSystemRequestToUrl", "sent to sdl");
+
+ updateBroadcastIntent(sendIntent2, "RPC_NAME", FunctionID.PUT_FILE.toString());
+ updateBroadcastIntent(sendIntent2, "TYPE", RPCMessage.KEY_REQUEST);
+ updateBroadcastIntent(sendIntent2, "CORRID", putFile.getCorrelationID());
+
+ }else{
+ Vector<String> cloudDataReceived = new Vector<String>();
+ final String dataKey = "data";
+ // Convert the response to JSON
+ JSONObject jsonResponse = new JSONObject(response.toString());
+ if(jsonResponse.has(dataKey)){
+ if (jsonResponse.get(dataKey) instanceof JSONArray)
+ {
+ JSONArray jsonArray = jsonResponse.getJSONArray(dataKey);
+ for (int i=0; i<jsonArray.length(); i++)
+ {
+ if (jsonArray.get(i) instanceof String)
+ {
+ cloudDataReceived.add(jsonArray.getString(i));
+ //Log.i("sendOnSystemRequestToUrl", "jsonArray.getString(i): " + jsonArray.getString(i));
+ }
+ }
+ }
+ else if (jsonResponse.get(dataKey) instanceof String)
+ {
+ cloudDataReceived.add(jsonResponse.getString(dataKey));
+ //Log.i("sendOnSystemRequestToUrl", "jsonResponse.getString(data): " + jsonResponse.getString("data"));
+ }
+ }
+ else
+ {
+ DebugTool.logError("sendOnSystemRequestToUrl: Data in JSON Object neither an array nor a string.");
+ //Log.i("sendOnSystemRequestToUrl", "sendOnSystemRequestToUrl: Data in JSON Object neither an array nor a string.");
+ return;
+ }
+
+ String sResponse = cloudDataReceived.toString();
+
+ if (sResponse.length() > 512)
+ {
+ sResponse = sResponse.substring(0, 511);
+ }
+
+ updateBroadcastIntent(sendIntent, "DATA", "Data from cloud response: " + sResponse);
+
+ // Send new SystemRequest to SDL
+ SystemRequest mySystemRequest;
+
+ if (bLegacy){
+ mySystemRequest = RPCRequestFactory.buildSystemRequestLegacy(cloudDataReceived, getPoliciesReservedCorrelationID());
+ }else{
+ mySystemRequest = RPCRequestFactory.buildSystemRequest(response.toString(), getPoliciesReservedCorrelationID());
+ }
+
+ if (getIsConnected())
+ {
+ sendRPCRequestPrivate(mySystemRequest);
+ Log.i("sendOnSystemRequestToUrl", "sent to sdl");
+
+ updateBroadcastIntent(sendIntent2, "RPC_NAME", FunctionID.SYSTEM_REQUEST.toString());
+ updateBroadcastIntent(sendIntent2, "TYPE", RPCMessage.KEY_REQUEST);
+ updateBroadcastIntent(sendIntent2, "CORRID", mySystemRequest.getCorrelationID());
+ }
+ }
+ }
+ catch (SdlException e)
+ {
+ DebugTool.logError("sendOnSystemRequestToUrl: Could not get data from JSONObject received.", e);
+ updateBroadcastIntent(sendIntent, "COMMENT3", " SdlException encountered sendOnSystemRequestToUrl: "+ e);
+ //Log.i("pt", "sendOnSystemRequestToUrl: Could not get data from JSONObject received."+ e);
+ }
+ catch (JSONException e)
+ {
+ DebugTool.logError("sendOnSystemRequestToUrl: JSONException: ", e);
+ updateBroadcastIntent(sendIntent, "COMMENT3", " JSONException encountered sendOnSystemRequestToUrl: "+ e);
+ //Log.i("pt", "sendOnSystemRequestToUrl: JSONException: "+ e);
+ }
+ catch (UnsupportedEncodingException e)
+ {
+ DebugTool.logError("sendOnSystemRequestToUrl: Could not encode string.", e);
+ updateBroadcastIntent(sendIntent, "COMMENT3", " UnsupportedEncodingException encountered sendOnSystemRequestToUrl: "+ e);
+ //Log.i("pt", "sendOnSystemRequestToUrl: Could not encode string."+ e);
+ }
+ catch (ProtocolException e)
+ {
+ DebugTool.logError("sendOnSystemRequestToUrl: Could not set request method to post.", e);
+ updateBroadcastIntent(sendIntent, "COMMENT3", " ProtocolException encountered sendOnSystemRequestToUrl: "+ e);
+ //Log.i("pt", "sendOnSystemRequestToUrl: Could not set request method to post."+ e);
+ }
+ catch (MalformedURLException e)
+ {
+ DebugTool.logError("sendOnSystemRequestToUrl: URL Exception when sending SystemRequest to an external server.", e);
+ updateBroadcastIntent(sendIntent, "COMMENT3", " MalformedURLException encountered sendOnSystemRequestToUrl: "+ e);
+ //Log.i("pt", "sendOnSystemRequestToUrl: URL Exception when sending SystemRequest to an external server."+ e);
+ }
+ catch (IOException e)
+ {
+ DebugTool.logError("sendOnSystemRequestToUrl: IOException: ", e);
+ updateBroadcastIntent(sendIntent, "COMMENT3", " IOException while sending to cloud: IOException: "+ e);
+ //Log.i("pt", "sendOnSystemRequestToUrl: IOException: "+ e);
+ }
+ catch (Exception e)
+ {
+ DebugTool.logError("sendOnSystemRequestToUrl: Unexpected Exception: ", e);
+ updateBroadcastIntent(sendIntent, "COMMENT3", " Exception encountered sendOnSystemRequestToUrl: "+ e);
+ //Log.i("pt", "sendOnSystemRequestToUrl: Unexpected Exception: " + e);
+ }
+ finally
+ {
+ sendBroadcastIntent(sendIntent);
+ sendBroadcastIntent(sendIntent2);
+
+ if (iFileCount < 10)
+ iFileCount++;
+ else
+ iFileCount = 0;
+
+ if(urlConnection != null)
+ {
+ urlConnection.disconnect();
+ }
+ }
+ }
+
+ private int getPoliciesReservedCorrelationID() {
+ return POLICIES_CORRELATION_ID;
+ }
+
+ // Test correlationID
+ private boolean isCorrelationIDProtected(Integer correlationID) {
+ if (correlationID != null &&
+ (HEARTBEAT_CORRELATION_ID == correlationID
+ || REGISTER_APP_INTERFACE_CORRELATION_ID == correlationID
+ || UNREGISTER_APP_INTERFACE_CORRELATION_ID == correlationID
+ || POLICIES_CORRELATION_ID == correlationID)) {
+ return true;
+ }
+
+ return false;
+ }
+
+ // Protected isConnected method to allow legacy proxy to poll isConnected state
+ public Boolean getIsConnected() {
+ if (sdlSession == null) return false;
+
+ return sdlSession.getIsConnected();
+ }
+
+ /**
+ * Returns whether the application is registered in SDL. Note: for testing
+ * purposes, it's possible that the connection is established, but the
+ * application is not registered.
+ *
+ * @return true if the application is registered in SDL
+ */
+ public Boolean getAppInterfaceRegistered() {
+ return _appInterfaceRegisterd;
+ }
+
+ // Function to initialize new proxy connection
+ private void initializeProxy() throws SdlException {
+ // Reset all of the flags and state variables
+ _haveReceivedFirstNonNoneHMILevel = false;
+ _haveReceivedFirstFocusLevel = false;
+ _haveReceivedFirstFocusLevelFull = false;
+ if (_preRegisterd)
+ _appInterfaceRegisterd = true;
+ else
+ _appInterfaceRegisterd = false;
+
+ _putFileListenerList.clear();
+
+ _sdlIntefaceAvailablity = SdlInterfaceAvailability.SDL_INTERFACE_UNAVAILABLE;
+
+ // Setup SdlConnection
+ synchronized(CONNECTION_REFERENCE_LOCK) {
+ this.sdlSession = SdlSession.createSession(_wiproVersion,_interfaceBroker, _transportConfig);
+ }
+
+ synchronized(CONNECTION_REFERENCE_LOCK) {
+ this.sdlSession.startSession();
+ sendTransportBroadcast();
+ }
+ }
+ /**
+ * This method will fake the multiplex connection event
+ * @param action
+ */
+ public void forceOnConnected(){
+ synchronized(CONNECTION_REFERENCE_LOCK) {
+ if (sdlSession != null) {
+ if(sdlSession.getSdlConnection()==null){ //There is an issue when switching from v1 to v2+ where the connection is closed. So we restart the session during this call.
+ try {
+ sdlSession.startSession();
+ } catch (SdlException e) {
+ e.printStackTrace();
+ }
+ }
+ sdlSession.getSdlConnection().forceHardwareConnectEvent(TransportType.BLUETOOTH);
+
+ }
+ }
+ }
+
+ public void sendTransportBroadcast()
+ {
+ if (sdlSession == null || _transportConfig == null) return;
+
+ String sTransComment = sdlSession.getBroadcastComment(_transportConfig);
+
+ if (sTransComment == null || sTransComment.equals("")) return;
+
+ Intent sendIntent = createBroadcastIntent();
+ updateBroadcastIntent(sendIntent, "FUNCTION_NAME", "initializeProxy");
+ updateBroadcastIntent(sendIntent, "COMMENT1", sTransComment);
+ sendBroadcastIntent(sendIntent);
+ }
+
+
+ /**
+ * Public method to enable the siphon transport
+ */
+ public void enableSiphonDebug() {
+
+ short enabledPortNumber = SiphonServer.enableSiphonServer();
+ String sSiphonPortNumber = "Enabled Siphon Port Number: " + enabledPortNumber;
+ Intent sendIntent = createBroadcastIntent();
+ updateBroadcastIntent(sendIntent, "FUNCTION_NAME", "enableSiphonDebug");
+ updateBroadcastIntent(sendIntent, "COMMENT1", sSiphonPortNumber);
+ sendBroadcastIntent(sendIntent);
+ }
+
+
+
+ /**
+ * Public method to disable the Siphon Trace Server
+ */
+ public void disableSiphonDebug() {
+
+ short disabledPortNumber = SiphonServer.disableSiphonServer();
+ if (disabledPortNumber != -1) {
+ String sSiphonPortNumber = "Disabled Siphon Port Number: " + disabledPortNumber;
+ Intent sendIntent = createBroadcastIntent();
+ updateBroadcastIntent(sendIntent, "FUNCTION_NAME", "disableSiphonDebug");
+ updateBroadcastIntent(sendIntent, "COMMENT1", sSiphonPortNumber);
+ sendBroadcastIntent(sendIntent);
+ }
+ }
+
+
+
+ /**
+ * Public method to enable the Debug Tool
+ */
+ public static void enableDebugTool() {
+ DebugTool.enableDebugTool();
+ }
+
+ /**
+ * Public method to disable the Debug Tool
+ */
+ public static void disableDebugTool() {
+ DebugTool.disableDebugTool();
+ }
+
+ /**
+ * Public method to determine Debug Tool enabled
+ */
+ public static boolean isDebugEnabled() {
+ return DebugTool.isDebugEnabled();
+ }
+
+
+ @Deprecated
+ public void close() throws SdlException {
+ dispose();
+ }
+
+ private void cleanProxy(SdlDisconnectedReason disconnectedReason) throws SdlException {
+ try {
+
+ // ALM Specific Cleanup
+ if (_advancedLifecycleManagementEnabled) {
+ _sdlConnectionState = SdlConnectionState.SDL_DISCONNECTED;
+
+ firstTimeFull = true;
+
+ // Should we wait for the interface to be unregistered?
+ Boolean waitForInterfaceUnregistered = false;
+ // Unregister app interface
+ synchronized(CONNECTION_REFERENCE_LOCK) {
+ if (sdlSession != null && sdlSession.getIsConnected() && getAppInterfaceRegistered()) {
+ waitForInterfaceUnregistered = true;
+ unregisterAppInterfacePrivate(UNREGISTER_APP_INTERFACE_CORRELATION_ID);
+ }
+ }
+
+ // Wait for the app interface to be unregistered
+ if (waitForInterfaceUnregistered) {
+ synchronized(APP_INTERFACE_REGISTERED_LOCK) {
+ try {
+ APP_INTERFACE_REGISTERED_LOCK.wait(3000);
+ } catch (InterruptedException e) {
+ // Do nothing
+ }
+ }
+ }
+ }
+
+ if(rpcResponseListeners != null){
+ rpcResponseListeners.clear();
+ }
+ if(rpcNotificationListeners != null){
+ rpcNotificationListeners.clear(); //TODO make sure we want to clear this
+ }
+
+ // Clean up SDL Connection
+ synchronized(CONNECTION_REFERENCE_LOCK) {
+ if (sdlSession != null) sdlSession.close();
+ }
+ } catch (SdlException e) {
+ throw e;
+ } finally {
+ SdlTrace.logProxyEvent("SdlProxy cleaned.", SDL_LIB_TRACE_KEY);
+ }
+ }
+
+ /**
+ * Terminates the App's Interface Registration, closes the transport connection, ends the protocol session, and frees any resources used by the proxy.
+ */
+ public void dispose() throws SdlException
+ {
+ if (_proxyDisposed) {
+ throw new SdlException("This object has been disposed, it is no long capable of executing methods.", SdlExceptionCause.SDL_PROXY_DISPOSED);
+ }
+
+ _proxyDisposed = true;
+
+ SdlTrace.logProxyEvent("Application called dispose() method.", SDL_LIB_TRACE_KEY);
+
+ try{
+ // Clean the proxy
+ cleanProxy(SdlDisconnectedReason.APPLICATION_REQUESTED_DISCONNECT);
+
+ // Close IncomingProxyMessageDispatcher thread
+ synchronized(INCOMING_MESSAGE_QUEUE_THREAD_LOCK) {
+ if (_incomingProxyMessageDispatcher != null) {
+ _incomingProxyMessageDispatcher.dispose();
+ _incomingProxyMessageDispatcher = null;
+ }
+ }
+
+ // Close OutgoingProxyMessageDispatcher thread
+ synchronized(OUTGOING_MESSAGE_QUEUE_THREAD_LOCK) {
+ if (_outgoingProxyMessageDispatcher != null) {
+ _outgoingProxyMessageDispatcher.dispose();
+ _outgoingProxyMessageDispatcher = null;
+ }
+ }
+
+ // Close InternalProxyMessageDispatcher thread
+ synchronized(INTERNAL_MESSAGE_QUEUE_THREAD_LOCK) {
+ if (_internalProxyMessageDispatcher != null) {
+ _internalProxyMessageDispatcher.dispose();
+ _internalProxyMessageDispatcher = null;
+ }
+ }
+
+ _traceDeviceInterrogator = null;
+
+ rpcResponseListeners = null;
+
+ } catch (SdlException e) {
+ throw e;
+ } finally {
+ SdlTrace.logProxyEvent("SdlProxy disposed.", SDL_LIB_TRACE_KEY);
+ }
+ } // end-method
+
+
+ private static Object CYCLE_LOCK = new Object();
+
+ private boolean _cycling = false;
+
+ // Method to cycle the proxy, only called in ALM
+ protected void cycleProxy(SdlDisconnectedReason disconnectedReason) {
+ if (_cycling) return;
+
+ synchronized(CYCLE_LOCK)
+ {
+ try{
+ _cycling = true;
+ cleanProxy(disconnectedReason);
+ initializeProxy();
+ if(!SdlDisconnectedReason.LEGACY_BLUETOOTH_MODE_ENABLED.equals(disconnectedReason) && !_transportConfig.getTransportType().equals(TransportType.MULTIPLEX)){
+ notifyProxyClosed("Sdl Proxy Cycled", new SdlException("Sdl Proxy Cycled", SdlExceptionCause.SDL_PROXY_CYCLED), disconnectedReason);
+ }
+ }
+ catch (SdlException e) {
+ Intent sendIntent = createBroadcastIntent();
+ updateBroadcastIntent(sendIntent, "FUNCTION_NAME", "cycleProxy");
+ updateBroadcastIntent(sendIntent, "COMMENT1", "Proxy cycled, exception cause: " + e.getSdlExceptionCause());
+ sendBroadcastIntent(sendIntent);
+
+ switch(e.getSdlExceptionCause()) {
+ case BLUETOOTH_DISABLED:
+ notifyProxyClosed("Bluetooth is disabled. Bluetooth must be enabled to connect to SDL. Reattempt a connection once Bluetooth is enabled.",
+ new SdlException("Bluetooth is disabled. Bluetooth must be enabled to connect to SDL. Reattempt a connection once Bluetooth is enabled.", SdlExceptionCause.BLUETOOTH_DISABLED), SdlDisconnectedReason.BLUETOOTH_DISABLED);
+ break;
+ case BLUETOOTH_ADAPTER_NULL:
+ notifyProxyClosed("Cannot locate a Bluetooth adapater. A SDL connection is impossible on this device until a Bluetooth adapter is added.",
+ new SdlException("Cannot locate a Bluetooth adapater. A SDL connection is impossible on this device until a Bluetooth adapter is added.", SdlExceptionCause.BLUETOOTH_ADAPTER_NULL), SdlDisconnectedReason.BLUETOOTH_ADAPTER_ERROR);
+ break;
+ default :
+ notifyProxyClosed("Cycling the proxy failed.", e, SdlDisconnectedReason.GENERIC_ERROR);
+ break;
+ }
+ } catch (Exception e) {
+ notifyProxyClosed("Cycling the proxy failed.", e, SdlDisconnectedReason.GENERIC_ERROR);
+ }
+ _cycling = false;
+ }
+ }
+
+
+
+ /************* Functions used by the Message Dispatching Queues ****************/
+ private void dispatchIncomingMessage(ProtocolMessage message) {
+ try{
+ // Dispatching logic
+ if (message.getSessionType().equals(SessionType.RPC)
+ ||message.getSessionType().equals(SessionType.BULK_DATA) ) {
+ try {
+ if (_wiproVersion == 1) {
+ if (message.getVersion() > 1) setWiProVersion(message.getVersion());
+ }
+
+ Hashtable<String, Object> hash = new Hashtable<String, Object>();
+ if (_wiproVersion > 1) {
+ Hashtable<String, Object> hashTemp = new Hashtable<String, Object>();
+ hashTemp.put(RPCMessage.KEY_CORRELATION_ID, message.getCorrID());
+ if (message.getJsonSize() > 0) {
+ final Hashtable<String, Object> mhash = JsonRPCMarshaller.unmarshall(message.getData());
+ //hashTemp.put(Names.parameters, mhash.get(Names.parameters));
+ hashTemp.put(RPCMessage.KEY_PARAMETERS, mhash);
+ }
+
+ String functionName = FunctionID.getFunctionName(message.getFunctionID());
+ if (functionName != null) {
+ hashTemp.put(RPCMessage.KEY_FUNCTION_NAME, functionName);
+ } else {
+ DebugTool.logWarning("Dispatch Incoming Message - function name is null unknown RPC. FunctionId: " + message.getFunctionID());
+ return;
+ }
+ if (message.getRPCType() == 0x00) {
+ hash.put(RPCMessage.KEY_REQUEST, hashTemp);
+ } else if (message.getRPCType() == 0x01) {
+ hash.put(RPCMessage.KEY_RESPONSE, hashTemp);
+ } else if (message.getRPCType() == 0x02) {
+ hash.put(RPCMessage.KEY_NOTIFICATION, hashTemp);
+ }
+ if (message.getBulkData() != null) hash.put(RPCStruct.KEY_BULK_DATA, message.getBulkData());
+ if (message.getPayloadProtected()) hash.put(RPCStruct.KEY_PROTECTED, true);
+ } else {
+ final Hashtable<String, Object> mhash = JsonRPCMarshaller.unmarshall(message.getData());
+ hash = mhash;
+ }
+ handleRPCMessage(hash);
+ } catch (final Exception excp) {
+ DebugTool.logError("Failure handling protocol message: " + excp.toString(), excp);
+ passErrorToProxyListener("Error handing incoming protocol message.", excp);
+ } // end-catch
+ } else {
+ // Handle other protocol message types here
+ }
+ } catch (final Exception e) {
+ // Pass error to application through listener
+ DebugTool.logError("Error handing proxy event.", e);
+ passErrorToProxyListener("Error handing incoming protocol message.", e);
+ }
+ }
+
+ private byte getWiProVersion() {
+ return this._wiproVersion;
+ }
+
+ private void setWiProVersion(byte version) {
+ this._wiproVersion = version;
+ }
+
+ public String serializeJSON(RPCMessage msg)
+ {
+ String sReturn = null;
+ try
+ {
+ sReturn = msg.serializeJSON(getWiProVersion()).toString(2);
+ }
+ catch (final Exception e)
+ {
+ DebugTool.logError("Error handing proxy event.", e);
+ passErrorToProxyListener("Error serializing message.", e);
+ return null;
+ }
+ return sReturn;
+ }
+
+ private void handleErrorsFromIncomingMessageDispatcher(String info, Exception e) {
+ passErrorToProxyListener(info, e);
+ }
+
+ private void dispatchOutgoingMessage(ProtocolMessage message) {
+ synchronized(CONNECTION_REFERENCE_LOCK) {
+ if (sdlSession != null) {
+ sdlSession.sendMessage(message);
+ }
+ }
+ SdlTrace.logProxyEvent("SdlProxy sending Protocol Message: " + message.toString(), SDL_LIB_TRACE_KEY);
+ }
+
+ private void handleErrorsFromOutgoingMessageDispatcher(String info, Exception e) {
+ passErrorToProxyListener(info, e);
+ }
+
+ void dispatchInternalMessage(final InternalProxyMessage message) {
+ try{
+ if (message.getFunctionName().equals(InternalProxyMessage.OnProxyError)) {
+ final OnError msg = (OnError)message;
+ if (_callbackToUIThread) {
+ // Run in UI thread
+ _mainUIHandler.post(new Runnable() {
+ @Override
+ public void run() {
+ _proxyListener.onError(msg.getInfo(), msg.getException());
+ }
+ });
+ } else {
+ _proxyListener.onError(msg.getInfo(), msg.getException());
+ }
+ } else if (message.getFunctionName().equals(InternalProxyMessage.OnServiceEnded)) {
+ final OnServiceEnded msg = (OnServiceEnded)message;
+ if (_callbackToUIThread) {
+ // Run in UI thread
+ _mainUIHandler.post(new Runnable() {
+ @Override
+ public void run() {
+ _proxyListener.onServiceEnded(msg);
+ }
+ });
+ } else {
+ _proxyListener.onServiceEnded(msg);
+ }
+ } else if (message.getFunctionName().equals(InternalProxyMessage.OnServiceNACKed)) {
+ final OnServiceNACKed msg = (OnServiceNACKed)message;
+ if (_callbackToUIThread) {
+ // Run in UI thread
+ _mainUIHandler.post(new Runnable() {
+ @Override
+ public void run() {
+ _proxyListener.onServiceNACKed(msg);
+ }
+ });
+ } else {
+ _proxyListener.onServiceNACKed(msg);
+ }
+
+ /**************Start Legacy Specific Call-backs************/
+ } else if (message.getFunctionName().equals(InternalProxyMessage.OnProxyOpened)) {
+ if (_callbackToUIThread) {
+ // Run in UI thread
+ _mainUIHandler.post(new Runnable() {
+ @Override
+ public void run() {
+ ((IProxyListener)_proxyListener).onProxyOpened();
+ }
+ });
+ } else {
+ ((IProxyListener)_proxyListener).onProxyOpened();
+ }
+ } else if (message.getFunctionName().equals(InternalProxyMessage.OnProxyClosed)) {
+ final OnProxyClosed msg = (OnProxyClosed)message;
+ if (_callbackToUIThread) {
+ // Run in UI thread
+ _mainUIHandler.post(new Runnable() {
+ @Override
+ public void run() {
+ _proxyListener.onProxyClosed(msg.getInfo(), msg.getException(), msg.getReason());
+ }
+ });
+ } else {
+ _proxyListener.onProxyClosed(msg.getInfo(), msg.getException(), msg.getReason());
+ }
+ /****************End Legacy Specific Call-backs************/
+ } else {
+ // Diagnostics
+ SdlTrace.logProxyEvent("Unknown RPC Message encountered. Check for an updated version of the SDL Proxy.", SDL_LIB_TRACE_KEY);
+ DebugTool.logError("Unknown RPC Message encountered. Check for an updated version of the SDL Proxy.");
+ }
+
+ SdlTrace.logProxyEvent("Proxy fired callback: " + message.getFunctionName(), SDL_LIB_TRACE_KEY);
+ } catch(final Exception e) {
+ // Pass error to application through listener
+ DebugTool.logError("Error handing proxy event.", e);
+ if (_callbackToUIThread) {
+ // Run in UI thread
+ _mainUIHandler.post(new Runnable() {
+ @Override
+ public void run() {
+ _proxyListener.onError("Error handing proxy event.", e);
+ }
+ });
+ } else {
+ _proxyListener.onError("Error handing proxy event.", e);
+ }
+ }
+ }
+
+ private void handleErrorsFromInternalMessageDispatcher(String info, Exception e) {
+ DebugTool.logError(info, e);
+ // This error cannot be passed to the user, as it indicates an error
+ // in the communication between the proxy and the application.
+
+ DebugTool.logError("InternalMessageDispatcher failed.", e);
+
+ // Note, this is the only place where the _proxyListener should be referenced asdlhronously,
+ // with an error on the internalMessageDispatcher, we have no other reliable way of
+ // communicating with the application.
+ notifyProxyClosed("Proxy callback dispatcher is down. Proxy instance is invalid.", e, SdlDisconnectedReason.GENERIC_ERROR);
+ _proxyListener.onError("Proxy callback dispatcher is down. Proxy instance is invalid.", e);
+ }
+ /************* END Functions used by the Message Dispatching Queues ****************/
+
+ // Private sendPRCRequest method. All RPCRequests are funneled through this method after
+ // error checking.
+ private void sendRPCRequestPrivate(RPCRequest request) throws SdlException {
+ try {
+ SdlTrace.logRPCEvent(InterfaceActivityDirection.Transmit, request, SDL_LIB_TRACE_KEY);
+
+ byte[] msgBytes = JsonRPCMarshaller.marshall(request, _wiproVersion);
+
+ ProtocolMessage pm = new ProtocolMessage();
+ pm.setData(msgBytes);
+ if (sdlSession != null)
+ pm.setSessionID(sdlSession.getSessionId());
+ pm.setMessageType(MessageType.RPC);
+ pm.setSessionType(SessionType.RPC);
+ pm.setFunctionID(FunctionID.getFunctionId(request.getFunctionName()));
+ pm.setPayloadProtected(request.isPayloadProtected());
+ if (request.getCorrelationID() == null)
+ {
+ //Log error here
+ throw new SdlException("CorrelationID cannot be null. RPC: " + request.getFunctionName(), SdlExceptionCause.INVALID_ARGUMENT);
+ }
+ pm.setCorrID(request.getCorrelationID());
+ if (request.getBulkData() != null){
+ pm.setBulkData(request.getBulkData());
+ }
+ if(request.getFunctionName().equalsIgnoreCase(FunctionID.PUT_FILE.name())){
+ pm.setPriorityCoefficient(1);
+ }
+
+ // Queue this outgoing message
+ synchronized(OUTGOING_MESSAGE_QUEUE_THREAD_LOCK) {
+ if (_outgoingProxyMessageDispatcher != null) {
+ _outgoingProxyMessageDispatcher.queueMessage(pm);
+ //Since the message is queued we can add it's listener to our list
+ OnRPCResponseListener listener = request.getOnRPCResponseListener();
+ if(request.getMessageType().equals(RPCMessage.KEY_REQUEST)){//We might want to include other message types in the future
+ addOnRPCResponseListener(listener, request.getCorrelationID(), msgBytes.length);
+ }
+ }
+ }
+ } catch (OutOfMemoryError e) {
+ SdlTrace.logProxyEvent("OutOfMemory exception while sending request " + request.getFunctionName(), SDL_LIB_TRACE_KEY);
+ throw new SdlException("OutOfMemory exception while sending request " + request.getFunctionName(), e, SdlExceptionCause.INVALID_ARGUMENT);
+ }
+ }
+
+ /**
+ * Only call this method for a PutFile response. It will cause a class cast exception if not.
+ * @param correlationId
+ * @param bytesWritten
+ * @param totalSize
+ */
+ public void onPacketProgress(int correlationId, long bytesWritten, long totalSize){
+ synchronized(ON_UPDATE_LISTENER_LOCK){
+ if(rpcResponseListeners !=null
+ && rpcResponseListeners.indexOfKey(correlationId)>=0){
+ ((OnPutFileUpdateListener)rpcResponseListeners.get(correlationId)).onUpdate(correlationId, bytesWritten, totalSize);
+ }
+ }
+
+ }
+
+ /**
+ * Will provide callback to the listener either onFinish or onError depending on the RPCResponses result code,
+ * <p>Will automatically remove the listener for the list of listeners on completion.
+ * @param msg
+ * @return if a listener was called or not
+ */
+ private boolean onRPCResponseReceived(RPCResponse msg){
+ synchronized(ON_UPDATE_LISTENER_LOCK){
+ int correlationId = msg.getCorrelationID();
+ if(rpcResponseListeners !=null
+ && rpcResponseListeners.indexOfKey(correlationId)>=0){
+ OnRPCResponseListener listener = rpcResponseListeners.get(correlationId);
+ if(msg.getSuccess()){
+ listener.onResponse(correlationId, msg);
+ }else{
+ listener.onError(correlationId, msg.getResultCode(), msg.getInfo());
+ }
+ rpcResponseListeners.remove(correlationId);
+ return true;
+ }
+ return false;
+ }
+ }
+
+/**
+ *
+ * @param listener
+ * @param correlationId
+ * @param totalSize only include if this is an OnPutFileUpdateListener. Otherwise it will be ignored.
+ */
+ public void addOnRPCResponseListener(OnRPCResponseListener listener,int correlationId, int totalSize){
+ synchronized(ON_UPDATE_LISTENER_LOCK){
+ if(rpcResponseListeners!=null
+ && listener !=null){
+ if(listener.getListenerType() == OnRPCResponseListener.UPDATE_LISTENER_TYPE_PUT_FILE){
+ ((OnPutFileUpdateListener)listener).setTotalSize(totalSize);
+ }
+ listener.onStart(correlationId);
+ rpcResponseListeners.put(correlationId, listener);
+ }
+ }
+ }
+
+ public SparseArray<OnRPCResponseListener> getResponseListeners(){
+ synchronized(ON_UPDATE_LISTENER_LOCK){
+ return this.rpcResponseListeners;
+ }
+ }
+
+ public boolean onRPCNotificationReceived(RPCNotification notification){
+ synchronized(ON_NOTIFICATION_LISTENER_LOCK){
+ OnRPCNotificationListener listener = rpcNotificationListeners.get(FunctionID.getFunctionId(notification.getFunctionName()));
+ if(listener!=null){
+ listener.onNotified(notification);
+ return true;
+ }
+ return false;
+ }
+ }
+
+ /**
+ * This will ad a listener for the specific type of notification. As of now it will only allow
+ * a single listener per notification function id
+ * @param notification The notification type that this listener is designated for
+ * @param listener The listener that will be called when a notification of the provided type is received
+ */
+ public void addOnRPCNotificationListener(FunctionID notificationId,OnRPCNotificationListener listener){
+ synchronized(ON_NOTIFICATION_LISTENER_LOCK){
+ rpcNotificationListeners.put(notificationId.getId(), listener);
+ }
+ }
+
+ public void removeOnRPCNotificationListener(FunctionID notificationId){
+ synchronized(ON_NOTIFICATION_LISTENER_LOCK){
+ rpcNotificationListeners.delete(notificationId.getId());
+ }
+ }
+
+ private void processRaiResponse(RegisterAppInterfaceResponse rai)
+ {
+ if (rai == null) return;
+
+ VehicleType vt = rai.getVehicleType();
+ if (vt == null) return;
+
+ String make = vt.getMake();
+ if (make == null) return;
+
+ if (_secList == null) return;
+
+ SdlSecurityBase sec = null;
+ Service svc = getService();
+ SdlSecurityBase.setAppService(svc);
+
+ for (Class<? extends SdlSecurityBase> cls : _secList)
+ {
+ try
+ {
+ sec = cls.newInstance();
+ }
+ catch (Exception e)
+ {
+ continue;
+ }
+
+ if ( (sec != null) && (sec.getMakeList() != null) )
+ {
+ if (sec.getMakeList().contains(make))
+ {
+ setSdlSecurity(sec);
+ if (sec != null)
+ {
+ sec.setAppId(_appID);
+ if (sdlSession != null)
+ sec.handleSdlSession(sdlSession);
+ }
+ return;
+ }
+ }
+ }
+ }
+
+ private void handleRPCMessage(Hashtable<String, Object> hash) {
+ RPCMessage rpcMsg = new RPCMessage(hash);
+ String functionName = rpcMsg.getFunctionName();
+ String messageType = rpcMsg.getMessageType();
+
+ if (messageType.equals(RPCMessage.KEY_RESPONSE)) {
+ SdlTrace.logRPCEvent(InterfaceActivityDirection.Receive, new RPCResponse(rpcMsg), SDL_LIB_TRACE_KEY);
+
+ // Check to ensure response is not from an internal message (reserved correlation ID)
+ if (isCorrelationIDProtected((new RPCResponse(hash)).getCorrelationID())) {
+ // This is a response generated from an internal message, it can be trapped here
+ // The app should not receive a response for a request it did not send
+ if ((new RPCResponse(hash)).getCorrelationID() == REGISTER_APP_INTERFACE_CORRELATION_ID
+ && _advancedLifecycleManagementEnabled
+ && functionName.equals(FunctionID.REGISTER_APP_INTERFACE.toString())) {
+ final RegisterAppInterfaceResponse msg = new RegisterAppInterfaceResponse(hash);
+ if (msg.getSuccess()) {
+ _appInterfaceRegisterd = true;
+ }
+ processRaiResponse(msg);
+
+ Intent sendIntent = createBroadcastIntent();
+ updateBroadcastIntent(sendIntent, "RPC_NAME", FunctionID.REGISTER_APP_INTERFACE.toString());
+ updateBroadcastIntent(sendIntent, "TYPE", RPCMessage.KEY_RESPONSE);
+ updateBroadcastIntent(sendIntent, "SUCCESS", msg.getSuccess());
+ updateBroadcastIntent(sendIntent, "COMMENT1", msg.getInfo());
+ updateBroadcastIntent(sendIntent, "COMMENT2", msg.getResultCode().toString());
+ updateBroadcastIntent(sendIntent, "DATA",serializeJSON(msg));
+ updateBroadcastIntent(sendIntent, "CORRID", msg.getCorrelationID());
+ sendBroadcastIntent(sendIntent);
+
+ //_autoActivateIdReturned = msg.getAutoActivateID();
+ /*Place holder for legacy support*/ _autoActivateIdReturned = "8675309";
+ _buttonCapabilities = msg.getButtonCapabilities();
+ _displayCapabilities = msg.getDisplayCapabilities();
+ _softButtonCapabilities = msg.getSoftButtonCapabilities();
+ _presetBankCapabilities = msg.getPresetBankCapabilities();
+ _hmiZoneCapabilities = msg.getHmiZoneCapabilities();
+ _speechCapabilities = msg.getSpeechCapabilities();
+ _prerecordedSpeech = msg.getPrerecordedSpeech();
+ _sdlLanguage = msg.getLanguage();
+ _hmiDisplayLanguage = msg.getHmiDisplayLanguage();
+ _sdlMsgVersion = msg.getSdlMsgVersion();
+ _vrCapabilities = msg.getVrCapabilities();
+ _vehicleType = msg.getVehicleType();
+ _audioPassThruCapabilities = msg.getAudioPassThruCapabilities();
+ _hmiCapabilities = msg.getHmiCapabilities();
+ _systemSoftwareVersion = msg.getSystemSoftwareVersion();
+ _proxyVersionInfo = msg.getProxyVersionInfo();
+
+
+
+ if (_bAppResumeEnabled)
+ {
+ if ( (_sdlMsgVersion.getMajorVersion() > 2) && (_lastHashID != null) && (msg.getSuccess()) && (msg.getResultCode() != Result.RESUME_FAILED) )
+ _bResumeSuccess = true;
+ else
+ {
+ _bResumeSuccess = false;
+ _lastHashID = null;
+ }
+ }
+ _diagModes = msg.getSupportedDiagModes();
+
+ String sVersionInfo = "SDL Proxy Version: " + _proxyVersionInfo;
+
+ if (!isDebugEnabled())
+ {
+ enableDebugTool();
+ DebugTool.logInfo(sVersionInfo, false);
+ disableDebugTool();
+ }
+ else
+ DebugTool.logInfo(sVersionInfo, false);
+
+ sendIntent = createBroadcastIntent();
+ updateBroadcastIntent(sendIntent, "FUNCTION_NAME", "RAI_RESPONSE");
+ updateBroadcastIntent(sendIntent, "COMMENT1", sVersionInfo);
+ sendBroadcastIntent(sendIntent);
+
+ // Send onSdlConnected message in ALM
+ _sdlConnectionState = SdlConnectionState.SDL_CONNECTED;
+
+ // If registerAppInterface failed, exit with OnProxyUnusable
+ if (!msg.getSuccess()) {
+ notifyProxyClosed("Unable to register app interface. Review values passed to the SdlProxy constructor. RegisterAppInterface result code: ",
+ new SdlException("Unable to register app interface. Review values passed to the SdlProxy constructor. RegisterAppInterface result code: " + msg.getResultCode(), SdlExceptionCause.SDL_REGISTRATION_ERROR), SdlDisconnectedReason.SDL_REGISTRATION_ERROR);
+ }
+
+ if (_callbackToUIThread) {
+ // Run in UI thread
+ _mainUIHandler.post(new Runnable() {
+ @Override
+ public void run() {
+ if (_proxyListener instanceof IProxyListener) {
+ ((IProxyListener)_proxyListener).onRegisterAppInterfaceResponse(msg);
+ } else if (_proxyListener instanceof IProxyListenerALM) {
+ //((IProxyListenerALM)_proxyListener).onRegisterAppInterfaceResponse(msg);
+ }
+ onRPCResponseReceived(msg);
+ }
+ });
+ } else {
+ if (_proxyListener instanceof IProxyListener) {
+ ((IProxyListener)_proxyListener).onRegisterAppInterfaceResponse(msg);
+ } else if (_proxyListener instanceof IProxyListenerALM) {
+ //((IProxyListenerALM)_proxyListener).onRegisterAppInterfaceResponse(msg);
+ }
+ onRPCResponseReceived(msg);
+ }
+ } else if ((new RPCResponse(hash)).getCorrelationID() == POLICIES_CORRELATION_ID
+ && functionName.equals(FunctionID.ON_ENCODED_SYNC_P_DATA.toString())) {
+
+ Log.i("pt", "POLICIES_CORRELATION_ID SystemRequest Notification (Legacy)");
+
+ final OnSystemRequest msg = new OnSystemRequest(hash);
+
+ // If url is not null, then send to URL
+ if ( (msg.getUrl() != null) )
+ {
+ // URL has data, attempt to post request to external server
+ Thread handleOffboardTransmissionThread = new Thread() {
+ @Override
+ public void run() {
+ sendOnSystemRequestToUrl(msg);
+ }
+ };
+
+ handleOffboardTransmissionThread.start();
+ }
+ }
+ else if ((new RPCResponse(hash)).getCorrelationID() == POLICIES_CORRELATION_ID
+ && functionName.equals(FunctionID.ENCODED_SYNC_P_DATA.toString())) {
+
+ Log.i("pt", "POLICIES_CORRELATION_ID SystemRequest Response (Legacy)");
+ final SystemRequestResponse msg = new SystemRequestResponse(hash);
+
+ Intent sendIntent = createBroadcastIntent();
+ updateBroadcastIntent(sendIntent, "RPC_NAME", FunctionID.SYSTEM_REQUEST.toString());
+ updateBroadcastIntent(sendIntent, "TYPE", RPCMessage.KEY_RESPONSE);
+ updateBroadcastIntent(sendIntent, "SUCCESS", msg.getSuccess());
+ updateBroadcastIntent(sendIntent, "COMMENT1", msg.getInfo());
+ updateBroadcastIntent(sendIntent, "COMMENT2", msg.getResultCode().toString());
+ updateBroadcastIntent(sendIntent, "CORRID", msg.getCorrelationID());
+ sendBroadcastIntent(sendIntent);
+ }
+ else if ((new RPCResponse(hash)).getCorrelationID() == POLICIES_CORRELATION_ID
+ && functionName.equals(FunctionID.SYSTEM_REQUEST.toString())) {
+ final SystemRequestResponse msg = new SystemRequestResponse(hash);
+
+ Intent sendIntent = createBroadcastIntent();
+ updateBroadcastIntent(sendIntent, "RPC_NAME", FunctionID.SYSTEM_REQUEST.toString());
+ updateBroadcastIntent(sendIntent, "TYPE", RPCMessage.KEY_RESPONSE);
+ updateBroadcastIntent(sendIntent, "SUCCESS", msg.getSuccess());
+ updateBroadcastIntent(sendIntent, "COMMENT1", msg.getInfo());
+ updateBroadcastIntent(sendIntent, "COMMENT2", msg.getResultCode().toString());
+ updateBroadcastIntent(sendIntent, "CORRID", msg.getCorrelationID());
+ updateBroadcastIntent(sendIntent, "DATA", serializeJSON(msg));
+ sendBroadcastIntent(sendIntent);
+ }
+ else if (functionName.equals(FunctionID.UNREGISTER_APP_INTERFACE.toString())) {
+ // UnregisterAppInterface
+ _appInterfaceRegisterd = false;
+ synchronized(APP_INTERFACE_REGISTERED_LOCK) {
+ APP_INTERFACE_REGISTERED_LOCK.notify();
+ }
+ final UnregisterAppInterfaceResponse msg = new UnregisterAppInterfaceResponse(hash);
+ Intent sendIntent = createBroadcastIntent();
+ updateBroadcastIntent(sendIntent, "RPC_NAME", FunctionID.UNREGISTER_APP_INTERFACE.toString());
+ updateBroadcastIntent(sendIntent, "TYPE", RPCMessage.KEY_RESPONSE);
+ updateBroadcastIntent(sendIntent, "SUCCESS", msg.getSuccess());
+ updateBroadcastIntent(sendIntent, "COMMENT1", msg.getInfo());
+ updateBroadcastIntent(sendIntent, "COMMENT2", msg.getResultCode().toString());
+ updateBroadcastIntent(sendIntent, "DATA",serializeJSON(msg));
+ updateBroadcastIntent(sendIntent, "CORRID", msg.getCorrelationID());
+ sendBroadcastIntent(sendIntent);
+ }
+ return;
+ }
+
+ if (functionName.equals(FunctionID.REGISTER_APP_INTERFACE.toString())) {
+ final RegisterAppInterfaceResponse msg = new RegisterAppInterfaceResponse(hash);
+ if (msg.getSuccess()) {
+ _appInterfaceRegisterd = true;
+ }
+ processRaiResponse(msg);
+
+ //_autoActivateIdReturned = msg.getAutoActivateID();
+ /*Place holder for legacy support*/ _autoActivateIdReturned = "8675309";
+ _buttonCapabilities = msg.getButtonCapabilities();
+ _displayCapabilities = msg.getDisplayCapabilities();
+ _softButtonCapabilities = msg.getSoftButtonCapabilities();
+ _presetBankCapabilities = msg.getPresetBankCapabilities();
+ _hmiZoneCapabilities = msg.getHmiZoneCapabilities();
+ _speechCapabilities = msg.getSpeechCapabilities();
+ _prerecordedSpeech = msg.getPrerecordedSpeech();
+ _sdlLanguage = msg.getLanguage();
+ _hmiDisplayLanguage = msg.getHmiDisplayLanguage();
+ _sdlMsgVersion = msg.getSdlMsgVersion();
+ _vrCapabilities = msg.getVrCapabilities();
+ _vehicleType = msg.getVehicleType();
+ _audioPassThruCapabilities = msg.getAudioPassThruCapabilities();
+ _hmiCapabilities = msg.getHmiCapabilities();
+ _systemSoftwareVersion = msg.getSystemSoftwareVersion();
+ _proxyVersionInfo = msg.getProxyVersionInfo();
+
+ if (_bAppResumeEnabled)
+ {
+ if ( (_sdlMsgVersion.getMajorVersion() > 2) && (_lastHashID != null) && (msg.getSuccess()) && (msg.getResultCode() != Result.RESUME_FAILED) )
+ _bResumeSuccess = true;
+ else
+ {
+ _bResumeSuccess = false;
+ _lastHashID = null;
+ }
+ }
+
+ _diagModes = msg.getSupportedDiagModes();
+
+ if (!isDebugEnabled())
+ {
+ enableDebugTool();
+ DebugTool.logInfo("SDL Proxy Version: " + _proxyVersionInfo);
+ disableDebugTool();
+ }
+ else
+ DebugTool.logInfo("SDL Proxy Version: " + _proxyVersionInfo);
+
+ // RegisterAppInterface
+ if (_advancedLifecycleManagementEnabled) {
+
+ // Send onSdlConnected message in ALM
+ _sdlConnectionState = SdlConnectionState.SDL_CONNECTED;
+
+ // If registerAppInterface failed, exit with OnProxyUnusable
+ if (!msg.getSuccess()) {
+ notifyProxyClosed("Unable to register app interface. Review values passed to the SdlProxy constructor. RegisterAppInterface result code: ",
+ new SdlException("Unable to register app interface. Review values passed to the SdlProxy constructor. RegisterAppInterface result code: " + msg.getResultCode(), SdlExceptionCause.SDL_REGISTRATION_ERROR), SdlDisconnectedReason.SDL_REGISTRATION_ERROR);
+ }
+ } else {
+ if (_callbackToUIThread) {
+ // Run in UI thread
+ _mainUIHandler.post(new Runnable() {
+ @Override
+ public void run() {
+ if (_proxyListener instanceof IProxyListener) {
+ ((IProxyListener)_proxyListener).onRegisterAppInterfaceResponse(msg);
+ } else if (_proxyListener instanceof IProxyListenerALM) {
+ //((IProxyListenerALM)_proxyListener).onRegisterAppInterfaceResponse(msg);
+ }
+ onRPCResponseReceived(msg);
+ }
+ });
+ } else {
+ if (_proxyListener instanceof IProxyListener) {
+ ((IProxyListener)_proxyListener).onRegisterAppInterfaceResponse(msg);
+ } else if (_proxyListener instanceof IProxyListenerALM) {
+ //((IProxyListenerALM)_proxyListener).onRegisterAppInterfaceResponse(msg);
+ }
+ onRPCResponseReceived(msg);
+ }
+ }
+ } else if (functionName.equals(FunctionID.SPEAK.toString())) {
+ // SpeakResponse
+
+ final SpeakResponse msg = new SpeakResponse(hash);
+ if (_callbackToUIThread) {
+ // Run in UI thread
+ _mainUIHandler.post(new Runnable() {
+ @Override
+ public void run() {
+ _proxyListener.onSpeakResponse(msg);
+ onRPCResponseReceived(msg);
+ }
+ });
+ } else {
+ _proxyListener.onSpeakResponse(msg);
+ onRPCResponseReceived(msg);
+ }
+ } else if (functionName.equals(FunctionID.ALERT.toString())) {
+ // AlertResponse
+
+ final AlertResponse msg = new AlertResponse(hash);
+ if (_callbackToUIThread) {
+ // Run in UI thread
+ _mainUIHandler.post(new Runnable() {
+ @Override
+ public void run() {
+ _proxyListener.onAlertResponse(msg);
+ onRPCResponseReceived(msg);
+ }
+ });
+ } else {
+ _proxyListener.onAlertResponse(msg);
+ onRPCResponseReceived(msg);
+ }
+ } else if (functionName.equals(FunctionID.SHOW.toString())) {
+ // ShowResponse
+
+ final ShowResponse msg = new ShowResponse(hash);
+ if (_callbackToUIThread) {
+ // Run in UI thread
+ _mainUIHandler.post(new Runnable() {
+ @Override
+ public void run() {
+ _proxyListener.onShowResponse((ShowResponse)msg);
+ onRPCResponseReceived(msg);
+ }
+ });
+ } else {
+ _proxyListener.onShowResponse((ShowResponse)msg);
+ onRPCResponseReceived(msg);
+ }
+ } else if (functionName.equals(FunctionID.ADD_COMMAND.toString())) {
+ // AddCommand
+
+ final AddCommandResponse msg = new AddCommandResponse(hash);
+ if (_callbackToUIThread) {
+ // Run in UI thread
+ _mainUIHandler.post(new Runnable() {
+ @Override
+ public void run() {
+ _proxyListener.onAddCommandResponse((AddCommandResponse)msg);
+ onRPCResponseReceived(msg);
+ }
+ });
+ } else {
+ _proxyListener.onAddCommandResponse((AddCommandResponse)msg);
+ onRPCResponseReceived(msg);
+ }
+ } else if (functionName.equals(FunctionID.DELETE_COMMAND.toString())) {
+ // DeleteCommandResponse
+
+ final DeleteCommandResponse msg = new DeleteCommandResponse(hash);
+ if (_callbackToUIThread) {
+ // Run in UI thread
+ _mainUIHandler.post(new Runnable() {
+ @Override
+ public void run() {
+ _proxyListener.onDeleteCommandResponse((DeleteCommandResponse)msg);
+ onRPCResponseReceived(msg);
+ }
+ });
+ } else {
+ _proxyListener.onDeleteCommandResponse((DeleteCommandResponse)msg);
+ onRPCResponseReceived(msg);
+ }
+ } else if (functionName.equals(FunctionID.ADD_SUB_MENU.toString())) {
+ // AddSubMenu
+
+ final AddSubMenuResponse msg = new AddSubMenuResponse(hash);
+ if (_callbackToUIThread) {
+ // Run in UI thread
+ _mainUIHandler.post(new Runnable() {
+ @Override
+ public void run() {
+ _proxyListener.onAddSubMenuResponse((AddSubMenuResponse)msg);
+ onRPCResponseReceived(msg);
+ }
+ });
+ } else {
+ _proxyListener.onAddSubMenuResponse((AddSubMenuResponse)msg);
+ onRPCResponseReceived(msg);
+ }
+ } else if (functionName.equals(FunctionID.DELETE_SUB_MENU.toString())) {
+ // DeleteSubMenu
+
+ final DeleteSubMenuResponse msg = new DeleteSubMenuResponse(hash);
+ if (_callbackToUIThread) {
+ // Run in UI thread
+ _mainUIHandler.post(new Runnable() {
+ @Override
+ public void run() {
+ _proxyListener.onDeleteSubMenuResponse((DeleteSubMenuResponse)msg);
+ onRPCResponseReceived(msg);
+ }
+ });
+ } else {
+ _proxyListener.onDeleteSubMenuResponse((DeleteSubMenuResponse)msg);
+ onRPCResponseReceived(msg);
+ }
+ } else if (functionName.equals(FunctionID.SUBSCRIBE_BUTTON.toString())) {
+ // SubscribeButton
+
+ final SubscribeButtonResponse msg = new SubscribeButtonResponse(hash);
+ if (_callbackToUIThread) {
+ // Run in UI thread
+ _mainUIHandler.post(new Runnable() {
+ @Override
+ public void run() {
+ _proxyListener.onSubscribeButtonResponse((SubscribeButtonResponse)msg);
+ onRPCResponseReceived(msg);
+ }
+ });
+ } else {
+ _proxyListener.onSubscribeButtonResponse((SubscribeButtonResponse)msg);
+ onRPCResponseReceived(msg);
+ }
+ } else if (functionName.equals(FunctionID.UNSUBSCRIBE_BUTTON.toString())) {
+ // UnsubscribeButton
+
+ final UnsubscribeButtonResponse msg = new UnsubscribeButtonResponse(hash);
+ if (_callbackToUIThread) {
+ // Run in UI thread
+ _mainUIHandler.post(new Runnable() {
+ @Override
+ public void run() {
+ _proxyListener.onUnsubscribeButtonResponse((UnsubscribeButtonResponse)msg);
+ onRPCResponseReceived(msg);
+ }
+ });
+ } else {
+ _proxyListener.onUnsubscribeButtonResponse((UnsubscribeButtonResponse)msg);
+ onRPCResponseReceived(msg);
+ }
+ } else if (functionName.equals(FunctionID.SET_MEDIA_CLOCK_TIMER.toString())) {
+ // SetMediaClockTimer
+
+ final SetMediaClockTimerResponse msg = new SetMediaClockTimerResponse(hash);
+ if (_callbackToUIThread) {
+ // Run in UI thread
+ _mainUIHandler.post(new Runnable() {
+ @Override
+ public void run() {
+ _proxyListener.onSetMediaClockTimerResponse((SetMediaClockTimerResponse)msg);
+ onRPCResponseReceived(msg);
+ }
+ });
+ } else {
+ _proxyListener.onSetMediaClockTimerResponse((SetMediaClockTimerResponse)msg);
+ onRPCResponseReceived(msg);
+ }
+ } else if (functionName.equals(FunctionID.ENCODED_SYNC_P_DATA.toString())) {
+
+ final SystemRequestResponse msg = new SystemRequestResponse(hash);
+
+ Intent sendIntent = createBroadcastIntent();
+ updateBroadcastIntent(sendIntent, "RPC_NAME", FunctionID.SYSTEM_REQUEST.toString());
+ updateBroadcastIntent(sendIntent, "TYPE", RPCMessage.KEY_RESPONSE);
+ updateBroadcastIntent(sendIntent, "SUCCESS", msg.getSuccess());
+ updateBroadcastIntent(sendIntent, "COMMENT1", msg.getInfo());
+ updateBroadcastIntent(sendIntent, "COMMENT2", msg.getResultCode().toString());
+ updateBroadcastIntent(sendIntent, "CORRID", msg.getCorrelationID());
+ sendBroadcastIntent(sendIntent);
+
+ if (_callbackToUIThread) {
+ // Run in UI thread
+ _mainUIHandler.post(new Runnable() {
+ @Override
+ public void run() {
+ _proxyListener.onSystemRequestResponse(msg);
+ onRPCResponseReceived(msg);
+ }
+ });
+ } else {
+ _proxyListener.onSystemRequestResponse(msg);
+ onRPCResponseReceived(msg);
+ }
+ } else if (functionName.equals(FunctionID.CREATE_INTERACTION_CHOICE_SET.toString())) {
+ // CreateInteractionChoiceSet
+
+ final CreateInteractionChoiceSetResponse msg = new CreateInteractionChoiceSetResponse(hash);
+ if (_callbackToUIThread) {
+ // Run in UI thread
+ _mainUIHandler.post(new Runnable() {
+ @Override
+ public void run() {
+ _proxyListener.onCreateInteractionChoiceSetResponse((CreateInteractionChoiceSetResponse)msg);
+ onRPCResponseReceived(msg);
+ }
+ });
+ } else {
+ _proxyListener.onCreateInteractionChoiceSetResponse((CreateInteractionChoiceSetResponse)msg);
+ onRPCResponseReceived(msg);
+ }
+ } else if (functionName.equals(FunctionID.DELETE_INTERACTION_CHOICE_SET.toString())) {
+ // DeleteInteractionChoiceSet
+
+ final DeleteInteractionChoiceSetResponse msg = new DeleteInteractionChoiceSetResponse(hash);
+ if (_callbackToUIThread) {
+ // Run in UI thread
+ _mainUIHandler.post(new Runnable() {
+ @Override
+ public void run() {
+ _proxyListener.onDeleteInteractionChoiceSetResponse((DeleteInteractionChoiceSetResponse)msg);
+ onRPCResponseReceived(msg);
+ }
+ });
+ } else {
+ _proxyListener.onDeleteInteractionChoiceSetResponse((DeleteInteractionChoiceSetResponse)msg);
+ onRPCResponseReceived(msg);
+ }
+ } else if (functionName.equals(FunctionID.PERFORM_INTERACTION.toString())) {
+ // PerformInteraction
+
+ final PerformInteractionResponse msg = new PerformInteractionResponse(hash);
+ if (_callbackToUIThread) {
+ // Run in UI thread
+ _mainUIHandler.post(new Runnable() {
+ @Override
+ public void run() {
+ _proxyListener.onPerformInteractionResponse((PerformInteractionResponse)msg);
+ onRPCResponseReceived(msg);
+ }
+ });
+ } else {
+ _proxyListener.onPerformInteractionResponse((PerformInteractionResponse)msg);
+ onRPCResponseReceived(msg);
+ }
+ } else if (functionName.equals(FunctionID.SET_GLOBAL_PROPERTIES.toString())) {
+ // SetGlobalPropertiesResponse
+
+ final SetGlobalPropertiesResponse msg = new SetGlobalPropertiesResponse(hash);
+ if (_callbackToUIThread) {
+ // Run in UI thread
+ _mainUIHandler.post(new Runnable() {
+ @Override
+ public void run() {
+ _proxyListener.onSetGlobalPropertiesResponse((SetGlobalPropertiesResponse)msg);
+ onRPCResponseReceived(msg);
+ }
+ });
+ } else {
+ _proxyListener.onSetGlobalPropertiesResponse((SetGlobalPropertiesResponse)msg);
+ onRPCResponseReceived(msg);
+ }
+ } else if (functionName.equals(FunctionID.RESET_GLOBAL_PROPERTIES.toString())) {
+ // ResetGlobalProperties
+
+ final ResetGlobalPropertiesResponse msg = new ResetGlobalPropertiesResponse(hash);
+ if (_callbackToUIThread) {
+ // Run in UI thread
+ _mainUIHandler.post(new Runnable() {
+ @Override
+ public void run() {
+ _proxyListener.onResetGlobalPropertiesResponse((ResetGlobalPropertiesResponse)msg);
+ onRPCResponseReceived(msg);
+ }
+ });
+ } else {
+ _proxyListener.onResetGlobalPropertiesResponse((ResetGlobalPropertiesResponse)msg);
+ onRPCResponseReceived(msg);
+ }
+ } else if (functionName.equals(FunctionID.UNREGISTER_APP_INTERFACE.toString())) {
+ // UnregisterAppInterface
+
+ _appInterfaceRegisterd = false;
+ synchronized(APP_INTERFACE_REGISTERED_LOCK) {
+ APP_INTERFACE_REGISTERED_LOCK.notify();
+ }
+
+ final UnregisterAppInterfaceResponse msg = new UnregisterAppInterfaceResponse(hash);
+
+ Intent sendIntent = createBroadcastIntent();
+ updateBroadcastIntent(sendIntent, "RPC_NAME", FunctionID.UNREGISTER_APP_INTERFACE.toString());
+ updateBroadcastIntent(sendIntent, "TYPE", RPCMessage.KEY_RESPONSE);
+ updateBroadcastIntent(sendIntent, "SUCCESS", msg.getSuccess());
+ updateBroadcastIntent(sendIntent, "COMMENT1", msg.getInfo());
+ updateBroadcastIntent(sendIntent, "COMMENT2", msg.getResultCode().toString());
+ updateBroadcastIntent(sendIntent, "DATA",serializeJSON(msg));
+ updateBroadcastIntent(sendIntent, "CORRID", msg.getCorrelationID());
+ sendBroadcastIntent(sendIntent);
+
+ if (_callbackToUIThread) {
+ // Run in UI thread
+ _mainUIHandler.post(new Runnable() {
+ @Override
+ public void run() {
+ if (_proxyListener instanceof IProxyListener) {
+ ((IProxyListener)_proxyListener).onUnregisterAppInterfaceResponse(msg);
+ } else if (_proxyListener instanceof IProxyListenerALM) {
+ //((IProxyListenerALM)_proxyListener).onUnregisterAppInterfaceResponse(msg);
+ }
+ onRPCResponseReceived(msg);
+ }
+ });
+ } else {
+ if (_proxyListener instanceof IProxyListener) {
+ ((IProxyListener)_proxyListener).onUnregisterAppInterfaceResponse(msg);
+ } else if (_proxyListener instanceof IProxyListenerALM) {
+ //((IProxyListenerALM)_proxyListener).onUnregisterAppInterfaceResponse(msg);
+ }
+ onRPCResponseReceived(msg);
+ }
+
+ notifyProxyClosed("UnregisterAppInterfaceResponse", null, SdlDisconnectedReason.APP_INTERFACE_UNREG);
+ } else if (functionName.equals(FunctionID.GENERIC_RESPONSE.toString())) {
+ // GenericResponse (Usually and error)
+ final GenericResponse msg = new GenericResponse(hash);
+ if (_callbackToUIThread) {
+ // Run in UI thread
+ _mainUIHandler.post(new Runnable() {
+ @Override
+ public void run() {
+ _proxyListener.onGenericResponse((GenericResponse)msg);
+ onRPCResponseReceived(msg);
+ }
+ });
+ } else {
+ _proxyListener.onGenericResponse((GenericResponse)msg);
+ onRPCResponseReceived(msg);
+ }
+ } else if (functionName.equals(FunctionID.SLIDER.toString())) {
+ // Slider
+ final SliderResponse msg = new SliderResponse(hash);
+ if (_callbackToUIThread) {
+ // Run in UI thread
+ _mainUIHandler.post(new Runnable() {
+ @Override
+ public void run() {
+ _proxyListener.onSliderResponse((SliderResponse)msg);
+ onRPCResponseReceived(msg);
+ }
+ });
+ } else {
+ _proxyListener.onSliderResponse((SliderResponse)msg);
+ onRPCResponseReceived(msg);
+ }
+ } else if (functionName.equals(FunctionID.PUT_FILE.toString())) {
+ // PutFile
+ final PutFileResponse msg = new PutFileResponse(hash);
+ if (_callbackToUIThread) {
+ // Run in UI thread
+ _mainUIHandler.post(new Runnable() {
+ @Override
+ public void run() {
+ _proxyListener.onPutFileResponse((PutFileResponse)msg);
+ onRPCResponseReceived(msg);
+ notifyPutFileStreamResponse(msg);
+ }
+ });
+ } else {
+ _proxyListener.onPutFileResponse((PutFileResponse)msg);
+ onRPCResponseReceived(msg);
+ notifyPutFileStreamResponse(msg);
+ }
+ } else if (functionName.equals(FunctionID.DELETE_FILE.toString())) {
+ // DeleteFile
+ final DeleteFileResponse msg = new DeleteFileResponse(hash);
+ if (_callbackToUIThread) {
+ // Run in UI thread
+ _mainUIHandler.post(new Runnable() {
+ @Override
+ public void run() {
+ _proxyListener.onDeleteFileResponse((DeleteFileResponse)msg);
+ onRPCResponseReceived(msg);
+ }
+ });
+ } else {
+ _proxyListener.onDeleteFileResponse((DeleteFileResponse)msg);
+ onRPCResponseReceived(msg);
+ }
+ } else if (functionName.equals(FunctionID.LIST_FILES.toString())) {
+ // ListFiles
+ final ListFilesResponse msg = new ListFilesResponse(hash);
+ if (_callbackToUIThread) {
+ // Run in UI thread
+ _mainUIHandler.post(new Runnable() {
+ @Override
+ public void run() {
+ _proxyListener.onListFilesResponse((ListFilesResponse)msg);
+ onRPCResponseReceived(msg);
+ }
+ });
+ } else {
+ _proxyListener.onListFilesResponse((ListFilesResponse)msg);
+ onRPCResponseReceived(msg);
+ }
+ } else if (functionName.equals(FunctionID.SET_APP_ICON.toString())) {
+ // SetAppIcon
+ final SetAppIconResponse msg = new SetAppIconResponse(hash);
+ if (_callbackToUIThread) {
+ // Run in UI thread
+ _mainUIHandler.post(new Runnable() {
+ @Override
+ public void run() {
+ _proxyListener.onSetAppIconResponse((SetAppIconResponse)msg);
+ onRPCResponseReceived(msg);
+ }
+ });
+ } else {
+ _proxyListener.onSetAppIconResponse((SetAppIconResponse)msg);
+ onRPCResponseReceived(msg);
+ }
+ } else if (functionName.equals(FunctionID.SCROLLABLE_MESSAGE.toString())) {
+ // ScrollableMessage
+ final ScrollableMessageResponse msg = new ScrollableMessageResponse(hash);
+ if (_callbackToUIThread) {
+ // Run in UI thread
+ _mainUIHandler.post(new Runnable() {
+ @Override
+ public void run() {
+ _proxyListener.onScrollableMessageResponse((ScrollableMessageResponse)msg);
+ onRPCResponseReceived(msg);
+ }
+ });
+ } else {
+ _proxyListener.onScrollableMessageResponse((ScrollableMessageResponse)msg);
+ onRPCResponseReceived(msg);
+ }
+ } else if (functionName.equals(FunctionID.CHANGE_REGISTRATION.toString())) {
+ // ChangeLanguageRegistration
+ final ChangeRegistrationResponse msg = new ChangeRegistrationResponse(hash);
+ if (_callbackToUIThread) {
+ // Run in UI thread
+ _mainUIHandler.post(new Runnable() {
+ @Override
+ public void run() {
+ _proxyListener.onChangeRegistrationResponse((ChangeRegistrationResponse)msg);
+ onRPCResponseReceived(msg);
+ }
+ });
+ } else {
+ _proxyListener.onChangeRegistrationResponse((ChangeRegistrationResponse)msg);
+ onRPCResponseReceived(msg);
+ }
+ } else if (functionName.equals(FunctionID.SET_DISPLAY_LAYOUT.toString())) {
+ // SetDisplayLayout
+ final SetDisplayLayoutResponse msg = new SetDisplayLayoutResponse(hash);
+
+ // successfully changed display layout - update layout capabilities
+ if(msg.getSuccess()){
+ _displayCapabilities = msg.getDisplayCapabilities();
+ _buttonCapabilities = msg.getButtonCapabilities();
+ _presetBankCapabilities = msg.getPresetBankCapabilities();
+ _softButtonCapabilities = msg.getSoftButtonCapabilities();
+ }
+
+ if (_callbackToUIThread) {
+ // Run in UI thread
+ _mainUIHandler.post(new Runnable() {
+ @Override
+ public void run() {
+ _proxyListener.onSetDisplayLayoutResponse((SetDisplayLayoutResponse)msg);
+ onRPCResponseReceived(msg);
+ }
+ });
+ } else {
+ _proxyListener.onSetDisplayLayoutResponse((SetDisplayLayoutResponse)msg);
+ onRPCResponseReceived(msg);
+ }
+ } else if (functionName.equals(FunctionID.PERFORM_AUDIO_PASS_THRU.toString())) {
+ // PerformAudioPassThru
+ final PerformAudioPassThruResponse msg = new PerformAudioPassThruResponse(hash);
+ if (_callbackToUIThread) {
+ // Run in UI thread
+ _mainUIHandler.post(new Runnable() {
+ @Override
+ public void run() {
+ _proxyListener.onPerformAudioPassThruResponse((PerformAudioPassThruResponse)msg);
+ onRPCResponseReceived(msg);
+ }
+ });
+ } else {
+ _proxyListener.onPerformAudioPassThruResponse((PerformAudioPassThruResponse)msg);
+ onRPCResponseReceived(msg);
+ }
+ } else if (functionName.equals(FunctionID.END_AUDIO_PASS_THRU.toString())) {
+ // EndAudioPassThru
+ final EndAudioPassThruResponse msg = new EndAudioPassThruResponse(hash);
+ if (_callbackToUIThread) {
+ // Run in UI thread
+ _mainUIHandler.post(new Runnable() {
+ @Override
+ public void run() {
+ _proxyListener.onEndAudioPassThruResponse((EndAudioPassThruResponse)msg);
+ onRPCResponseReceived(msg);
+ }
+ });
+ } else {
+ _proxyListener.onEndAudioPassThruResponse((EndAudioPassThruResponse)msg);
+ onRPCResponseReceived(msg);
+ }
+ } else if (functionName.equals(FunctionID.SUBSCRIBE_VEHICLE_DATA.toString())) {
+ // SubscribeVehicleData
+ final SubscribeVehicleDataResponse msg = new SubscribeVehicleDataResponse(hash);
+ if (_callbackToUIThread) {
+ // Run in UI thread
+ _mainUIHandler.post(new Runnable() {
+ @Override
+ public void run() {
+ _proxyListener.onSubscribeVehicleDataResponse((SubscribeVehicleDataResponse)msg);
+ onRPCResponseReceived(msg);
+ }
+ });
+ } else {
+ _proxyListener.onSubscribeVehicleDataResponse((SubscribeVehicleDataResponse)msg);
+ onRPCResponseReceived(msg);
+ }
+ } else if (functionName.equals(FunctionID.UNSUBSCRIBE_VEHICLE_DATA.toString())) {
+ // UnsubscribeVehicleData
+ final UnsubscribeVehicleDataResponse msg = new UnsubscribeVehicleDataResponse(hash);
+ if (_callbackToUIThread) {
+ // Run in UI thread
+ _mainUIHandler.post(new Runnable() {
+ @Override
+ public void run() {
+ _proxyListener.onUnsubscribeVehicleDataResponse((UnsubscribeVehicleDataResponse)msg);
+ onRPCResponseReceived(msg);
+ }
+ });
+ } else {
+ _proxyListener.onUnsubscribeVehicleDataResponse((UnsubscribeVehicleDataResponse)msg);
+ onRPCResponseReceived(msg);
+ }
+ } else if (functionName.equals(FunctionID.GET_VEHICLE_DATA.toString())) {
+ // GetVehicleData
+ final GetVehicleDataResponse msg = new GetVehicleDataResponse(hash);
+ if (_callbackToUIThread) {
+ // Run in UI thread
+ _mainUIHandler.post(new Runnable() {
+ @Override
+ public void run() {
+ _proxyListener.onGetVehicleDataResponse((GetVehicleDataResponse)msg);
+ onRPCResponseReceived(msg);
+ }
+ });
+ } else {
+ _proxyListener.onGetVehicleDataResponse((GetVehicleDataResponse)msg);
+ onRPCResponseReceived(msg);
+ }
+ } else if (functionName.equals(FunctionID.SUBSCRIBE_WAY_POINTS.toString())) {
+ // SubscribeWayPoints
+ final SubscribeWayPointsResponse msg = new SubscribeWayPointsResponse(hash);
+ if (_callbackToUIThread) {
+ // Run in UI thread
+ _mainUIHandler.post(new Runnable() {
+ @Override
+ public void run() {
+ _proxyListener.onSubscribeWayPointsResponse((SubscribeWayPointsResponse)msg);
+ onRPCResponseReceived(msg);
+ }
+ });
+ } else {
+ _proxyListener.onSubscribeWayPointsResponse((SubscribeWayPointsResponse)msg);
+ onRPCResponseReceived(msg);
+ }
+ } else if (functionName.equals(FunctionID.UNSUBSCRIBE_WAY_POINTS.toString())) {
+ // UnsubscribeWayPoints
+ final UnsubscribeWayPointsResponse msg = new UnsubscribeWayPointsResponse(hash);
+ if (_callbackToUIThread) {
+ // Run in UI thread
+ _mainUIHandler.post(new Runnable() {
+ @Override
+ public void run() {
+ _proxyListener.onUnsubscribeWayPointsResponse((UnsubscribeWayPointsResponse)msg);
+ onRPCResponseReceived(msg);
+ }
+ });
+ } else {
+ _proxyListener.onUnsubscribeWayPointsResponse((UnsubscribeWayPointsResponse)msg);
+ onRPCResponseReceived(msg);
+ }
+ } else if (functionName.equals(FunctionID.GET_WAY_POINTS.toString())) {
+ // GetWayPoints
+ final GetWayPointsResponse msg = new GetWayPointsResponse(hash);
+ if (_callbackToUIThread) {
+ // Run in UI thread
+ _mainUIHandler.post(new Runnable() {
+ @Override
+ public void run() {
+ _proxyListener.onGetWayPointsResponse((GetWayPointsResponse)msg);
+ onRPCResponseReceived(msg);
+ }
+ });
+ } else {
+ _proxyListener.onGetWayPointsResponse((GetWayPointsResponse)msg);
+ onRPCResponseReceived(msg);
+ }
+ } else if (functionName.equals(FunctionID.READ_DID.toString())) {
+ final ReadDIDResponse msg = new ReadDIDResponse(hash);
+ if (_callbackToUIThread) {
+ // Run in UI thread
+ _mainUIHandler.post(new Runnable() {
+ @Override
+ public void run() {
+ _proxyListener.onReadDIDResponse((ReadDIDResponse)msg);
+ onRPCResponseReceived(msg);
+ }
+ });
+ } else {
+ _proxyListener.onReadDIDResponse((ReadDIDResponse)msg);
+ onRPCResponseReceived(msg);
+ }
+ } else if (functionName.equals(FunctionID.GET_DTCS.toString())) {
+ final GetDTCsResponse msg = new GetDTCsResponse(hash);
+ if (_callbackToUIThread) {
+ // Run in UI thread
+ _mainUIHandler.post(new Runnable() {
+ @Override
+ public void run() {
+ _proxyListener.onGetDTCsResponse((GetDTCsResponse)msg);
+ onRPCResponseReceived(msg);
+ }
+ });
+ } else {
+ _proxyListener.onGetDTCsResponse((GetDTCsResponse)msg);
+ onRPCResponseReceived(msg);
+ }
+ } else if (functionName.equals(FunctionID.DIAGNOSTIC_MESSAGE.toString())) {
+ final DiagnosticMessageResponse msg = new DiagnosticMessageResponse(hash);
+ if (_callbackToUIThread) {
+ // Run in UI thread
+ _mainUIHandler.post(new Runnable() {
+ @Override
+ public void run() {
+ _proxyListener.onDiagnosticMessageResponse((DiagnosticMessageResponse)msg);
+ onRPCResponseReceived(msg);
+ }
+ });
+ } else {
+ _proxyListener.onDiagnosticMessageResponse((DiagnosticMessageResponse)msg);
+ onRPCResponseReceived(msg);
+ }
+ }
+ else if (functionName.equals(FunctionID.SYSTEM_REQUEST.toString())) {
+
+ final SystemRequestResponse msg = new SystemRequestResponse(hash);
+ if (_callbackToUIThread) {
+ // Run in UI thread
+ _mainUIHandler.post(new Runnable() {
+ @Override
+ public void run() {
+ _proxyListener.onSystemRequestResponse((SystemRequestResponse)msg);
+ onRPCResponseReceived(msg);
+ }
+ });
+ } else {
+ _proxyListener.onSystemRequestResponse((SystemRequestResponse)msg);
+ onRPCResponseReceived(msg);
+ }
+ }
+ else if (functionName.equals(FunctionID.SEND_LOCATION.toString())) {
+
+ final SendLocationResponse msg = new SendLocationResponse(hash);
+ if (_callbackToUIThread) {
+ // Run in UI thread
+ _mainUIHandler.post(new Runnable() {
+ @Override
+ public void run() {
+ _proxyListener.onSendLocationResponse(msg);
+ onRPCResponseReceived(msg);
+ }
+ });
+ } else {
+ _proxyListener.onSendLocationResponse(msg);
+ onRPCResponseReceived(msg);
+ }
+ }
+ else if (functionName.equals(FunctionID.DIAL_NUMBER.toString())) {
+
+ final DialNumberResponse msg = new DialNumberResponse(hash);
+ if (_callbackToUIThread) {
+ // Run in UI thread
+ _mainUIHandler.post(new Runnable() {
+ @Override
+ public void run() {
+ _proxyListener.onDialNumberResponse(msg);
+ onRPCResponseReceived(msg);
+ }
+ });
+ } else {
+ _proxyListener.onDialNumberResponse(msg);
+ onRPCResponseReceived(msg);
+ }
+ }
+ else if (functionName.equals(FunctionID.SHOW_CONSTANT_TBT.toString())) {
+ final ShowConstantTbtResponse msg = new ShowConstantTbtResponse(hash);
+ if (_callbackToUIThread) {
+ _mainUIHandler.post(new Runnable() {
+ @Override
+ public void run() {
+ _proxyListener.onShowConstantTbtResponse(msg);
+ onRPCResponseReceived(msg);
+ }
+ });
+ } else {
+ _proxyListener.onShowConstantTbtResponse(msg);
+ onRPCResponseReceived(msg);
+ }
+ }
+ else if (functionName.equals(FunctionID.ALERT_MANEUVER.toString())) {
+ final AlertManeuverResponse msg = new AlertManeuverResponse(hash);
+ if (_callbackToUIThread) {
+ _mainUIHandler.post(new Runnable() {
+ @Override
+ public void run() {
+ _proxyListener.onAlertManeuverResponse(msg);
+ onRPCResponseReceived(msg);
+ }
+ });
+ } else {
+ _proxyListener.onAlertManeuverResponse(msg);
+ onRPCResponseReceived(msg);
+ }
+ } else if (functionName.equals(FunctionID.UPDATE_TURN_LIST.toString())) {
+ final UpdateTurnListResponse msg = new UpdateTurnListResponse(hash);
+ if (_callbackToUIThread) {
+ _mainUIHandler.post(new Runnable() {
+ @Override
+ public void run() {
+ _proxyListener.onUpdateTurnListResponse(msg);
+ onRPCResponseReceived(msg);
+ }
+ });
+ } else {
+ _proxyListener.onUpdateTurnListResponse(msg);
+ onRPCResponseReceived(msg);
+ }
+ }
+ else {
+ if (_sdlMsgVersion != null) {
+ DebugTool.logError("Unrecognized response Message: " + functionName.toString() +
+ "SDL Message Version = " + _sdlMsgVersion);
+ } else {
+ DebugTool.logError("Unrecognized response Message: " + functionName.toString());
+ }
+ } // end-if
+
+ } else if (messageType.equals(RPCMessage.KEY_NOTIFICATION)) {
+ SdlTrace.logRPCEvent(InterfaceActivityDirection.Receive, new RPCNotification(rpcMsg), SDL_LIB_TRACE_KEY);
+ if (functionName.equals(FunctionID.ON_HMI_STATUS.toString())) {
+ // OnHMIStatus
+
+ final OnHMIStatus msg = new OnHMIStatus(hash);
+
+ //setup lockscreeninfo
+ if (sdlSession != null)
+ {
+ sdlSession.getLockScreenMan().setHMILevel(msg.getHmiLevel());
+ }
+
+ msg.setFirstRun(Boolean.valueOf(firstTimeFull));
+ if (msg.getHmiLevel() == HMILevel.HMI_FULL) firstTimeFull = false;
+
+ if (msg.getHmiLevel() != _priorHmiLevel && msg.getAudioStreamingState() != _priorAudioStreamingState) {
+ if (_callbackToUIThread) {
+ // Run in UI thread
+ _mainUIHandler.post(new Runnable() {
+ @Override
+ public void run() {
+ _proxyListener.onOnHMIStatus((OnHMIStatus)msg);
+ _proxyListener.onOnLockScreenNotification(sdlSession.getLockScreenMan().getLockObj());
+ onRPCNotificationReceived(msg);
+ }
+ });
+ } else {
+ _proxyListener.onOnHMIStatus((OnHMIStatus)msg);
+ _proxyListener.onOnLockScreenNotification(sdlSession.getLockScreenMan().getLockObj());
+ onRPCNotificationReceived(msg);
+ }
+ }
+ } else if (functionName.equals(FunctionID.ON_COMMAND.toString())) {
+ // OnCommand
+
+ final OnCommand msg = new OnCommand(hash);
+ if (_callbackToUIThread) {
+ // Run in UI thread
+ _mainUIHandler.post(new Runnable() {
+ @Override
+ public void run() {
+ _proxyListener.onOnCommand((OnCommand)msg);
+ onRPCNotificationReceived(msg);
+ }
+ });
+ } else {
+ _proxyListener.onOnCommand((OnCommand)msg);
+ onRPCNotificationReceived(msg);
+ }
+ } else if (functionName.equals(FunctionID.ON_DRIVER_DISTRACTION.toString())) {
+ // OnDriverDistration
+
+ final OnDriverDistraction msg = new OnDriverDistraction(hash);
+
+ //setup lockscreeninfo
+ if (sdlSession != null)
+ {
+ DriverDistractionState drDist = msg.getState();
+ boolean bVal = false;
+ if (drDist == DriverDistractionState.DD_ON)
+ bVal = true;
+ else
+ bVal = false;
+ sdlSession.getLockScreenMan().setDriverDistStatus(bVal);
+ }
+
+ if (_callbackToUIThread) {
+ // Run in UI thread
+ _mainUIHandler.post(new Runnable() {
+ @Override
+ public void run() {
+ _proxyListener.onOnDriverDistraction(msg);
+ _proxyListener.onOnLockScreenNotification(sdlSession.getLockScreenMan().getLockObj());
+ onRPCNotificationReceived(msg);
+ }
+ });
+ } else {
+ _proxyListener.onOnDriverDistraction(msg);
+ _proxyListener.onOnLockScreenNotification(sdlSession.getLockScreenMan().getLockObj());
+ onRPCNotificationReceived(msg);
+ }
+ } else if (functionName.equals(FunctionID.ON_ENCODED_SYNC_P_DATA.toString())) {
+
+ final OnSystemRequest msg = new OnSystemRequest(hash);
+
+ Intent sendIntent = createBroadcastIntent();
+ updateBroadcastIntent(sendIntent, "RPC_NAME", FunctionID.ON_SYSTEM_REQUEST.toString());
+ updateBroadcastIntent(sendIntent, "TYPE", RPCMessage.KEY_NOTIFICATION);
+
+ // If url is null, then send notification to the app, otherwise, send to URL
+ if (msg.getUrl() == null) {
+ updateBroadcastIntent(sendIntent, "COMMENT1", "URL is a null value (received)");
+ sendBroadcastIntent(sendIntent);
+ if (_callbackToUIThread) {
+ // Run in UI thread
+ _mainUIHandler.post(new Runnable() {
+ @Override
+ public void run() {
+ _proxyListener.onOnSystemRequest(msg);
+ onRPCNotificationReceived(msg);
+ }
+ });
+ } else {
+ _proxyListener.onOnSystemRequest(msg);
+ onRPCNotificationReceived(msg);
+ }
+ } else {
+ updateBroadcastIntent(sendIntent, "COMMENT1", "Sending to cloud: " + msg.getUrl());
+ sendBroadcastIntent(sendIntent);
+
+ Log.i("pt", "send to url");
+
+ if ( (msg.getUrl() != null) )
+ {
+ Thread handleOffboardTransmissionThread = new Thread() {
+ @Override
+ public void run() {
+ sendOnSystemRequestToUrl(msg);
+ }
+ };
+
+ handleOffboardTransmissionThread.start();
+ }
+ }
+ } else if (functionName.equals(FunctionID.ON_PERMISSIONS_CHANGE.toString())) {
+ //OnPermissionsChange
+
+ final OnPermissionsChange msg = new OnPermissionsChange(hash);
+ if (_callbackToUIThread) {
+ // Run in UI thread
+ _mainUIHandler.post(new Runnable() {
+ @Override
+ public void run() {
+ _proxyListener.onOnPermissionsChange(msg);
+ onRPCNotificationReceived(msg);
+ }
+ });
+ } else {
+ _proxyListener.onOnPermissionsChange(msg);
+ onRPCNotificationReceived(msg);
+ }
+ } else if (functionName.equals(FunctionID.ON_TBT_CLIENT_STATE.toString())) {
+ // OnTBTClientState
+
+ final OnTBTClientState msg = new OnTBTClientState(hash);
+ if (_callbackToUIThread) {
+ // Run in UI thread
+ _mainUIHandler.post(new Runnable() {
+ @Override
+ public void run() {
+ _proxyListener.onOnTBTClientState(msg);
+ onRPCNotificationReceived(msg);
+ }
+ });
+ } else {
+ _proxyListener.onOnTBTClientState(msg);
+ onRPCNotificationReceived(msg);
+ }
+ } else if (functionName.equals(FunctionID.ON_BUTTON_PRESS.toString())) {
+ // OnButtonPress
+
+ final OnButtonPress msg = new OnButtonPress(hash);
+ if (_callbackToUIThread) {
+ // Run in UI thread
+ _mainUIHandler.post(new Runnable() {
+ @Override
+ public void run() {
+ _proxyListener.onOnButtonPress((OnButtonPress)msg);
+ onRPCNotificationReceived(msg);
+ }
+ });
+ } else {
+ _proxyListener.onOnButtonPress((OnButtonPress)msg);
+ onRPCNotificationReceived(msg);
+ }
+ } else if (functionName.equals(FunctionID.ON_BUTTON_EVENT.toString())) {
+ // OnButtonEvent
+
+ final OnButtonEvent msg = new OnButtonEvent(hash);
+ if (_callbackToUIThread) {
+ // Run in UI thread
+ _mainUIHandler.post(new Runnable() {
+ @Override
+ public void run() {
+ _proxyListener.onOnButtonEvent((OnButtonEvent)msg);
+ onRPCNotificationReceived(msg);
+ }
+ });
+ } else {
+ _proxyListener.onOnButtonEvent((OnButtonEvent)msg);
+ onRPCNotificationReceived(msg);
+ }
+ } else if (functionName.equals(FunctionID.ON_LANGUAGE_CHANGE.toString())) {
+ // OnLanguageChange
+
+ final OnLanguageChange msg = new OnLanguageChange(hash);
+ if (_callbackToUIThread) {
+ // Run in UI thread
+ _mainUIHandler.post(new Runnable() {
+ @Override
+ public void run() {
+ _proxyListener.onOnLanguageChange((OnLanguageChange)msg);
+ onRPCNotificationReceived(msg);
+ }
+ });
+ } else {
+ _proxyListener.onOnLanguageChange((OnLanguageChange)msg);
+ onRPCNotificationReceived(msg);
+ }
+ } else if (functionName.equals(FunctionID.ON_HASH_CHANGE.toString())) {
+ // OnLanguageChange
+
+ final OnHashChange msg = new OnHashChange(hash);
+ if (_callbackToUIThread) {
+ // Run in UI thread
+ _mainUIHandler.post(new Runnable() {
+ @Override
+ public void run() {
+ _proxyListener.onOnHashChange((OnHashChange)msg);
+ onRPCNotificationReceived(msg);
+ if (_bAppResumeEnabled)
+ {
+ _lastHashID = msg.getHashID();
+ }
+ }
+ });
+ } else {
+ _proxyListener.onOnHashChange((OnHashChange)msg);
+ onRPCNotificationReceived(msg);
+ if (_bAppResumeEnabled)
+ {
+ _lastHashID = msg.getHashID();
+ }
+ }
+ } else if (functionName.equals(FunctionID.ON_SYSTEM_REQUEST.toString())) {
+ // OnSystemRequest
+
+ final OnSystemRequest msg = new OnSystemRequest(hash);
+
+ if ((msg.getUrl() != null) &&
+ (((msg.getRequestType() == RequestType.PROPRIETARY) && (msg.getFileType() == FileType.JSON))
+ || ((msg.getRequestType() == RequestType.HTTP) && (msg.getFileType() == FileType.BINARY)))){
+ Thread handleOffboardTransmissionThread = new Thread() {
+ @Override
+ public void run() {
+ sendOnSystemRequestToUrl(msg);
+ }
+ };
+
+ handleOffboardTransmissionThread.start();
+ }
+
+
+ if(msg.getRequestType() == RequestType.LOCK_SCREEN_ICON_URL &&
+ msg.getUrl() != null){
+ lockScreenIconRequest = msg;
+ }
+
+ if (_callbackToUIThread) {
+ // Run in UI thread
+ _mainUIHandler.post(new Runnable() {
+ @Override
+ public void run() {
+ _proxyListener.onOnSystemRequest((OnSystemRequest)msg);
+ onRPCNotificationReceived(msg);
+ }
+ });
+ } else {
+ _proxyListener.onOnSystemRequest((OnSystemRequest)msg);
+ onRPCNotificationReceived(msg);
+ }
+ } else if (functionName.equals(FunctionID.ON_AUDIO_PASS_THRU.toString())) {
+ // OnAudioPassThru
+ final OnAudioPassThru msg = new OnAudioPassThru(hash);
+ if (_callbackToUIThread) {
+ // Run in UI thread
+ _mainUIHandler.post(new Runnable() {
+ @Override
+ public void run() {
+ _proxyListener.onOnAudioPassThru((OnAudioPassThru)msg);
+ onRPCNotificationReceived(msg);
+ }
+ });
+ } else {
+ _proxyListener.onOnAudioPassThru((OnAudioPassThru)msg);
+ onRPCNotificationReceived(msg);
+ }
+ } else if (functionName.equals(FunctionID.ON_VEHICLE_DATA.toString())) {
+ // OnVehicleData
+ final OnVehicleData msg = new OnVehicleData(hash);
+ if (_callbackToUIThread) {
+ // Run in UI thread
+ _mainUIHandler.post(new Runnable() {
+ @Override
+ public void run() {
+ _proxyListener.onOnVehicleData((OnVehicleData)msg);
+ onRPCNotificationReceived(msg);
+ }
+ });
+ } else {
+ _proxyListener.onOnVehicleData((OnVehicleData)msg);
+ onRPCNotificationReceived(msg);
+ }
+ }
+ else if (functionName.equals(FunctionID.ON_APP_INTERFACE_UNREGISTERED.toString())) {
+ // OnAppInterfaceUnregistered
+
+ _appInterfaceRegisterd = false;
+ synchronized(APP_INTERFACE_REGISTERED_LOCK) {
+ APP_INTERFACE_REGISTERED_LOCK.notify();
+ }
+
+ final OnAppInterfaceUnregistered msg = new OnAppInterfaceUnregistered(hash);
+
+ Intent sendIntent = createBroadcastIntent();
+ updateBroadcastIntent(sendIntent, "RPC_NAME", FunctionID.ON_APP_INTERFACE_UNREGISTERED.toString());
+ updateBroadcastIntent(sendIntent, "TYPE", RPCMessage.KEY_NOTIFICATION);
+ updateBroadcastIntent(sendIntent, "DATA",serializeJSON(msg));
+ sendBroadcastIntent(sendIntent);
+
+ if (_advancedLifecycleManagementEnabled) {
+ // This requires the proxy to be cycled
+ cycleProxy(SdlDisconnectedReason.convertAppInterfaceUnregisteredReason(msg.getReason()));
+ } else {
+ if (_callbackToUIThread) {
+ // Run in UI thread
+ _mainUIHandler.post(new Runnable() {
+ @Override
+ public void run() {
+ ((IProxyListener)_proxyListener).onOnAppInterfaceUnregistered(msg);
+ onRPCNotificationReceived(msg);
+ }
+ });
+ } else {
+ ((IProxyListener)_proxyListener).onOnAppInterfaceUnregistered(msg);
+ onRPCNotificationReceived(msg);
+ }
+ notifyProxyClosed("OnAppInterfaceUnregistered", null, SdlDisconnectedReason.APP_INTERFACE_UNREG);
+ }
+ }
+ else if (functionName.equals(FunctionID.ON_KEYBOARD_INPUT.toString())) {
+ final OnKeyboardInput msg = new OnKeyboardInput(hash);
+ if (_callbackToUIThread) {
+ // Run in UI thread
+ _mainUIHandler.post(new Runnable() {
+ @Override
+ public void run() {
+ _proxyListener.onOnKeyboardInput((OnKeyboardInput)msg);
+ onRPCNotificationReceived(msg);
+ }
+ });
+ } else {
+ _proxyListener.onOnKeyboardInput((OnKeyboardInput)msg);
+ onRPCNotificationReceived(msg);
+ }
+ }
+ else if (functionName.equals(FunctionID.ON_TOUCH_EVENT.toString())) {
+ final OnTouchEvent msg = new OnTouchEvent(hash);
+ if (_callbackToUIThread) {
+ // Run in UI thread
+ _mainUIHandler.post(new Runnable() {
+ @Override
+ public void run() {
+ _proxyListener.onOnTouchEvent((OnTouchEvent)msg);
+ onRPCNotificationReceived(msg);
+ }
+ });
+ } else {
+ _proxyListener.onOnTouchEvent((OnTouchEvent)msg);
+ onRPCNotificationReceived(msg);
+ }
+ }
+ else if (functionName.equals(FunctionID.ON_WAY_POINT_CHANGE.toString())) {
+ final OnWayPointChange msg = new OnWayPointChange(hash);
+ if (_callbackToUIThread) {
+ // Run in UI thread
+ _mainUIHandler.post(new Runnable() {
+ @Override
+ public void run() {
+ _proxyListener.onOnWayPointChange((OnWayPointChange)msg);
+ onRPCNotificationReceived(msg);
+ }
+ });
+ } else {
+ _proxyListener.onOnWayPointChange((OnWayPointChange)msg);
+ onRPCNotificationReceived(msg);
+ }
+ }
+ else {
+ if (_sdlMsgVersion != null) {
+ DebugTool.logInfo("Unrecognized notification Message: " + functionName.toString() +
+ " connected to SDL using message version: " + _sdlMsgVersion.getMajorVersion() + "." + _sdlMsgVersion.getMinorVersion());
+ } else {
+ DebugTool.logInfo("Unrecognized notification Message: " + functionName.toString());
+ }
+ } // end-if
+ } // end-if notification
+
+ SdlTrace.logProxyEvent("Proxy received RPC Message: " + functionName, SDL_LIB_TRACE_KEY);
+ }
+
+ /**
+ * Takes an RPCRequest and sends it to SDL. Responses are captured through callback on IProxyListener.
+ *
+ * @param request
+ * @throws SdlException
+ */
+ public void sendRPCRequest(RPCRequest request) throws SdlException {
+ if (_proxyDisposed) {
+ throw new SdlException("This object has been disposed, it is no long capable of executing methods.", SdlExceptionCause.SDL_PROXY_DISPOSED);
+ }
+
+ // Test if request is null
+ if (request == null) {
+ SdlTrace.logProxyEvent("Application called sendRPCRequest method with a null RPCRequest.", SDL_LIB_TRACE_KEY);
+ throw new IllegalArgumentException("sendRPCRequest cannot be called with a null request.");
+ }
+
+ SdlTrace.logProxyEvent("Application called sendRPCRequest method for RPCRequest: ." + request.getFunctionName(), SDL_LIB_TRACE_KEY);
+
+ // Test if SdlConnection is null
+ synchronized(CONNECTION_REFERENCE_LOCK) {
+ if (sdlSession == null || !sdlSession.getIsConnected()) {
+ SdlTrace.logProxyEvent("Application attempted to send and RPCRequest without a connected transport.", SDL_LIB_TRACE_KEY);
+ throw new SdlException("There is no valid connection to SDL. sendRPCRequest cannot be called until SDL has been connected.", SdlExceptionCause.SDL_UNAVAILABLE);
+ }
+ }
+
+ // Test for illegal correlation ID
+ if (isCorrelationIDProtected(request.getCorrelationID())) {
+
+ SdlTrace.logProxyEvent("Application attempted to use the reserved correlation ID, " + request.getCorrelationID(), SDL_LIB_TRACE_KEY);
+ throw new SdlException("Invalid correlation ID. The correlation ID, " + request.getCorrelationID()
+ + " , is a reserved correlation ID.", SdlExceptionCause.RESERVED_CORRELATION_ID);
+ }
+
+ // Throw exception if RPCRequest is sent when SDL is unavailable
+ if (!_appInterfaceRegisterd && !request.getFunctionName().equals(FunctionID.REGISTER_APP_INTERFACE.toString())) {
+
+ SdlTrace.logProxyEvent("Application attempted to send an RPCRequest (non-registerAppInterface), before the interface was registerd.", SDL_LIB_TRACE_KEY);
+ throw new SdlException("SDL is currently unavailable. RPC Requests cannot be sent.", SdlExceptionCause.SDL_UNAVAILABLE);
+ }
+
+ if (_advancedLifecycleManagementEnabled) {
+ if (request.getFunctionName().equals(FunctionID.REGISTER_APP_INTERFACE.toString())
+ || request.getFunctionName().equals(FunctionID.UNREGISTER_APP_INTERFACE.toString())) {
+
+ SdlTrace.logProxyEvent("Application attempted to send a RegisterAppInterface or UnregisterAppInterface while using ALM.", SDL_LIB_TRACE_KEY);
+ throw new SdlException("The RPCRequest, " + request.getFunctionName() +
+ ", is unallowed using the Advanced Lifecycle Management Model.", SdlExceptionCause.INCORRECT_LIFECYCLE_MODEL);
+ }
+ }
+
+ sendRPCRequestPrivate(request);
+ } // end-method
+
+ protected void notifyProxyClosed(final String info, final Exception e, final SdlDisconnectedReason reason) {
+ SdlTrace.logProxyEvent("NotifyProxyClose", SDL_LIB_TRACE_KEY);
+ OnProxyClosed message = new OnProxyClosed(info, e, reason);
+ queueInternalMessage(message);
+ }
+
+ private void passErrorToProxyListener(final String info, final Exception e) {
+
+ OnError message = new OnError(info, e);
+ queueInternalMessage(message);
+ }
+
+ private void startRPCProtocolSession(byte sessionID, String correlationID) {
+
+ // Set Proxy Lifecyclek Available
+ if (_advancedLifecycleManagementEnabled) {
+
+ try {
+ registerAppInterfacePrivate(
+ _sdlMsgVersionRequest,
+ _applicationName,
+ _ttsName,
+ _ngnMediaScreenAppName,
+ _vrSynonyms,
+ _isMediaApp,
+ _sdlLanguageDesired,
+ _hmiDisplayLanguageDesired,
+ _appType,
+ _appID,
+ _autoActivateIdDesired,
+ REGISTER_APP_INTERFACE_CORRELATION_ID);
+
+ } catch (Exception e) {
+ notifyProxyClosed("Failed to register application interface with SDL. Check parameter values given to SdlProxy constructor.", e, SdlDisconnectedReason.SDL_REGISTRATION_ERROR);
+ }
+ } else {
+ InternalProxyMessage message = new InternalProxyMessage(InternalProxyMessage.OnProxyOpened);
+ queueInternalMessage(message);
+ }
+ }
+
+ // Queue internal callback message
+ private void queueInternalMessage(InternalProxyMessage message) {
+ synchronized(INTERNAL_MESSAGE_QUEUE_THREAD_LOCK) {
+ if (_internalProxyMessageDispatcher != null) {
+ _internalProxyMessageDispatcher.queueMessage(message);
+ }
+ }
+ }
+
+ // Queue incoming ProtocolMessage
+ private void queueIncomingMessage(ProtocolMessage message) {
+ synchronized(INCOMING_MESSAGE_QUEUE_THREAD_LOCK) {
+ if (_incomingProxyMessageDispatcher != null) {
+ _incomingProxyMessageDispatcher.queueMessage(message);
+ }
+ }
+ }
+
+ private FileInputStream getFileInputStream(String sLocalFile)
+ {
+ FileInputStream is = null;
+ try
+ {
+ is = new FileInputStream(sLocalFile);
+ }
+ catch (IOException e1)
+ {
+ e1.printStackTrace();
+ }
+ return is;
+ }
+
+ private Long getFileInputStreamSize(FileInputStream is)
+ {
+ Long lSize = null;
+
+ try
+ {
+ lSize = is.getChannel().size();
+ }
+ catch (IOException e)
+ {
+ e.printStackTrace();
+ }
+ return lSize;
+ }
+
+ private void closeFileInputStream(FileInputStream is)
+ {
+ try
+ {
+ is.close();
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+ }
+
+ @SuppressWarnings("unchecked")
+ private RPCStreamController startRPCStream(String sLocalFile, PutFile request, SessionType sType, byte rpcSessionID, byte wiproVersion)
+ {
+ if (sdlSession == null) return null;
+
+ FileInputStream is = getFileInputStream(sLocalFile);
+ if (is == null) return null;
+
+ Long lSize = getFileInputStreamSize(is);
+ if (lSize == null)
+ {
+ closeFileInputStream(is);
+ return null;
+ }
+
+ try {
+ StreamRPCPacketizer rpcPacketizer = new StreamRPCPacketizer((SdlProxyBase<IProxyListenerBase>) this, sdlSession, is, request, sType, rpcSessionID, wiproVersion, lSize, sdlSession);
+ rpcPacketizer.start();
+ RPCStreamController streamController = new RPCStreamController(rpcPacketizer, request.getCorrelationID());
+ return streamController;
+ } catch (Exception e) {
+ Log.e("SyncConnection", "Unable to start streaming:" + e.toString());
+ return null;
+ }
+ }
+
+ @SuppressWarnings("unchecked")
+ private RPCStreamController startRPCStream(InputStream is, PutFile request, SessionType sType, byte rpcSessionID, byte wiproVersion)
+ {
+ if (sdlSession == null) return null;
+ Long lSize = request.getLength();
+
+ if (lSize == null)
+ {
+ return null;
+ }
+
+ try {
+ StreamRPCPacketizer rpcPacketizer = new StreamRPCPacketizer((SdlProxyBase<IProxyListenerBase>) this, sdlSession, is, request, sType, rpcSessionID, wiproVersion, lSize, sdlSession);
+ rpcPacketizer.start();
+ RPCStreamController streamController = new RPCStreamController(rpcPacketizer, request.getCorrelationID());
+ return streamController;
+ } catch (Exception e) {
+ Log.e("SyncConnection", "Unable to start streaming:" + e.toString());
+ return null;
+ }
+ }
+
+ private RPCStreamController startPutFileStream(String sPath, PutFile msg) {
+ if (sdlSession == null) return null;
+ return startRPCStream(sPath, msg, SessionType.RPC, sdlSession.getSessionId(), _wiproVersion);
+ }
+
+ private RPCStreamController startPutFileStream(InputStream is, PutFile msg) {
+ if (sdlSession == null) return null;
+ if (is == null) return null;
+ startRPCStream(is, msg, SessionType.RPC, sdlSession.getSessionId(), _wiproVersion);
+ return null;
+ }
+
+ public boolean startRPCStream(InputStream is, RPCRequest msg) {
+ if (sdlSession == null) return false;
+ sdlSession.startRPCStream(is, msg, SessionType.RPC, sdlSession.getSessionId(), _wiproVersion);
+ return true;
+ }
+
+ public OutputStream startRPCStream(RPCRequest msg) {
+ if (sdlSession == null) return null;
+ return sdlSession.startRPCStream(msg, SessionType.RPC, sdlSession.getSessionId(), _wiproVersion);
+ }
+
+ public void endRPCStream() {
+ if (sdlSession == null) return;
+ sdlSession.stopRPCStream();
+ }
+
+ private class CallableMethod implements Callable<Void> {
+ private long waitTime;
+
+ public CallableMethod(int timeInMillis){
+ this.waitTime=timeInMillis;
+ }
+ @Override
+ public Void call() {
+ try {
+ Thread.sleep(waitTime);
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ return null;
+ }
+ }
+ public FutureTask<Void> createFutureTask(CallableMethod callMethod){
+ return new FutureTask<Void>(callMethod);
+ }
+ public ScheduledExecutorService createScheduler(){
+ return Executors.newSingleThreadScheduledExecutor();
+ }
+
+ /**
+ *Opens the video service (serviceType 11) and subsequently streams raw H264 video from an InputStream provided by the app
+ *@return true if service is opened successfully and stream is started, return false otherwise
+ */
+ public boolean startH264(InputStream is, boolean isEncrypted) {
+
+ if (sdlSession == null) return false;
+
+ navServiceStartResponseReceived = false;
+ navServiceStartResponse = false;
+
+ sdlSession.startService(SessionType.NAV, sdlSession.getSessionId(), isEncrypted);
+
+ FutureTask<Void> fTask = createFutureTask(new CallableMethod(RESPONSE_WAIT_TIME));
+ ScheduledExecutorService scheduler = createScheduler();
+ scheduler.execute(fTask);
+
+ while (!navServiceStartResponseReceived && !fTask.isDone());
+ scheduler.shutdown();
+ scheduler = null;
+ fTask = null;
+
+ if (navServiceStartResponse) {
+ try {
+ sdlSession.startStream(is, SessionType.NAV, sdlSession.getSessionId());
+ return true;
+ } catch (Exception e) {
+ return false;
+ }
+ } else {
+ return false;
+ }
+ }
+
+ /**
+ *Opens the video service (serviceType 11) and subsequently provides an OutputStream to the app to use for a raw H264 video stream
+ *@return OutputStream if service is opened successfully and stream is started, return null otherwise
+ */
+ public OutputStream startH264(boolean isEncrypted) {
+
+ if (sdlSession == null) return null;
+
+ navServiceStartResponseReceived = false;
+ navServiceStartResponse = false;
+ sdlSession.startService(SessionType.NAV, sdlSession.getSessionId(), isEncrypted);
+
+ FutureTask<Void> fTask = createFutureTask(new CallableMethod(RESPONSE_WAIT_TIME));
+ ScheduledExecutorService scheduler = createScheduler();
+ scheduler.execute(fTask);
+
+ while (!navServiceStartResponseReceived && !fTask.isDone());
+ scheduler.shutdown();
+ scheduler = null;
+ fTask = null;
+
+ if (navServiceStartResponse) {
+ try {
+ return sdlSession.startStream(SessionType.NAV, sdlSession.getSessionId());
+ } catch (Exception e) {
+ return null;
+ }
+ } else {
+ return null;
+ }
+ }
+
+ /**
+ *Closes the opened video service (serviceType 11)
+ *@return true if the video service is closed successfully, return false otherwise
+ */
+ public boolean endH264() {
+ if (sdlSession == null) return false;
+
+ navServiceEndResponseReceived = false;
+ navServiceEndResponse = false;
+ sdlSession.stopVideoStream();
+
+ FutureTask<Void> fTask = createFutureTask(new CallableMethod(RESPONSE_WAIT_TIME));
+ ScheduledExecutorService scheduler = createScheduler();
+ scheduler.execute(fTask);
+
+ while (!navServiceEndResponseReceived && !fTask.isDone());
+ scheduler.shutdown();
+ scheduler = null;
+ fTask = null;
+
+ if (navServiceEndResponse) {
+ return true;
+ } else {
+ return false;
+ }
+ }
+ /**
+ *Pauses the stream for the opened audio service (serviceType 10)
+ *@return true if the audio service stream is paused successfully, return false otherwise
+ */
+ public boolean pausePCM()
+ {
+ if (sdlSession == null) return false;
+ return sdlSession.pauseAudioStream();
+ }
+
+ /**
+ *Pauses the stream for the opened video service (serviceType 11)
+ *@return true if the video service stream is paused successfully, return false otherwise
+ */
+ public boolean pauseH264()
+ {
+ if (sdlSession == null) return false;
+ return sdlSession.pauseVideoStream();
+ }
+
+ /**
+ *Resumes the stream for the opened audio service (serviceType 10)
+ *@return true if the audio service stream is resumed successfully, return false otherwise
+ */
+ public boolean resumePCM()
+ {
+ if (sdlSession == null) return false;
+ return sdlSession.resumeAudioStream();
+ }
+
+ /**
+ *Resumes the stream for the opened video service (serviceType 11)
+ *@return true if the video service is resumed successfully, return false otherwise
+ */
+ public boolean resumeH264()
+ {
+ if (sdlSession == null) return false;
+ return sdlSession.resumeVideoStream();
+ }
+
+
+ /**
+ *Opens the audio service (serviceType 10) and subsequently streams raw PCM audio from an InputStream provided by the app
+ *@return true if service is opened successfully and stream is started, return false otherwise
+ */
+ public boolean startPCM(InputStream is, boolean isEncrypted) {
+ if (sdlSession == null) return false;
+
+ pcmServiceStartResponseReceived = false;
+ pcmServiceStartResponse = false;
+ sdlSession.startService(SessionType.PCM, sdlSession.getSessionId(), isEncrypted);
+
+ FutureTask<Void> fTask = createFutureTask(new CallableMethod(RESPONSE_WAIT_TIME));
+ ScheduledExecutorService scheduler = createScheduler();
+ scheduler.execute(fTask);
+
+ while (!pcmServiceStartResponseReceived && !fTask.isDone());
+ scheduler.shutdown();
+ scheduler = null;
+ fTask = null;
+
+ if (pcmServiceStartResponse) {
+ try {
+ sdlSession.startStream(is, SessionType.PCM, sdlSession.getSessionId());
+ return true;
+ } catch (Exception e) {
+ return false;
+ }
+ } else {
+ return false;
+ }
+ }
+
+ /**
+ *Opens the audio service (serviceType 10) and subsequently provides an OutputStream to the app
+ *@return OutputStream if service is opened successfully and stream is started, return null otherwise
+ */
+ public OutputStream startPCM(boolean isEncrypted) {
+ if (sdlSession == null) return null;
+
+ pcmServiceStartResponseReceived = false;
+ pcmServiceStartResponse = false;
+ sdlSession.startService(SessionType.PCM, sdlSession.getSessionId(), isEncrypted);
+
+ FutureTask<Void> fTask = createFutureTask(new CallableMethod(RESPONSE_WAIT_TIME));
+ ScheduledExecutorService scheduler = createScheduler();
+ scheduler.execute(fTask);
+
+ while (!pcmServiceStartResponseReceived && !fTask.isDone());
+ scheduler.shutdown();
+ scheduler = null;
+ fTask = null;
+
+ if (pcmServiceStartResponse) {
+ try {
+ return sdlSession.startStream(SessionType.PCM, sdlSession.getSessionId());
+ } catch (Exception e) {
+ return null;
+ }
+ } else {
+ return null;
+ }
+ }
+
+ /**
+ *Closes the opened audio service (serviceType 10)
+ *@return true if the audio service is closed successfully, return false otherwise
+ */
+ public boolean endPCM() {
+ if (sdlSession == null) return false;
+ SdlConnection sdlConn = sdlSession.getSdlConnection();
+ if (sdlConn == null) return false;
+
+ pcmServiceEndResponseReceived = false;
+ pcmServiceEndResponse = false;
+ sdlSession.stopAudioStream();
+
+ FutureTask<Void> fTask = createFutureTask(new CallableMethod(RESPONSE_WAIT_TIME));
+ ScheduledExecutorService scheduler = createScheduler();
+ scheduler.execute(fTask);
+
+ while (!pcmServiceEndResponseReceived && !fTask.isDone());
+ scheduler.shutdown();
+ scheduler = null;
+ fTask = null;
+
+ if (pcmServiceEndResponse) {
+ return true;
+ } else {
+ return false;
+ }
+ }
+
+ /**
+ * Opens the video service (serviceType 11) and creates a Surface (used for streaming video) with input parameters provided by the app
+ * @param frameRate - specified rate of frames to utilize for creation of Surface
+ * @param iFrameInterval - specified interval to utilize for creation of Surface
+ * @param width - specified width to utilize for creation of Surface
+ * @param height - specified height to utilize for creation of Surface
+ * @param bitrate - specified bitrate to utilize for creation of Surface
+ *@return Surface if service is opened successfully and stream is started, return null otherwise
+ */
+ public Surface createOpenGLInputSurface(int frameRate, int iFrameInterval, int width,
+ int height, int bitrate, boolean isEncrypted) {
+
+ if (sdlSession == null) return null;
+ SdlConnection sdlConn = sdlSession.getSdlConnection();
+ if (sdlConn == null) return null;
+
+ navServiceStartResponseReceived = false;
+ navServiceStartResponse = false;
+ sdlSession.startService(SessionType.NAV, sdlSession.getSessionId(), isEncrypted);
+
+ FutureTask<Void> fTask = createFutureTask(new CallableMethod(RESPONSE_WAIT_TIME));
+ ScheduledExecutorService scheduler = createScheduler();
+ scheduler.execute(fTask);
+
+ while (!navServiceStartResponseReceived && !fTask.isDone());
+ scheduler.shutdown();
+ scheduler = null;
+ fTask = null;
+
+ if (navServiceStartResponse) {
+ return sdlSession.createOpenGLInputSurface(frameRate, iFrameInterval, width,
+ height, bitrate, SessionType.NAV, sdlSession.getSessionId());
+ } else {
+ return null;
+ }
+ }
+
+ /**
+ *Starts the MediaCodec encoder utilized in conjunction with the Surface returned via the createOpenGLInputSurface method
+ */
+ public void startEncoder () {
+ if (sdlSession == null) return;
+ SdlConnection sdlConn = sdlSession.getSdlConnection();
+ if (sdlConn == null) return;
+
+ sdlSession.startEncoder();
+ }
+
+ /**
+ *Releases the MediaCodec encoder utilized in conjunction with the Surface returned via the createOpenGLInputSurface method
+ */
+ public void releaseEncoder() {
+ if (sdlSession == null) return;
+ SdlConnection sdlConn = sdlSession.getSdlConnection();
+ if (sdlConn == null) return;
+
+ sdlSession.releaseEncoder();
+ }
+
+ /**
+ *Releases the MediaCodec encoder utilized in conjunction with the Surface returned via the createOpenGLInputSurface method
+ */
+ public void drainEncoder(boolean endOfStream) {
+ if (sdlSession == null) return;
+ SdlConnection sdlConn = sdlSession.getSdlConnection();
+ if (sdlConn == null) return;
+
+ sdlSession.drainEncoder(endOfStream);
+ }
+
+ private void NavServiceStarted() {
+ navServiceStartResponseReceived = true;
+ navServiceStartResponse = true;
+ }
+
+ private void NavServiceStartedNACK() {
+ navServiceStartResponseReceived = true;
+ navServiceStartResponse = false;
+ }
+
+ private void AudioServiceStarted() {
+ pcmServiceStartResponseReceived = true;
+ pcmServiceStartResponse = true;
+ }
+
+ private void RPCProtectedServiceStarted() {
+ rpcProtectedResponseReceived = true;
+ rpcProtectedStartResponse = true;
+ }
+ private void AudioServiceStartedNACK() {
+ pcmServiceStartResponseReceived = true;
+ pcmServiceStartResponse = false;
+ }
+
+ private void NavServiceEnded() {
+ navServiceEndResponseReceived = true;
+ navServiceEndResponse = true;
+ }
+
+ private void NavServiceEndedNACK() {
+ navServiceEndResponseReceived = true;
+ navServiceEndResponse = false;
+ }
+
+ private void AudioServiceEnded() {
+ pcmServiceEndResponseReceived = true;
+ pcmServiceEndResponse = true;
+ }
+
+ private void AudioServiceEndedNACK() {
+ pcmServiceEndResponseReceived = true;
+ pcmServiceEndResponse = false;
+ }
+
+ public void setAppService(Service mService)
+ {
+ _appService = mService;
+ }
+
+ public boolean startProtectedRPCService() {
+ rpcProtectedResponseReceived = false;
+ rpcProtectedStartResponse = false;
+ sdlSession.startService(SessionType.RPC, sdlSession.getSessionId(), true);
+
+ FutureTask<Void> fTask = createFutureTask(new CallableMethod(RESPONSE_WAIT_TIME));
+ ScheduledExecutorService scheduler = createScheduler();
+ scheduler.execute(fTask);
+
+ while (!rpcProtectedResponseReceived && !fTask.isDone());
+ scheduler.shutdown();
+ scheduler = null;
+ fTask = null;
+
+ if (rpcProtectedStartResponse) {
+ return true;
+ } else {
+ return false;
+ }
+ }
+
+ public void getLockScreenIcon(final OnLockScreenIconDownloadedListener l){
+ if(lockScreenIconRequest == null){
+ l.onLockScreenIconDownloadError(new SdlException("This version of SDL core may not support lock screen icons.",
+ SdlExceptionCause.LOCK_SCREEN_ICON_NOT_SUPPORTED));
+ return;
+ }
+
+ LockScreenManager lockMan = sdlSession.getLockScreenMan();
+ Bitmap bitmap = lockMan.getLockScreenIcon();
+
+ // read bitmap if it was already downloaded so we don't have to download it every time
+ if(bitmap != null){
+ l.onLockScreenIconDownloaded(bitmap);
+ }
+ else{
+ String url = lockScreenIconRequest.getUrl();
+ sdlSession.getLockScreenMan().downloadLockScreenIcon(url, l);
+ }
+ }
+
+ /******************** Public Helper Methods *************************/
+
+ /*Begin V1 Enhanced helper*/
+
+ /**
+ *Sends an AddCommand RPCRequest to SDL. Responses are captured through callback on IProxyListener.
+ *
+ *@param commandID -Unique command ID of the command to add.
+ *@param menuText -Menu text for optional sub value containing menu parameters.
+ *@param parentID -Menu parent ID for optional sub value containing menu parameters.
+ *@param position -Menu position for optional sub value containing menu parameters.
+ *@param vrCommands -VR synonyms for this AddCommand.
+ *@param IconValue -A static hex icon value or the binary image file name identifier (sent by the PutFile RPC).
+ *@param IconType -Describes whether the image is static or dynamic
+ *@param correlationID -A unique ID that correlates each RPCRequest and RPCResponse
+ *@throws SdlException
+ */
+ public void addCommand(Integer commandID,
+ String menuText, Integer parentID, Integer position,
+ Vector<String> vrCommands, String IconValue, ImageType IconType, Integer correlationID)
+ throws SdlException {
+
+ AddCommand msg = RPCRequestFactory.buildAddCommand(commandID, menuText, parentID, position,
+ vrCommands, IconValue, IconType, correlationID);
+
+ sendRPCRequest(msg);
+ }
+
+ /**
+ *Sends an AddCommand RPCRequest to SDL. Responses are captured through callback on IProxyListener.
+ *
+ *@param commandID -Unique command ID of the command to add.
+ *@param menuText -Menu text for optional sub value containing menu parameters.
+ *@param position -Menu position for optional sub value containing menu parameters.
+ *@param vrCommands -VR synonyms for this AddCommand.
+ *@param IconValue -A static hex icon value or the binary image file name identifier (sent by the PutFile RPC).
+ *@param IconType -Describes whether the image is static or dynamic
+ *@param correlationID -A unique ID that correlates each RPCRequest and RPCResponse
+ *@throws SdlException
+ */
+ public void addCommand(Integer commandID,
+ String menuText, Integer position,
+ Vector<String> vrCommands, String IconValue, ImageType IconType, Integer correlationID)
+ throws SdlException {
+
+ addCommand(commandID, menuText, null, position, vrCommands, IconValue, IconType, correlationID);
+ }
+
+ /**
+ *Sends an AddCommand RPCRequest to SDL. Responses are captured through callback on IProxyListener.
+ *
+ *@param commandID -Unique command ID of the command to add.
+ *@param menuText -Menu text for optional sub value containing menu parameters.
+ *@param position -Menu position for optional sub value containing menu parameters.
+ *@param IconValue -A static hex icon value or the binary image file name identifier (sent by the PutFile RPC).
+ *@param IconType -Describes whether the image is static or dynamic
+ *@param correlationID -A unique ID that correlates each RPCRequest and RPCResponse
+ *@throws SdlException
+ */
+ public void addCommand(Integer commandID,
+ String menuText, Integer position, String IconValue, ImageType IconType,
+ Integer correlationID)
+ throws SdlException {
+
+ addCommand(commandID, menuText, null, position, null, IconValue, IconType, correlationID);
+ }
+
+ /**
+ *Sends an AddCommand RPCRequest to SDL. Responses are captured through callback on IProxyListener.
+ *
+ *@param commandID -Unique command ID of the command to add.
+ *@param menuText -Menu text for optional sub value containing menu parameters.
+ *@param IconValue -A static hex icon value or the binary image file name identifier (sent by the PutFile RPC).
+ *@param IconType -Describes whether the image is static or dynamic
+ *@param correlationID -A unique ID that correlates each RPCRequest and RPCResponse
+ *@throws SdlException
+ */
+ public void addCommand(Integer commandID,
+ String menuText, String IconValue, ImageType IconType, Integer correlationID)
+ throws SdlException {
+
+ addCommand(commandID, menuText, null, null, null, IconValue, IconType, correlationID);
+ }
+
+ /**
+ * Sends an AddCommand RPCRequest to SDL. Responses are captured through callback on IProxyListener.
+ *
+ * @param commandID -Unique command ID of the command to add.
+ * @param menuText -Menu text for optional sub value containing menu parameters.
+ * @param vrCommands -VR synonyms for this AddCommand.
+ * @param IconValue -A static hex icon value or the binary image file name identifier (sent by the PutFile RPC).
+ * @param IconType -Describes whether the image is static or dynamic
+ * @param correlationID -A unique ID that correlates each RPCRequest and RPCResponse
+ * @throws SdlException
+ */
+ public void addCommand(Integer commandID,
+ String menuText, Vector<String> vrCommands, String IconValue, ImageType IconType, Integer correlationID)
+ throws SdlException {
+
+ addCommand(commandID, menuText, null, null, vrCommands, IconValue, IconType, correlationID);
+ }
+
+ /**
+ * Sends an AddCommand RPCRequest to SDL. Responses are captured through callback on IProxyListener.
+ *
+ * @param commandID -Unique command ID of the command to add.
+ * @param vrCommands -VR synonyms for this AddCommand.
+ * @param IconValue -A static hex icon value or the binary image file name identifier (sent by the PutFile RPC).
+ * @param IconType -Describes whether the image is static or dynamic
+ * @param correlationID -A unique ID that correlates each RPCRequest and RPCResponse
+ * @throws SdlException
+ */
+ public void addCommand(Integer commandID,
+ Vector<String> vrCommands, String IconValue, ImageType IconType, Integer correlationID)
+ throws SdlException {
+
+ addCommand(commandID, null, null, null, vrCommands, IconValue, IconType, correlationID);
+ }
+
+ /*End V1 Enhanced helper*/
+
+ /**
+ *Sends an AddCommand RPCRequest to SDL. Responses are captured through callback on IProxyListener.
+ *
+ *@param commandID -Unique command ID of the command to add.
+ *@param menuText -Menu text for optional sub value containing menu parameters.
+ *@param parentID -Menu parent ID for optional sub value containing menu parameters.
+ *@param position -Menu position for optional sub value containing menu parameters.
+ *@param vrCommands -VR synonyms for this AddCommand.
+ *@param correlationID -A unique ID that correlates each RPCRequest and RPCResponse
+ *@throws SdlException
+ */
+ public void addCommand(Integer commandID,
+ String menuText, Integer parentID, Integer position,
+ Vector<String> vrCommands, Integer correlationID)
+ throws SdlException {
+
+ AddCommand msg = RPCRequestFactory.buildAddCommand(commandID, menuText, parentID, position,
+ vrCommands, correlationID);
+
+ sendRPCRequest(msg);
+ }
+
+ /**
+ *Sends an AddCommand RPCRequest to SDL. Responses are captured through callback on IProxyListener.
+ *
+ *@param commandID -Unique command ID of the command to add.
+ *@param menuText -Menu text for optional sub value containing menu parameters.
+ *@param position -Menu position for optional sub value containing menu parameters.
+ *@param vrCommands -VR synonyms for this AddCommand.
+ *@param correlationID -A unique ID that correlates each RPCRequest and RPCResponse
+ *@throws SdlException
+ */
+ public void addCommand(Integer commandID,
+ String menuText, Integer position,
+ Vector<String> vrCommands, Integer correlationID)
+ throws SdlException {
+
+ addCommand(commandID, menuText, null, position, vrCommands, correlationID);
+ }
+
+ /**
+ *Sends an AddCommand RPCRequest to SDL. Responses are captured through callback on IProxyListener.
+ *
+ *@param commandID -Unique command ID of the command to add.
+ *@param menuText -Menu text for optional sub value containing menu parameters.
+ *@param position -Menu position for optional sub value containing menu parameters.
+ *@param correlationID -A unique ID that correlates each RPCRequest and RPCResponse
+ *@throws SdlException
+ */
+ public void addCommand(Integer commandID,
+ String menuText, Integer position,
+ Integer correlationID)
+ throws SdlException {
+
+ addCommand(commandID, menuText, null, position, null, correlationID);
+ }
+
+ /**
+ *Sends an AddCommand RPCRequest to SDL. Responses are captured through callback on IProxyListener.
+ *
+ *@param commandID -Unique command ID of the command to add.
+ *@param menuText -Menu text for optional sub value containing menu parameters.
+ *@param correlationID -A unique ID that correlates each RPCRequest and RPCResponse
+ *@throws SdlException
+ */
+ public void addCommand(Integer commandID,
+ String menuText, Integer correlationID)
+ throws SdlException {
+ Vector<String> vrCommands = null;
+
+ addCommand(commandID, menuText, null, null, vrCommands, correlationID);
+ }
+
+ /**
+ * Sends an AddCommand RPCRequest to SDL. Responses are captured through callback on IProxyListener.
+ *
+ *@param commandID -Unique command ID of the command to add.
+ *@param menuText -Menu text for optional sub value containing menu parameters.
+ *@param vrCommands -VR synonyms for this AddCommand.
+ *@param correlationID -A unique ID that correlates each RPCRequest and RPCResponse
+ *@throws SdlException
+ */
+ public void addCommand(Integer commandID,
+ String menuText, Vector<String> vrCommands, Integer correlationID)
+ throws SdlException {
+
+ addCommand(commandID, menuText, null, null, vrCommands, correlationID);
+ }
+
+ /**
+ * Sends an AddCommand RPCRequest to SDL. Responses are captured through callback on IProxyListener.
+ *
+ *@param commandID -Unique command ID of the command to add.
+ *@param vrCommands -VR synonyms for this AddCommand.
+ *@param correlationID -A unique ID that correlates each RPCRequest and RPCResponse
+ *@throws SdlException
+ */
+ public void addCommand(Integer commandID,
+ Vector<String> vrCommands, Integer correlationID)
+ throws SdlException {
+
+ addCommand(commandID, null, null, null, vrCommands, correlationID);
+ }
+
+
+ /**
+ * Sends an AddSubMenu RPCRequest to SDL. Responses are captured through callback on IProxyListener.
+ *
+ * @param menuID -Unique ID of the sub menu to add.
+ * @param menuName -Text to show in the menu for this sub menu.
+ * @param position -Position within the items that are are at top level of the in application menu.
+ * @param correlationID -A unique ID that correlates each RPCRequest and RPCResponse
+ * @throws SdlException
+ */
+ public void addSubMenu(Integer menuID, String menuName,
+ Integer position, Integer correlationID)
+ throws SdlException {
+
+ AddSubMenu msg = RPCRequestFactory.buildAddSubMenu(menuID, menuName,
+ position, correlationID);
+
+ sendRPCRequest(msg);
+ }
+
+ /**
+ * Sends an AddSubMenu RPCRequest to SDL. Responses are captured through callback on IProxyListener.
+ *
+ * @param menuID -Unique ID of the sub menu to add.
+ * @param menuName -Text to show in the menu for this sub menu.
+ * @param correlationID -A unique ID that correlates each RPCRequest and RPCResponse
+ * @throws SdlException
+ */
+ public void addSubMenu(Integer menuID, String menuName,
+ Integer correlationID) throws SdlException {
+
+ addSubMenu(menuID, menuName, null, correlationID);
+ }
+
+ /*Begin V1 Enhanced helper*/
+ /**
+ * Sends an Alert RPCRequest to SDL. Responses are captured through callback on IProxyListener.
+ *
+ * @param ttsText -The text to speech message in the form of a string.
+ * @param alertText1 -The first line of the alert text field.
+ * @param alertText2 -The second line of the alert text field.
+ * @param alertText3 -The optional third line of the alert text field.
+ * @param playTone -Defines if tone should be played.
+ * @param duration -Timeout in milliseconds.
+ * @param softButtons -A list of App defined SoftButtons.
+ * @param correlationID -A unique ID that correlates each RPCRequest and RPCResponse
+ * @throws SdlException
+ */
+ public void alert(String ttsText, String alertText1,
+ String alertText2, String alertText3, Boolean playTone, Integer duration, Vector<SoftButton> softButtons,
+ Integer correlationID) throws SdlException {
+
+ Alert msg = RPCRequestFactory.buildAlert(ttsText, alertText1, alertText2, alertText3, playTone, duration, softButtons, correlationID);
+
+ sendRPCRequest(msg);
+ }
+
+ /**
+ * Sends an Alert RPCRequest to SDL. Responses are captured through callback on IProxyListener.
+ *
+ * @param ttsChunks -Text/phonemes to speak in the form of ttsChunks.
+ * @param alertText1 -The first line of the alert text field.
+ * @param alertText2 -The second line of the alert text field.
+ * @param alertText3 -The optional third line of the alert text field.
+ * @param playTone -Defines if tone should be played.
+ * @param duration -Timeout in milliseconds.
+ * @param softButtons -A list of App defined SoftButtons.
+ * @param correlationID -A unique ID that correlates each RPCRequest and RPCResponse
+ * @throws SdlException
+ */
+ public void alert(Vector<TTSChunk> ttsChunks,
+ String alertText1, String alertText2, String alertText3, Boolean playTone,
+ Integer duration, Vector<SoftButton> softButtons, Integer correlationID) throws SdlException {
+
+ Alert msg = RPCRequestFactory.buildAlert(ttsChunks, alertText1, alertText2, alertText3, playTone, duration, softButtons, correlationID);
+
+ sendRPCRequest(msg);
+ }
+
+ /**
+ * Sends an Alert RPCRequest to SDL. Responses are captured through callback on IProxyListener.
+ *
+ * @param ttsText -The text to speech message in the form of a string.
+ * @param playTone -Defines if tone should be played.
+ * @param softButtons -A list of App defined SoftButtons.
+ * @param correlationID -A unique ID that correlates each RPCRequest and RPCResponse
+ * @throws SdlException
+ */
+ public void alert(String ttsText, Boolean playTone, Vector<SoftButton> softButtons,
+ Integer correlationID) throws SdlException {
+
+ alert(ttsText, null, null, null, playTone, null, softButtons, correlationID);
+ }
+
+ /**
+ * Sends an Alert RPCRequest to SDL. Responses are captured through callback on IProxyListener.
+ *
+ * @param chunks -A list of text/phonemes to speak in the form of ttsChunks.
+ * @param playTone -Defines if tone should be played.
+ * @param softButtons -A list of App defined SoftButtons.
+ * @param correlationID -A unique ID that correlates each RPCRequest and RPCResponse
+ * @throws SdlException
+ */
+ public void alert(Vector<TTSChunk> chunks, Boolean playTone, Vector<SoftButton> softButtons,
+ Integer correlationID) throws SdlException {
+
+ alert(chunks, null, null, null, playTone, null, softButtons, correlationID);
+ }
+
+ /**
+ * Sends an Alert RPCRequest to SDL. Responses are captured through callback on IProxyListener.
+ *
+ * @param alertText1 -The first line of the alert text field.
+ * @param alertText2 -The second line of the alert text field.
+ * @param alertText3 -The optional third line of the alert text field.
+ * @param playTone -Defines if tone should be played.
+ * @param duration -Timeout in milliseconds.
+ * @param softButtons -A list of App defined SoftButtons.
+ * @param correlationID -A unique ID that correlates each RPCRequest and RPCResponse
+ * @throws SdlException
+ */
+ public void alert(String alertText1, String alertText2, String alertText3,
+ Boolean playTone, Integer duration, Vector<SoftButton> softButtons, Integer correlationID)
+ throws SdlException {
+
+ alert((Vector<TTSChunk>)null, alertText1, alertText2, alertText3, playTone, duration, softButtons, correlationID);
+ }
+
+ /*End V1 Enhanced helper*/
+
+ /**
+ * Sends an Alert RPCRequest to SDL. Responses are captured through callback on IProxyListener.
+ *
+ * @param ttsText -The text to speech message in the form of a string.
+ * @param alertText1 -The first line of the alert text field.
+ * @param alertText2 -The second line of the alert text field.
+ * @param playTone -Defines if tone should be played.
+ * @param duration -Timeout in milliseconds.
+ * @param correlationID -A unique ID that correlates each RPCRequest and RPCResponse
+ * @throws SdlException
+ */
+ public void alert(String ttsText, String alertText1,
+ String alertText2, Boolean playTone, Integer duration,
+ Integer correlationID) throws SdlException {
+
+ Alert msg = RPCRequestFactory.buildAlert(ttsText, alertText1, alertText2,
+ playTone, duration, correlationID);
+
+ sendRPCRequest(msg);
+ }
+
+ /**
+ * Sends an Alert RPCRequest to SDL. Responses are captured through callback on IProxyListener.
+ *
+ * @param ttsChunks -A list of text/phonemes to speak in the form of ttsChunks.
+ * @param alertText1 -The first line of the alert text field.
+ * @param alertText2 -The second line of the alert text field.
+ * @param playTone -Defines if tone should be played.
+ * @param duration -Timeout in milliseconds.
+ * @param correlationID -A unique ID that correlates each RPCRequest and RPCResponse
+ * @throws SdlException
+ */
+ public void alert(Vector<TTSChunk> ttsChunks,
+ String alertText1, String alertText2, Boolean playTone,
+ Integer duration, Integer correlationID) throws SdlException {
+
+ Alert msg = RPCRequestFactory.buildAlert(ttsChunks, alertText1, alertText2, playTone,
+ duration, correlationID);
+
+ sendRPCRequest(msg);
+ }
+
+ /**
+ * Sends an Alert RPCRequest to SDL. Responses are captured through callback on IProxyListener.
+ *
+ * @param ttsText -The text to speech message in the form of a string.
+ * @param playTone -Defines if tone should be played.
+ * @param correlationID -A unique ID that correlates each RPCRequest and RPCResponse
+ * @throws SdlException
+ */
+ public void alert(String ttsText, Boolean playTone,
+ Integer correlationID) throws SdlException {
+
+ alert(ttsText, null, null, playTone, null, correlationID);
+ }
+
+ /**
+ * Sends an Alert RPCRequest to SDL. Responses are captured through callback on IProxyListener.
+ *
+ * @param chunks -A list of text/phonemes to speak in the form of ttsChunks.
+ * @param playTone -Defines if tone should be played.
+ * @param correlationID -A unique ID that correlates each RPCRequest and RPCResponse
+ * @throws SdlException
+ */
+ public void alert(Vector<TTSChunk> chunks, Boolean playTone,
+ Integer correlationID) throws SdlException {
+
+ alert(chunks, null, null, playTone, null, correlationID);
+ }
+
+ /**
+ * Sends an Alert RPCRequest to SDL. Responses are captured through callback on IProxyListener.
+ *
+ * @param alertText1 -The first line of the alert text field.
+ * @param alertText2 -The second line of the alert text field.
+ * @param playTone -Defines if tone should be played.
+ * @param duration -Timeout in milliseconds.
+ * @param correlationID -A unique ID that correlates each RPCRequest and RPCResponse
+ * @throws SdlException
+ */
+ public void alert(String alertText1, String alertText2,
+ Boolean playTone, Integer duration, Integer correlationID)
+ throws SdlException {
+
+ alert((Vector<TTSChunk>)null, alertText1, alertText2, playTone, duration, correlationID);
+ }
+
+ /**
+ * Sends a CreateInteractionChoiceSet RPCRequest to SDL. Responses are captured through callback on IProxyListener.
+ *
+ * @param choiceSet
+ * @param interactionChoiceSetID
+ * @param correlationID
+ * @throws SdlException
+ */
+ public void createInteractionChoiceSet(
+ Vector<Choice> choiceSet, Integer interactionChoiceSetID,
+ Integer correlationID) throws SdlException {
+
+ CreateInteractionChoiceSet msg = RPCRequestFactory.buildCreateInteractionChoiceSet(
+ choiceSet, interactionChoiceSetID, correlationID);
+
+ sendRPCRequest(msg);
+ }
+
+ /**
+ * Sends a DeleteCommand RPCRequest to SDL. Responses are captured through callback on IProxyListener.
+ *
+ * @param commandID -ID of the command(s) to delete.
+ * @param correlationID -A unique ID that correlates each RPCRequest and RPCResponse
+ * @throws SdlException
+ */
+ public void deleteCommand(Integer commandID,
+ Integer correlationID) throws SdlException {
+
+ DeleteCommand msg = RPCRequestFactory.buildDeleteCommand(commandID, correlationID);
+
+ sendRPCRequest(msg);
+ }
+
+ /**
+ * Sends a DeleteInteractionChoiceSet RPCRequest to SDL. Responses are captured through callback on IProxyListener.
+ *
+ * @param interactionChoiceSetID -ID of the interaction choice set to delete.
+ * @param correlationID -A unique ID that correlates each RPCRequest and RPCResponse
+ * @throws SdlException
+ */
+ public void deleteInteractionChoiceSet(
+ Integer interactionChoiceSetID, Integer correlationID)
+ throws SdlException {
+
+ DeleteInteractionChoiceSet msg = RPCRequestFactory.buildDeleteInteractionChoiceSet(
+ interactionChoiceSetID, correlationID);
+
+ sendRPCRequest(msg);
+ }
+
+ /**
+ * Sends a DeleteSubMenu RPCRequest to SDL. Responses are captured through callback on IProxyListener.
+ *
+ * @param menuID -The menuID of the submenu to delete.
+ * @param correlationID -A unique ID that correlates each RPCRequest and RPCResponse
+ * @throws SdlException
+ */
+ public void deleteSubMenu(Integer menuID,
+ Integer correlationID) throws SdlException {
+
+ DeleteSubMenu msg = RPCRequestFactory.buildDeleteSubMenu(menuID, correlationID);
+
+ sendRPCRequest(msg);
+ }
+
+
+
+ /*Begin V1 Enhanced helper*/
+
+ /**
+ * Sends a PerformInteraction RPCRequest to SDL. Responses are captured through callback on IProxyListener.
+ *
+ * @param initPrompt -Intial prompt spoken to the user at the start of an interaction.
+ * @param displayText -Text to be displayed first.
+ * @param interactionChoiceSetID -Interaction choice set IDs to use with an interaction.
+ * @param vrHelp -Suggested VR Help Items to display on-screen during Perform Interaction.
+ * @param correlationID -A unique ID that correlates each RPCRequest and RPCResponse.
+ * @throws SdlException
+ */
+ public void performInteraction(String initPrompt,
+ String displayText, Integer interactionChoiceSetID, Vector<VrHelpItem> vrHelp,
+ Integer correlationID) throws SdlException {
+
+ PerformInteraction msg = RPCRequestFactory.buildPerformInteraction(initPrompt,
+ displayText, interactionChoiceSetID, vrHelp, correlationID);
+
+ sendRPCRequest(msg);
+ }
+
+ /**
+ * Sends a PerformInteraction RPCRequest to SDL. Responses are captured through callback on IProxyListener.
+ *
+ * @param initPrompt -Intial prompt spoken to the user at the start of an interaction.
+ * @param displayText -Text to be displayed first.
+ * @param interactionChoiceSetID -Interaction choice set IDs to use with an interaction.
+ * @param helpPrompt -Help text that is spoken when a user speaks "help" during the interaction.
+ * @param timeoutPrompt -Timeout text that is spoken when a VR interaction times out.
+ * @param interactionMode - The method in which the user is notified and uses the interaction (Manual,VR,Both).
+ * @param timeout -Timeout in milliseconds.
+ * @param vrHelp -Suggested VR Help Items to display on-screen during Perform Interaction.
+ * @param correlationID -A unique ID that correlates each RPCRequest and RPCResponse.
+ * @throws SdlException
+ */
+ public void performInteraction(String initPrompt,
+ String displayText, Integer interactionChoiceSetID,
+ String helpPrompt, String timeoutPrompt,
+ InteractionMode interactionMode, Integer timeout, Vector<VrHelpItem> vrHelp,
+ Integer correlationID) throws SdlException {
+
+ PerformInteraction msg = RPCRequestFactory.buildPerformInteraction(
+ initPrompt, displayText, interactionChoiceSetID,
+ helpPrompt, timeoutPrompt, interactionMode,
+ timeout, vrHelp, correlationID);
+
+ sendRPCRequest(msg);
+ }
+
+ /**
+ * Sends a PerformInteraction RPCRequest to SDL. Responses are captured through callback on IProxyListener.
+ *
+ * @param initPrompt -Intial prompt spoken to the user at the start of an interaction.
+ * @param displayText -Text to be displayed first.
+ * @param interactionChoiceSetIDList -A list of interaction choice set IDs to use with an interaction.
+ * @param helpPrompt -Help text that is spoken when a user speaks "help" during the interaction.
+ * @param timeoutPrompt -Timeout text that is spoken when a VR interaction times out.
+ * @param interactionMode - The method in which the user is notified and uses the interaction (Manual,VR,Both).
+ * @param timeout -Timeout in milliseconds.
+ * @param vrHelp -Suggested VR Help Items to display on-screen during Perform Interaction.
+ * @param correlationID -A unique ID that correlates each RPCRequest and RPCResponse.
+ * @throws SdlException
+ */
+ public void performInteraction(String initPrompt,
+ String displayText, Vector<Integer> interactionChoiceSetIDList,
+ String helpPrompt, String timeoutPrompt,
+ InteractionMode interactionMode, Integer timeout, Vector<VrHelpItem> vrHelp,
+ Integer correlationID) throws SdlException {
+
+ PerformInteraction msg = RPCRequestFactory.buildPerformInteraction(initPrompt,
+ displayText, interactionChoiceSetIDList,
+ helpPrompt, timeoutPrompt, interactionMode, timeout, vrHelp,
+ correlationID);
+
+ sendRPCRequest(msg);
+ }
+
+ /**
+ * Sends a PerformInteraction RPCRequest to SDL. Responses are captured through callback on IProxyListener.
+ *
+ * @param initChunks -A list of text/phonemes to speak for the initial prompt in the form of ttsChunks.
+ * @param displayText -Text to be displayed first.
+ * @param interactionChoiceSetIDList -A list of interaction choice set IDs to use with an interaction.
+ * @param helpChunks -A list of text/phonemes to speak for the help text that is spoken when a user speaks "help" during the interaction.
+ * @param timeoutChunks A list of text/phonems to speak for the timeout text that is spoken when a VR interaction times out.
+ * @param interactionMode - The method in which the user is notified and uses the interaction (Manual,VR,Both).
+ * @param timeout -Timeout in milliseconds.
+ * @param vrHelp -Suggested VR Help Items to display on-screen during Perform Interaction.
+ * @param correlationID -A unique ID that correlates each RPCRequest and RPCResponse.
+ * @throws SdlException
+ */
+ public void performInteraction(
+ Vector<TTSChunk> initChunks, String displayText,
+ Vector<Integer> interactionChoiceSetIDList,
+ Vector<TTSChunk> helpChunks, Vector<TTSChunk> timeoutChunks,
+ InteractionMode interactionMode, Integer timeout, Vector<VrHelpItem> vrHelp,
+ Integer correlationID) throws SdlException {
+
+ PerformInteraction msg = RPCRequestFactory.buildPerformInteraction(
+ initChunks, displayText, interactionChoiceSetIDList,
+ helpChunks, timeoutChunks, interactionMode, timeout,vrHelp,
+ correlationID);
+
+ sendRPCRequest(msg);
+ }
+
+ /*End V1 Enhanced*/
+
+ /**
+ * Sends a PerformInteraction RPCRequest to SDL. Responses are captured through callback on IProxyListener.
+ *
+ * @param initPrompt -Intial prompt spoken to the user at the start of an interaction.
+ * @param displayText -Text to be displayed first.
+ * @param interactionChoiceSetID -Interaction choice set IDs to use with an interaction.
+ * @param correlationID -A unique ID that correlates each RPCRequest and RPCResponse.
+ * @throws SdlException
+ */
+ public void performInteraction(String initPrompt,
+ String displayText, Integer interactionChoiceSetID,
+ Integer correlationID) throws SdlException {
+
+ PerformInteraction msg = RPCRequestFactory.buildPerformInteraction(initPrompt,
+ displayText, interactionChoiceSetID, correlationID);
+
+ sendRPCRequest(msg);
+ }
+
+ /**
+ * Sends a PerformInteraction RPCRequest to SDL. Responses are captured through callback on IProxyListener.
+ *
+ * @param initPrompt -Intial prompt spoken to the user at the start of an interaction.
+ * @param displayText -Text to be displayed first.
+ * @param interactionChoiceSetID -Interaction choice set IDs to use with an interaction.
+ * @param helpPrompt -Help text that is spoken when a user speaks "help" during the interaction.
+ * @param timeoutPrompt -Timeout text that is spoken when a VR interaction times out.
+ * @param interactionMode - The method in which the user is notified and uses the interaction (Manual,VR,Both).
+ * @param timeout -Timeout in milliseconds.
+ * @param correlationID -A unique ID that correlates each RPCRequest and RPCResponse.
+ * @throws SdlException
+ */
+ public void performInteraction(String initPrompt,
+ String displayText, Integer interactionChoiceSetID,
+ String helpPrompt, String timeoutPrompt,
+ InteractionMode interactionMode, Integer timeout,
+ Integer correlationID) throws SdlException {
+
+ PerformInteraction msg = RPCRequestFactory.buildPerformInteraction(
+ initPrompt, displayText, interactionChoiceSetID,
+ helpPrompt, timeoutPrompt, interactionMode,
+ timeout, correlationID);
+
+ sendRPCRequest(msg);
+ }
+
+ /**
+ * Sends a PerformInteraction RPCRequest to SDL. Responses are captured through callback on IProxyListener.
+ *
+ * @param initPrompt -Intial prompt spoken to the user at the start of an interaction.
+ * @param displayText -Text to be displayed first.
+ * @param interactionChoiceSetIDList -A list of interaction choice set IDs to use with an interaction.
+ * @param helpPrompt -Help text that is spoken when a user speaks "help" during the interaction.
+ * @param timeoutPrompt -Timeout text that is spoken when a VR interaction times out.
+ * @param interactionMode - The method in which the user is notified and uses the interaction (Manual,VR,Both).
+ * @param timeout -Timeout in milliseconds.
+ * @param correlationID -A unique ID that correlates each RPCRequest and RPCResponse.
+ * @throws SdlException
+ */
+ public void performInteraction(String initPrompt,
+ String displayText, Vector<Integer> interactionChoiceSetIDList,
+ String helpPrompt, String timeoutPrompt,
+ InteractionMode interactionMode, Integer timeout,
+ Integer correlationID) throws SdlException {
+
+ PerformInteraction msg = RPCRequestFactory.buildPerformInteraction(initPrompt,
+ displayText, interactionChoiceSetIDList,
+ helpPrompt, timeoutPrompt, interactionMode, timeout,
+ correlationID);
+
+ sendRPCRequest(msg);
+ }
+
+ /**
+ * Sends a PerformInteraction RPCRequest to SDL. Responses are captured through callback on IProxyListener.
+ *
+ * @param initChunks -A list of text/phonemes to speak for the initial prompt in the form of ttsChunks.
+ * @param displayText -Text to be displayed first.
+ * @param interactionChoiceSetIDList -A list of interaction choice set IDs to use with an interaction.
+ * @param helpChunks -A list of text/phonemes to speak for the help text that is spoken when a user speaks "help" during the interaction.
+ * @param timeoutChunks A list of text/phonems to speak for the timeout text that is spoken when a VR interaction times out.
+ * @param interactionMode - The method in which the user is notified and uses the interaction (Manual,VR,Both).
+ * @param timeout -Timeout in milliseconds.
+ * @param correlationID -A unique ID that correlates each RPCRequest and RPCResponse.
+ * @throws SdlException
+ */
+ public void performInteraction(
+ Vector<TTSChunk> initChunks, String displayText,
+ Vector<Integer> interactionChoiceSetIDList,
+ Vector<TTSChunk> helpChunks, Vector<TTSChunk> timeoutChunks,
+ InteractionMode interactionMode, Integer timeout,
+ Integer correlationID) throws SdlException {
+
+ PerformInteraction msg = RPCRequestFactory.buildPerformInteraction(
+ initChunks, displayText, interactionChoiceSetIDList,
+ helpChunks, timeoutChunks, interactionMode, timeout,
+ correlationID);
+
+ sendRPCRequest(msg);
+ }
+
+ // Protected registerAppInterface used to ensure only non-ALM applications call
+ // reqisterAppInterface
+ protected void registerAppInterfacePrivate(
+ SdlMsgVersion sdlMsgVersion, String appName, Vector<TTSChunk> ttsName,
+ String ngnMediaScreenAppName, Vector<String> vrSynonyms, Boolean isMediaApp,
+ Language languageDesired, Language hmiDisplayLanguageDesired, Vector<AppHMIType> appType,
+ String appID, String autoActivateID, Integer correlationID)
+ throws SdlException {
+ String carrierName = null;
+ if(telephonyManager != null){
+ carrierName = telephonyManager.getNetworkOperatorName();
+ }
+ deviceInfo = RPCRequestFactory.BuildDeviceInfo(carrierName);
+ RegisterAppInterface msg = RPCRequestFactory.buildRegisterAppInterface(
+ sdlMsgVersion, appName, ttsName, ngnMediaScreenAppName, vrSynonyms, isMediaApp,
+ languageDesired, hmiDisplayLanguageDesired, appType, appID, correlationID, deviceInfo);
+
+ if (_bAppResumeEnabled)
+ {
+ if (_lastHashID != null)
+ msg.setHashID(_lastHashID);
+ }
+
+ Intent sendIntent = createBroadcastIntent();
+ updateBroadcastIntent(sendIntent, "RPC_NAME", FunctionID.REGISTER_APP_INTERFACE.toString());
+ updateBroadcastIntent(sendIntent, "TYPE", RPCMessage.KEY_REQUEST);
+ updateBroadcastIntent(sendIntent, "CORRID", msg.getCorrelationID());
+ updateBroadcastIntent(sendIntent, "DATA",serializeJSON(msg));
+ sendBroadcastIntent(sendIntent);
+
+ sendRPCRequestPrivate(msg);
+ }
+
+ /*Begin V1 Enhanced helper function*/
+
+ /**
+ * Sends a SetGlobalProperties RPCRequest to SDL. Responses are captured through callback on IProxyListener.
+ *
+ * @param helpPrompt
+ * @param timeoutPrompt
+ * @param vrHelpTitle
+ * @param vrHelp
+ * @param correlationID
+ * @throws SdlException
+ */
+ public void setGlobalProperties(
+ String helpPrompt, String timeoutPrompt, String vrHelpTitle, Vector<VrHelpItem> vrHelp, Integer correlationID)
+ throws SdlException {
+
+ SetGlobalProperties req = RPCRequestFactory.buildSetGlobalProperties(helpPrompt,
+ timeoutPrompt, vrHelpTitle, vrHelp, correlationID);
+
+ sendRPCRequest(req);
+ }
+
+ /**
+ * Sends a SetGlobalProperties RPCRequest to SDL. Responses are captured through callback on IProxyListener.
+ *
+ * @param helpChunks
+ * @param timeoutChunks
+ * @param vrHelpTitle
+ * @param vrHelp
+ * @param correlationID
+ * @throws SdlException
+ */
+ public void setGlobalProperties(
+ Vector<TTSChunk> helpChunks, Vector<TTSChunk> timeoutChunks, String vrHelpTitle, Vector<VrHelpItem> vrHelp,
+ Integer correlationID) throws SdlException {
+
+ SetGlobalProperties req = RPCRequestFactory.buildSetGlobalProperties(
+ helpChunks, timeoutChunks, vrHelpTitle, vrHelp, correlationID);
+
+ sendRPCRequest(req);
+ }
+
+ /*End V1 Enhanced helper function*/
+
+ /**
+ * Sends a SetGlobalProperties RPCRequest to SDL. Responses are captured through callback on IProxyListener.
+ *
+ * @param helpPrompt
+ * @param timeoutPrompt
+ * @param correlationID
+ * @throws SdlException
+ */
+ public void setGlobalProperties(
+ String helpPrompt, String timeoutPrompt, Integer correlationID)
+ throws SdlException {
+
+ SetGlobalProperties req = RPCRequestFactory.buildSetGlobalProperties(helpPrompt,
+ timeoutPrompt, correlationID);
+
+ sendRPCRequest(req);
+ }
+
+ /**
+ * Sends a SetGlobalProperties RPCRequest to SDL. Responses are captured through callback on IProxyListener.
+ *
+ * @param helpChunks
+ * @param timeoutChunks
+ * @param correlationID
+ * @throws SdlException
+ */
+ public void setGlobalProperties(
+ Vector<TTSChunk> helpChunks, Vector<TTSChunk> timeoutChunks,
+ Integer correlationID) throws SdlException {
+
+ SetGlobalProperties req = RPCRequestFactory.buildSetGlobalProperties(
+ helpChunks, timeoutChunks, correlationID);
+
+ sendRPCRequest(req);
+ }
+
+ public void resetGlobalProperties(Vector<GlobalProperty> properties,
+ Integer correlationID) throws SdlException {
+
+ ResetGlobalProperties req = new ResetGlobalProperties();
+
+ req.setCorrelationID(correlationID);
+ req.setProperties(properties);
+
+ sendRPCRequest(req);
+ }
+
+
+ /**
+ * Sends a SetMediaClockTimer RPCRequest to SDL. Responses are captured through callback on IProxyListener.
+ *
+ * @param hours
+ * @param minutes
+ * @param seconds
+ * @param updateMode
+ * @param correlationID
+ * @throws SdlException
+ */
+ public void setMediaClockTimer(Integer hours,
+ Integer minutes, Integer seconds, UpdateMode updateMode,
+ Integer correlationID) throws SdlException {
+
+ SetMediaClockTimer msg = RPCRequestFactory.buildSetMediaClockTimer(hours,
+ minutes, seconds, updateMode, correlationID);
+
+ sendRPCRequest(msg);
+ }
+
+ /**
+ * Pauses the media clock. Responses are captured through callback on IProxyListener.
+ *
+ * @param correlationID
+ * @throws SdlException
+ */
+ public void pauseMediaClockTimer(Integer correlationID)
+ throws SdlException {
+
+ SetMediaClockTimer msg = RPCRequestFactory.buildSetMediaClockTimer(0,
+ 0, 0, UpdateMode.PAUSE, correlationID);
+
+ sendRPCRequest(msg);
+ }
+
+ /**
+ * Resumes the media clock. Responses are captured through callback on IProxyListener.
+ *
+ * @param correlationID
+ * @throws SdlException
+ */
+ public void resumeMediaClockTimer(Integer correlationID)
+ throws SdlException {
+
+ SetMediaClockTimer msg = RPCRequestFactory.buildSetMediaClockTimer(0,
+ 0, 0, UpdateMode.RESUME, correlationID);
+
+ sendRPCRequest(msg);
+ }
+
+ /**
+ * Clears the media clock. Responses are captured through callback on IProxyListener.
+ *
+ * @param correlationID
+ * @throws SdlException
+ */
+ public void clearMediaClockTimer(Integer correlationID)
+ throws SdlException {
+
+ Show msg = RPCRequestFactory.buildShow(null, null, null, " ", null, null, correlationID);
+
+ sendRPCRequest(msg);
+ }
+
+ /*Begin V1 Enhanced helper*/
+ /**
+ * Sends a Show RPCRequest to SDL. Responses are captured through callback on IProxyListener.
+ *
+ * @param mainText1 -Text displayed in a single or upper display line.
+ * @param mainText2 -Text displayed on the second display line.
+ * @param mainText3 -Text displayed on the second "page" first display line.
+ * @param mainText4 -Text displayed on the second "page" second display line.
+ * @param statusBar
+ * @param mediaClock -Text value for MediaClock field.
+ * @param mediaTrack -Text displayed in the track field.
+ * @param graphic -Image struct determining whether static or dynamic image to display in app.
+ * @param softButtons -App defined SoftButtons.
+ * @param customPresets -App labeled on-screen presets.
+ * @param alignment -Specifies how mainText1 and mainText2s texts should be aligned on display.
+ * @param correlationID -A unique ID that correlates each RPCRequest and RPCResponse.
+ * @throws SdlException
+ */
+ public void show(String mainText1, String mainText2, String mainText3, String mainText4,
+ String statusBar, String mediaClock, String mediaTrack,
+ Image graphic, Vector<SoftButton> softButtons, Vector <String> customPresets,
+ TextAlignment alignment, Integer correlationID)
+ throws SdlException {
+
+ Show msg = RPCRequestFactory.buildShow(mainText1, mainText2, mainText3, mainText4,
+ statusBar, mediaClock, mediaTrack, graphic, softButtons, customPresets,
+ alignment, correlationID);
+
+ sendRPCRequest(msg);
+ }
+
+ /**
+ * Sends a Show RPCRequest to SDL. Responses are captured through callback on IProxyListener.
+ *
+ * @param mainText1 -Text displayed in a single or upper display line.
+ * @param mainText2 -Text displayed on the second display line.
+ * @param mainText3 -Text displayed on the second "page" first display line.
+ * @param mainText4 -Text displayed on the second "page" second display line.
+ * @param graphic -Image struct determining whether static or dynamic image to display in app.
+ * @param softButtons -App defined SoftButtons.
+ * @param customPresets -App labeled on-screen presets.
+ * @param alignment -Specifies how mainText1 and mainText2s texts should be aligned on display.
+ * @param correlationID -A unique ID that correlates each RPCRequest and RPCResponse.
+ * @throws SdlException
+ */
+ public void show(String mainText1, String mainText2, String mainText3, String mainText4,
+ Image graphic, Vector<SoftButton> softButtons, Vector <String> customPresets,
+ TextAlignment alignment, Integer correlationID)
+ throws SdlException {
+
+ show(mainText1, mainText2, mainText3, mainText4, null, null, null, graphic, softButtons, customPresets, alignment, correlationID);
+ }
+ /*End V1 Enhanced helper*/
+
+ /**
+ * Sends a Show RPCRequest to SDL. Responses are captured through callback on IProxyListener.
+ *
+ * @param mainText1 -Text displayed in a single or upper display line.
+ * @param mainText2 -Text displayed on the second display line.
+ * @param statusBar
+ * @param mediaClock -Text value for MediaClock field.
+ * @param mediaTrack -Text displayed in the track field.
+ * @param alignment -Specifies how mainText1 and mainText2s texts should be aligned on display.
+ * @param correlationID -A unique ID that correlates each RPCRequest and RPCResponse.
+ * @throws SdlException
+ */
+ public void show(String mainText1, String mainText2,
+ String statusBar, String mediaClock, String mediaTrack,
+ TextAlignment alignment, Integer correlationID)
+ throws SdlException {
+
+ Show msg = RPCRequestFactory.buildShow(mainText1, mainText2,
+ statusBar, mediaClock, mediaTrack,
+ alignment, correlationID);
+
+ sendRPCRequest(msg);
+ }
+
+ /**
+ * Sends a Show RPCRequest to SDL. Responses are captured through callback on IProxyListener.
+ *
+ * @param mainText1 -Text displayed in a single or upper display line.
+ * @param mainText2 -Text displayed on the second display line.
+ * @param alignment -Specifies how mainText1 and mainText2s texts should be aligned on display.
+ * @param correlationID -A unique ID that correlates each RPCRequest and RPCResponse.
+ * @throws SdlException
+ */
+ public void show(String mainText1, String mainText2,
+ TextAlignment alignment, Integer correlationID)
+ throws SdlException {
+
+ show(mainText1, mainText2, null, null, null, alignment, correlationID);
+ }
+
+ /**
+ * Sends a Speak RPCRequest to SDL. Responses are captured through callback on IProxyListener.
+ *
+ * @param ttsText -The text to speech message in the form of a string.
+ * @param correlationID -A unique ID that correlates each RPCRequest and RPCResponse.
+ * @throws SdlException
+ */
+ public void speak(String ttsText, Integer correlationID)
+ throws SdlException {
+
+ Speak msg = RPCRequestFactory.buildSpeak(TTSChunkFactory.createSimpleTTSChunks(ttsText),
+ correlationID);
+
+ sendRPCRequest(msg);
+ }
+
+ /**
+ * Sends a Speak RPCRequest to SDL. Responses are captured through callback on IProxyListener.
+ *
+ * @param ttsChunks -Text/phonemes to speak in the form of ttsChunks.
+ * @param correlationID -A unique ID that correlates each RPCRequest and RPCResponse.
+ * @throws SdlException
+ */
+ public void speak(Vector<TTSChunk> ttsChunks,
+ Integer correlationID) throws SdlException {
+
+ Speak msg = RPCRequestFactory.buildSpeak(ttsChunks, correlationID);
+
+ sendRPCRequest(msg);
+ }
+
+ /**
+ * Sends a SubscribeButton RPCRequest to SDL. Responses are captured through callback on IProxyListener.
+ *
+ * @param buttonName -Name of the button to subscribe.
+ * @param correlationID -A unique ID that correlates each RPCRequest and RPCResponse.
+ * @throws SdlException
+ */
+ public void subscribeButton(ButtonName buttonName,
+ Integer correlationID) throws SdlException {
+
+ SubscribeButton msg = RPCRequestFactory.buildSubscribeButton(buttonName,
+ correlationID);
+
+ sendRPCRequest(msg);
+ }
+
+ // Protected unregisterAppInterface used to ensure no non-ALM app calls
+ // unregisterAppInterface.
+ protected void unregisterAppInterfacePrivate(Integer correlationID)
+ throws SdlException {
+
+ UnregisterAppInterface msg =
+ RPCRequestFactory.buildUnregisterAppInterface(correlationID);
+ Intent sendIntent = createBroadcastIntent();
+
+ updateBroadcastIntent(sendIntent, "RPC_NAME", FunctionID.UNREGISTER_APP_INTERFACE.toString());
+ updateBroadcastIntent(sendIntent, "TYPE", RPCMessage.KEY_REQUEST);
+ updateBroadcastIntent(sendIntent, "CORRID", msg.getCorrelationID());
+ updateBroadcastIntent(sendIntent, "DATA",serializeJSON(msg));
+ sendBroadcastIntent(sendIntent);
+
+ sendRPCRequestPrivate(msg);
+ }
+
+ /**
+ * Sends an UnsubscribeButton RPCRequest to SDL. Responses are captured through callback on IProxyListener.
+ *
+ * @param buttonName -Name of the button to unsubscribe.
+ * @param correlationID -A unique ID that correlates each RPCRequest and RPCResponse.
+ * @throws SdlException
+ */
+ public void unsubscribeButton(ButtonName buttonName,
+ Integer correlationID) throws SdlException {
+
+ UnsubscribeButton msg = RPCRequestFactory.buildUnsubscribeButton(
+ buttonName, correlationID);
+
+ sendRPCRequest(msg);
+ }
+
+ /**
+ * Creates a choice to be added to a choiceset. Choice has both a voice and a visual menu component.
+ *
+ * @param choiceID -Unique ID used to identify this choice (returned in callback).
+ * @param choiceMenuName -Text name displayed for this choice.
+ * @param choiceVrCommands -Vector of vrCommands used to select this choice by voice. Must contain
+ * at least one non-empty element.
+ * @return Choice created.
+ * @throws SdlException
+ */
+ public Choice createChoiceSetChoice(Integer choiceID, String choiceMenuName,
+ Vector<String> choiceVrCommands) {
+ Choice returnChoice = new Choice();
+
+ returnChoice.setChoiceID(choiceID);
+ returnChoice.setMenuName(choiceMenuName);
+ returnChoice.setVrCommands(choiceVrCommands);
+
+ return returnChoice;
+ }
+
+ /**
+ * Starts audio pass thru session. Responses are captured through callback on IProxyListener.
+ *
+ * @param initialPrompt -SDL will speak this prompt before opening the audio pass thru session.
+ * @param audioPassThruDisplayText1 -First line of text displayed during audio capture.
+ * @param audioPassThruDisplayText2 -Second line of text displayed during audio capture.
+ * @param samplingRate -Allowable values of 8 khz or 16 or 22 or 44 khz.
+ * @param maxDuration -The maximum duration of audio recording in milliseconds.
+ * @param bitsPerSample -Specifies the quality the audio is recorded. Currently 8 bit or 16 bit.
+ * @param audioType -Specifies the type of audio data being requested.
+ * @param muteAudio -Defines if the current audio source should be muted during the APT session.
+ * @param correlationID -A unique ID that correlates each RPCRequest and RPCResponse.
+ * @throws SdlException
+ */
+ public void performaudiopassthru(String initialPrompt, String audioPassThruDisplayText1, String audioPassThruDisplayText2,
+ SamplingRate samplingRate, Integer maxDuration, BitsPerSample bitsPerSample,
+ AudioType audioType, Boolean muteAudio, Integer correlationID) throws SdlException {
+
+ PerformAudioPassThru msg = RPCRequestFactory.BuildPerformAudioPassThru(initialPrompt, audioPassThruDisplayText1, audioPassThruDisplayText2,
+ samplingRate, maxDuration, bitsPerSample, audioType, muteAudio, correlationID);
+ sendRPCRequest(msg);
+ }
+
+ /**
+ * Ends audio pass thru session. Responses are captured through callback on IProxyListener.
+ *
+ * @param correlationID
+ * @throws SdlException
+ */
+ public void endaudiopassthru(Integer correlationID) throws SdlException
+ {
+ EndAudioPassThru msg = RPCRequestFactory.BuildEndAudioPassThru(correlationID);
+ sendRPCRequest(msg);
+ }
+
+ /**
+ * Subscribes for specific published data items. The data will be only sent if it has changed.
+ * Responses are captured through callback on IProxyListener.
+ *
+ * @param gps -Subscribes to GPS data.
+ * @param speed -Subscribes to vehicle speed data in kilometers per hour.
+ * @param rpm -Subscribes to number of revolutions per minute of the engine.
+ * @param fuelLevel -Subscribes to fuel level in the tank (percentage).
+ * @param fuelLevel_State -Subscribes to fuel level state.
+ * @param instantFuelConsumption -Subscribes to instantaneous fuel consumption in microlitres.
+ * @param externalTemperature -Subscribes to the external temperature in degrees celsius.
+ * @param prndl -Subscribes to PRNDL data that houses the selected gear.
+ * @param tirePressure -Subscribes to the TireStatus data containing status and pressure of tires.
+ * @param odometer -Subscribes to Odometer data in km.
+ * @param beltStatus -Subscribes to status of the seat belts.
+ * @param bodyInformation -Subscribes to body information including power modes.
+ * @param deviceStatus -Subscribes to device status including signal and battery strength.
+ * @param driverBraking -Subscribes to the status of the brake pedal.
+ * @param correlationID -A unique ID that correlates each RPCRequest and RPCResponse.
+ * @throws SdlException
+ */
+ public void subscribevehicledata(boolean gps, boolean speed, boolean rpm, boolean fuelLevel, boolean fuelLevel_State,
+ boolean instantFuelConsumption, boolean externalTemperature, boolean prndl, boolean tirePressure,
+ boolean odometer, boolean beltStatus, boolean bodyInformation, boolean deviceStatus,
+ boolean driverBraking, Integer correlationID) throws SdlException
+ {
+ SubscribeVehicleData msg = RPCRequestFactory.BuildSubscribeVehicleData(gps, speed, rpm, fuelLevel, fuelLevel_State, instantFuelConsumption, externalTemperature, prndl, tirePressure,
+ odometer, beltStatus, bodyInformation, deviceStatus, driverBraking, correlationID);
+
+ sendRPCRequest(msg);
+ }
+
+ /**
+ * Unsubscribes for specific published data items.
+ * Responses are captured through callback on IProxyListener.
+ *
+ * @param gps -Unsubscribes to GPS data.
+ * @param speed -Unsubscribes to vehicle speed data in kilometers per hour.
+ * @param rpm -Unsubscribes to number of revolutions per minute of the engine.
+ * @param fuelLevel -Unsubscribes to fuel level in the tank (percentage).
+ * @param fuelLevel_State -Unsubscribes to fuel level state.
+ * @param instantFuelConsumption -Unsubscribes to instantaneous fuel consumption in microlitres.
+ * @param externalTemperature -Unsubscribes to the external temperature in degrees celsius.
+ * @param prndl -Unsubscribes to PRNDL data that houses the selected gear.
+ * @param tirePressure -Unsubscribes to the TireStatus data containing status and pressure of tires.
+ * @param odometer -Unsubscribes to Odometer data in km.
+ * @param beltStatus -Unsubscribes to status of the seat belts.
+ * @param bodyInformation -Unsubscribes to body information including power modes.
+ * @param deviceStatus -Unsubscribes to device status including signal and battery strength.
+ * @param driverBraking -Unsubscribes to the status of the brake pedal.
+ * @param correlationID -A unique ID that correlates each RPCRequest and RPCResponse.
+ * @throws SdlException
+ */
+
+ public void unsubscribevehicledata(boolean gps, boolean speed, boolean rpm, boolean fuelLevel, boolean fuelLevel_State,
+ boolean instantFuelConsumption, boolean externalTemperature, boolean prndl, boolean tirePressure,
+ boolean odometer, boolean beltStatus, boolean bodyInformation, boolean deviceStatus,
+ boolean driverBraking, Integer correlationID) throws SdlException
+ {
+ UnsubscribeVehicleData msg = RPCRequestFactory.BuildUnsubscribeVehicleData(gps, speed, rpm, fuelLevel, fuelLevel_State, instantFuelConsumption, externalTemperature, prndl, tirePressure,
+ odometer, beltStatus, bodyInformation, deviceStatus, driverBraking, correlationID);
+ sendRPCRequest(msg);
+ }
+
+
+ /**
+ * Performs a Non periodic vehicle data read request.
+ * Responses are captured through callback on IProxyListener.
+ *
+ * @param gps -Performs an ad-hoc request for GPS data.
+ * @param speed -Performs an ad-hoc request for vehicle speed data in kilometers per hour.
+ * @param rpm -Performs an ad-hoc request for number of revolutions per minute of the engine.
+ * @param fuelLevel -Performs an ad-hoc request for fuel level in the tank (percentage).
+ * @param fuelLevel_State -Performs an ad-hoc request for fuel level state.
+ * @param instantFuelConsumption -Performs an ad-hoc request for instantaneous fuel consumption in microlitres.
+ * @param externalTemperature -Performs an ad-hoc request for the external temperature in degrees celsius.
+ * @param vin -Performs an ad-hoc request for the Vehicle identification number
+ * @param prndl -Performs an ad-hoc request for PRNDL data that houses the selected gear.
+ * @param tirePressure -Performs an ad-hoc request for the TireStatus data containing status and pressure of tires.
+ * @param odometer -Performs an ad-hoc request for Odometer data in km.
+ * @param beltStatus -Performs an ad-hoc request for status of the seat belts.
+ * @param bodyInformation -Performs an ad-hoc request for body information including power modes.
+ * @param deviceStatus -Performs an ad-hoc request for device status including signal and battery strength.
+ * @param driverBraking -Performs an ad-hoc request for the status of the brake pedal.
+ * @param correlationID -A unique ID that correlates each RPCRequest and RPCResponse.
+ * @throws SdlException
+ */
+ public void getvehicledata(boolean gps, boolean speed, boolean rpm, boolean fuelLevel, boolean fuelLevel_State,
+ boolean instantFuelConsumption, boolean externalTemperature, boolean vin, boolean prndl, boolean tirePressure,
+ boolean odometer, boolean beltStatus, boolean bodyInformation, boolean deviceStatus,
+ boolean driverBraking, Integer correlationID) throws SdlException
+ {
+
+ GetVehicleData msg = RPCRequestFactory.BuildGetVehicleData(gps, speed, rpm, fuelLevel, fuelLevel_State, instantFuelConsumption, externalTemperature, vin, prndl, tirePressure, odometer,
+ beltStatus, bodyInformation, deviceStatus, driverBraking, correlationID);
+ sendRPCRequest(msg);
+ }
+
+
+ /**
+ * Creates a full screen overlay containing a large block of formatted text that can be scrolled with up to 8 SoftButtons defined.
+ * Responses are captured through callback on IProxyListener.
+ *
+ * @param scrollableMessageBody -Body of text that can include newlines and tabs.
+ * @param timeout -App defined timeout. Indicates how long of a timeout from the last action.
+ * @param softButtons -App defined SoftButtons.
+ * @param correlationID -A unique ID that correlates each RPCRequest and RPCResponse.
+ * @throws SdlException
+ */
+ public void scrollablemessage(String scrollableMessageBody, Integer timeout, Vector<SoftButton> softButtons, Integer correlationID) throws SdlException
+ {
+ ScrollableMessage msg = RPCRequestFactory.BuildScrollableMessage(scrollableMessageBody, timeout, softButtons, correlationID);
+ sendRPCRequest(msg);
+ }
+
+
+ /**
+ * Creates a full screen or pop-up overlay (depending on platform) with a single user controlled slider.
+ * Responses are captured through callback on IProxyListener.
+ *
+ * @param numTicks -Number of selectable items on a horizontal axis.
+ * @param position -Initial position of slider control (cannot exceed numTicks).
+ * @param sliderHeader -Text header to display.
+ * @param sliderFooter - Text footer to display (meant to display min/max threshold descriptors).
+ * @param timeout -App defined timeout. Indicates how long of a timeout from the last action.
+ * @param correlationID -A unique ID that correlates each RPCRequest and RPCResponse.
+ * @throws SdlException
+ */
+ public void slider(Integer numTicks, Integer position, String sliderHeader, Vector<String> sliderFooter, Integer timeout, Integer correlationID) throws SdlException
+ {
+ Slider msg = RPCRequestFactory.BuildSlider(numTicks, position, sliderHeader, sliderFooter, timeout, correlationID);
+ sendRPCRequest(msg);
+ }
+
+ /**
+ * Responses are captured through callback on IProxyListener.
+ *
+ * @param language
+ * @param hmiDisplayLanguage
+ * @param correlationID
+ * @throws SdlException
+ */
+ public void changeregistration(Language language, Language hmiDisplayLanguage, Integer correlationID) throws SdlException
+ {
+ ChangeRegistration msg = RPCRequestFactory.BuildChangeRegistration(language, hmiDisplayLanguage, correlationID);
+ sendRPCRequest(msg);
+ }
+
+ /**
+ * Used to push a binary stream of file data onto the module from a mobile device.
+ * Responses are captured through callback on IProxyListener.
+ *
+ * @param is - The input stream of byte data that putFileStream will read from
+ * @param sdlFileName - The file reference name used by the putFile RPC.
+ * @param iOffset - The data offset in bytes, a value of zero is used to indicate data starting from the beginging of the file.
+ * A value greater than zero is used for resuming partial data chunks.
+ * @param iLength - The total length of the file being sent.
+ * @throws SdlException
+ * @see {@link#putFileStream(InputStream, String, Long, Long)}
+ */
+ @Deprecated
+ public void putFileStream(InputStream is, String sdlFileName, Integer iOffset, Integer iLength) throws SdlException
+ {
+ PutFile msg = RPCRequestFactory.buildPutFile(sdlFileName, iOffset, iLength);
+ startRPCStream(is, msg);
+ }
+
+ /**
+ * Used to push a binary stream of file data onto the module from a mobile
+ * device. Responses are captured through callback on IProxyListener.
+ *
+ * @param inputStream The input stream of byte data that will be read from.
+ * @param fileName The SDL file reference name used by the RPC.
+ * @param offset The data offset in bytes. A value of zero is used to
+ * indicate data starting from the beginning of the file and a value greater
+ * than zero is used for resuming partial data chunks.
+ * @param length The total length of the file being sent.
+ * @throws SdlException
+ */
+ public void putFileStream(InputStream inputStream, String fileName, Long offset, Long length) throws SdlException {
+ PutFile msg = RPCRequestFactory.buildPutFile(fileName, offset, length);
+ startRPCStream(inputStream, msg);
+ }
+
+ /**
+ * Used to push a binary stream of file data onto the module from a mobile device.
+ * Responses are captured through callback on IProxyListener.
+ *
+ * @param sdlFileName - The file reference name used by the putFile RPC.
+ * @param iOffset - The data offset in bytes, a value of zero is used to indicate data starting from the beginging of a file.
+ * A value greater than zero is used for resuming partial data chunks.
+ * @param iLength - The total length of the file being sent.
+ *
+ * @return OutputStream - The output stream of byte data that is written to by the app developer
+ * @throws SdlException
+ * @see {@link#putFileStream(String, Long, Long)}
+ */
+ @Deprecated
+ public OutputStream putFileStream(String sdlFileName, Integer iOffset, Integer iLength) throws SdlException
+ {
+ PutFile msg = RPCRequestFactory.buildPutFile(sdlFileName, iOffset, iLength);
+ return startRPCStream(msg);
+ }
+
+ /**
+ * Used to push a binary stream of file data onto the module from a mobile
+ * device. Responses are captured through callback on IProxyListener.
+ *
+ * @param fileName The SDL file reference name used by the RPC.
+ * @param offset The data offset in bytes. A value of zero is used to
+ * indicate data starting from the beginning of the file and a value greater
+ * than zero is used for resuming partial data chunks.
+ * @param length The total length of the file being sent.
+ * @throws SdlException
+ */
+ public OutputStream putFileStream(String fileName, Long offset, Long length) throws SdlException {
+ PutFile msg = RPCRequestFactory.buildPutFile(fileName, offset, length);
+ return startRPCStream(msg);
+ }
+
+ /**
+ * Used to push a binary stream of file data onto the module from a mobile device.
+ * Responses are captured through callback on IProxyListener.
+ *
+ * @param is - The input stream of byte data that PutFileStream will read from
+ * @param sdlFileName - The file reference name used by the putFile RPC.
+ * @param iOffset - The data offset in bytes, a value of zero is used to indicate data starting from the beginging of the file.
+ * A value greater than zero is used for resuming partial data chunks.
+ * @param iLength - The total length of the file being sent.
+ * @param fileType - The selected file type -- see the FileType enumeration for details
+ * @param bPersistentFile - Indicates if the file is meant to persist between sessions / ignition cycles.
+ * @param bSystemFile - Indicates if the file is meant to be passed thru core to elsewhere on the system.
+ * @throws SdlException
+ * @see {@link#putFileStream(InputStream, String, Long, Long, FileType, Boolean, Boolean)}
+ */
+ @Deprecated
+ public void putFileStream(InputStream is, String sdlFileName, Integer iOffset, Integer iLength, FileType fileType, Boolean bPersistentFile, Boolean bSystemFile) throws SdlException
+ {
+ PutFile msg = RPCRequestFactory.buildPutFile(sdlFileName, iOffset, iLength, fileType, bPersistentFile, bSystemFile);
+ startRPCStream(is, msg);
+ }
+
+ /**
+ * Used to push a binary stream of file data onto the module from a mobile
+ * device. Responses are captured through callback on IProxyListener.
+ *
+ * @param inputStream The input stream of byte data that will be read from.
+ * @param fileName The SDL file reference name used by the RPC.
+ * @param offset The data offset in bytes. A value of zero is used to
+ * indicate data starting from the beginning of the file and a value greater
+ * than zero is used for resuming partial data chunks.
+ * @param length The total length of the file being sent.
+ * @param fileType The selected file type. See the {@link FileType} enum for
+ * details.
+ * @param isPersistentFile Indicates if the file is meant to persist between
+ * sessions / ignition cycles.
+ * @param isSystemFile Indicates if the file is meant to be passed through
+ * core to elsewhere in the system.
+ * @throws SdlException
+ */
+ public void putFileStream(InputStream inputStream, String fileName, Long offset, Long length, FileType fileType, Boolean isPersistentFile, Boolean isSystemFile, OnPutFileUpdateListener cb) throws SdlException {
+ PutFile msg = RPCRequestFactory.buildPutFile(fileName, offset, length);
+ msg.setOnPutFileUpdateListener(cb);
+ startRPCStream(inputStream, msg);
+ }
+
+ /**
+ * Used to push a binary stream of file data onto the module from a mobile device.
+ * Responses are captured through callback on IProxyListener.
+ *
+ * @param sdlFileName - The file reference name used by the putFile RPC.
+ * @param iOffset - The data offset in bytes, a value of zero is used to indicate data starting from the beginging of a file.
+ * A value greater than zero is used for resuming partial data chunks.
+ * @param iLength - The total length of the file being sent.
+ * @param fileType - The selected file type -- see the FileType enumeration for details
+ * @param bPersistentFile - Indicates if the file is meant to persist between sessions / ignition cycles.
+ * @param bSystemFile - Indicates if the file is meant to be passed thru core to elsewhere on the system.
+ * @return OutputStream - The output stream of byte data that is written to by the app developer
+ * @throws SdlException
+ * @see {@link#putFileStream(String, Long, Long, FileType, Boolean, Boolean)}
+ */
+ @Deprecated
+ public OutputStream putFileStream(String sdlFileName, Integer iOffset, Integer iLength, FileType fileType, Boolean bPersistentFile, Boolean bSystemFile) throws SdlException
+ {
+ PutFile msg = RPCRequestFactory.buildPutFile(sdlFileName, iOffset, iLength, fileType, bPersistentFile, bSystemFile);
+ return startRPCStream(msg);
+ }
+
+ /**
+ * Used to push a binary stream of file data onto the module from a mobile
+ * device. Responses are captured through callback on IProxyListener.
+ *
+ * @param fileName The SDL file reference name used by the RPC.
+ * @param offset The data offset in bytes. A value of zero is used to
+ * indicate data starting from the beginning of the file and a value greater
+ * than zero is used for resuming partial data chunks.
+ * @param length The total length of the file being sent.
+ * @param fileType The selected file type. See the {@link FileType} enum for
+ * details.
+ * @param isPersistentFile Indicates if the file is meant to persist between
+ * sessions / ignition cycles.
+ * @param isSystemFile Indicates if the file is meant to be passed through
+ * core to elsewhere in the system.
+ * @throws SdlException
+ */
+ public OutputStream putFileStream(String fileName, Long offset, Long length, FileType fileType, Boolean isPersistentFile, Boolean isSystemFile, OnPutFileUpdateListener cb) throws SdlException {
+ PutFile msg = RPCRequestFactory.buildPutFile(fileName, offset, length);
+ msg.setOnPutFileUpdateListener(cb);
+ return startRPCStream(msg);
+ }
+
+ /**
+ * Used to push a stream of putfile RPC's containing binary data from a mobile device to the module.
+ * Responses are captured through callback on IProxyListener.
+ *
+ * @param sPath - The physical file path on the mobile device.
+ * @param sdlFileName - The file reference name used by the putFile RPC.
+ * @param iOffset - The data offset in bytes, a value of zero is used to indicate data starting from the beginging of a file.
+ * A value greater than zero is used for resuming partial data chunks.
+ * @param fileType - The selected file type -- see the FileType enumeration for details
+ * @param bPersistentFile - Indicates if the file is meant to persist between sessions / ignition cycles.
+ * @param bSystemFile - Indicates if the file is meant to be passed thru core to elsewhere on the system.
+ * @param correlationID - A unique ID that correlates each RPCRequest and RPCResponse.
+ * @return RPCStreamController - If the putFileStream was not started successfully null is returned, otherwise a valid object reference is returned
+ * @throws SdlException
+ * @see {@link#putFileStream(String, String, Long, FileType, Boolean, Boolean, Integer)}
+ */
+ @Deprecated
+ public RPCStreamController putFileStream(String sPath, String sdlFileName, Integer iOffset, FileType fileType, Boolean bPersistentFile, Boolean bSystemFile, Integer iCorrelationID) throws SdlException
+ {
+ PutFile msg = RPCRequestFactory.buildPutFile(sdlFileName, iOffset, 0, fileType, bPersistentFile, bSystemFile, iCorrelationID);
+ return startPutFileStream(sPath, msg);
+ }
+
+ /**
+ * Used to push a binary stream of file data onto the module from a mobile
+ * device. Responses are captured through callback on IProxyListener.
+ *
+ * @param path The physical file path on the mobile device.
+ * @param fileName The SDL file reference name used by the RPC.
+ * @param offset The data offset in bytes. A value of zero is used to
+ * indicate data starting from the beginning of the file and a value greater
+ * than zero is used for resuming partial data chunks.
+ * @param fileType The selected file type. See the {@link FileType} enum for
+ * details.
+ * @param isPersistentFile Indicates if the file is meant to persist between
+ * sessions / ignition cycles.
+ * @param isSystemFile Indicates if the file is meant to be passed through
+ * core to elsewhere in the system.
+ * @param correlationId A unique id that correlates each RPCRequest and
+ * RPCResponse.
+ * @return RPCStreamController If the putFileStream was not started
+ * successfully null is returned, otherwise a valid object reference is
+ * returned .
+ * @throws SdlException
+ */
+ public RPCStreamController putFileStream(String path, String fileName, Long offset, FileType fileType, Boolean isPersistentFile, Boolean isSystemFile, Boolean isPayloadProtected, Integer correlationId, OnPutFileUpdateListener cb ) throws SdlException {
+ PutFile msg = RPCRequestFactory.buildPutFile(fileName, offset, 0L, fileType, isPersistentFile, isSystemFile, isPayloadProtected, correlationId);
+ msg.setOnPutFileUpdateListener(cb);
+ return startPutFileStream(path,msg);
+ }
+
+ /**
+ * Used to push a stream of putfile RPC's containing binary data from a mobile device to the module.
+ * Responses are captured through callback on IProxyListener.
+ *
+ * @param is - The input stream of byte data that putFileStream will read from.
+ * @param sdlFileName - The file reference name used by the putFile RPC.
+ * @param iOffset - The data offset in bytes, a value of zero is used to indicate data starting from the beginging of a file.
+ * A value greater than zero is used for resuming partial data chunks.
+ * @param fileType - The selected file type -- see the FileType enumeration for details
+ * @param bPersistentFile - Indicates if the file is meant to persist between sessions / ignition cycles.
+ * @param bSystemFile - Indicates if the file is meant to be passed thru core to elsewhere on the system.
+ * @param correlationID - A unique ID that correlates each RPCRequest and RPCResponse.
+ * @return RPCStreamController - If the putFileStream was not started successfully null is returned, otherwise a valid object reference is returned
+ * @throws SdlException
+ * @see {@link#putFileStream(InputStream, String, Long, Long, FileType, Boolean, Boolean, Integer)}
+ */
+ @Deprecated
+ public RPCStreamController putFileStream(InputStream is, String sdlFileName, Integer iOffset, Integer iLength, FileType fileType, Boolean bPersistentFile, Boolean bSystemFile, Integer iCorrelationID) throws SdlException
+ {
+ PutFile msg = RPCRequestFactory.buildPutFile(sdlFileName, iOffset, iLength, fileType, bPersistentFile, bSystemFile, iCorrelationID);
+ return startPutFileStream(is, msg);
+ }
+
+ /**
+ * Used to push a binary stream of file data onto the module from a mobile
+ * device. Responses are captured through callback on IProxyListener.
+ *
+ * @param inputStream The input stream of byte data that will be read from.
+ * @param fileName The SDL file reference name used by the RPC.
+ * @param offset The data offset in bytes. A value of zero is used to
+ * indicate data starting from the beginning of the file and a value greater
+ * than zero is used for resuming partial data chunks.
+ * @param length The total length of the file being sent.
+ * @param fileType The selected file type. See the {@link FileType} enum for
+ * details.
+ * @param isPersistentFile Indicates if the file is meant to persist between
+ * sessions / ignition cycles.
+ * @param isSystemFile Indicates if the file is meant to be passed through
+ * core to elsewhere in the system.
+ * @param correlationId A unique id that correlates each RPCRequest and
+ * RPCResponse.
+ * @throws SdlException
+ */
+ public RPCStreamController putFileStream(InputStream inputStream, String fileName, Long offset, Long length, FileType fileType, Boolean isPersistentFile, Boolean isSystemFile, Boolean isPayloadProtected, Integer correlationId) throws SdlException {
+ PutFile msg = RPCRequestFactory.buildPutFile(fileName, offset, length, fileType, isPersistentFile, isSystemFile, isPayloadProtected, correlationId);
+ return startPutFileStream(inputStream, msg);
+ }
+
+ /**
+ *
+ * Used to end an existing putFileStream that was previously initiated with any putFileStream method.
+ *
+ */
+ public void endPutFileStream()
+ {
+ endRPCStream();
+ }
+
+
+ /**
+ * Used to push a binary data onto the SDL module from a mobile device, such as icons and album art. Not supported on first generation SDL vehicles.
+ * Responses are captured through callback on IProxyListener.
+ *
+ * @param sdlFileName -File reference name.
+ * @param fileType -Selected file type.
+ * @param persistentFile -Indicates if the file is meant to persist between sessions / ignition cycles.
+ * @param fileData
+ * @param correlationID -A unique ID that correlates each RPCRequest and RPCResponse.
+ * @throws SdlException
+ */
+ public void putfile(String sdlFileName, FileType fileType, Boolean persistentFile, byte[] fileData, Integer correlationID) throws SdlException
+ {
+ PutFile msg = RPCRequestFactory.buildPutFile(sdlFileName, fileType, persistentFile, fileData, correlationID);
+ sendRPCRequest(msg);
+ }
+
+ /**
+ * Used to delete a file resident on the SDL module in the app's local cache. Not supported on first generation SDL vehicles.
+ * Responses are captured through callback on IProxyListener.
+ *
+ * @param sdlFileName -File reference name.
+ * @param correlationID -A unique ID that correlates each RPCRequest and RPCResponse.
+ * @throws SdlException
+ */
+ public void deletefile(String sdlFileName, Integer correlationID) throws SdlException
+ {
+ DeleteFile msg = RPCRequestFactory.buildDeleteFile(sdlFileName, correlationID);
+ sendRPCRequest(msg);
+ }
+
+ /**
+ * Requests the current list of resident filenames for the registered app. Not supported on first generation SDL vehicles.
+ * Responses are captured through callback on IProxyListener.
+ *
+ * @param correlationID -A unique ID that correlates each RPCRequest and RPCResponse.
+ * @throws SdlException
+ */
+ public void listfiles(Integer correlationID) throws SdlException
+ {
+ ListFiles msg = RPCRequestFactory.buildListFiles(correlationID);
+ sendRPCRequest(msg);
+ }
+
+ /**
+ * Used to set existing local file on SDL as the app's icon. Not supported on first generation SDL vehicles.
+ * Responses are captured through callback on IProxyListener.
+ *
+ * @param sdlFileName -File reference name.
+ * @param correlationID -A unique ID that correlates each RPCRequest and RPCResponse.
+ * @throws SdlException
+ */
+ public void setappicon(String sdlFileName, Integer correlationID) throws SdlException
+ {
+ SetAppIcon msg = RPCRequestFactory.buildSetAppIcon(sdlFileName, correlationID);
+ sendRPCRequest(msg);
+ }
+
+ /**
+ * Set an alternate display layout. If not sent, default screen for given platform will be shown.
+ * Responses are captured through callback on IProxyListener.
+ *
+ * @param displayLayout -Predefined or dynamically created screen layout.
+ * @param correlationID -A unique ID that correlates each RPCRequest and RPCResponse.
+ * @throws SdlException
+ */
+ public void setdisplaylayout(String displayLayout, Integer correlationID) throws SdlException
+ {
+ SetDisplayLayout msg = RPCRequestFactory.BuildSetDisplayLayout(displayLayout, correlationID);
+ sendRPCRequest(msg);
+ }
+
+ /******************** END Public Helper Methods *************************/
+
+ /**
+ * Gets type of transport currently used by this SdlProxy.
+ *
+ * @return One of TransportType enumeration values.
+ *
+ * @see TransportType
+ */
+ public TransportType getCurrentTransportType() throws IllegalStateException {
+ if (sdlSession == null) {
+ throw new IllegalStateException("Incorrect state of SdlProxyBase: Calling for getCurrentTransportType() while connection is not initialized");
+ }
+
+ return sdlSession.getCurrentTransportType();
+ }
+
+ public void setSdlSecurityClassList(List<Class<? extends SdlSecurityBase>> list) {
+ _secList = list;
+ }
+
+ private void setSdlSecurity(SdlSecurityBase sec) {
+ if (sdlSession != null)
+ {
+ sdlSession.setSdlSecurity(sec);
+ }
+ }
+
+ public boolean isServiceTypeProtected(SessionType sType)
+ {
+ if (sdlSession == null)
+ return false;
+
+ return sdlSession.isServiceProtected(sType);
+ }
+
+ public IProxyListenerBase getProxyListener()
+ {
+ return _proxyListener;
+ }
+
+ public String getAppName()
+ {
+ return _applicationName;
+ }
+
+ public String getNgnAppName()
+ {
+ return _ngnMediaScreenAppName;
+ }
+
+ public String getAppID()
+ {
+ return _appID;
+ }
+ public DeviceInfo getDeviceInfo()
+ {
+ return deviceInfo;
+ }
+ public long getInstanceDT()
+ {
+ return instanceDateTime;
+ }
+ public void setConnectionDetails(String sDetails)
+ {
+ sConnectionDetails = sDetails;
+ }
+ public String getConnectionDetails()
+ {
+ return sConnectionDetails;
+ }
+ //for testing only
+ public void setPoliciesURL(String sText)
+ {
+ sPoliciesURL = sText;
+ }
+ //for testing only
+ public String getPoliciesURL()
+ {
+ return sPoliciesURL;
+ }
+
+} // end-class
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/SdlProxyBuilder.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/SdlProxyBuilder.java
new file mode 100644
index 000000000..9e6921a61
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/SdlProxyBuilder.java
@@ -0,0 +1,157 @@
+package com.smartdevicelink.proxy;
+
+import java.util.List;
+import java.util.Vector;
+
+import com.smartdevicelink.exception.SdlException;
+import com.smartdevicelink.proxy.interfaces.IProxyListenerALM;
+import com.smartdevicelink.proxy.rpc.SdlMsgVersion;
+import com.smartdevicelink.proxy.rpc.TTSChunk;
+import com.smartdevicelink.proxy.rpc.enums.AppHMIType;
+import com.smartdevicelink.proxy.rpc.enums.Language;
+import com.smartdevicelink.security.SdlSecurityBase;
+import com.smartdevicelink.transport.BTTransportConfig;
+import com.smartdevicelink.transport.BaseTransportConfig;
+import com.smartdevicelink.transport.MultiplexTransportConfig;
+
+import android.app.Service;
+import android.content.Context;
+
+public class SdlProxyBuilder
+{
+ // Builder Pattern
+ private IProxyListenerALM listener;
+ private String appId;
+ private String appName;
+ private Boolean isMediaApp;
+
+ private Service service;
+ private SdlProxyConfigurationResources sdlProxyConfigurationResources;
+ private Vector<TTSChunk> ttsChunks;
+ private String sShortAppName;
+ private Vector<String>vrSynonyms;
+ private SdlMsgVersion sdlMessageVersion;
+ private Language lang;
+ private Language hmiLang;
+ private Vector<AppHMIType> vrAppHMITypes;
+ private String autoActivateID;
+ private boolean callbackToUIThread;
+ private boolean preRegister;
+ private String sAppResumeHash;
+ private BaseTransportConfig mTransport;
+ private List<Class<? extends SdlSecurityBase>> sdlSecList;
+
+ public static class Builder
+ {
+ // Required parameters
+ private IProxyListenerALM listener;
+ private String appId;
+ private String appName;
+ private Boolean isMediaApp;
+ private Context context;
+
+ // Optional parameters - initialized to default values
+ private Service service = null;
+ private SdlProxyConfigurationResources sdlProxyConfigurationResources = null;
+ private Vector<TTSChunk> ttsChunks = null;
+ private String sShortAppName = null;
+ private Vector<String>vrSynonyms = null;
+ private SdlMsgVersion sdlMessageVersion = null;
+ private Language lang = Language.EN_US;
+ private Language hmiLang = Language.EN_US;
+ private Vector<AppHMIType> vrAppHMITypes = null;
+ private String autoActivateID = null;
+ private boolean callbackToUIThread = false;
+ private boolean preRegister = false;
+ private String sAppResumeHash = null;
+ private List<Class<? extends SdlSecurityBase>> sdlSecList = null;
+ private BaseTransportConfig mTransport; //Initialized in constructor
+
+ /**
+ * @deprecated Use Builder(IProxyListenerALM, String, String, Boolean, Context) instead
+ */
+ @Deprecated
+ public Builder(IProxyListenerALM listener, String appId, String appName, Boolean isMediaApp)
+ {
+ this.listener = listener;
+ this.appId = appId;
+ this.appName = appName;
+ this.isMediaApp = isMediaApp;
+ this.mTransport = new BTTransportConfig();
+ }
+
+ public Builder(IProxyListenerALM listener, String appId, String appName, Boolean isMediaApp, Context context)
+ {
+ this.listener = listener;
+ this.appId = appId;
+ this.appName = appName;
+ this.isMediaApp = isMediaApp;
+ this.context = context;
+ this.mTransport = new MultiplexTransportConfig(context, appId);
+ }
+
+ public Builder setService(Service val)
+ { service = val; return this; }
+ public Builder setSdlProxyConfigurationResources(SdlProxyConfigurationResources val)
+ { sdlProxyConfigurationResources = val; return this; }
+ public Builder setTtsName(Vector<TTSChunk> val)
+ { ttsChunks = val; return this; }
+ public Builder setShortAppName(String val)
+ { sShortAppName = val; return this; }
+ public Builder setVrSynonyms(Vector<String> val)
+ { vrSynonyms = val; return this; }
+ public Builder setSdlMessageVersion(SdlMsgVersion val)
+ { sdlMessageVersion = val; return this; }
+ public Builder setLangDesired(Language val)
+ { lang = val; return this; }
+ public Builder setHMILangDesired(Language val)
+ { hmiLang = val; return this; }
+ public Builder setVrAppHMITypes(Vector<AppHMIType> val)
+ { vrAppHMITypes = val; return this; }
+ public Builder setAutoActivateID(String val)
+ { autoActivateID = val; return this; }
+ public Builder setCallbackToUIThread(boolean val)
+ { callbackToUIThread = val; return this; }
+ public Builder setPreRegister(boolean val)
+ { preRegister = val; return this; }
+ public Builder setAppResumeDataHash(String val)
+ { sAppResumeHash = val; return this; }
+ public Builder setTransportType(BaseTransportConfig val)
+ { mTransport = val; return this; }
+ public Builder setSdlSecurity(List<Class<? extends SdlSecurityBase>> val)
+ { sdlSecList = val; return this; }
+
+ public SdlProxyALM build() throws SdlException
+ {
+ SdlProxyBuilder obj = new SdlProxyBuilder(this);
+ SdlProxyALM proxy = new SdlProxyALM(obj.service,obj.listener,obj.sdlProxyConfigurationResources,obj.appName,obj.ttsChunks,obj.sShortAppName,obj.vrSynonyms,obj.isMediaApp,obj.sdlMessageVersion,obj.lang,obj.hmiLang,obj.vrAppHMITypes,obj.appId,obj.autoActivateID,obj.callbackToUIThread,obj.preRegister,obj.sAppResumeHash,obj.mTransport);
+ proxy.setSdlSecurityClassList(obj.sdlSecList);
+ return proxy;
+ }
+ }
+
+ private SdlProxyBuilder(Builder builder)
+ {
+ listener = builder.listener;
+ appId = builder.appId;
+ appName = builder.appName;
+ isMediaApp = builder.isMediaApp;
+
+ service = builder.service;
+ sdlProxyConfigurationResources = builder.sdlProxyConfigurationResources;
+ ttsChunks = builder.ttsChunks;
+ sShortAppName = builder.sShortAppName;
+ vrSynonyms = builder.vrSynonyms;
+ sdlMessageVersion = builder.sdlMessageVersion;
+ lang = builder.lang;
+ hmiLang = builder.hmiLang;
+ vrAppHMITypes = builder.vrAppHMITypes;
+ autoActivateID = builder.autoActivateID;
+ callbackToUIThread = builder.callbackToUIThread;
+ preRegister = builder.preRegister;
+ sAppResumeHash = builder.sAppResumeHash;
+ mTransport = builder.mTransport;
+ sdlSecList = builder.sdlSecList;
+ }
+}
+
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/SdlProxyConfigurationResources.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/SdlProxyConfigurationResources.java
new file mode 100644
index 000000000..d875b59ce
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/SdlProxyConfigurationResources.java
@@ -0,0 +1,34 @@
+package com.smartdevicelink.proxy;
+
+import android.telephony.TelephonyManager;
+
+public class SdlProxyConfigurationResources {
+ private String _sdlConfigurationFilePath;
+ private TelephonyManager _telephonyManager;
+
+ public SdlProxyConfigurationResources() {
+ this(null, null);
+ }
+
+ public SdlProxyConfigurationResources(String sdlConfigurationFilePath,
+ TelephonyManager telephonyManager) {
+ _sdlConfigurationFilePath = sdlConfigurationFilePath;
+ _telephonyManager = telephonyManager;
+ }
+
+ public void setSdlConfigurationFilePath(String sdlConfigurationFilePath) {
+ _sdlConfigurationFilePath = sdlConfigurationFilePath;
+ }
+
+ public String getSdlConfigurationFilePath() {
+ return _sdlConfigurationFilePath;
+ }
+
+ public void setTelephonyManager(TelephonyManager telephonyManager) {
+ _telephonyManager = telephonyManager;
+ }
+
+ public TelephonyManager getTelephonyManager() {
+ return _telephonyManager;
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/TTSChunkFactory.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/TTSChunkFactory.java
new file mode 100644
index 000000000..b8b847261
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/TTSChunkFactory.java
@@ -0,0 +1,39 @@
+package com.smartdevicelink.proxy;
+
+import java.util.Vector;
+
+import com.smartdevicelink.proxy.rpc.TTSChunk;
+import com.smartdevicelink.proxy.rpc.enums.SpeechCapabilities;
+
+public class TTSChunkFactory {
+
+ public static TTSChunk createChunk(SpeechCapabilities type, String text) {
+ TTSChunk ret = new TTSChunk();
+ ret.setType(type);
+ ret.setText(text);
+ return ret;
+ }
+
+ public static Vector<TTSChunk> createSimpleTTSChunks(String simple) {
+ if (simple == null) {
+ return null;
+ }
+
+ Vector<TTSChunk> chunks = new Vector<TTSChunk>();
+
+ TTSChunk chunk = createChunk(SpeechCapabilities.TEXT, simple);
+ chunks.add(chunk);
+ return chunks;
+ }
+
+ public static Vector<TTSChunk> createPrerecordedTTSChunks(String prerecorded) {
+ if (prerecorded == null) {
+ return null;
+ }
+
+ Vector<TTSChunk> chunks = new Vector<TTSChunk>();
+ TTSChunk chunk = createChunk(SpeechCapabilities.PRE_RECORDED, prerecorded);
+ chunks.add(chunk);
+ return chunks;
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/Version.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/Version.java
new file mode 100644
index 000000000..214792f85
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/Version.java
@@ -0,0 +1,5 @@
+package com.smartdevicelink.proxy;
+
+public class Version {
+ public static final String VERSION = "VERSION-INFO";
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/callbacks/InternalProxyMessage.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/callbacks/InternalProxyMessage.java
new file mode 100644
index 000000000..dc03f5c72
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/callbacks/InternalProxyMessage.java
@@ -0,0 +1,19 @@
+package com.smartdevicelink.proxy.callbacks;
+
+public class InternalProxyMessage {
+ private String _functionName;
+ public static final String OnProxyError = "OnProxyError";
+ public static final String OnProxyOpened = "OnProxyOpened";
+ public static final String OnProxyClosed = "OnProxyClosed";
+ public static final String OnServiceEnded = "OnServiceEnded";
+ public static final String OnServiceNACKed = "OnServiceNACKed";
+
+ public InternalProxyMessage(String functionName) {
+ //this(functionName, null, null);
+ this._functionName = functionName;
+ }
+
+ public String getFunctionName() {
+ return _functionName;
+ }
+} \ No newline at end of file
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/callbacks/OnError.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/callbacks/OnError.java
new file mode 100644
index 000000000..0323afa15
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/callbacks/OnError.java
@@ -0,0 +1,25 @@
+package com.smartdevicelink.proxy.callbacks;
+
+public class OnError extends InternalProxyMessage {
+
+ private String _info;
+ private Exception _e;
+
+ public OnError() {
+ super(InternalProxyMessage.OnProxyError);
+ }
+
+ public OnError(String info, Exception e) {
+ super(InternalProxyMessage.OnProxyError);
+ this._info = info;
+ this._e = e;
+ }
+
+ public String getInfo() {
+ return _info;
+ }
+
+ public Exception getException() {
+ return _e;
+ }
+} \ No newline at end of file
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/callbacks/OnProxyClosed.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/callbacks/OnProxyClosed.java
new file mode 100644
index 000000000..9a32c4a8d
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/callbacks/OnProxyClosed.java
@@ -0,0 +1,33 @@
+package com.smartdevicelink.proxy.callbacks;
+
+import com.smartdevicelink.proxy.rpc.enums.SdlDisconnectedReason;
+
+public class OnProxyClosed extends InternalProxyMessage {
+
+ private String _info;
+ private Exception _e;
+ private SdlDisconnectedReason _reason;
+
+ public OnProxyClosed() {
+ super(InternalProxyMessage.OnProxyClosed);
+ }
+
+ public OnProxyClosed(String info, Exception e, SdlDisconnectedReason reason) {
+ super(InternalProxyMessage.OnProxyClosed);
+ this._info = info;
+ this._e = e;
+ this._reason = reason;
+ }
+
+ public String getInfo() {
+ return _info;
+ }
+
+ public SdlDisconnectedReason getReason() {
+ return _reason;
+ }
+
+ public Exception getException() {
+ return _e;
+ }
+} \ No newline at end of file
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/callbacks/OnProxyOpened.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/callbacks/OnProxyOpened.java
new file mode 100644
index 000000000..1fa9c19eb
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/callbacks/OnProxyOpened.java
@@ -0,0 +1,8 @@
+package com.smartdevicelink.proxy.callbacks;
+
+public class OnProxyOpened extends InternalProxyMessage {
+
+ public OnProxyOpened() {
+ super(InternalProxyMessage.OnProxyOpened);
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/callbacks/OnServiceEnded.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/callbacks/OnServiceEnded.java
new file mode 100644
index 000000000..d69802e0f
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/callbacks/OnServiceEnded.java
@@ -0,0 +1,21 @@
+package com.smartdevicelink.proxy.callbacks;
+
+import com.smartdevicelink.protocol.enums.SessionType;
+
+public class OnServiceEnded extends InternalProxyMessage {
+ private SessionType sessionType;
+
+ public OnServiceEnded() {
+ super(InternalProxyMessage.OnServiceEnded);
+ }
+
+ public OnServiceEnded(SessionType sessionType) {
+ super(InternalProxyMessage.OnServiceEnded);
+ this.sessionType = sessionType;
+ }
+
+ public SessionType getSessionType() {
+ return this.sessionType;
+ }
+
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/callbacks/OnServiceNACKed.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/callbacks/OnServiceNACKed.java
new file mode 100644
index 000000000..9eae5e4c4
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/callbacks/OnServiceNACKed.java
@@ -0,0 +1,21 @@
+package com.smartdevicelink.proxy.callbacks;
+
+import com.smartdevicelink.protocol.enums.SessionType;
+
+public class OnServiceNACKed extends InternalProxyMessage {
+ private SessionType sessionType;
+
+ public OnServiceNACKed() {
+ super(InternalProxyMessage.OnServiceNACKed);
+ }
+
+ public OnServiceNACKed(SessionType sessionType) {
+ super(InternalProxyMessage.OnServiceNACKed);
+ this.sessionType = sessionType;
+ }
+
+ public SessionType getSessionType() {
+ return this.sessionType;
+ }
+
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/constants/Jingles.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/constants/Jingles.java
new file mode 100644
index 000000000..b029e55e8
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/constants/Jingles.java
@@ -0,0 +1,15 @@
+package com.smartdevicelink.proxy.constants;
+
+@Deprecated
+public class Jingles {
+ public static final String POSITIVE_JINGLE = "POSITIVE_JINGLE";
+
+ public static final String NEGATIVE_JINGLE = "NEGATIVE_JINGLE";
+
+ public static final String INITIAL_JINGLE = "INITIAL_JINGLE";
+
+ public static final String LISTEN_JINGLE = "LISTEN_JINGLE";
+
+ public static final String HELP_JINGLE = "HELP_JINGLE";
+
+} \ No newline at end of file
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/constants/Names.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/constants/Names.java
new file mode 100644
index 000000000..26729e997
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/constants/Names.java
@@ -0,0 +1,506 @@
+package com.smartdevicelink.proxy.constants;
+
+@Deprecated
+public class Names {
+ public static final String request = "request";
+ public static final String response = "response";
+ public static final String notification = "notification";
+ public static final String function_name = "name";
+ public static final String parameters = "parameters";
+ public static final String bulkData = "bulkData";
+
+ public static final String RegisterAppInterface = "RegisterAppInterface";
+ public static final String UnregisterAppInterface = "UnregisterAppInterface";
+ public static final String Alert = "Alert";
+ public static final String Show = "Show";
+ public static final String Speak = "Speak";
+ public static final String AddCommand = "AddCommand";
+ public static final String DeleteCommand = "DeleteCommand";
+ public static final String AddSubMenu = "AddSubMenu";
+ public static final String DeleteSubMenu = "DeleteSubMenu";
+ public static final String CreateInteractionChoiceSet = "CreateInteractionChoiceSet";
+ public static final String DeleteInteractionChoiceSet = "DeleteInteractionChoiceSet";
+ public static final String PerformInteraction = "PerformInteraction";
+ public static final String DialNumber = "DialNumber";
+ public static final String EncodedSyncPData = "EncodedSyncPData";
+ public static final String SyncPData = "SyncPData";
+ public static final String SubscribeButton = "SubscribeButton";
+ public static final String UnsubscribeButton = "UnsubscribeButton";
+ public static final String SubscribeVehicleData = "SubscribeVehicleData";
+ public static final String UnsubscribeVehicleData = "UnsubscribeVehicleData";
+ public static final String SetMediaClockTimer = "SetMediaClockTimer";
+ public static final String SetGlobalProperties = "SetGlobalProperties";
+ public static final String GenericResponse = "GenericResponse";
+ public static final String ScrollableMessage = "ScrollableMessage";
+ public static final String GetDID = "GetDID";
+ public static final String GetDTCs = "GetDTCs";
+ public static final String DiagnosticMessage = "DiagnosticMessage";
+ public static final String SystemRequest = "SystemRequest";
+ public static final String ReadDID = "ReadDID";
+ public static final String OnVehicleData = "OnVehicleData";
+ public static final String GetFile = "GetFile";
+ public static final String PutFile = "PutFile";
+ public static final String DeleteFile = "DeleteFile";
+ public static final String ListFiles = "ListFiles";
+ public static final String EndAudioCapture = "EndAudioCapture";
+ public static final String GetVehicleData = "GetVehicleData";
+ public static final String ResetGlobalProperties = "ResetGlobalProperties";
+ public static final String PerformAudioCapture = "PerformAudioCapture";
+ public static final String SetAppIcon = "SetAppIcon";
+ public static final String ChangeRegistration = "ChangeRegistration";
+ public static final String SetDisplayLayout = "SetDisplayLayout";
+ public static final String keypressMode = "keypressMode";
+ public static final String keyboardLayout = "keyboardLayout";
+ public static final String limitedCharacterList = "limitedCharacterList";
+ public static final String autoCompleteText = "autoCompleteText";
+ public static final String OnLanguageChange = "OnLanguageChange";
+ public static final String hmiDisplayLanguage = "hmiDisplayLanguage";
+ public static final String displayLayout = "displayLayout";
+ public static final String ttsName = "ttsName";
+ public static final String hmiDisplayLanguageDesired = "hmiDisplayLanguageDesired";
+ public static final String appHMIType = "appHMIType";
+ public static final String hashID = "hashID";
+ public static final String appID = "appID";
+ public static final String vrHelpTitle = "vrHelpTitle";
+ public static final String graphic = "graphic";
+ public static final String customPresets = "customPresets";
+ public static final String softButtonCapabilities = "softButtonCapabilities";
+ public static final String presetBankCapabilities = "presetBankCapabilities";
+ public static final String vehicleType = "vehicleType";
+ public static final String make = "make";
+ public static final String model = "model";
+ public static final String modelYear = "modelYear";
+ public static final String trim = "trim";
+ public static final String allowed = "allowed";
+ public static final String userDisallowed = "userDisallowed";
+ public static final String rpcName = "rpcName";
+ public static final String hmiPermissions = "hmiPermissions";
+ public static final String parameterPermissions = "parameterPermissions";
+ public static final String permissionItem = "permissionItem";
+ public static final String numTicks = "numTicks";
+ public static final String sliderHeader = "sliderHeader";
+ public static final String sliderFooter = "sliderFooter";
+ public static final String PerformAudioPassThru = "PerformAudioPassThru";
+ public static final String PerformAudioPassThruResponse = "PerformAudioPassThruResponse";
+ public static final String EndAudioPassThru = "EndAudioPassThru";
+ public static final String EndAudioPassThruResponse = "EndAudioPassThruResponse";
+ public static final String OnAudioPassThru = "OnAudioPassThru";
+ public static final String ShowConstantTBT = "ShowConstantTBT";
+ public static final String AlertManeuver = "AlertManeuver";
+ public static final String UpdateTurnList = "UpdateTurnList";
+
+ public static final String OnCommand = "OnCommand";
+ public static final String OnDataPublished = "OnDataPublished";
+ public static final String OnButtonPress = "OnButtonPress";
+ public static final String OnButtonEvent = "OnButtonEvent";
+ public static final String OnHMIStatus = "OnHMIStatus";
+ public static final String OnTBTClientState = "OnTBTClientState";
+ public static final String OnEncodedSyncPData = "OnEncodedSyncPData";
+ public static final String onEncodedSyncPDataResponse = "onEncodedSyncPDataResponse";
+ public static final String OnSyncPData = "OnSyncPData";
+ public static final String onOnSyncPData = "onOnSyncPData";
+ public static final String OnDriverDistraction = "OnDriverDistraction";
+ public static final String OnAppInterfaceUnregistered = "OnAppInterfaceUnregistered";
+ public static final String OnKeyboardInput = "OnKeyboardInput";
+ public static final String OnTouchEvent = "OnTouchEvent";
+ public static final String OnSystemRequest = "OnSystemRequest";
+ public static final String OnHashChange = "OnHashChange";
+ public static final String OnProxyClosed = "OnProxyClosed";
+ public static final String OnProxyError = "OnProxyError";
+ public static final String OnProxyOpened = "OnProxyOpened";
+ public static final String OnProxyUnusable = "OnProxyUnusable";
+ public static final String OnHMILevelChange = "OnHMILevelChange";
+ public static final String OnSdlChoiceChosen = "OnSdlChoiceChosen";
+ public static final String OnPermissionsChange = "OnPermissionsChange";
+ public static final String OnScreenPresetsAvailable = "OnScreenPresetsAvailable";
+ public static final String isHighlighted = "isHighlighted";
+ public static final String softButtonID = "softButtonID";
+ public static final String fileType = "fileType";
+ public static final String url = "url";
+ public static final String requestType = "requestType";
+ public static final String fileName = "fileName";
+ public static final String persistentFile = "persistentFile";
+ public static final String spaceAvailable = "spaceAvailable";
+ public static final String filenames = "filenames";
+ public static final String cmdIcon = "cmdIcon";
+ public static final String Slider = "Slider";
+ public static final String sliderPosition = "sliderPosition";
+ public static final String samplingRate = "samplingRate";
+ public static final String audioType = "audioType";
+ public static final String satRadioESN = "satRadioESN";
+ public static final String dtc = "dtc";
+ public static final String tryAgainTime = "tryAgainTime";
+
+ public static final String success = "success";
+ public static final String resultCode = "resultCode";
+ public static final String info = "info";
+
+ public static final String payload = "payload";
+ public static final String reason = "reason";
+ public static final String state = "state";
+ public static final String cmdID = "cmdID";
+ public static final String menuParams = "menuParams";
+ public static final String parentID = "parentID";
+ public static final String position = "position";
+ public static final String menuName = "menuName";
+ public static final String vrCommands = "vrCommands";
+ public static final String language = "language";
+ public static final String languageDesired = "languageDesired";
+ public static final String triggerSource = "triggerSource";
+ public static final String subscriptionType = "subscriptionType";
+ public static final String data = "data";
+ public static final String event = "event";
+ public static final String correlationID = "correlationID";
+ public static final String sdlMsgVersion = "syncMsgVersion";
+ public static final String deviceInfo = "deviceInfo";
+ public static final String majorVersion = "majorVersion";
+ public static final String minorVersion = "minorVersion";
+ public static final String appName = "appName";
+ public static final String ngnMediaScreenAppName = "ngnMediaScreenAppName";
+ public static final String isMediaApplication = "isMediaApplication";
+ public static final String vrSynonyms = "vrSynonyms";
+ public static final String usesVehicleData = "usesVehicleData";
+ public static final String text = "text";
+ public static final String type = "type";
+ public static final String ttsChunks = "ttsChunks";
+ public static final String playTone = "playTone";
+ public static final String duration = "duration";
+ public static final String mainField1 = "mainField1";
+ public static final String mainField2 = "mainField2";
+ public static final String mainField3 = "mainField3";
+ public static final String mainField4 = "mainField4";
+ public static final String statusBar = "statusBar";
+ public static final String name = "name";
+ public static final String menuID = "menuID";
+ public static final String longPress = "longPress";
+ public static final String shortPress = "shortPress";
+ public static final String buttonName = "buttonName";
+ public static final String buttonPressMode = "buttonPressMode";
+ public static final String buttonEventMode = "buttonEventMode";
+ public static final String minutes = "minutes";
+ public static final String seconds = "seconds";
+ public static final String startTime = "startTime";
+ public static final String endTime = "endTime";
+ public static final String updateMode = "updateMode";
+ public static final String mediaClock = "mediaClock";
+ public static final String initialText = "initialText";
+ public static final String initialPrompt = "initialPrompt";
+ public static final String helpPrompt = "helpPrompt";
+ public static final String timeoutPrompt = "timeoutPrompt";
+ public static final String timeout = "timeout";
+ public static final String choiceSet = "choiceSet";
+ public static final String interactionMode = "interactionMode";
+ public static final String result = "result";
+ public static final String alertText1 = "alertText1";
+ public static final String alertText2 = "alertText2";
+ public static final String alertText3 = "alertText3";
+ public static final String shortPressAvailable = "shortPressAvailable";
+ public static final String longPressAvailable = "longPressAvailable";
+ public static final String upDownAvailable = "upDownAvailable";
+ public static final String width = "width";
+ public static final String height = "height";
+ public static final String resolutionWidth = "resolutionWidth";
+ public static final String resolutionHeight = "resolutionHeight";
+ public static final String characterSet = "characterSet";
+ public static final String displayType = "displayType";
+ public static final String mediaClockFormats = "mediaClockFormats";
+ public static final String textFields = "textFields";
+ public static final String imageFields = "imageFields";
+ public static final String autoActivateID = "autoActivateID";
+ public static final String vehicleDataCapabilities = "vehicleDataCapabilities";
+ public static final String speechCapabilities = "speechCapabilities";
+ public static final String vrCapabilities = "vrCapabilities";
+ public static final String audioPassThruCapabilities = "audioPassThruCapabilities";
+ public static final String buttonCapabilities = "buttonCapabilities";
+ public static final String displayCapabilities = "displayCapabilities";
+ public static final String hmiZoneCapabilities = "hmiZoneCapabilities";
+ public static final String interactionChoiceSetID = "interactionChoiceSetID";
+ public static final String interactionChoiceSetIDList = "interactionChoiceSetIDList";
+ public static final String audioFileName = "audioFileName";
+ public static final String gpsPositionValid = "gpsPositionValid";
+ public static final String longitudeDegrees = "longitudeDegrees";
+ public static final String latitudeDegrees = "latitudeDegrees";
+ public static final String utcYear = "utcYear";
+ public static final String utcMonth = "utcMonth";
+ public static final String utcDay = "utcDay";
+ public static final String utcHours = "utcHours";
+ public static final String utcMinutes = "utcMinutes";
+ public static final String utcSeconds = "utcSeconds";
+ public static final String compassDirection = "compassDirection";
+ public static final String pdop = "pdop";
+ public static final String vdop = "vdop";
+ public static final String hdop = "hdop";
+ public static final String actual = "actual";
+ public static final String satellites = "satellites";
+ public static final String dimension = "dimension";
+ public static final String altitude = "altitude";
+ public static final String heading = "heading";
+ public static final String speed = "speed";
+ public static final String number = "number";
+ public static final String smartDeviceLinkFileName = "syncFileName";
+ public static final String localFileName = "localFileName";
+ public static final String maxDuration = "maxDuration";
+ public static final String timerMode = "timerMode";
+ public static final String status = "status";
+ public static final String pressure = "pressure";
+ public static final String hours = "hours";
+ public static final String rows = "rows";
+ public static final String pressureTellTale = "pressureTellTale";
+ public static final String leftFront = "leftFront";
+ public static final String rightFront = "rightFront";
+ public static final String leftRear = "leftRear";
+ public static final String rightRear = "rightRear";
+ public static final String innerLeftRear = "innerLeftRear";
+ public static final String innerRightRear = "innerRightRear";
+ public static final String VehicleData = "VehicleData";
+ public static final String alignment = "alignment";
+ public static final String mediaTrack = "mediaTrack";
+ public static final String properties = "properties";
+ public static final String choiceID = "choiceID";
+ public static final String bitsPerSample = "bitsPerSample";
+ public static final String hmiLevel = "hmiLevel";
+ public static final String audioStreamingState = "audioStreamingState";
+ public static final String systemContext = "systemContext";
+ public static final String sdlChoice = "sdlChoice";
+ public static final String sdlCommand = "sdlCommand";
+ public static final String URL = "URL";
+ public static final String Timeout = "Timeout";
+ public static final String PermissionGroupName = "PermissionGroupName";
+ public static final String PermissionGroupStatus = "PermissionGroupStatus";
+ public static final String PermissionGroupItems = "PermissionGroupItems";
+ public static final String audioPacket = "audioPacket";
+ public static final String audioPassThruDisplayText1 = "audioPassThruDisplayText1";
+ public static final String audioPassThruDisplayText2 = "audioPassThruDisplayText2";
+ public static final String bitRate = "bitRate";
+ public static final String rpm = "rpm";
+ public static final String fuelLevel = "fuelLevel";
+ public static final String avgFuelEconomy = "avgFuelEconomy";
+ public static final String batteryVoltage = "batteryVoltage";
+ public static final String externalTemperature = "externalTemperature";
+ public static final String vin = "vin";
+ public static final String prndl = "prndl";
+ public static final String tirePressure = "tirePressure";
+ public static final String batteryPackVoltage = "batteryPackVoltage";
+ public static final String batteryPackCurrent = "batteryPackCurrent";
+ public static final String batteryPackTemperature = "batteryPackTemperature";
+ public static final String engineTorque = "engineTorque";
+ public static final String odometer = "odometer";
+ public static final String tripOdometer = "tripOdometer";
+ public static final String genericbinary = "genericbinary";
+ public static final String GPSData = "GPSData";
+ public static final String gps = "gps";
+ public static final String fuelLevel_State = "fuelLevel_State";
+ public static final String instantFuelConsumption = "instantFuelConsumption";
+ public static final String beltStatus = "beltStatus";
+ public static final String bodyInformation = "bodyInformation";
+ public static final String deviceStatus = "deviceStatus";
+ public static final String driverBraking = "driverBraking";
+ public static final String wiperStatus = "wiperStatus";
+ public static final String fuelEconomy = "fuelEconomy";
+ public static final String engineOilLife = "engineOilLife";
+ public static final String headLampStatus = "headLampStatus";
+ public static final String brakeTorque = "brakeTorque";
+ public static final String turboBoost = "turboBoost";
+ public static final String coolantTemp = "coolantTemp";
+ public static final String airFuelRatio = "airFuelRatio";
+ public static final String coolingHeadTemp = "coolingHeadTemp";
+ public static final String oilTemp = "oilTemp";
+ public static final String intakeAirTemp = "intakeAirTemp";
+ public static final String gearShiftAdvice = "gearShiftAdvice";
+ public static final String acceleration = "acceleration";
+ public static final String accPedalPosition = "accPedalPosition";
+ public static final String clutchPedalPosition = "clutchPedalPosition";
+ public static final String reverseGearStatus = "reverseGearStatus";
+ public static final String accTorque = "accTorque";
+ public static final String ambientLightStatus = "ambientLightStatus";
+ public static final String ambientLightSensorStatus = "ambientLightSensorStatus";
+ public static final String dataType = "dataType";
+ public static final String identifier = "identifier";
+ public static final String statusByte = "statusByte";
+ public static final String didResult = "didResult";
+ public static final String ecuName = "ecuName";
+ public static final String didLocation = "didLocation";
+ public static final String value = "value";
+ public static final String softButtonName = "softButtonName";
+ public static final String imageSupported = "imageSupported";
+ public static final String systemAction = "systemAction";
+ public static final String image = "image";
+ public static final String secondaryText = "secondaryText";
+ public static final String tertiaryText = "tertiaryText";
+ public static final String secondaryImage = "secondaryImage";
+ public static final String imageType = "imageType";
+ public static final String fileData = "fileData";
+ public static final String scrollableMessageBody = "scrollableMessageBody";
+ public static final String softButtons = "softButtons";
+ public static final String customButtonID = "customButtonID";
+ public static final String vrHelp = "vrHelp";
+ public static final String interactionLayout = "interactionLayout";
+ public static final String customButtonName = "customButtonName";
+ public static final String navigationText = "navigationText";
+ public static final String turnIcon = "turnIcon";
+ public static final String nextTurnIcon = "nextTurnIcon";
+ public static final String navigationText1 = "navigationText1";
+ public static final String navigationText2 = "navigationText2";
+ public static final String eta = "eta";
+ public static final String totalDistance = "totalDistance";
+ public static final String distanceToManeuver = "distanceToManeuver";
+ public static final String distanceToManeuverScale = "distanceToManeuverScale";
+ public static final String maneuverComplete = "maneuverComplete";
+ public static final String turnList = "turnList";
+ public static final String steeringWheelAngle = "steeringWheelAngle";
+ public static final String menuTitle = "menuTitle";
+ public static final String menuIcon = "menuIcon";
+ public static final String keyboardProperties = "keyboardProperties";
+ public static final String driverBeltDeployed = "driverBeltDeployed";
+ public static final String passengerBeltDeployed = "passengerBeltDeployed";
+ public static final String passengerBuckleBelted = "passengerBuckleBelted";
+ public static final String driverBuckleBelted = "driverBuckleBelted";
+ public static final String leftRow2BuckleBelted = "leftRow2BuckleBelted";
+ public static final String passengerChildDetected = "passengerChildDetected";
+ public static final String rightRow2BuckleBelted = "rightRow2BuckleBelted";
+ public static final String middleRow2BuckleBelted = "middleRow2BuckleBelted";
+ public static final String middleRow3BuckleBelted = "middleRow3BuckleBelted";
+ public static final String leftRow3BuckleBelted = "leftRow3BuckleBelted";
+ public static final String rightRow3BuckleBelted = "rightRow3BuckleBelted";
+ public static final String rearInflatableBelted = "rearInflatableBelted";
+ public static final String leftRearInflatableBelted = "leftRearInflatableBelted";
+ public static final String rightRearInflatableBelted = "rightRearInflatableBelted";
+ public static final String middleRow1BeltDeployed = "middleRow1BeltDeployed";
+ public static final String middleRow1BuckleBelted = "middleRow1BuckleBelted";
+
+ public static final String graphicSupported = "graphicSupported";
+ public static final String screenParams = "screenParams";
+ public static final String muteAudio = "muteAudio";
+ public static final String parkBrakeActive = "parkBrakeActive";
+ public static final String ignitionStableStatus = "ignitionStableStatus";
+ public static final String ignitionStatus = "ignitionStatus";
+ public static final String driverDoorAjar = "driverDoorAjar";
+ public static final String passengerDoorAjar = "passengerDoorAjar";
+ public static final String rearLeftDoorAjar = "rearLeftDoorAjar";
+ public static final String rearRightDoorAjar = "rearRightDoorAjar";
+ public static final String systemFile = "systemFile";
+
+ public static final String voiceRecOn = "voiceRecOn";
+ public static final String btIconOn = "btIconOn";
+ public static final String callActive = "callActive";
+ public static final String phoneRoaming = "phoneRoaming";
+ public static final String textMsgAvailable = "textMsgAvailable";
+ public static final String battLevelStatus = "battLevelStatus";
+ public static final String stereoAudioOutputMuted = "stereoAudioOutputMuted";
+ public static final String monoAudioOutputMuted = "monoAudioOutputMuted";
+ public static final String signalLevelStatus = "signalLevelStatus";
+ public static final String primaryAudioSource = "primaryAudioSource";
+ public static final String eCallEventActive = "eCallEventActive";
+
+ public static final String fuelEconomySinceLastReset = "fuelEconomySinceLastReset";
+ public static final String currentTripFuelEconomy = "currentTripFuelEconomy";
+ public static final String averageTripFuelEconomy = "averageTripFuelEconomy";
+ public static final String currentCycleFuelEconomy = "currentCycleFuelEconomy";
+
+ public static final String lightSwitchStatus = "lightSwitchStatus";
+ public static final String highBeamsOn = "highBeamsOn";
+ public static final String lowBeamsOn = "lowBeamsOn";
+
+ public static final String electricFuelConsumption = "electricFuelConsumption";
+ public static final String stateOfCharge = "stateOfCharge";
+ public static final String fuelMaintenanceMode = "fuelMaintenanceMode";
+ public static final String distanceToEmpty = "distanceToEmpty";
+
+ public static final String dtcMask = "dtcMask";
+ public static final String targetID = "targetID";
+ public static final String messageLength = "messageLength";
+ public static final String messageData = "messageData";
+ public static final String messageDataResult = "messageDataResult";
+
+ public static final String imageTypeSupported = "imageTypeSupported";
+ public static final String imageResolution = "imageResolution";
+ public static final String x = "x";
+ public static final String y = "y";
+ public static final String id = "id";
+ public static final String ts = "ts";
+ public static final String c = "c";
+ public static final String resolution = "resolution";
+ public static final String touchEventAvailable = "touchEventAvailable";
+
+ public static final String pressAvailable = "pressAvailable";
+ public static final String multiTouchAvailable = "multiTouchAvailable";
+ public static final String doublePressAvailable = "doublePressAvailable";
+ public static final String templatesAvailable = "templatesAvailable";
+ public static final String numCustomPresetsAvailable = "numCustomPresetsAvailable";
+ public static final String prerecordedSpeech = "prerecordedSpeech";
+ public static final String manualTextEntry = "manualTextEntry";
+ public static final String progressIndicator = "progressIndicator";
+ public static final String secondaryGraphic = "secondaryGraphic";
+ public static final String offset = "offset";
+ public static final String length = "length";
+
+ public static final String hardware = "hardware";
+ public static final String firmwareRev = "firmwareRev";
+ public static final String os = "os";
+ public static final String osVersion = "osVersion";
+ public static final String carrier = "carrier";
+ public static final String maxNumberRFCOMMPorts = "maxNumberRFCOMMPorts";
+
+ public static final String onReadDIDResponse = "onReadDIDResponse";
+ public static final String onGetDTCsResponse = "onGetDTCsResponse";
+ public static final String onOnKeyboardInput = "onOnKeyboardInput";
+ public static final String onOnTouchEvent = "onOnTouchEvent";
+ public static final String onOnSystemRequest = "onOnSystemRequest";
+
+ public static final String onDiagnosticMessageResponse = "onDiagnosticMessageResponse";
+ public static final String onSystemRequestResponse = "onSystemRequestResponse";
+ public static final String onGetVehicleDataResponse = "onGetVehicleDataResponse";
+ public static final String getSupportedDiagModes = "getSupportedDiagModes";
+ public static final String supportedDiagModes = "supportedDiagModes";
+
+ public static final String driverAirbagDeployed = "driverAirbagDeployed";
+ public static final String driverSideAirbagDeployed = "driverSideAirbagDeployed";
+ public static final String driverCurtainAirbagDeployed = "driverCurtainAirbagDeployed";
+ public static final String passengerAirbagDeployed = "passengerAirbagDeployed";
+ public static final String passengerCurtainAirbagDeployed = "passengerCurtainAirbagDeployed";
+ public static final String driverKneeAirbagDeployed = "driverKneeAirbagDeployed";
+ public static final String passengerSideAirbagDeployed = "passengerSideAirbagDeployed";
+ public static final String passengerKneeAirbagDeployed = "passengerKneeAirbagDeployed";
+
+ public static final String powerModeActive = "powerModeActive";
+ public static final String powerModeQualificationStatus = "powerModeQualificationStatus";
+ public static final String carModeStatus = "carModeStatus";
+ public static final String powerModeStatus = "powerModeStatus";
+
+ public static final String eCallNotificationStatus = "eCallNotificationStatus";
+ public static final String auxECallNotificationStatus = "auxECallNotificationStatus";
+ public static final String eCallConfirmationStatus = "eCallConfirmationStatus";
+ public static final String e911Override = "e911Override";
+
+ public static final String emergencyEventType = "emergencyEventType";
+ public static final String fuelCutoffStatus = "fuelCutoffStatus";
+ public static final String rolloverEvent = "rolloverEvent";
+ public static final String maximumChangeVelocity = "maximumChangeVelocity";
+ public static final String multipleEvents = "multipleEvents";
+
+ public static final String eCallInfo = "eCallInfo";
+ public static final String airbagStatus = "airbagStatus";
+ public static final String emergencyEvent = "emergencyEvent";
+ public static final String clusterModeStatus = "clusterModeStatus";
+ public static final String myKey = "myKey";
+ public static final String timeToDestination = "timeToDestination";
+
+ public static final String driverDistraction = "driverDistraction";
+ public static final String showLockScreen = "showLockScreen";
+ public static final String userSelected = "userSelected";
+ public static final String notSet = "notSet";
+
+ public static final String headers = "headers";
+ public static final String body = "body";
+
+ public static final String ContentType = "ContentType";
+ public static final String ConnectTimeout = "ConnectTimeout";
+ public static final String DoOutput = "DoOutput";
+ public static final String DoInput = "DoInput";
+ public static final String UseCaches = "UseCaches";
+ public static final String RequestMethod = "RequestMethod";
+ public static final String ReadTimeout = "ReadTimeout";
+ public static final String InstanceFollowRedirects = "InstanceFollowRedirects";
+ public static final String charset = "charset";
+ public static final String ContentLength = "Content-Length";
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/interfaces/IProxyListenerALM.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/interfaces/IProxyListenerALM.java
new file mode 100644
index 000000000..2fb5a4063
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/interfaces/IProxyListenerALM.java
@@ -0,0 +1,48 @@
+package com.smartdevicelink.proxy.interfaces;
+
+public interface IProxyListenerALM extends IProxyListenerBase {
+ // Adds Advanced Life-cycle Management call-backs to the IProxyListenerAbstract interface
+
+ /**
+ * **MOVED TO IProxyListenerBase** - onOnHMIStatus() being called indicates that the proxy has entered a state in which the
+ * application may create SDL related resources (addCommands, ChoiceSets).
+ */
+ //public void onOnHMIStatus(OnHMIStatus notification);
+
+ /**
+ * **MOVED TO IProxyListenerBase** - onProxyClosed() being called indicates that the app is no longer registered with SDL
+ * All resources on SDL (addCommands and ChoiceSets) have been deleted and will have to be
+ * recreated upon the next onReadyForInitialization() call-back.
+ */
+ //public void onProxyClosed(String info, Exception e);
+
+ /**
+ * **MOVED TO IProxyListenerBase** - onError() being called indicates that the proxy has experienced an unrecoverable error.
+ * A new proxy object must be initiated to reestablish connection with SDL.
+ *
+ * @param info - Any info present about the error that occurred.
+ * @param e - Any exception thrown by the error.
+ */
+ //public void onError(String info, Exception e);
+
+ /**
+ * **Deprecated** - onSdlInterfaceAvailable() being called indicates that the proxy now has access to SDL's HMI.
+ * Monitor the onFocusChange call-back to determine which level of HMI is available to the proxy.
+ *
+ * @param isFirstAvailability - Indicates this is the first onSdlInterfaceAvailable in this lifecycle.
+ */
+ // HMI (Background, Limited, Full) from Unavailable = onSdlInterfaceAvailable(Boolean isFirstAvailability);
+
+ /**
+ * **Deprecated** - onSdlInterfaceUnavailable() being called indicates that the proxy does NOT have access to SDL's HIM.
+ */
+ // HMI None onSdlInterfaceUnavailable();
+
+ /**
+ * **Deprecated** - ALM HMI states converted back to HMI Levels
+ *
+ * HMI Full = onSdlInFocus(Boolean isFirstSdlInFocus);
+ * HMI Limited = onSdlInFocusLimited();
+ * HMI Background = onSdlLostFocus();
+ */
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/interfaces/IProxyListenerBase.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/interfaces/IProxyListenerBase.java
new file mode 100644
index 000000000..8b437e05e
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/interfaces/IProxyListenerBase.java
@@ -0,0 +1,338 @@
+package com.smartdevicelink.proxy.interfaces;
+
+import com.smartdevicelink.proxy.callbacks.OnServiceEnded;
+import com.smartdevicelink.proxy.callbacks.OnServiceNACKed;
+import com.smartdevicelink.proxy.rpc.AddCommandResponse;
+import com.smartdevicelink.proxy.rpc.AddSubMenuResponse;
+import com.smartdevicelink.proxy.rpc.AlertManeuverResponse;
+import com.smartdevicelink.proxy.rpc.AlertResponse;
+import com.smartdevicelink.proxy.rpc.ChangeRegistrationResponse;
+import com.smartdevicelink.proxy.rpc.CreateInteractionChoiceSetResponse;
+import com.smartdevicelink.proxy.rpc.DeleteCommandResponse;
+import com.smartdevicelink.proxy.rpc.DeleteFileResponse;
+import com.smartdevicelink.proxy.rpc.DeleteInteractionChoiceSetResponse;
+import com.smartdevicelink.proxy.rpc.DeleteSubMenuResponse;
+import com.smartdevicelink.proxy.rpc.DiagnosticMessageResponse;
+import com.smartdevicelink.proxy.rpc.DialNumberResponse;
+import com.smartdevicelink.proxy.rpc.EndAudioPassThruResponse;
+import com.smartdevicelink.proxy.rpc.GenericResponse;
+import com.smartdevicelink.proxy.rpc.GetDTCsResponse;
+import com.smartdevicelink.proxy.rpc.GetVehicleDataResponse;
+import com.smartdevicelink.proxy.rpc.GetWayPointsResponse;
+import com.smartdevicelink.proxy.rpc.ListFilesResponse;
+import com.smartdevicelink.proxy.rpc.OnAudioPassThru;
+import com.smartdevicelink.proxy.rpc.OnButtonEvent;
+import com.smartdevicelink.proxy.rpc.OnButtonPress;
+import com.smartdevicelink.proxy.rpc.OnCommand;
+import com.smartdevicelink.proxy.rpc.OnDriverDistraction;
+import com.smartdevicelink.proxy.rpc.OnHMIStatus;
+import com.smartdevicelink.proxy.rpc.OnHashChange;
+import com.smartdevicelink.proxy.rpc.OnKeyboardInput;
+import com.smartdevicelink.proxy.rpc.OnLanguageChange;
+import com.smartdevicelink.proxy.rpc.OnLockScreenStatus;
+import com.smartdevicelink.proxy.rpc.OnPermissionsChange;
+import com.smartdevicelink.proxy.rpc.OnSystemRequest;
+import com.smartdevicelink.proxy.rpc.OnTBTClientState;
+import com.smartdevicelink.proxy.rpc.OnStreamRPC;
+import com.smartdevicelink.proxy.rpc.OnTouchEvent;
+import com.smartdevicelink.proxy.rpc.OnVehicleData;
+import com.smartdevicelink.proxy.rpc.OnWayPointChange;
+import com.smartdevicelink.proxy.rpc.PerformAudioPassThruResponse;
+import com.smartdevicelink.proxy.rpc.PerformInteractionResponse;
+import com.smartdevicelink.proxy.rpc.PutFileResponse;
+import com.smartdevicelink.proxy.rpc.ReadDIDResponse;
+import com.smartdevicelink.proxy.rpc.ResetGlobalPropertiesResponse;
+import com.smartdevicelink.proxy.rpc.ScrollableMessageResponse;
+import com.smartdevicelink.proxy.rpc.SendLocationResponse;
+import com.smartdevicelink.proxy.rpc.SetAppIconResponse;
+import com.smartdevicelink.proxy.rpc.SetDisplayLayoutResponse;
+import com.smartdevicelink.proxy.rpc.SetGlobalPropertiesResponse;
+import com.smartdevicelink.proxy.rpc.SetMediaClockTimerResponse;
+import com.smartdevicelink.proxy.rpc.ShowConstantTbtResponse;
+import com.smartdevicelink.proxy.rpc.ShowResponse;
+import com.smartdevicelink.proxy.rpc.SliderResponse;
+import com.smartdevicelink.proxy.rpc.SpeakResponse;
+import com.smartdevicelink.proxy.rpc.StreamRPCResponse;
+import com.smartdevicelink.proxy.rpc.SubscribeButtonResponse;
+import com.smartdevicelink.proxy.rpc.SubscribeVehicleDataResponse;
+import com.smartdevicelink.proxy.rpc.SubscribeWayPointsResponse;
+import com.smartdevicelink.proxy.rpc.SystemRequestResponse;
+import com.smartdevicelink.proxy.rpc.UnsubscribeButtonResponse;
+import com.smartdevicelink.proxy.rpc.UnsubscribeVehicleDataResponse;
+import com.smartdevicelink.proxy.rpc.UnsubscribeWayPointsResponse;
+import com.smartdevicelink.proxy.rpc.UpdateTurnListResponse;
+import com.smartdevicelink.proxy.rpc.enums.SdlDisconnectedReason;
+
+
+public interface IProxyListenerBase {
+
+ /**
+ * onOnHMIStatus being called indicates that there has been an HMI Level change,
+ * system context change or audio streaming state change.
+ *
+ * @param notification - Contains information about the HMI Level,
+ * system context and audio streaming state.
+ */
+ public void onOnHMIStatus(OnHMIStatus notification);
+
+ /**
+ * onProxyClosed has different functionality for the different models.
+ * In the non-ALM model this indicates that the proxy has experienced an unrecoverable error.
+ * A new proxy object must be initiated to reestablish connection with SDL.
+ * In the ALM model this indicates that the app is no longer registered with SDL
+ * All resources on SDL (addCommands and ChoiceSets) have been deleted and will have to be
+ * recreated upon the next onReadyForInitialization() call-back.
+ *
+ * @param info - Includes information about the reason the proxy has been closed.
+ * @param e - The exception that occurred.
+ */
+ public void onProxyClosed(String info, Exception e, SdlDisconnectedReason reason);
+
+ public void onServiceEnded(OnServiceEnded serviceEnded);
+
+ public void onServiceNACKed(OnServiceNACKed serviceNACKed);
+
+ public void onOnStreamRPC(OnStreamRPC notification);
+
+ public void onStreamRPCResponse(StreamRPCResponse response);
+
+ /**
+ * onProxyError() being called indicates that the SDL Proxy experenced an error.
+ *
+ * @param info - Includes information about the Exception that occurred.
+ * @param e - The exception that occurred.
+ */
+ public void onError(String info, Exception e);
+
+ /**
+ * onGenericResponse() being called indicates that SDL could not determine the
+ * type of request it is responding to. This is usually result of an unknown RPC Request
+ * being sent.
+ *
+ * @param response - Includes detailed information about the response.
+ */
+ public void onGenericResponse(GenericResponse response);
+
+ /**
+ * onOnCommand() being called indicates that the user selected a command on SDL.
+ *
+ * @param notification - Contains information about the command chosen.
+ */
+ public void onOnCommand(OnCommand notification);
+
+ /**
+ * onAddCommandResponse() being called indicates that SDL has responded to
+ * a request to add a command.
+ *
+ * @param response - Contains information about the response sent from SDL.
+ */
+ public void onAddCommandResponse(AddCommandResponse response);
+
+ /**
+ * onAddSubMenuResponse() being called indicates that SDL has responded to
+ * a request to add a command.
+ *
+ * @param response - Contains information about the response sent from SDL.
+ */
+ public void onAddSubMenuResponse(AddSubMenuResponse response);
+
+ /**
+ * onCreateInteractionChoiceSetResponse() being called indicates that SDL has
+ * responded to a request to add an interactionChoiceSet.
+ *
+ * @param response - Contains information about the response sent from SDL.
+ */
+ public void onCreateInteractionChoiceSetResponse(CreateInteractionChoiceSetResponse response);
+
+ /**
+ * onAlertResponse being called indicates that SDL has
+ * responded to a request to alert the user.
+ *
+ * @param response - Contains information about the response sent from SDL.
+ */
+ public void onAlertResponse(AlertResponse response);
+
+ /**
+ * onDeleteCommandResponse being called indicates that SDL has
+ * responded to a request to delete a command.
+ *
+ * @param response - Contains information about the response sent from SDL.
+ */
+ public void onDeleteCommandResponse(DeleteCommandResponse response);
+
+ /**
+ * onDeleteCommandResponse being called indicates that SDL has
+ * responded to a request to delete an interaction choice set.
+ *
+ * @param response - Contains information about the response sent from SDL.
+ */
+ public void onDeleteInteractionChoiceSetResponse(DeleteInteractionChoiceSetResponse response);
+
+ /**
+ * onDeleteCommandResponse being called indicates that SDL has
+ * responded to a request to delete a submenu.
+ *
+ * @param response - Contains information about the response sent from SDL.
+ */
+ public void onDeleteSubMenuResponse(DeleteSubMenuResponse response);
+
+ /**
+ * onPerformInteractionResponse being called indicates that SDL has
+ * responded to a request to perform an interaction.
+ *
+ * @param response - Contains information about the response sent from SDL.
+ */
+ public void onPerformInteractionResponse(PerformInteractionResponse response);
+
+ /**
+ * onResetGlobalPropertiesResponse being called indicates that SDL has
+ * responded to a request to reset global properties.
+ *
+ * @param response - Contains information about the response sent from SDL.
+ */
+ public void onResetGlobalPropertiesResponse(ResetGlobalPropertiesResponse response);
+
+ /**
+ * onSetGlobalPropertiesResponse being called indicates that SDL has
+ * responded to a request to set global properties.
+ *
+ * @param response - Contains information about the response sent from SDL.
+ */
+ public void onSetGlobalPropertiesResponse(SetGlobalPropertiesResponse response);
+
+ /**
+ * onSetMediaClockTimerResponse being called indicates that SDL has
+ * responded to a request to set the media clock timer.
+ *
+ * @param response - Contains information about the response sent from SDL.
+ */
+ public void onSetMediaClockTimerResponse(SetMediaClockTimerResponse response);
+
+ /**
+ * onShowResponse being called indicates that SDL has
+ * responded to a request to display information to the user.
+ *
+ * @param response - Contains information about the response sent from SDL.
+ */
+ public void onShowResponse(ShowResponse response);
+
+ /**
+ * onSpeakResponse being called indicates that SDL has
+ * responded to a request to speak information to the user.
+ *
+ * @param response - Contains information about the response sent from SDL.
+ */
+ public void onSpeakResponse(SpeakResponse response);
+
+ /**
+ * onButtonEvent being called indicates that a button event has occurred.
+ *
+ * @param notification - Contains information about the notification sent from SDL.
+ */
+ public void onOnButtonEvent(OnButtonEvent notification);
+
+ /**
+ * onButtonPress being called indicates that SDL has a button has
+ * been pressed by the user.
+ *
+ * @param notification - Contains information about the notification sent from SDL.
+ */
+ public void onOnButtonPress(OnButtonPress notification);
+
+ /**
+ * onSubscribeButtonResponse being called indicates that SDL has
+ * responded to a request to subscribe to button events and button presses.
+ *
+ * @param response - Contains information about the response sent from SDL.
+ */
+ public void onSubscribeButtonResponse(SubscribeButtonResponse response);
+
+ /**
+ * onUnsubscribeButtonResponse being called indicates that SDL has
+ * responded to a request to unsubscribe from button events and button presses.
+ *
+ * @param response - Contains information about the response sent from SDL.
+ */
+ public void onUnsubscribeButtonResponse(UnsubscribeButtonResponse response);
+
+ /**
+ * onOnPermissionsChange being called indicates that your app permissions have
+ * changed due to a policy table change. This can mean your app has received additional
+ * permissions OR lost permissions.
+ *
+ * @param notification - Contains information about the changed permissions.
+ */
+ public void onOnPermissionsChange(OnPermissionsChange notification);
+
+ public void onSubscribeVehicleDataResponse(SubscribeVehicleDataResponse response);
+
+ public void onUnsubscribeVehicleDataResponse(UnsubscribeVehicleDataResponse response);
+
+ public void onGetVehicleDataResponse(GetVehicleDataResponse response);
+
+ public void onOnVehicleData(OnVehicleData notification);
+
+ public void onPerformAudioPassThruResponse(PerformAudioPassThruResponse response);
+
+ public void onEndAudioPassThruResponse(EndAudioPassThruResponse response);
+
+ public void onOnAudioPassThru(OnAudioPassThru notification);
+
+ public void onPutFileResponse(PutFileResponse response);
+
+ public void onDeleteFileResponse(DeleteFileResponse response);
+
+ public void onListFilesResponse(ListFilesResponse response);
+
+ public void onSetAppIconResponse(SetAppIconResponse response);
+
+ public void onScrollableMessageResponse(ScrollableMessageResponse response);
+
+ public void onChangeRegistrationResponse(ChangeRegistrationResponse response);
+
+ public void onSetDisplayLayoutResponse(SetDisplayLayoutResponse response);
+
+ public void onOnLanguageChange(OnLanguageChange notification);
+
+ public void onOnHashChange(OnHashChange notification);
+
+ public void onSliderResponse(SliderResponse response);
+
+ public void onOnDriverDistraction(OnDriverDistraction notification);
+
+ public void onOnTBTClientState(OnTBTClientState notification);
+
+ public void onOnSystemRequest(OnSystemRequest notification);
+
+ public void onSystemRequestResponse(SystemRequestResponse response);
+
+ public void onOnKeyboardInput(OnKeyboardInput notification);
+
+ public void onOnTouchEvent(OnTouchEvent notification);
+
+ public void onDiagnosticMessageResponse(DiagnosticMessageResponse response);
+
+ public void onReadDIDResponse(ReadDIDResponse response);
+
+ public void onGetDTCsResponse(GetDTCsResponse response);
+
+ public void onOnLockScreenNotification(OnLockScreenStatus notification);
+
+ public void onDialNumberResponse(DialNumberResponse response);
+
+ public void onSendLocationResponse(SendLocationResponse response);
+
+ public void onShowConstantTbtResponse(ShowConstantTbtResponse response);
+
+ public void onAlertManeuverResponse(AlertManeuverResponse response);
+
+ public void onUpdateTurnListResponse(UpdateTurnListResponse response);
+
+ public void onServiceDataACK(int dataSize);
+ public void onGetWayPointsResponse(GetWayPointsResponse response);
+
+ public void onSubscribeWayPointsResponse(SubscribeWayPointsResponse response);
+
+ public void onUnsubscribeWayPointsResponse(UnsubscribeWayPointsResponse response);
+ public void onOnWayPointChange(OnWayPointChange notification);
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/interfaces/IPutFileResponseListener.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/interfaces/IPutFileResponseListener.java
new file mode 100644
index 000000000..7929e86e6
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/interfaces/IPutFileResponseListener.java
@@ -0,0 +1,9 @@
+package com.smartdevicelink.proxy.interfaces;
+
+import com.smartdevicelink.proxy.rpc.PutFileResponse;
+
+public interface IPutFileResponseListener {
+ public void onPutFileResponse(PutFileResponse response);
+
+ public void onPutFileStreamError(Exception e, String info);
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/AddCommand.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/AddCommand.java
new file mode 100644
index 000000000..57b58ea5b
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/AddCommand.java
@@ -0,0 +1,268 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+import java.util.List;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCRequest;
+import com.smartdevicelink.util.DebugTool;
+
+/**
+*
+* <p>This class will add a command to the application's Command Menu</p>
+*
+*
+* <p><b>Note:</b> A command will be added to the end of the list of elements in
+* the Command Menu under the following conditions:</p>
+*
+* <ul>
+* <li>When a Command is added with no MenuParams value provided</li>
+* <li>When a MenuParams value is provided with a MenuParam.position value
+* greater than or equal to the number of menu items currently defined in the
+* menu specified by the MenuParam.parentID value</li>
+* </ul>
+*
+*
+* <p>The set of choices which the application builds using AddCommand can be a
+* mixture of:</p>
+*
+* <ul>
+* <li>Choices having only VR synonym definitions, but no MenuParams definitions
+* </li>
+* <li>Choices having only MenuParams definitions, but no VR synonym definitions
+* </li>
+* <li>Choices having both MenuParams and VR synonym definitions</li>
+* </ul>
+*
+* <p><b>HMILevel needs to be FULL, LIMITED or BACKGROUD</b></p>
+*
+ * <p><b>Parameter List</b></p>
+ * <table border="1" rules="all">
+ * <tr>
+ * <th>Param Name</th>
+ * <th>Type</th>
+ * <th>Description</th>
+ * <th> Req.</th>
+ * <th>Notes</th>
+ * <th>Version Available</th>
+ * </tr>
+ * <tr>
+ * <td>cmdID</td>
+ * <td> Integer</td>
+ * <td>unique ID of the command to add</td>
+ * <td>Y</td>
+ * <td> minvalue:0; maxvalue:2000000000</td>
+ * <td>SmartDeviceLink 1.0</td>
+ * <tr>
+ * <td>menuParams</td>
+ * <td>ButtonName</td>
+ * <td>Name of the button to unsubscribe.</td>
+ * <td>Y</td>
+ * <td></td>
+ * <td>SmartDeviceLink 1.0</td>
+ * <tr/>
+ * <tr>
+ * <td>vrCommands</td>
+ * <td>String</td>
+ * <td><p>An array of strings to be used as VR synonyms for this command.</p> <p>If this array is provided, it may not be empty.</p></td>
+ * <td>N</td>
+ * <td>minsize:1; maxsize:100</td>
+ * <td>SmartDeviceLink 1.0</td>
+ * <tr>
+ * <td>cmdIcon</td>
+ * <td>Image</td>
+ * <td><p>Image struct determining whether static or dynamic icon.</p><p>If omitted on supported displays, no (or the default if applicable) icon shall be displayed.</p></td>
+ * <td>N</td>
+ * <td></td>
+ * <td>SmartDeviceLink 1.0</td>
+ * </tr>
+* </table>
+* <p> <b>Response</b></p><p>Indicates that the corresponding request has failed or succeeded, if the response returns with a SUCCESS result code, this means a command was added to the Command Menu successfully.</p>
+*
+* <p><b>Non-default Result Codes:</b></p> <p>INVALID_ID</p> <p>DUPLICATE_NAME</p>
+* @since SmartDeviceLink 1.0
+* @see DeleteCommand
+* @see AddSubMenu
+* @see DeleteSubMenu
+*/
+
+public class AddCommand extends RPCRequest {
+ public static final String KEY_CMD_ICON = "cmdIcon";
+ public static final String KEY_MENU_PARAMS = "menuParams";
+ public static final String KEY_CMD_ID = "cmdID";
+ public static final String KEY_VR_COMMANDS = "vrCommands";
+
+ /**
+ * Constructs a new AddCommand object
+ */
+ public AddCommand() {
+ super(FunctionID.ADD_COMMAND.toString());
+ }
+
+ /**
+ * <p>
+ * Constructs a new AddCommand object indicated by the Hashtable
+ * parameter
+ * </p>
+ *
+ * @param hash
+ * The Hashtable to use
+ */
+ public AddCommand(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+ /**
+ * <p>
+ * Returns an <i>Integer</i> object representing the Command ID that you want to add
+ * </p>
+ *
+ * @return Integer -an integer representation a Unique Command ID
+ */
+ public Integer getCmdID() {
+ return (Integer) parameters.get(KEY_CMD_ID);
+ }
+ /**
+ * <p>Sets an Unique Command ID that identifies the command. Is returned in an
+ * <i>{@linkplain OnCommand}</i> notification to identify the command
+ * selected by the user</p>
+ *
+ *
+ * @param cmdID
+ * an integer object representing a Command ID
+ * <p>
+ * <b>Notes:</b> Min Value: 0; Max Value: 2000000000</p>
+ */
+ public void setCmdID(Integer cmdID) {
+ if (cmdID != null) {
+ parameters.put(KEY_CMD_ID, cmdID);
+ } else {
+ parameters.remove(KEY_CMD_ID);
+ }
+ }
+ /**
+ * <p>
+ * Returns a <I>MenuParams</I> object which will defined the command and how
+ * it is added to the Command Menu
+ * </p>
+ *
+ * @return MenuParams -a MenuParams object
+ *
+ */
+ @SuppressWarnings("unchecked")
+ public MenuParams getMenuParams() {
+ Object obj = parameters.get(KEY_MENU_PARAMS);
+ if (obj instanceof MenuParams) {
+ return (MenuParams) obj;
+ }
+ else if (obj instanceof Hashtable) {
+ try {
+ return new MenuParams((Hashtable<String, Object>) obj);
+ } catch (Exception e) {
+ DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_MENU_PARAMS, e);
+ }
+ }
+ return null;
+ }
+ /**
+ * <p>
+ * Sets Menu parameters</p>
+ * If provided, this will define the command and how it is added to the
+ * Command Menu<p>
+ * If null, commands will not be accessible through the HMI application menu
+ * </p>
+ *
+ * @param menuParams
+ * a menuParams object
+ */
+ public void setMenuParams(MenuParams menuParams) {
+ if (menuParams != null) {
+ parameters.put(KEY_MENU_PARAMS, menuParams);
+ } else {
+ parameters.remove(KEY_MENU_PARAMS);
+ }
+ }
+ /**
+ * <p>
+ * Gets Voice Recognition Commands
+ * </p>
+ *
+ * @return List<String> -(List<String>) indicating one or more VR phrases
+ */
+ @SuppressWarnings("unchecked")
+ public List<String> getVrCommands() {
+ if (parameters.get(KEY_VR_COMMANDS) instanceof List<?>) {
+ List<?> list = (List<?>)parameters.get(KEY_VR_COMMANDS);
+ if (list != null && list.size() > 0) {
+ Object obj = list.get(0);
+ if (obj instanceof String) {
+ return (List<String>)list;
+ }
+ }
+ }
+ return null;
+ }
+ /**
+ * <p>
+ * Sets Voice Recognition Commands </p>
+ * <p>If provided, defines one or more VR phrases the recognition of any of
+ * which triggers the <i>{@linkplain OnCommand}</i> notification with this
+ * cmdID</p>
+ * <p>If null, commands will not be accessible by voice commands (when the user
+ * hits push-to-talk)
+ * </p>
+ *
+ * @param vrCommands
+ * List<String> indicating one or more VR phrases
+ * <p>
+ * <b>Notes: </b>Optional only if menuParams is provided. If
+ * provided, array must contain at least one non-empty (not null,
+ * not zero-length, not whitespace only) element</p>
+ */
+ public void setVrCommands( List<String> vrCommands ) {
+ if (vrCommands != null) {
+ parameters.put(KEY_VR_COMMANDS, vrCommands );
+ } else {
+ parameters.remove(KEY_VR_COMMANDS);
+ }
+ }
+
+ /**
+ * <p>Gets the image to be shown along with a command </p>
+ *
+ * @return Image -an Image object
+ * @since SmartDeviceLink 2.0
+ */
+ @SuppressWarnings("unchecked")
+ public Image getCmdIcon() {
+ Object obj = parameters.get(KEY_CMD_ICON);
+ if (obj instanceof Image) {
+ return (Image) obj;
+ } else if (obj instanceof Hashtable) {
+ try {
+ return new Image((Hashtable<String, Object>) obj);
+ } catch (Exception e) {
+ DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_CMD_ICON, e);
+ }
+ }
+ return null;
+ }
+
+ /**
+ * <p>Sets the Image
+ * If provided, defines the image to be be shown along with a command</p>
+ * @param cmdIcon
+ * <p>an Image obj representing the Image obj shown along with a
+ * command</p>
+ * <p>
+ * <b>Notes: </b>If omitted on supported displays, no (or the
+ * default if applicable) icon will be displayed</p>
+ * @since SmartDeviceLink 2.0
+ */
+ public void setCmdIcon(Image cmdIcon) {
+ if (cmdIcon != null) {
+ parameters.put(KEY_CMD_ICON, cmdIcon);
+ } else {
+ parameters.remove(KEY_CMD_ICON);
+ }
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/AddCommandResponse.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/AddCommandResponse.java
new file mode 100644
index 000000000..da908908b
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/AddCommandResponse.java
@@ -0,0 +1,25 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCResponse;
+
+/**
+ * Add Command Response is sent, when AddCommand has been called
+ *
+ * @since SmartDeviceLink 1.0
+ */
+public class AddCommandResponse extends RPCResponse {
+ /**
+ * Constructs a new AddCommandResponse object
+ */
+ public AddCommandResponse() {
+ super(FunctionID.ADD_COMMAND.toString());
+ }
+
+ public AddCommandResponse(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+}
+
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/AddSubMenu.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/AddSubMenu.java
new file mode 100644
index 000000000..2edc70c50
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/AddSubMenu.java
@@ -0,0 +1,170 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCRequest;
+
+/**
+ * <p>Add a SubMenu to the Command Menu</p>
+ *
+ * <p>A SubMenu can only be added to the Top Level Menu (i.e.a SubMenu cannot be
+ * added to a SubMenu), and may only contain commands as children</p>
+ *
+ *
+ * <p><b>HMILevel needs to be FULL, LIMITED or BACKGROUD</b></p>
+ *
+ * <p><b>Parameter List</b></p>
+ * <table border="1" rules="all">
+ * <tr>
+ * <th>Param Name</th>
+ * <th>Type</th>
+ * <th>Description</th>
+ * <th> Req.</th>
+ * <th>Notes</th>
+ * <th>Version Available</th>
+ * </tr>
+ * <tr>
+ * <td>menuID</td>
+ * <td>Integer</td>
+ * <td>Unique ID that identifies this sub menu. This value is used in AddCommand to which SubMenu is the parent of the command being added.</td>
+ * <td>Y</td>
+ * <td></td>
+ * <td>SmartDeviceLink 1.0</td>
+ * </tr>
+ * <tr>
+ * <td>position</td>
+ * <td>Integer</td>
+ * <td>Position within the items of the top level Command Menu. 0 will insert at the front, 1 will insert after the first existing element, etc. Position of any submenu will always be located before the return and exit options.</td>
+ * <td>N</td>
+ * <td>Min Value: 0 <p>Max Value: 1000</p> <p>If position is greater or equal than the number of items on top level, the sub menu will be appended by the end.</p><p>If this parameter is omitted, the entry will be added at the end of the list.</P></td>
+ * <td>SmartDeviceLink 1.0</td>
+ * </tr>
+ * <tr>
+ * <td>menuName</td>
+ * <td>String</td>
+ * <td>Text which is displayed representing this submenu item</td>
+ * <td>Y</td>
+ * <td>maxlength:500</td>
+ * <td>SmartDeviceLink 1.0</td>
+ * </tr>
+ * </table>
+ * <b>Response</b>
+ * <p>Indicates that the corresponding request either failed or succeeded. If the response returns with a SUCCESS result code, this means the SubMenu was added to the Command Menu successfully</p>
+ *
+ * <p><b>Non-default Result Codes:</b></p>
+ * <p>INVALID_ID</p>
+ * <p>DUPLICATE NAME</p>
+ * @since SmartDeviceLink 1.0
+ * @see DeleteSubMenu
+ * @see AddCommand
+ * @see DeleteCommand
+ */
+public class AddSubMenu extends RPCRequest {
+ public static final String KEY_POSITION = "position";
+ public static final String KEY_MENU_NAME = "menuName";
+ public static final String KEY_MENU_ID = "menuID";
+
+ /**
+ * Constructs a new AddSubMenu object
+ */
+ public AddSubMenu() {
+ super(FunctionID.ADD_SUB_MENU.toString());
+ }
+ /**
+ * Constructs a new AddSubMenu object indicated by the Hashtable parameter
+ *
+ *
+ * @param hash
+ * The Hashtable to use
+ */
+ public AddSubMenu(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+ /**
+ * Returns an <i>Integer</i> object representing the Menu ID that identifies
+ * a sub menu
+ *
+ *
+ * @return Integer -an integer representing the Menu ID that identifies a sub
+ * menu
+ */
+ public Integer getMenuID() {
+ return (Integer) parameters.get( KEY_MENU_ID );
+ }
+ /**
+ * <p>Sets a Menu ID that identifies a sub menu.</p><p> This value is used in
+ * {@linkplain AddCommand} to which SubMenu is the parent of the command
+ * being added</p>
+ *
+ *
+ * @param menuID
+ * an integer object representing a Menu ID
+ *
+ * <p><b>Notes:</b> Min Value: 0; Max Value: 2000000000</p>
+ */
+ public void setMenuID( Integer menuID ) {
+ if (menuID != null) {
+ parameters.put(KEY_MENU_ID, menuID );
+ } else {
+ parameters.remove(KEY_MENU_ID);
+ }
+ }
+ /**
+ * <p>Returns an <i>Integer</i> object representing the position of menu</p>
+ *
+ *
+ * @return Integer -the value representing the relative position of menus
+ */
+ public Integer getPosition() {
+ return (Integer) parameters.get( KEY_POSITION );
+ }
+ /**
+ * Sets a position of menu
+ *
+ * @param position
+ * <p>An Integer object representing the position within the items
+ * of the top level Command Menu. 0 will insert at the front, 1
+ * will insert after the first existing element, etc. Position of
+ * any submenu will always be located before the return and exit
+ * options
+ * </p>
+ * <b>Notes: </b>
+ * <ul>
+ * <li>
+ * Min Value: 0; Max Value: 1000</li>
+ * <li>If position is greater than or equal to the number of items
+ * on top level, the sub menu will be appended by the end</li>
+ * <li>If this parameter is omitted, the entry will be added at
+ * the end of the list</li>
+ * </ul>
+ */
+ public void setPosition( Integer position ) {
+ if (position != null) {
+ parameters.put(KEY_POSITION, position );
+ } else {
+ parameters.remove(KEY_POSITION);
+ }
+ }
+ /**
+ * Returns String which is displayed representing this submenu item
+ *
+ * @return String -a Submenu item's name
+ */
+ public String getMenuName() {
+ return (String) parameters.get( KEY_MENU_NAME );
+ }
+ /**
+ * Sets a menuName which is displayed representing this submenu item
+ *
+ * @param menuName
+ * String which will be displayed representing this submenu item
+ */
+ public void setMenuName( String menuName ) {
+ if (menuName != null) {
+ parameters.put(KEY_MENU_NAME, menuName );
+ } else {
+ parameters.remove(KEY_MENU_NAME);
+ }
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/AddSubMenuResponse.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/AddSubMenuResponse.java
new file mode 100644
index 000000000..6b386eef5
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/AddSubMenuResponse.java
@@ -0,0 +1,23 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCResponse;
+
+/**
+ * Add SubMenu Response is sent, when AddSubMenu has been called
+ * @since SmartDeviceLink 1.0
+ */
+public class AddSubMenuResponse extends RPCResponse {
+ /**
+ * Constructs a new AddSubMenuResponse object
+ */
+
+ public AddSubMenuResponse() {
+ super(FunctionID.ADD_SUB_MENU.toString());
+ }
+ public AddSubMenuResponse(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+} \ No newline at end of file
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/AirbagStatus.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/AirbagStatus.java
new file mode 100644
index 000000000..b80a9c2c4
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/AirbagStatus.java
@@ -0,0 +1,234 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+
+import com.smartdevicelink.proxy.RPCStruct;
+import com.smartdevicelink.proxy.rpc.enums.VehicleDataEventStatus;
+/**
+ * <p>The status of the air bags.</p>
+ *
+ *
+ *
+ * <p><b>Parameter List</b></p>
+ * <table border="1" rules="all">
+ * <tr>
+ * <th>Name</th>
+ * <th>Type</th>
+ * <th>Description</th>
+ * <th>SmartDeviceLink Version.</th>
+ * </tr>
+ * <tr>
+ * <td>driverAirbagDeployed </td>
+ * <td>VehicleDataEventStatus</td>
+ * <td>Status of driver airbag.</td>
+ * <td>SmartDeviceLink 1.0</td>
+ * </tr>
+ * <tr>
+ * <td>driverSideAirbagDeployed</td>
+ * <td>VehicleDataEventStatus</td>
+ * <td>Status of driver side airbag.</td>
+ * <td>SmartDeviceLink 1.0</td>
+ * </tr>
+ * <tr>
+ * <td>driverCurtainAirbagDeployed</td>
+ * <td>VehicleDataEventStatus</td>
+ * <td>Status of driver curtain airbag.</td>
+ * <td>SmartDeviceLink 1.0</td>
+ * </tr>
+ * <tr>
+ * <td>passengerAirbagDeployed</td>
+ * <td>VehicleDataEventStatus</td>
+ * <td>Status of passenger airbag.</td>
+ * <td>SmartDeviceLink 1.0</td>
+ * </tr>
+ * <tr>
+ * <td>passengerCurtainAirbagDeployed</td>
+ * <td>VehicleDataEventStatus</td>
+ * <td>Status of passenger curtain airbag.</td>
+ * <td>SmartDeviceLink 1.0</td>
+ * </tr>
+ * <tr>
+ * <td>driverKneeAirbagDeployed</td>
+ * <td>VehicleDataEventStatus</td>
+ * <td>Status of driver knee airbag.</td>
+ * <td>SmartDeviceLink 1.0</td>
+ * </tr>
+ * <tr>
+ * <td>passengerSideAirbagDeployed</td>
+ * <td>VehicleDataEventStatus</td>
+ * <td>Status of passenger side airbag.</td>
+ * <td>SmartDeviceLink 1.0</td>
+ * </tr>
+ * <tr>
+ * <td>passengerKneeAirbagDeployed</td>
+ * <td>VehicleDataEventStatus</td>
+ * <td>Status of passenger knee airbag</td>
+ * <td>SmartDeviceLink 1.0</td>
+ * </tr>
+ *
+ * </table>
+ *
+ * <p><b>Response:</b></p>
+ * If a resultCode of "SUCCESS" is returned, the request was accepted by SDL. By the time the corresponding response is received, the Alert will have completed.
+ *
+ * <p><b> Non-default Result Codes:</b></p>
+ * <p>REJECTED</p><p> ABORTED</P>
+ *
+ *
+ * @since SmartDeviceLink 1.0
+ *
+ * @see TextFieldName
+ * @see Image
+ * @see SubscribeVehicleData
+ */
+public class AirbagStatus extends RPCStruct {
+ public static final String KEY_DRIVER_AIRBAG_DEPLOYED = "driverAirbagDeployed";
+ public static final String KEY_DRIVER_SIDE_AIRBAG_DEPLOYED = "driverSideAirbagDeployed";
+ public static final String KEY_DRIVER_CURTAIN_AIRBAG_DEPLOYED = "driverCurtainAirbagDeployed";
+ public static final String KEY_DRIVER_KNEE_AIRBAG_DEPLOYED = "driverKneeAirbagDeployed";
+ public static final String KEY_PASSENGER_AIRBAG_DEPLOYED = "passengerAirbagDeployed";
+ public static final String KEY_PASSENGER_SIDE_AIRBAG_DEPLOYED = "passengerSideAirbagDeployed";
+ public static final String KEY_PASSENGER_CURTAIN_AIRBAG_DEPLOYED = "passengerCurtainAirbagDeployed";
+ public static final String KEY_PASSENGER_KNEE_AIRBAG_DEPLOYED = "passengerKneeAirbagDeployed";
+ /** Constructs a new AirbagStatus object indicated by the Hashtable
+ * parameter
+ * @param hash
+ * The hash table to use
+ *
+ *
+ */
+
+ public AirbagStatus() { }
+ public AirbagStatus(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+
+ public void setDriverAirbagDeployed(VehicleDataEventStatus driverAirbagDeployed) {
+ if (driverAirbagDeployed != null) {
+ store.put(KEY_DRIVER_AIRBAG_DEPLOYED, driverAirbagDeployed);
+ } else {
+ store.remove(KEY_DRIVER_AIRBAG_DEPLOYED);
+ }
+ }
+ public VehicleDataEventStatus getDriverAirbagDeployed() {
+ Object obj = store.get(KEY_DRIVER_AIRBAG_DEPLOYED);
+ if (obj instanceof VehicleDataEventStatus) {
+ return (VehicleDataEventStatus) obj;
+ } else if (obj instanceof String) {
+ return VehicleDataEventStatus.valueForString((String) obj);
+ }
+ return null;
+ }
+ public void setDriverSideAirbagDeployed(VehicleDataEventStatus driverSideAirbagDeployed) {
+ if (driverSideAirbagDeployed != null) {
+ store.put(KEY_DRIVER_SIDE_AIRBAG_DEPLOYED, driverSideAirbagDeployed);
+ } else {
+ store.remove(KEY_DRIVER_SIDE_AIRBAG_DEPLOYED);
+ }
+ }
+ public VehicleDataEventStatus getDriverSideAirbagDeployed() {
+ Object obj = store.get(KEY_DRIVER_SIDE_AIRBAG_DEPLOYED);
+ if (obj instanceof VehicleDataEventStatus) {
+ return (VehicleDataEventStatus) obj;
+ } else if (obj instanceof String) {
+ return VehicleDataEventStatus.valueForString((String) obj);
+ }
+ return null;
+ }
+ public void setDriverCurtainAirbagDeployed(VehicleDataEventStatus driverCurtainAirbagDeployed) {
+ if (driverCurtainAirbagDeployed != null) {
+ store.put(KEY_DRIVER_CURTAIN_AIRBAG_DEPLOYED, driverCurtainAirbagDeployed);
+ } else {
+ store.remove(KEY_DRIVER_CURTAIN_AIRBAG_DEPLOYED);
+ }
+ }
+ public VehicleDataEventStatus getDriverCurtainAirbagDeployed() {
+ Object obj = store.get(KEY_DRIVER_CURTAIN_AIRBAG_DEPLOYED);
+ if (obj instanceof VehicleDataEventStatus) {
+ return (VehicleDataEventStatus) obj;
+ } else if (obj instanceof String) {
+ return VehicleDataEventStatus.valueForString((String) obj);
+ }
+ return null;
+ }
+ public void setPassengerAirbagDeployed(VehicleDataEventStatus passengerAirbagDeployed) {
+ if (passengerAirbagDeployed != null) {
+ store.put(KEY_PASSENGER_AIRBAG_DEPLOYED, passengerAirbagDeployed);
+ } else {
+ store.remove(KEY_PASSENGER_AIRBAG_DEPLOYED);
+ }
+ }
+ public VehicleDataEventStatus getPassengerAirbagDeployed() {
+ Object obj = store.get(KEY_PASSENGER_AIRBAG_DEPLOYED);
+ if (obj instanceof VehicleDataEventStatus) {
+ return (VehicleDataEventStatus) obj;
+ } else if (obj instanceof String) {
+ return VehicleDataEventStatus.valueForString((String) obj);
+ }
+ return null;
+ }
+ public void setPassengerCurtainAirbagDeployed(VehicleDataEventStatus passengerCurtainAirbagDeployed) {
+ if (passengerCurtainAirbagDeployed != null) {
+ store.put(KEY_PASSENGER_CURTAIN_AIRBAG_DEPLOYED, passengerCurtainAirbagDeployed);
+ } else {
+ store.remove(KEY_PASSENGER_CURTAIN_AIRBAG_DEPLOYED);
+ }
+ }
+ public VehicleDataEventStatus getPassengerCurtainAirbagDeployed() {
+ Object obj = store.get(KEY_PASSENGER_CURTAIN_AIRBAG_DEPLOYED);
+ if (obj instanceof VehicleDataEventStatus) {
+ return (VehicleDataEventStatus) obj;
+ } else if (obj instanceof String) {
+ return VehicleDataEventStatus.valueForString((String) obj);
+ }
+ return null;
+ }
+ public void setDriverKneeAirbagDeployed(VehicleDataEventStatus driverKneeAirbagDeployed) {
+ if (driverKneeAirbagDeployed != null) {
+ store.put(KEY_DRIVER_KNEE_AIRBAG_DEPLOYED, driverKneeAirbagDeployed);
+ } else {
+ store.remove(KEY_DRIVER_KNEE_AIRBAG_DEPLOYED);
+ }
+ }
+ public VehicleDataEventStatus getDriverKneeAirbagDeployed() {
+ Object obj = store.get(KEY_DRIVER_KNEE_AIRBAG_DEPLOYED);
+ if (obj instanceof VehicleDataEventStatus) {
+ return (VehicleDataEventStatus) obj;
+ } else if (obj instanceof String) {
+ return VehicleDataEventStatus.valueForString((String) obj);
+ }
+ return null;
+ }
+ public void setPassengerSideAirbagDeployed(VehicleDataEventStatus passengerSideAirbagDeployed) {
+ if (passengerSideAirbagDeployed != null) {
+ store.put(KEY_PASSENGER_SIDE_AIRBAG_DEPLOYED, passengerSideAirbagDeployed);
+ } else {
+ store.remove(KEY_PASSENGER_SIDE_AIRBAG_DEPLOYED);
+ }
+ }
+ public VehicleDataEventStatus getPassengerSideAirbagDeployed() {
+ Object obj = store.get(KEY_PASSENGER_SIDE_AIRBAG_DEPLOYED);
+ if (obj instanceof VehicleDataEventStatus) {
+ return (VehicleDataEventStatus) obj;
+ } else if (obj instanceof String) {
+ return VehicleDataEventStatus.valueForString((String) obj);
+ }
+ return null;
+ }
+ public void setPassengerKneeAirbagDeployed(VehicleDataEventStatus passengerKneeAirbagDeployed) {
+ if (passengerKneeAirbagDeployed != null) {
+ store.put(KEY_PASSENGER_KNEE_AIRBAG_DEPLOYED, passengerKneeAirbagDeployed);
+ } else {
+ store.remove(KEY_PASSENGER_KNEE_AIRBAG_DEPLOYED);
+ }
+ }
+ public VehicleDataEventStatus getPassengerKneeAirbagDeployed() {
+ Object obj = store.get(KEY_PASSENGER_KNEE_AIRBAG_DEPLOYED);
+ if (obj instanceof VehicleDataEventStatus) {
+ return (VehicleDataEventStatus) obj;
+ } else if (obj instanceof String) {
+ return VehicleDataEventStatus.valueForString((String) obj);
+ }
+ return null;
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/Alert.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/Alert.java
new file mode 100644
index 000000000..811d65a42
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/Alert.java
@@ -0,0 +1,413 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.ArrayList;
+import java.util.Hashtable;
+import java.util.List;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCRequest;
+
+/**
+ * Provides information to the user using either TTS, the Display or both and
+ * can include a system-generated alert tone
+ *
+ * <ul>
+ * <li>The displayed portion of the Alert, if any, will persist until the
+ * specified timeout has elapsed, or the Alert is preempted</li>
+ * <li>An Alert will preempt (abort) any SmartDeviceLink Operation that is in-progress,
+ * except an already-in-progress Alert</li>
+ * <li>An Alert cannot be preempted by any SmartDeviceLink Operation</li>
+ * <li>An Alert can be preempted by a user action (button push)</li>
+ * <li>An Alert will fail if it is issued while another Alert is in progress</li>
+ * <li>Although each Alert parameter is optional, in fact each Alert request
+ * must supply at least one of the following parameters:
+ * <ul>
+ * <li>alertText1</li>
+ * <li>alertText2</li>
+ * <li>alertText3</li>
+ * <li>ttsChunks</li>
+ * </ul>
+ * </li>
+ * </ul>
+ *
+ * <p><b>HMILevel needs to be FULL or LIMITED.</b></p>
+ * <b>If the app has been granted function group Notification the HMILevel can
+ * also be BACKGROUND</b>
+ * <table border="1" rules="all">
+ * <tr>
+ * <th>Name</th>
+ * <th>Type</th>
+ * <th>Description</th>
+ * <th> Req.</th>
+ * <th>Notes</th>
+ * <th>Version Available</th>
+ * </tr>
+ * <tr>
+ * <td>alertText1</td>
+ * <td>String</td>
+ * <td>Text to be displayed in the first field of the display during the Alert. </td>
+ * <td>N</td>
+ * <td> Length is limited to what is indicated in RegisterAppInterface response. If omitted, top display line will be cleared. Text is always centered</td>
+ * <td>SmartDeviceLink 1.0</td>
+ * </tr>
+ * <tr>
+ * <td>alertText2</td>
+ * <td>String</td>
+ * <td>Text to be displayed in the second field of the display during the Alert. </td>
+ * <td>N</td>
+ * <td> Only permitted if HMI supports a second display line. Length is limited to what is indicated in RegisterAppInterface response. If omitted, second display line will be cleared. </td>
+ * <td>SmartDeviceLink 1.0</td>
+ * </tr>
+ * <tr>
+ * <td>alertText3</td>
+ * <td>String</td>
+ * <td>Text to be displayed in the third field of the display during the Alert.</td>
+ * <td>N</td>
+ * <td>Array must have a least one element. </td>
+ * <td>SmartDeviceLink 1.0</td>
+ * </tr>
+ * <tr>
+ * <td>ttsChunks</td>
+ * <td>TTSChunk[]</td>
+ * <td>Array of type TTSChunk which, taken together, specify what is to be spoken to the user.</td>
+ * <td>N</td>
+ * <td>Array must have a least one element. </td>
+ * <td>SmartDeviceLink 1.0</td>
+ * </tr>
+ * <tr>
+ * <td>duration</td>
+ * <td>Integer</td>
+ * <td><p>The duration of the displayed portion of the alert, in milliseconds.</p> After this amount of time has passed, the display fields alertText1 and alertText2 will revert to what was displayed in those fields before the alert began.</td>
+ * <td>N</td>
+ * <td>Min Value: 3000 Max Value: 10000 <p>If omitted, the default is 5000 milliseconds</p></td>
+ * <td>SmartDeviceLink 1.0</td>
+ * </tr>
+ * <tr>
+ * <td>playTone</td>
+ * <td>Boolean</td>
+ * <td>Specifies whether the alert tone should be played before the TTS (if any) is spoken.</td>
+ * <td>N</td>
+ * <td>If omitted, default is true.</td>
+ * <td>SmartDeviceLink 1.0</td>
+ * </tr>
+ * <tr>
+ * <td>softButtons</td>
+ * <td>SoftButton[]</td>
+ * <td>Specifies the softbuttons, the apps wants to use in this alert.</td>
+ * <td></td>
+ * <td>If omitted on supported displays, the alert will not have any SoftButton.ArrayMin: 0; ArrayMax: 4</td>
+ * <td>SmartDeviceLink 1.0</td>
+ * </tr>
+ * <tr>
+ * <td>progressIndicator</td>
+ * <td>Boolean</td>
+ * <td>If supported on the given platform, the alert GUI will include some sort of animation indicating that loading of a feature is progressing. e.g. a spinning wheel or hourglass, etc.</td>
+ * <td>N</td>
+ * <td></td>
+ * <td>SmartDeviceLink 1.0</td>
+ * </tr>
+ * </table>
+ * @since SmartDeviceLink 1.0
+ *
+ *
+ * @see GetVehicleData
+ * @see OnVehicleData
+ * @see Show
+ * @see Speak
+ */
+public class Alert extends RPCRequest {
+ public static final String KEY_PLAY_TONE = "playTone";
+ public static final String KEY_DURATION = "duration";
+ public static final String KEY_ALERT_TEXT_1 = "alertText1";
+ public static final String KEY_ALERT_TEXT_2 = "alertText2";
+ public static final String KEY_ALERT_TEXT_3 = "alertText3";
+ public static final String KEY_PROGRESS_INDICATOR = "progressIndicator";
+ public static final String KEY_TTS_CHUNKS = "ttsChunks";
+ public static final String KEY_SOFT_BUTTONS = "softButtons";
+
+ /**
+ * Constructs a new Alert object
+ */
+ public Alert() {
+ super(FunctionID.ALERT.toString());
+ }
+ /**
+ * <p>Constructs a new Alert object indicated by the Hashtable parameter</p>
+ *
+ *
+ * @param hash
+ * The Hashtable to use
+ */
+ public Alert(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+ /**
+ * Gets the text which is displayed in the first field of the display during
+ * the Alert
+ *
+ * @return String - a String value representing the text which is displayed
+ * in the first field during the Alert
+ */
+ public String getAlertText1() {
+ return (String) parameters.get(KEY_ALERT_TEXT_1);
+ }
+ /**
+ * Sets the String to be displayed in the first field of the display during
+ * the Alert
+ *
+ * @param alertText1
+ * String Value
+ *
+ * <p><b>Notes: </b></p>
+ * <ul>
+ * <li>Length is limited to what is indicated in <i>
+ * {@linkplain RegisterAppInterface}</i> response</li>
+ * <li>If omitted, top display line will be cleared</li>
+ * <li>Text is always centered</li>
+ * </ul>
+ */
+ public void setAlertText1(String alertText1) {
+ if (alertText1 != null) {
+ parameters.put(KEY_ALERT_TEXT_1, alertText1);
+ } else {
+ parameters.remove(KEY_ALERT_TEXT_1);
+ }
+ }
+ /**
+ * Gets the text which is displayed in the second field of the display
+ * during the Alert
+ *
+ * @return String -a String value representing the text which is displayed
+ * in the second field during the Alert
+ */
+ public String getAlertText2() {
+ return (String) parameters.get(KEY_ALERT_TEXT_2);
+ }
+ /**
+ * Sets the String to be displayed in the second field of the display during
+ * the Alert
+ *
+ * @param alertText2
+ * String Value
+ *
+ * <p><b>Notes: </b></p>
+ * <ul>
+ * <li>Only permitted if HMI supports a second display line</li>
+ * <li>Length is limited to what is indicated in <i>
+ * {@linkplain RegisterAppInterface}</i> response</li>
+ * <li>If omitted, second display line will be cleared</li>
+ * <li>Text is always centered</li>
+ * </ul>
+ */
+ public void setAlertText2(String alertText2) {
+ if (alertText2 != null) {
+ parameters.put(KEY_ALERT_TEXT_2, alertText2);
+ } else {
+ parameters.remove(KEY_ALERT_TEXT_2);
+ }
+ }
+
+ /**
+ * Gets the text which is displayed in the third field of the display during
+ * the Alert
+ *
+ * @return String -a String value representing the text which is displayed
+ * in the third field during the Alert
+ *
+ * @since SmartDeviceLink 2.0
+ */
+ public String getAlertText3() {
+ return (String) parameters.get(KEY_ALERT_TEXT_3);
+ }
+
+ /**
+ * Sets the String to be displayed in the third field of the display during
+ * the Alert
+ *
+ * @param alertText3
+ * String Value
+ *
+ * <p> <b>Notes: </b></p>
+ * <ul>
+ * <li>Only permitted if HMI supports a third display line</li>
+ * <li>Length is limited to what is indicated in <i>
+ * {@linkplain RegisterAppInterface}</i> response</li>
+ * <li>If omitted, third display line will be cleared</li>
+ * <li>Text is always centered</li>
+ * </ul>
+ *
+ * @since SmartDeviceLink 2.0
+ */
+ public void setAlertText3(String alertText3) {
+ if (alertText3 != null) {
+ parameters.put(KEY_ALERT_TEXT_3, alertText3);
+ } else {
+ parameters.remove(KEY_ALERT_TEXT_3);
+ }
+ }
+ /**
+ * Gets TTSChunk[], the Array of type TTSChunk which, taken together,
+ * specify what is to be spoken to the user
+ *
+ * @return List -a List<TTSChunk> value specify what is to be spoken to
+ * the user
+ */
+ @SuppressWarnings("unchecked")
+ public List<TTSChunk> getTtsChunks() {
+ if (parameters.get(KEY_TTS_CHUNKS) instanceof List<?>) {
+ List<?> list = (List<?>)parameters.get(KEY_TTS_CHUNKS);
+ if (list != null && list.size() > 0) {
+ Object obj = list.get(0);
+ if (obj instanceof TTSChunk) {
+ return (List<TTSChunk>) list;
+ } else if (obj instanceof Hashtable) {
+ List<TTSChunk> newList = new ArrayList<TTSChunk>();
+ for (Object hashObj : list) {
+ newList.add(new TTSChunk((Hashtable<String, Object>)hashObj));
+ }
+ return newList;
+ }
+ }
+ }
+ return null;
+ }
+ /**
+ * Sets array of type TTSChunk which, taken together, specify what is to be
+ * spoken to the user
+ *
+ * @param ttsChunks
+ *
+ * <p> <b>Notes: </b>Array must have a least one element</p>
+ */
+ public void setTtsChunks(List<TTSChunk> ttsChunks) {
+ if (ttsChunks != null) {
+ parameters.put(KEY_TTS_CHUNKS, ttsChunks);
+ } else {
+ parameters.remove(KEY_TTS_CHUNKS);
+ }
+ }
+ /**
+ * Gets the duration of the displayed portion of the alert, in milliseconds
+ *
+ * @return Integer -an Integer value representing the duration of the
+ * displayed portion of the alert, in milliseconds
+ */
+ public Integer getDuration() {
+ return (Integer) parameters.get(KEY_DURATION);
+ }
+ /**
+ * <p>Sets the duration of the displayed portion of the alert, in milliseconds.
+ * After this amount of time has passed, the display fields alertText1 and
+ * alertText2 will revert to what was displayed in those fields before the
+ * alert began</p>
+ *
+ *
+ * @param duration
+ * the Integer values representing the duration time, in
+ * milliseconds
+ * <p>
+ * <b>Notes: </b></p>
+ * <ul>
+ * <li>Min Value: 3000; Max Value: 10000</li>
+ * <li>If omitted, the default is 5000 milliseconds</li>
+ * </ul>
+ */
+ public void setDuration(Integer duration) {
+ if (duration != null) {
+ parameters.put(KEY_DURATION, duration);
+ } else {
+ parameters.remove(KEY_DURATION);
+ }
+ }
+ /**
+ * Gets a Boolean value representing the alert tone
+ *
+ * @return Boolean -If TRUE, means an alert tone will be played before the
+ * TTS (if any) is spoken
+ */
+ public Boolean getPlayTone() {
+ return (Boolean) parameters.get(KEY_PLAY_TONE);
+ }
+ /**
+ * Sets whether the alert tone should be played before the TTS (if any) is
+ * spoken
+ *
+ * @param playTone
+ * a Boolean value which specifies whether the alert tone should
+ * be played before the TTS (if any) is spoken
+ *
+ * <p> <b>Notes: </b>If omitted, default is true</p>
+ */
+ public void setPlayTone(Boolean playTone) {
+ if (playTone != null) {
+ parameters.put(KEY_PLAY_TONE, playTone);
+ } else {
+ parameters.remove(KEY_PLAY_TONE);
+ }
+ }
+
+ /**
+ * Gets the SoftButton List object
+ *
+ * @return List<SoftButton> -a List<SoftButton> representing the List
+ * object
+ * @since SmartDeviceLink 2.0
+ */
+ @SuppressWarnings("unchecked")
+ public List<SoftButton> getSoftButtons() {
+ if (parameters.get(KEY_SOFT_BUTTONS) instanceof List<?>) {
+ List<?> list = (List<?>)parameters.get(KEY_SOFT_BUTTONS);
+ if (list != null && list.size() > 0) {
+ Object obj = list.get(0);
+ if (obj instanceof SoftButton) {
+ return (List<SoftButton>) list;
+ } else if (obj instanceof Hashtable) {
+ List<SoftButton> newList = new ArrayList<SoftButton>();
+ for (Object hashObj : list) {
+ newList.add(new SoftButton((Hashtable<String, Object>)hashObj));
+ }
+ return newList;
+ }
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Sets the SoftButtons
+ *
+ * @param softButtons
+ * a List<SoftButton> value
+ * <p>
+ * <b>Notes: </b></p>
+ * <ul>
+ * <li>If omitted on supported displays, the alert will not have
+ * any SoftButton</li>
+ * <li>ArrayMin: 0</li>
+ * <li>ArrayMax: 4</li>
+ * </ul>
+ * @since SmartDeviceLink 2.0
+ */
+
+ public void setSoftButtons(List<SoftButton> softButtons) {
+ if (softButtons != null) {
+ parameters.put(KEY_SOFT_BUTTONS, softButtons);
+ } else {
+ parameters.remove(KEY_SOFT_BUTTONS);
+ }
+ }
+ public Boolean getProgressIndicator() {
+ final Object obj = parameters.get(KEY_PROGRESS_INDICATOR);
+ if (obj instanceof Boolean) {
+ return (Boolean) obj;
+ }
+ return null;
+ }
+ public void setProgressIndicator(Boolean progressIndicator) {
+ if (progressIndicator != null) {
+ parameters.put(KEY_PROGRESS_INDICATOR, progressIndicator);
+ } else {
+ parameters.remove(KEY_PROGRESS_INDICATOR);
+ }
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/AlertManeuver.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/AlertManeuver.java
new file mode 100644
index 000000000..fba595150
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/AlertManeuver.java
@@ -0,0 +1,139 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.ArrayList;
+import java.util.Hashtable;
+import java.util.List;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCRequest;
+
+/**
+ * <p>This will bring up an alert with information related to the next navigation maneuver including potential voice
+ * navigation instructions. Shown information will be taken from the ShowConstantTBT function
+ * </p>
+ * <p>Function Group: Navigation</p>
+ *
+ * <p><b>HMILevel needs to be FULL, LIMITED or BACKGROUND</b></p>
+ *
+ *
+ * @since SmartDeviceLink 2.0
+ * @see ShowConstantTbt
+ */
+public class AlertManeuver extends RPCRequest{
+
+ public static final String KEY_TTS_CHUNKS = "ttsChunks";
+ public static final String KEY_SOFT_BUTTONS = "softButtons";
+
+ /**
+ * Constructs a new AlertManeuver object
+ */
+ public AlertManeuver(){
+ super(FunctionID.ALERT_MANEUVER.toString());
+ }
+
+ /**
+ *
+ * <p>Constructs a new AlertManeuver object indicated by the Hashtable parameter</p>
+ *
+ *
+ * @param hash
+ * The Hashtable to use
+ */
+ public AlertManeuver(Hashtable<String, Object> hash){
+ super(hash);
+ }
+
+ /**
+ * Gets the SoftButton List object
+ *
+ * @return List<SoftButton> -a List<SoftButton> representing the List object
+ * @since SmartDeviceLink 2.0
+ */
+ @SuppressWarnings("unchecked")
+ public List<SoftButton> getSoftButtons(){
+ if(parameters.get(KEY_SOFT_BUTTONS) instanceof List<?>){
+ List<?> list = (List<?>) parameters.get(KEY_SOFT_BUTTONS);
+ if(list != null && list.size() > 0){
+ Object obj = list.get(0);
+ if(obj instanceof SoftButton){
+ return (List<SoftButton>) list;
+ }
+ else if(obj instanceof Hashtable){
+ List<SoftButton> newList = new ArrayList<SoftButton>();
+ for(Object hashObj : list){
+ newList.add(new SoftButton((Hashtable<String, Object>) hashObj));
+ }
+ return newList;
+ }
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Sets the SoftButtons
+ *
+ * @param softButtons
+ * a List<SoftButton> value
+ * <p>
+ * <b>Notes: </b></p>
+ * <ul>
+ * <li>If omitted on supported displays, the alert will not have any SoftButton</li>
+ * <li>ArrayMin: 0</li>
+ * <li>ArrayMax: 4</li>
+ * </ul>
+ * @since SmartDeviceLink 2.0
+ */
+
+ public void setSoftButtons(List<SoftButton> softButtons){
+ if(softButtons != null){
+ parameters.put(KEY_SOFT_BUTTONS, softButtons);
+ }
+ else{
+ parameters.remove(KEY_SOFT_BUTTONS);
+ }
+ }
+
+ /**
+ * Gets TTSChunk[], the Array of type TTSChunk which, taken together, specify what is to be spoken to the user
+ *
+ * @return List -a List<TTSChunk> value specify what is to be spoken to the user
+ */
+ @SuppressWarnings("unchecked")
+ public List<TTSChunk> getTtsChunks(){
+ if(parameters.get(KEY_TTS_CHUNKS) instanceof List<?>){
+ List<?> list = (List<?>) parameters.get(KEY_TTS_CHUNKS);
+ if(list != null && list.size() > 0){
+ Object obj = list.get(0);
+ if(obj instanceof TTSChunk){
+ return (List<TTSChunk>) list;
+ }
+ else if(obj instanceof Hashtable){
+ List<TTSChunk> newList = new ArrayList<TTSChunk>();
+ for(Object hashObj : list){
+ newList.add(new TTSChunk((Hashtable<String, Object>) hashObj));
+ }
+ return newList;
+ }
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Sets array of type TTSChunk which, taken together, specify what is to be spoken to the user
+ *
+ * @param ttsChunks
+ * <p>
+ * <b>Notes: </b></p>Array must have a least one element
+ */
+ public void setTtsChunks(List<TTSChunk> ttsChunks){
+ if(ttsChunks != null){
+ parameters.put(KEY_TTS_CHUNKS, ttsChunks);
+ }
+ else{
+ parameters.remove(KEY_TTS_CHUNKS);
+ }
+ }
+
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/AlertManeuverResponse.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/AlertManeuverResponse.java
new file mode 100644
index 000000000..6ed8ca1a4
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/AlertManeuverResponse.java
@@ -0,0 +1,35 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCResponse;
+
+/**
+ * Alert Maneuver Response is sent, when AlertManeuver has been called
+ *
+ * @since SmartDeviceLink 2.0
+ */
+public class AlertManeuverResponse extends RPCResponse{
+
+ /**
+ * Constructs a new AlertManeuverResponse object
+ */
+ public AlertManeuverResponse() {
+ super(FunctionID.ALERT_MANEUVER.toString());
+ }
+
+ /**
+ * <p>
+ * Constructs a new AlertManeuverResponse object indicated by the Hashtable
+ * parameter
+ * </p>
+ *
+ * @param hash
+ * The Hashtable to use
+ */
+ public AlertManeuverResponse(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/AlertResponse.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/AlertResponse.java
new file mode 100644
index 000000000..cea706d4e
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/AlertResponse.java
@@ -0,0 +1,44 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCResponse;
+
+/**
+ * Alert Response is sent, when Alert has been called
+ *
+ * @since SmartDeviceLink 1.0
+ */
+public class AlertResponse extends RPCResponse {
+ public static final String KEY_TRY_AGAIN_TIME = "tryAgainTime";
+
+ /**
+ * Constructs a new AlertResponse object
+ */
+ public AlertResponse() {
+ super(FunctionID.ALERT.toString());
+ }
+
+ /**
+ * <p>Constructs a new AlertResponse object indicated by the Hashtable
+ * parameter
+ * </p>
+ *
+ * @param hash
+ * The Hashtable to use
+ */
+ public AlertResponse(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+ public Integer getTryAgainTime() {
+ return (Integer) parameters.get(KEY_TRY_AGAIN_TIME);
+ }
+ public void setTryAgainTime(Integer tryAgainTime) {
+ if (tryAgainTime != null) {
+ parameters.put(KEY_TRY_AGAIN_TIME, tryAgainTime);
+ } else {
+ parameters.remove(KEY_TRY_AGAIN_TIME);
+ }
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/AudioPassThruCapabilities.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/AudioPassThruCapabilities.java
new file mode 100644
index 000000000..48cfd129b
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/AudioPassThruCapabilities.java
@@ -0,0 +1,143 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+
+import com.smartdevicelink.proxy.RPCStruct;
+import com.smartdevicelink.proxy.rpc.enums.AudioType;
+import com.smartdevicelink.proxy.rpc.enums.BitsPerSample;
+import com.smartdevicelink.proxy.rpc.enums.SamplingRate;
+
+/**
+ *<p> Describes different audio type configurations for PerformAudioPassThru, e.g. {8kHz,8-bit,PCM}
+ * Specifies the capabilities of audio capturing: sampling rate, bits per sample, audio type.</p>
+ *
+ * <p><b>Parameter List</b></p>
+ * <table border="1" rules="all">
+ * <tr>
+ * <th>Name</th>
+ * <th>Type</th>
+ * <th>Description</th>
+ * <th>SmartDeviceLink Ver. Available</th>
+ * </tr>
+ * <tr>
+ * <td>samplingRate</td>
+ * <td>SamplingRate</td>
+ * <td>Describes the sampling rate for AudioPassThru
+ * </td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>bitsPerSample</td>
+ * <td>BitsPerSample</td>
+ * <td>Describes the sample depth in bit for AudioPassThru
+ * </td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>audioType</td>
+ * <td>AudioType</td>
+ * <td>Describes the audiotype for AudioPassThru
+ * </td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * </table>
+ * @see ButtonName
+ * @see GetCapabilities
+ * @since SmartDeviceLink 2.0
+ */
+public class AudioPassThruCapabilities extends RPCStruct {
+ public static final String KEY_SAMPLING_RATE = "samplingRate";
+ public static final String KEY_AUDIO_TYPE = "audioType";
+ public static final String KEY_BITS_PER_SAMPLE = "bitsPerSample";
+
+ /**
+ * Constructs a newly allocated AudioPassThruCapabilities object
+ */
+ public AudioPassThruCapabilities() {}
+
+ /**
+ * Constructs a newly allocated AudioPassThruCapabilities object indicated by the Hashtable parameter
+ * @param hash The Hashtable to use
+ */
+ public AudioPassThruCapabilities(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+
+ /**
+ * set the sampling rate for AudioPassThru
+ * @param samplingRate the sampling rate for AudioPassThru
+ */
+ public void setSamplingRate(SamplingRate samplingRate) {
+ if (samplingRate != null) {
+ store.put(KEY_SAMPLING_RATE, samplingRate);
+ } else {
+ store.remove(KEY_SAMPLING_RATE);
+ }
+ }
+
+ /**
+ * get the sampling rate for AudioPassThru
+ * @return the sampling rate for AudioPassThru
+ */
+ public SamplingRate getSamplingRate() {
+ Object obj = store.get(KEY_SAMPLING_RATE);
+ if (obj instanceof SamplingRate) {
+ return (SamplingRate) obj;
+ } else if (obj instanceof String) {
+ return SamplingRate.valueForString((String) obj);
+ }
+ return null;
+ }
+
+ /**
+ * set the sample depth in bit for AudioPassThru
+ * @param bitsPerSample the sample depth in bit for AudioPassThru
+ */
+ public void setBitsPerSample(BitsPerSample bitsPerSample) {
+ if (bitsPerSample != null) {
+ store.put(KEY_BITS_PER_SAMPLE, bitsPerSample);
+ } else {
+ store.remove(KEY_BITS_PER_SAMPLE);
+ }
+ }
+
+ /**
+ * get the sample depth in bit for AudioPassThru
+ * @return the sample depth in bit for AudioPassThru
+ */
+ public BitsPerSample getBitsPerSample() {
+ Object obj = store.get(KEY_BITS_PER_SAMPLE);
+ if (obj instanceof BitsPerSample) {
+ return (BitsPerSample) obj;
+ } else if (obj instanceof String) {
+ return BitsPerSample.valueForString((String) obj);
+ }
+ return null;
+ }
+
+ /**
+ * set the audiotype for AudioPassThru
+ * @param audioType the audiotype for AudioPassThru
+ */
+ public void setAudioType(AudioType audioType) {
+ if (audioType != null) {
+ store.put(KEY_AUDIO_TYPE, audioType);
+ } else {
+ store.remove(KEY_AUDIO_TYPE);
+ }
+ }
+
+ /**
+ * get the audiotype for AudioPassThru
+ * @return the audiotype for AudioPassThru
+ */
+ public AudioType getAudioType() {
+ Object obj = store.get(KEY_AUDIO_TYPE);
+ if (obj instanceof AudioType) {
+ return (AudioType) obj;
+ } else if (obj instanceof String) {
+ return AudioType.valueForString((String) obj);
+ }
+ return null;
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/BeltStatus.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/BeltStatus.java
new file mode 100644
index 000000000..71db21640
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/BeltStatus.java
@@ -0,0 +1,385 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+
+import com.smartdevicelink.proxy.RPCStruct;
+import com.smartdevicelink.proxy.rpc.enums.VehicleDataEventStatus;
+/** The status of the seat belts.
+ *
+ * <p><b>Parameter List</b></p>
+ *
+ * <table border="1" rules="all">
+ * <tr>
+ * <th>Param Name</th>
+ * <th>Type</th>
+ * <th>Mandatory</th>
+ * <th>Description</th>
+ * </tr>
+ * <tr>
+ * <td>driverBeltDeployed</td>
+ * <td>VehicleDataEventStatus</td>
+ * <td>false</td>
+ * <td>The driver seat belt is deployed.</td>
+ * </tr>
+ * <tr>
+ * <td>passengerBeltDeployed</td>
+ * <td>VehicleDataEventStatus</td>
+ * <td>false</td>
+ * <td>The passenger seat belt is deployed.</td>
+ * </tr>
+ * <tr>
+ * <td>passengerBuckleBelted</td>
+ * <td>VehicleDataEventStatus</td>
+ * <td>false</td>
+ * <td>The passenger seat belt is buckled.</td>
+ * </tr>
+ * <tr>
+ * <td>driverBuckleBelted</td>
+ * <td>VehicleDataEventStatus</td>
+ * <td>false</td>
+ * <td>The driver seat belt is buckled.</td>
+ * </tr>
+ * <tr>
+ * <td>leftRow2BuckleBelted</td>
+ * <td>VehicleDataEventStatus</td>
+ * <td>false</td>
+ * <td>The left seat belt of the 2nd row is buckled.</td>
+ * </tr>
+ * <tr>
+ * <td>passengerChildDetected</td>
+ * <td>VehicleDataEventStatus</td>
+ * <td>false</td>
+ * <td>The child passenger is detected.</td>
+ * </tr>
+ * <tr>
+ * <td>rightRow2BuckleBelted</td>
+ * <td>VehicleDataEventStatus</td>
+ * <td>false</td>
+ * <td>The right seat belt of the 2nd row is buckled.</td>
+ * </tr>
+ * <tr>
+ * <td>middleRow2BuckleBelted</td>
+ * <td>VehicleDataEventStatus</td>
+ * <td>false</td>
+ * <td>The middle seat belt of the 2nd row is buckled.</td>
+ * </tr>
+ * <tr>
+ * <td>middleRow3BuckleBelted</td>
+ * <td>VehicleDataEventStatus</td>
+ * <td>false</td>
+ * <td>The middle seat belt of the 3rd row is buckled.</td>
+ * </tr>
+ * <tr>
+ * <td>leftRow3BuckleBelted</td>
+ * <td>VehicleDataEventStatus</td>
+ * <td>false</td>
+ * <td>The left seat belt of the 3rd row is buckled.</td>
+ * </tr>
+ * <tr>
+ * <td>rightRow3BuckleBelted</td>
+ * <td>VehicleDataEventStatus</td>
+ * <td>false</td>
+ * <td>The right seat belt of the 3rd row is buckled.</td>
+ * </tr>
+ * <tr>
+ * <td>leftRearInflatableBelted</td>
+ * <td>VehicleDataEventStatus</td>
+ * <td>false</td>
+ * <td>The left rear inflatable is belted.</td>
+ * </tr>
+ * <tr>
+ * <td>rightRearInflatableBelted</td>
+ * <td>VehicleDataEventStatus</td>
+ * <td>false</td>
+ * <td>The right rear inflatable is belted.</td>
+ * </tr>
+ * <tr>
+ * <td>middleRow1BeltDeployed</td>
+ * <td>VehicleDataEventStatus</td>
+ * <td>false</td>
+ * <td>The seat belt of the middle row is deployed.</td>
+ * </tr>
+ * <tr>
+ * <td>middleRow1BuckleBelted</td>
+ * <td>VehicleDataEventStatus</td>
+ * <td>false</td>
+ * <td>The seat belt of the middle row is buckled.</td>
+ * </tr>
+ * </table>
+* @since SmartDeviceLink 2.0
+* @see VehicleDataEventStatus
+* @see GetVehicleData
+* @see OnVehicleData
+ * @see SubscribeVehicleData
+ */
+
+public class BeltStatus extends RPCStruct {
+ public static final String KEY_DRIVER_BELT_DEPLOYED = "driverBeltDeployed";
+ public static final String KEY_PASSENGER_BELT_DEPLOYED = "passengerBeltDeployed";
+ public static final String KEY_PASSENGER_BUCKLE_BELTED = "passengerBuckleBelted";
+ public static final String KEY_DRIVER_BUCKLE_BELTED = "driverBuckleBelted";
+ public static final String KEY_LEFT_ROW_2_BUCKLE_BELTED = "leftRow2BuckleBelted";
+ public static final String KEY_PASSENGER_CHILD_DETECTED = "passengerChildDetected";
+ public static final String KEY_RIGHT_ROW_2_BUCKLE_BELTED = "rightRow2BuckleBelted";
+ public static final String KEY_MIDDLE_ROW_2_BUCKLE_BELTED = "middleRow2BuckleBelted";
+ public static final String KEY_MIDDLE_ROW_3_BUCKLE_BELTED = "middleRow3BuckleBelted";
+ public static final String KEY_LEFT_ROW_3_BUCKLE_BELTED = "leftRow3BuckleBelted";
+ public static final String KEY_RIGHT_ROW_3_BUCKLE_BELTED = "rightRow3BuckleBelted";
+ public static final String KEY_REAR_INFLATABLE_BELTED = "rearInflatableBelted";
+ public static final String KEY_RIGHT_REAR_INFLATABLE_BELTED = "rightRearInflatableBelted";
+ public static final String KEY_MIDDLE_ROW_1_BELT_DEPLOYED = "middleRow1BeltDeployed";
+ public static final String KEY_MIDDLE_ROW_1_BUCKLE_BELTED = "middleRow1BuckleBelted";
+ /** Constructs a new BeltStatus object indicated by the Hashtable
+ * parameter
+ * @param hash
+ * The hash table to use
+ *
+ *
+ */
+
+ public BeltStatus() { }
+ public BeltStatus(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+
+ public void setDriverBeltDeployed(VehicleDataEventStatus driverBeltDeployed) {
+ if (driverBeltDeployed != null) {
+ store.put(KEY_DRIVER_BELT_DEPLOYED, driverBeltDeployed);
+ } else {
+ store.remove(KEY_DRIVER_BELT_DEPLOYED);
+ }
+ }
+ public VehicleDataEventStatus getDriverBeltDeployed() {
+ Object obj = store.get(KEY_DRIVER_BELT_DEPLOYED);
+ if (obj instanceof VehicleDataEventStatus) {
+ return (VehicleDataEventStatus) obj;
+ } else if (obj instanceof String) {
+ return VehicleDataEventStatus.valueForString((String) obj);
+ }
+ return null;
+ }
+ public void setPassengerBeltDeployed(VehicleDataEventStatus passengerBeltDeployed) {
+ if (passengerBeltDeployed != null) {
+ store.put(KEY_PASSENGER_BELT_DEPLOYED, passengerBeltDeployed);
+ } else {
+ store.remove(KEY_PASSENGER_BELT_DEPLOYED);
+ }
+ }
+ public VehicleDataEventStatus getPassengerBeltDeployed() {
+ Object obj = store.get(KEY_PASSENGER_BELT_DEPLOYED);
+ if (obj instanceof VehicleDataEventStatus) {
+ return (VehicleDataEventStatus) obj;
+ } else if (obj instanceof String) {
+ return VehicleDataEventStatus.valueForString((String) obj);
+ }
+ return null;
+ }
+ public void setPassengerBuckleBelted(VehicleDataEventStatus passengerBuckleBelted) {
+ if (passengerBuckleBelted != null) {
+ store.put(KEY_PASSENGER_BUCKLE_BELTED, passengerBuckleBelted);
+ } else {
+ store.remove(KEY_PASSENGER_BUCKLE_BELTED);
+ }
+ }
+ public VehicleDataEventStatus getPassengerBuckleBelted() {
+ Object obj = store.get(KEY_PASSENGER_BUCKLE_BELTED);
+ if (obj instanceof VehicleDataEventStatus) {
+ return (VehicleDataEventStatus) obj;
+ } else if (obj instanceof String) {
+ return VehicleDataEventStatus.valueForString((String) obj);
+ }
+ return null;
+ }
+ public void setDriverBuckleBelted(VehicleDataEventStatus driverBuckleBelted) {
+ if (driverBuckleBelted != null) {
+ store.put(KEY_DRIVER_BUCKLE_BELTED, driverBuckleBelted);
+ } else {
+ store.remove(KEY_DRIVER_BUCKLE_BELTED);
+ }
+ }
+ public VehicleDataEventStatus getDriverBuckleBelted() {
+ Object obj = store.get(KEY_DRIVER_BUCKLE_BELTED);
+ if (obj instanceof VehicleDataEventStatus) {
+ return (VehicleDataEventStatus) obj;
+ } else if (obj instanceof String) {
+ return VehicleDataEventStatus.valueForString((String) obj);
+ }
+ return null;
+ }
+ public void setLeftRow2BuckleBelted(VehicleDataEventStatus leftRow2BuckleBelted) {
+ if (leftRow2BuckleBelted != null) {
+ store.put(KEY_LEFT_ROW_2_BUCKLE_BELTED, leftRow2BuckleBelted);
+ } else {
+ store.remove(KEY_LEFT_ROW_2_BUCKLE_BELTED);
+ }
+ }
+ public VehicleDataEventStatus getLeftRow2BuckleBelted() {
+ Object obj = store.get(KEY_LEFT_ROW_2_BUCKLE_BELTED);
+ if (obj instanceof VehicleDataEventStatus) {
+ return (VehicleDataEventStatus) obj;
+ } else if (obj instanceof String) {
+ return VehicleDataEventStatus.valueForString((String) obj);
+ }
+ return null;
+ }
+ public void setPassengerChildDetected(VehicleDataEventStatus passengerChildDetected) {
+ if (passengerChildDetected != null) {
+ store.put(KEY_PASSENGER_CHILD_DETECTED, passengerChildDetected);
+ } else {
+ store.remove(KEY_PASSENGER_CHILD_DETECTED);
+ }
+ }
+ public VehicleDataEventStatus getPassengerChildDetected() {
+ Object obj = store.get(KEY_PASSENGER_CHILD_DETECTED);
+ if (obj instanceof VehicleDataEventStatus) {
+ return (VehicleDataEventStatus) obj;
+ } else if (obj instanceof String) {
+ return VehicleDataEventStatus.valueForString((String) obj);
+ }
+ return null;
+ }
+ public void setRightRow2BuckleBelted(VehicleDataEventStatus rightRow2BuckleBelted) {
+ if (rightRow2BuckleBelted != null) {
+ store.put(KEY_RIGHT_ROW_2_BUCKLE_BELTED, rightRow2BuckleBelted);
+ } else {
+ store.remove(KEY_RIGHT_ROW_2_BUCKLE_BELTED);
+ }
+ }
+ public VehicleDataEventStatus getRightRow2BuckleBelted() {
+ Object obj = store.get(KEY_RIGHT_ROW_2_BUCKLE_BELTED);
+ if (obj instanceof VehicleDataEventStatus) {
+ return (VehicleDataEventStatus) obj;
+ } else if (obj instanceof String) {
+ return VehicleDataEventStatus.valueForString((String) obj);
+ }
+ return null;
+ }
+ public void setMiddleRow2BuckleBelted(VehicleDataEventStatus middleRow2BuckleBelted) {
+ if (middleRow2BuckleBelted != null) {
+ store.put(KEY_MIDDLE_ROW_2_BUCKLE_BELTED, middleRow2BuckleBelted);
+ } else {
+ store.remove(KEY_MIDDLE_ROW_2_BUCKLE_BELTED);
+ }
+ }
+ public VehicleDataEventStatus getMiddleRow2BuckleBelted() {
+ Object obj = store.get(KEY_MIDDLE_ROW_2_BUCKLE_BELTED);
+ if (obj instanceof VehicleDataEventStatus) {
+ return (VehicleDataEventStatus) obj;
+ } else if (obj instanceof String) {
+ return VehicleDataEventStatus.valueForString((String) obj);
+ }
+ return null;
+ }
+ public void setMiddleRow3BuckleBelted(VehicleDataEventStatus middleRow3BuckleBelted) {
+ if (middleRow3BuckleBelted != null) {
+ store.put(KEY_MIDDLE_ROW_3_BUCKLE_BELTED, middleRow3BuckleBelted);
+ } else {
+ store.remove(KEY_MIDDLE_ROW_3_BUCKLE_BELTED);
+ }
+ }
+ public VehicleDataEventStatus getMiddleRow3BuckleBelted() {
+ Object obj = store.get(KEY_MIDDLE_ROW_3_BUCKLE_BELTED);
+ if (obj instanceof VehicleDataEventStatus) {
+ return (VehicleDataEventStatus) obj;
+ } else if (obj instanceof String) {
+ return VehicleDataEventStatus.valueForString((String) obj);
+ }
+ return null;
+ }
+ public void setLeftRow3BuckleBelted(VehicleDataEventStatus leftRow3BuckleBelted) {
+ if (leftRow3BuckleBelted != null) {
+ store.put(KEY_LEFT_ROW_3_BUCKLE_BELTED, leftRow3BuckleBelted);
+ } else {
+ store.remove(KEY_LEFT_ROW_3_BUCKLE_BELTED);
+ }
+ }
+ public VehicleDataEventStatus getLeftRow3BuckleBelted() {
+ Object obj = store.get(KEY_LEFT_ROW_3_BUCKLE_BELTED);
+ if (obj instanceof VehicleDataEventStatus) {
+ return (VehicleDataEventStatus) obj;
+ } else if (obj instanceof String) {
+ return VehicleDataEventStatus.valueForString((String) obj);
+ }
+ return null;
+ }
+ public void setRightRow3BuckleBelted(VehicleDataEventStatus rightRow3BuckleBelted) {
+ if (rightRow3BuckleBelted != null) {
+ store.put(KEY_RIGHT_ROW_3_BUCKLE_BELTED, rightRow3BuckleBelted);
+ } else {
+ store.remove(KEY_RIGHT_ROW_3_BUCKLE_BELTED);
+ }
+ }
+ public VehicleDataEventStatus getRightRow3BuckleBelted() {
+ Object obj = store.get(KEY_RIGHT_ROW_3_BUCKLE_BELTED);
+ if (obj instanceof VehicleDataEventStatus) {
+ return (VehicleDataEventStatus) obj;
+ } else if (obj instanceof String) {
+ return VehicleDataEventStatus.valueForString((String) obj);
+ }
+ return null;
+ }
+ public void setLeftRearInflatableBelted(VehicleDataEventStatus rearInflatableBelted) {
+ if (rearInflatableBelted != null) {
+ store.put(KEY_REAR_INFLATABLE_BELTED, rearInflatableBelted);
+ } else {
+ store.remove(KEY_REAR_INFLATABLE_BELTED);
+ }
+ }
+ public VehicleDataEventStatus getLeftRearInflatableBelted() {
+ Object obj = store.get(KEY_REAR_INFLATABLE_BELTED);
+ if (obj instanceof VehicleDataEventStatus) {
+ return (VehicleDataEventStatus) obj;
+ } else if (obj instanceof String) {
+ return VehicleDataEventStatus.valueForString((String) obj);
+ }
+ return null;
+ }
+ public void setRightRearInflatableBelted(VehicleDataEventStatus rightRearInflatableBelted) {
+ if (rightRearInflatableBelted != null) {
+ store.put(KEY_RIGHT_REAR_INFLATABLE_BELTED, rightRearInflatableBelted);
+ } else {
+ store.remove(KEY_RIGHT_REAR_INFLATABLE_BELTED);
+ }
+ }
+ public VehicleDataEventStatus getRightRearInflatableBelted() {
+ Object obj = store.get(KEY_RIGHT_REAR_INFLATABLE_BELTED);
+ if (obj instanceof VehicleDataEventStatus) {
+ return (VehicleDataEventStatus) obj;
+ } else if (obj instanceof String) {
+ return VehicleDataEventStatus.valueForString((String) obj);
+ }
+ return null;
+ }
+ public void setMiddleRow1BeltDeployed(VehicleDataEventStatus middleRow1BeltDeployed) {
+ if (middleRow1BeltDeployed != null) {
+ store.put(KEY_MIDDLE_ROW_1_BELT_DEPLOYED, middleRow1BeltDeployed);
+ } else {
+ store.remove(KEY_MIDDLE_ROW_1_BELT_DEPLOYED);
+ }
+ }
+ public VehicleDataEventStatus getMiddleRow1BeltDeployed() {
+ Object obj = store.get(KEY_MIDDLE_ROW_1_BELT_DEPLOYED);
+ if (obj instanceof VehicleDataEventStatus) {
+ return (VehicleDataEventStatus) obj;
+ } else if (obj instanceof String) {
+ return VehicleDataEventStatus.valueForString((String) obj);
+ }
+ return null;
+ }
+ public void setMiddleRow1BuckleBelted(VehicleDataEventStatus middleRow1BuckleBelted) {
+ if (middleRow1BuckleBelted != null) {
+ store.put(KEY_MIDDLE_ROW_1_BUCKLE_BELTED, middleRow1BuckleBelted);
+ } else {
+ store.remove(KEY_MIDDLE_ROW_1_BUCKLE_BELTED);
+ }
+ }
+ public VehicleDataEventStatus getMiddleRow1BuckleBelted() {
+ Object obj = store.get(KEY_MIDDLE_ROW_1_BUCKLE_BELTED);
+ if (obj instanceof VehicleDataEventStatus) {
+ return (VehicleDataEventStatus) obj;
+ } else if (obj instanceof String) {
+ return VehicleDataEventStatus.valueForString((String) obj);
+ }
+ return null;
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/BodyInformation.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/BodyInformation.java
new file mode 100644
index 000000000..038b1970e
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/BodyInformation.java
@@ -0,0 +1,195 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+
+import com.smartdevicelink.proxy.RPCStruct;
+import com.smartdevicelink.proxy.rpc.enums.IgnitionStableStatus;
+import com.smartdevicelink.proxy.rpc.enums.IgnitionStatus;
+/** The body information including power modes.
+ *
+ * <p><b>Note:</b> The structure defines the information about the park brake and ignition.</p>
+ *
+ * <p><b>Parameter List</b></p>
+ * <table border="1" rules="all">
+ * <tr>
+ * <th>Param Name</th>
+ * <th>Type</th>
+ * <th>Mandatory</th>
+ * <th>Description</th>
+ * <th>Version</th>
+ * </tr>
+ * <tr>
+ * <td>parkBrakeActive</td>
+ * <td>Boolean</td>
+ * <td>true</td>
+ * <td>Describes, if the parkbreak is active. The information about the park brake: - true, if active - false if not.</td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>ignitionStableStatus</td>
+ * <td>IgnitionStableStatus</td>
+ * <td>true</td>
+ * <td>Describes, if the ignition situation is considered stableThe information about stability of the ignition switch. See {@linkplain IgnitionStableStatus}</td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>ignitionStatus</td>
+ * <td>IgnitionStatus</td>
+ * <td>true</td>
+ * <td>The information about ignition status. See {@linkplain IgnitionStatus}</td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>parkBrakeActive</td>
+ * <td>Boolean</td>
+ * <td>true</td>
+ * <td>The information about the park brake: - true, if active - false if not.</td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>driverDoorAjar</td>
+ * <td>Boolean</td>
+ * <td>true</td>
+ * <td>The information about the park brake: - true, if active - false if not.</td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>passengerDoorAjar</td>
+ * <td>Boolean</td>
+ * <td>true</td>
+ * <td>The information about the park brake: - true, if active - false if not.</td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>rearLeftDoorAjar</td>
+ * <td>Boolean</td>
+ * <td>true</td>
+ * <td>The information about the park brake: - true, if active - false if not.</td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>rearRightDoorAjar</td>
+ * <td>Boolean</td>
+ * <td>true</td>
+ * <td>References signal "DrStatRr_B_Actl".</td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ *
+ * </table>
+ * @since SmartDeviceLink 2.0
+ * @see SubscribeVehicleData
+ * @see GetVehicleData
+ * @see OnVehicleData
+ *
+ */
+
+public class BodyInformation extends RPCStruct {
+ public static final String KEY_PARK_BRAKE_ACTIVE = "parkBrakeActive";
+ public static final String KEY_IGNITION_STABLE_STATUS = "ignitionStableStatus";
+ public static final String KEY_IGNITION_STATUS = "ignitionStatus";
+ public static final String KEY_DRIVER_DOOR_AJAR = "driverDoorAjar";
+ public static final String KEY_PASSENGER_DOOR_AJAR = "passengerDoorAjar";
+ public static final String KEY_REAR_LEFT_DOOR_AJAR = "rearLeftDoorAjar";
+ public static final String KEY_REAR_RIGHT_DOOR_AJAR = "rearRightDoorAjar";
+ /** Constructs a new BodyInformation object indicated by the Hashtable
+ * parameter
+ * @param hash
+ * The hash table to use
+ *
+ *
+ */
+
+ public BodyInformation() { }
+ public BodyInformation(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+
+ public void setParkBrakeActive(Boolean parkBrakeActive) {
+ if (parkBrakeActive != null) {
+ store.put(KEY_PARK_BRAKE_ACTIVE, parkBrakeActive);
+ } else {
+ store.remove(KEY_PARK_BRAKE_ACTIVE);
+ }
+ }
+ public Boolean getParkBrakeActive() {
+ return (Boolean) store.get(KEY_PARK_BRAKE_ACTIVE);
+ }
+ public void setIgnitionStableStatus(IgnitionStableStatus ignitionStableStatus) {
+ if (ignitionStableStatus != null) {
+ store.put(KEY_IGNITION_STABLE_STATUS, ignitionStableStatus);
+ } else {
+ store.remove(KEY_IGNITION_STABLE_STATUS);
+ }
+ }
+ public IgnitionStableStatus getIgnitionStableStatus() {
+ Object obj = store.get(KEY_IGNITION_STABLE_STATUS);
+ if (obj instanceof IgnitionStableStatus) {
+ return (IgnitionStableStatus) obj;
+ } else if (obj instanceof String) {
+ return IgnitionStableStatus.valueForString((String) obj);
+ }
+ return null;
+ }
+ public void setIgnitionStatus(IgnitionStatus ignitionStatus) {
+ if (ignitionStatus != null) {
+ store.put(KEY_IGNITION_STATUS, ignitionStatus);
+ } else {
+ store.remove(KEY_IGNITION_STATUS);
+ }
+ }
+ public IgnitionStatus getIgnitionStatus() {
+ Object obj = store.get(KEY_IGNITION_STATUS);
+ if (obj instanceof IgnitionStatus) {
+ return (IgnitionStatus) obj;
+ } else if (obj instanceof String) {
+ return IgnitionStatus.valueForString((String) obj);
+ }
+ return null;
+ }
+
+ public void setDriverDoorAjar(Boolean driverDoorAjar) {
+ if (driverDoorAjar != null) {
+ store.put(KEY_DRIVER_DOOR_AJAR, driverDoorAjar);
+ } else {
+ store.remove(KEY_DRIVER_DOOR_AJAR);
+ }
+ }
+ public Boolean getDriverDoorAjar() {
+ return (Boolean) store.get(KEY_DRIVER_DOOR_AJAR);
+ }
+
+
+ public void setPassengerDoorAjar(Boolean passengerDoorAjar) {
+ if (passengerDoorAjar != null) {
+ store.put(KEY_PASSENGER_DOOR_AJAR, passengerDoorAjar);
+ } else {
+ store.remove(KEY_PASSENGER_DOOR_AJAR);
+ }
+ }
+ public Boolean getPassengerDoorAjar() {
+ return (Boolean) store.get(KEY_PASSENGER_DOOR_AJAR);
+ }
+
+ public void setRearLeftDoorAjar(Boolean rearLeftDoorAjar) {
+ if (rearLeftDoorAjar != null) {
+ store.put(KEY_REAR_LEFT_DOOR_AJAR, rearLeftDoorAjar);
+ } else {
+ store.remove(KEY_REAR_LEFT_DOOR_AJAR);
+ }
+ }
+ public Boolean getRearLeftDoorAjar() {
+ return (Boolean) store.get(KEY_REAR_LEFT_DOOR_AJAR);
+ }
+
+ public void setRearRightDoorAjar(Boolean rearRightDoorAjar) {
+ if (rearRightDoorAjar != null) {
+ store.put(KEY_REAR_RIGHT_DOOR_AJAR, rearRightDoorAjar);
+ } else {
+ store.remove(KEY_REAR_RIGHT_DOOR_AJAR);
+ }
+ }
+ public Boolean getRearRightDoorAjar() {
+ return (Boolean) store.get(KEY_REAR_RIGHT_DOOR_AJAR);
+ }
+
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/ButtonCapabilities.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/ButtonCapabilities.java
new file mode 100644
index 000000000..9b15c5be9
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/ButtonCapabilities.java
@@ -0,0 +1,156 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+
+import com.smartdevicelink.proxy.RPCStruct;
+import com.smartdevicelink.proxy.rpc.enums.ButtonName;
+
+/**
+ * Provides information about the capabilities of a SDL HMI button.
+ * <p><b> Parameter List</b></p>
+ * <table border="1" rules="all">
+ * <tr>
+ * <th>Name</th>
+ * <th>Type</th>
+ * <th>Description</th>
+ * <th>SmartDeviceLink Ver. Available</th>
+ * </tr>
+ * <tr>
+ * <td>name</td>
+ * <td>ButtonName</td>
+ * <td>The name of theSDL HMI button.</td>
+ * <td>SmartDeviceLink 1.0</td>
+ * </tr>
+ * <tr>
+ * <td>shortPressAvailable</td>
+ * <td>Boolean</td>
+ * <td>The button supports a SHORT press. See {@linkplain ButtonPressMode} for more information.</td>
+ * <td>SmartDeviceLink 1.0</td>
+ * </tr>
+ * <tr>
+ * <td>longPressAvailable</td>
+ * <td>Boolean</td>
+ * <td>The button supports a LONG press. See {@linkplain ButtonPressMode} for more information.</td>
+ * <td>SmartDeviceLink 1.0</td>
+ * </tr>
+ * <tr>
+ * <td>upDownAvailable</td>
+ * <td>Boolean</td>
+ * <td>The button supports "button down" and "button up". When the button is depressed, the <i>{@linkplain OnButtonEvent}</i> notification will be invoked with a value of BUTTONDOWN.
+ * <p> When the button is released, the <i>{@linkplain OnButtonEvent}</i> notification will be invoked with a value of BUTTONUP.</p></td>
+ * <td>SmartDeviceLink 1.0</td>
+ * </tr>
+ * </table>
+ *
+ * <p>Upon the request HMI must provide the list of the following information:</p>
+ * <p>The names of all existing/supported hardware buttons.</p>
+ * <p>The availability of LONG/SHORT press for each existing/supported hardware button correspondingly</p>
+ * <p>The availability of UP/DOWN events for each existing/supported hardware button correspondingly.</p>
+ *
+ * @since SmartDeviceLink 1.0
+ *
+ * @see ButtonName
+ * @see ButtonEventMode
+ * @see ButtonPressMode
+ *
+ *
+ *
+ * @see OnButtonEvent
+ * @see OnButtonPress
+ *
+ */
+public class ButtonCapabilities extends RPCStruct {
+ public static final String KEY_NAME = "name";
+ public static final String KEY_SHORT_PRESS_AVAILABLE = "shortPressAvailable";
+ public static final String KEY_LONG_PRESS_AVAILABLE = "longPressAvailable";
+ public static final String KEY_UP_DOWN_AVAILABLE = "upDownAvailable";
+ /**
+ * Constructs a newly allocated ButtonCapabilities object
+ */
+ public ButtonCapabilities() { }
+ /**
+ * Constructs a newly allocated ButtonCapabilities object indicated by the Hashtable parameter
+ * @param hash The Hashtable to use
+ */
+ public ButtonCapabilities(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+ /**
+ * Get the name of theSDL HMI button.
+ * @return ButtonName the name of the Button
+ */
+ public ButtonName getName() {
+ Object obj = store.get(KEY_NAME);
+ if (obj instanceof ButtonName) {
+ return (ButtonName) obj;
+ } else if (obj instanceof String) {
+ return ButtonName.valueForString((String) obj);
+ }
+ return null;
+ }
+ /**
+ * Set the name of theSDL HMI button.
+ * @param name the name of button
+ */
+ public void setName( ButtonName name ) {
+ if (name != null) {
+ store.put(KEY_NAME, name );
+ } else {
+ store.remove(KEY_NAME);
+ }
+ }
+ /**
+ * Whether the button supports a SHORT press. See <i>{@linkplain com.smartdevicelink.proxy.rpc.enums.ButtonPressMode}</i> for more information.
+ * @return True if support otherwise False.
+ */
+ public Boolean getShortPressAvailable() {
+ return (Boolean) store.get( KEY_SHORT_PRESS_AVAILABLE );
+ }
+ /**
+ * Set the button supports a SHORT press. See <i>{@linkplain com.smartdevicelink.proxy.rpc.enums.ButtonPressMode}</i> for more information.
+ * @param shortPressAvailable True if support otherwise False.
+ */
+ public void setShortPressAvailable( Boolean shortPressAvailable ) {
+ if (shortPressAvailable != null) {
+ store.put(KEY_SHORT_PRESS_AVAILABLE, shortPressAvailable );
+ } else {
+ store.remove(KEY_SHORT_PRESS_AVAILABLE);
+ }
+ }
+ /**
+ * Whether the button supports a LONG press. See <i>{@linkplain com.smartdevicelink.proxy.rpc.enums.ButtonPressMode}</i> for more information.
+ * @return True if support otherwise False.
+ */
+ public Boolean getLongPressAvailable() {
+ return (Boolean) store.get( KEY_LONG_PRESS_AVAILABLE );
+ }
+ /**
+ * Set the button supports a LONG press. See <i>{@linkplain com.smartdevicelink.proxy.rpc.enums.ButtonPressMode}</i> for more information.
+ * @param longPressAvailable True if support otherwise False.
+ */
+ public void setLongPressAvailable( Boolean longPressAvailable ) {
+ if (longPressAvailable != null) {
+ store.put(KEY_LONG_PRESS_AVAILABLE, longPressAvailable );
+ } else {
+ store.remove(KEY_LONG_PRESS_AVAILABLE);
+ }
+ }
+ /**
+ * Whether the button supports "button down" and "button up". When the button is depressed, the <i>{@linkplain OnButtonEvent}</i> notification will be invoked with a value of BUTTONDOWN.
+ * @return True if support otherwise False.
+ */
+ public Boolean getUpDownAvailable() {
+ return (Boolean) store.get( KEY_UP_DOWN_AVAILABLE );
+ }
+ /**
+ * Set the button supports "button down" and "button up". When the button is depressed, the <i>{@linkplain OnButtonEvent}</i> notification will be invoked with a value of BUTTONDOWN.
+ * @param upDownAvailable True if support otherwise False.
+ */
+ public void setUpDownAvailable( Boolean upDownAvailable ) {
+ if (upDownAvailable != null) {
+ store.put(KEY_UP_DOWN_AVAILABLE, upDownAvailable );
+ } else {
+ store.remove(KEY_UP_DOWN_AVAILABLE);
+ }
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/ChangeRegistration.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/ChangeRegistration.java
new file mode 100644
index 000000000..2b4c69f42
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/ChangeRegistration.java
@@ -0,0 +1,317 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.ArrayList;
+import java.util.Hashtable;
+import java.util.List;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCRequest;
+import com.smartdevicelink.proxy.rpc.enums.Language;
+
+/**
+ * If the app recognizes during the app registration that the SDL HMI language
+ * (voice/TTS and/or display) does not match the app language, the app will be
+ * able (but does not need) to change this registration with changeRegistration
+ * prior to app being brought into focus.
+ *
+ * <p>Function Group: Base</p>
+ *
+ * <p><b>HMILevel can by any</b></p>
+ *
+ * <b>Note:</b>
+ *
+ * <p>SDL will send the language value confirmed to be supported by HMI via UI.GetCapabilities.</p>
+ * <p><b> Parameter List</b></p>
+ *
+ * <table border="1" rules="all">
+ * <tr>
+ * <th>Name</th>
+ * <th>Type</th>
+ * <th>Description</th>
+ * <th> Req.</th>
+ * <th>Notes</th>
+ * <th>Version Available</th>
+ * </tr>
+ * <tr>
+ * <td>Language</td>
+ * <td>Language</td>
+ * <td>Requested SDL voice engine (VR+TTS) language registration.</td>
+ * <td>Y</td>
+ * <td></td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>hmiDisplayLanguage</td>
+ * <td>Language</td>
+ * <td>Request display language registration.</td>
+ * <td>Y</td>
+ * <td>Minvalue=0; Maxvalue=2000000000</td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ *
+ * <tr>
+ * <td>appName</td>
+ * <td>String</td>
+ * <td>Request new app name registration</td>
+ * <td>N</td>
+ * <td>maxlength:100</td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>ttsName</td>
+ * <td>TTSChunk</td>
+ * <td>Request new ttsName registration</td>
+ * <td>N</td>
+ * <td>minsize:1; maxsize:100</td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>ngnMediaScreenAppName</td>
+ * <td>String</td>
+ * <td>Request new app short name registration</td>
+ * <td>N</td>
+ * <td>maxlength: 100</td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>vrSynonyms</td>
+ * <td>String</td>
+ * <td>Request new VR synonyms registration</td>
+ * <td>N</td>
+ * <td>maxlength: 40; minsize:1; maxsize:100</td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * </table>
+ *
+ * <p><b>Response </b></p>
+ *
+ * <p><b>Non-default Result Codes:</b></p>
+ * <p>SUCCESS</p>
+ * <p>INVALID_DATA</p>
+ * <p>OUT_OF_MEMORY</p>
+ * <p> TOO_MANY_PENDING_REQUESTS</p>
+ * <p>APPLICATION_NOT_REGISTERED</p>
+ * <p>GENERIC_ERROR</p>
+ * <p>REJECTED</p>
+ * <p>DISALLOWED</p>
+ *
+ * @since SmartDeviceLink 2.0
+ * @see RegisterAppInterface
+ */
+public class ChangeRegistration extends RPCRequest {
+ public static final String KEY_LANGUAGE = "language";
+ public static final String KEY_HMI_DISPLAY_LANGUAGE = "hmiDisplayLanguage";
+ public static final String KEY_APP_NAME = "appName";
+ public static final String KEY_TTS_NAME = "ttsName";
+ public static final String KEY_NGN_MEDIA_SCREEN_NAME = "ngnMediaScreenAppName";
+ public static final String KEY_VR_SYNONYMS = "vrSynonyms";
+
+ /**
+ * Constructs a new ChangeRegistration object
+ */
+ public ChangeRegistration() {
+ super(FunctionID.CHANGE_REGISTRATION.toString());
+ }
+
+ /**
+ * <p>Constructs a new ChangeRegistration object indicated by the Hashtable
+ * parameter</p>
+ *
+ *
+ * @param hash
+ * The Hashtable to use
+ */
+ public ChangeRegistration(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+
+ /**
+ * Sets language
+ *
+ * @param language
+ * a language value
+ */
+ public void setLanguage(Language language) {
+ if (language != null) {
+ parameters.put(KEY_LANGUAGE, language);
+ } else {
+ parameters.remove(KEY_LANGUAGE);
+ }
+ }
+
+ /**
+ * Gets language
+ *
+ * @return Language -a Language value
+ */
+ public Language getLanguage() {
+ Object obj = parameters.get(KEY_LANGUAGE);
+ if (obj instanceof Language) {
+ return (Language) obj;
+ } else if (obj instanceof String) {
+ return Language.valueForString((String) obj);
+ }
+ return null;
+ }
+
+ /**
+ * Sets HMI display language
+ *
+ * @param hmiDisplayLanguage
+ * a Language value
+ */
+ public void setHmiDisplayLanguage(Language hmiDisplayLanguage) {
+ if (hmiDisplayLanguage != null) {
+ parameters.put(KEY_HMI_DISPLAY_LANGUAGE, hmiDisplayLanguage);
+ } else {
+ parameters.remove(KEY_HMI_DISPLAY_LANGUAGE);
+ }
+ }
+
+ /**
+ * Gets HMI display language
+ *
+ * @return Language -a Language value
+ */
+ public Language getHmiDisplayLanguage() {
+ Object obj = parameters.get(KEY_HMI_DISPLAY_LANGUAGE);
+ if (obj instanceof Language) {
+ return (Language) obj;
+ } else if (obj instanceof String) {
+ return Language.valueForString((String) obj);
+ }
+ return null;
+ }
+
+ /**
+ * Sets app name
+ *
+ * @param appName App name to set
+ */
+ public void setAppName(String appName){
+ if(appName != null){
+ parameters.put(KEY_APP_NAME, appName);
+ }
+ else{
+ parameters.remove(KEY_APP_NAME);
+ }
+ }
+
+ /**
+ * Gets app name
+ *
+ * @return The app name
+ */
+ public String getAppName(){
+ return (String) parameters.get(KEY_APP_NAME);
+ }
+
+ /**
+ * Sets NGN media screen app name
+ *
+ * @param ngnAppName The NGN app name
+ */
+ public void setNgnMediaScreenAppName(String ngnAppName){
+ if(ngnAppName != null){
+ parameters.put(KEY_NGN_MEDIA_SCREEN_NAME, ngnAppName);
+ }
+ else{
+ parameters.remove(KEY_NGN_MEDIA_SCREEN_NAME);
+ }
+ }
+
+ /**
+ * Gets NGN media screen app name
+ *
+ * @return The NGN app name
+ */
+ public String getNgnMediaScreenAppName(){
+ return (String) parameters.get(KEY_NGN_MEDIA_SCREEN_NAME);
+ }
+
+ /**
+ * Sets the TTS name
+ *
+ * @param ttsName The TTS name to set
+ */
+ public void setTtsName(List<TTSChunk> ttsName){
+ if(ttsName != null){
+ parameters.put(KEY_TTS_NAME, ttsName);
+ }
+ else{
+ parameters.remove(KEY_TTS_NAME);
+ }
+ }
+
+ /**
+ * Gets the TTS name
+ *
+ * @return The TTS name
+ */
+ @SuppressWarnings("unchecked")
+ public List<TTSChunk> getTtsName(){
+ if (parameters.get(KEY_TTS_NAME) instanceof List<?>) {
+ List<?> list = (List<?>)parameters.get(KEY_TTS_NAME);
+ if (list != null && list.size() > 0) {
+ Object obj = list.get(0);
+ if (obj instanceof TTSChunk) {
+ return (List<TTSChunk>) list;
+ } else if (obj instanceof Hashtable) {
+ List<TTSChunk> newList = new ArrayList<TTSChunk>();
+ for (Object hashObj : list) {
+ newList.add(new TTSChunk((Hashtable<String, Object>)hashObj));
+ }
+ return newList;
+ }
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Gets the List<String> representing the an array of 1-100 elements, each
+ * element containing a voice-recognition synonym
+ *
+ * @return List<String> -a List value representing the an array of
+ * 1-100 elements, each element containing a voice-recognition
+ * synonym
+ */
+ @SuppressWarnings("unchecked")
+ public List<String> getVrSynonyms() {
+ if (parameters.get(KEY_VR_SYNONYMS) instanceof List<?>) {
+ List<?> list = (List<?>)parameters.get(KEY_VR_SYNONYMS);
+ if (list != null && list.size()>0) {
+ Object obj = list.get(0);
+ if (obj instanceof String) {
+ return (List<String>) list;
+ }
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Sets a vrSynonyms representing the an array of 1-100 elements, each
+ * element containing a voice-recognition synonym
+ *
+ * @param vrSynonyms
+ * a List<String> value representing the an array of 1-100
+ * elements
+ * <p>
+ * <b>Notes: </b></p>
+ * <ul>
+ * <li>Each vr synonym is limited to 40 characters, and there can
+ * be 1-100 synonyms in array</li>
+ * <li>May not be the same (by case insensitive comparison) as
+ * the name or any synonym of any currently-registered
+ * application</li>
+ * </ul>
+ */
+ public void setVrSynonyms(List<String> vrSynonyms) {
+ if (vrSynonyms != null) {
+ parameters.put(KEY_VR_SYNONYMS, vrSynonyms);
+ } else {
+ parameters.remove(KEY_VR_SYNONYMS);
+ }
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/ChangeRegistrationResponse.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/ChangeRegistrationResponse.java
new file mode 100644
index 000000000..e5404cad3
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/ChangeRegistrationResponse.java
@@ -0,0 +1,33 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCResponse;
+
+/**
+ * Change Registration Response is sent, when ChangeRegistration has been called
+ *
+ * @since SmartDeviceLink 2.0
+ */
+public class ChangeRegistrationResponse extends RPCResponse {
+
+ /**
+ * Constructs a new ChangeRegistrationResponse object
+ */
+ public ChangeRegistrationResponse() {
+ super(FunctionID.CHANGE_REGISTRATION.toString());
+ }
+
+ /**
+ * <p>Constructs a new ChangeRegistrationResponse object indicated by the Hashtable
+ * parameter</p>
+ *
+ *
+ * @param hash
+ * The Hashtable to use
+ */
+ public ChangeRegistrationResponse(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/Choice.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/Choice.java
new file mode 100644
index 000000000..2bc59736e
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/Choice.java
@@ -0,0 +1,225 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+import java.util.List;
+
+import com.smartdevicelink.proxy.RPCStruct;
+import com.smartdevicelink.util.DebugTool;
+
+/**
+ * A choice is an option which a user can select either via the menu or via voice recognition (VR) during an application initiated interaction.
+ * For example, the application may request for the user`s choice among several suggested ones: Yes, No, Skip.
+ * <p><b> Parameter List</b></p>
+ * <table border="1" rules="all">
+ * <tr>
+ * <th>Name</th>
+ * <th>Type</th>
+ * <th>Description</th>
+ * <th>SmartDeviceLink Ver. Available</th>
+ * </tr>
+ * <tr>
+ * <td>choiceID</td>
+ * <td>Integer</td>
+ * <td>Application-scoped identifier that uniquely identifies this choice.
+ * Min: 0;
+ * Max: 65535
+ * </td>
+ * <td>SmartDeviceLink 1.0</td>
+ * </tr>
+ * <tr>
+ * <td>menuName</td>
+ * <td>String</td>
+ * <td>Text which appears in menu, representing this choice.
+ * Min: 1;
+ * Max: 100
+ * </td>
+ * <td>SmartDeviceLink 1.0</td>
+ * </tr>
+ * <tr>
+ * <td>vrCommands</td>
+ * <td>String[]</td>
+ * <td>An array of strings to be used as VR synonyms for this choice. If this array is provided, it must have at least one non-empty element</td>
+ * <td>SmartDeviceLink 1.0</td>
+ * </tr>
+ * <tr>
+ * <td>image</td>
+ * <td>Image</td>
+ * <td>Either a static hex icon value or a binary image file name identifier (sent by PutFile).</td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * </table>
+ *
+ * @since SmartDeviceLink 1.0
+ *
+ * @see AddCommand
+ * @see PerformInteraction
+ * @see Image
+ */
+public class Choice extends RPCStruct {
+ public static final String KEY_SECONDARY_TEXT = "secondaryText";
+ public static final String KEY_TERTIARY_TEXT = "tertiaryText";
+ public static final String KEY_SECONDARY_IMAGE = "secondaryImage";
+ public static final String KEY_MENU_NAME = "menuName";
+ public static final String KEY_VR_COMMANDS = "vrCommands";
+ public static final String KEY_CHOICE_ID = "choiceID";
+ public static final String KEY_IMAGE = "image";
+ /**
+ * Constructs a newly allocated Choice object
+ */
+ public Choice() { }
+ /**
+ * Constructs a newly allocated Choice object indicated by the Hashtable parameter
+ * @param hash The Hashtable to use
+ */
+ public Choice(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+ /**
+ * Get the application-scoped identifier that uniquely identifies this choice.
+ * @return choiceID Min: 0; Max: 65535
+ */
+ public Integer getChoiceID() {
+ return (Integer) store.get(KEY_CHOICE_ID);
+ }
+ /**
+ * Set the application-scoped identifier that uniquely identifies this choice.
+ * @param choiceID Min: 0 Max: 65535
+ */
+ public void setChoiceID(Integer choiceID) {
+ if (choiceID != null) {
+ store.put(KEY_CHOICE_ID, choiceID);
+ } else {
+ store.remove(KEY_CHOICE_ID);
+ }
+ }
+ /**
+ * Text which appears in menu, representing this choice.
+ * Min: 1;
+ * Max: 100
+ * @return menuName the menu name
+ */
+ public String getMenuName() {
+ return (String) store.get(KEY_MENU_NAME);
+ }
+ /**
+ * Text which appears in menu, representing this choice.
+ * Min: 1;
+ * Max: 100
+ * @param menuName the menu name
+ */
+ public void setMenuName(String menuName) {
+ if (menuName != null) {
+ store.put(KEY_MENU_NAME, menuName);
+ } else {
+ store.remove(KEY_MENU_NAME);
+ }
+ }
+ /**
+ * Get an array of strings to be used as VR synonyms for this choice. If this array is provided, it must have at least one non-empty element
+ * @return vrCommands List
+ * @since SmartDeviceLink 2.0
+ */
+ @SuppressWarnings("unchecked")
+ public List<String> getVrCommands() {
+ if (store.get(KEY_VR_COMMANDS) instanceof List<?>) {
+ List<?> list = (List<?>)store.get( KEY_VR_COMMANDS);
+ if (list != null && list.size() > 0) {
+ Object obj = list.get(0);
+ if (obj instanceof String) {
+ return (List<String>) list;
+ }
+ }
+ }
+ return null;
+ }
+ /**
+ * Set an array of strings to be used as VR synonyms for this choice. If this array is provided, it must have at least one non-empty element
+ * @param vrCommands the List of vrCommands
+ * @since SmartDeviceLink 2.0
+ */
+ public void setVrCommands(List<String> vrCommands) {
+ if (vrCommands != null) {
+ store.put(KEY_VR_COMMANDS, vrCommands);
+ } else {
+ store.remove(KEY_VR_COMMANDS);
+ }
+ }
+ /**
+ * Set the image
+ * @param image the image of the choice
+ */
+ public void setImage(Image image) {
+ if (image != null) {
+ store.put(KEY_IMAGE, image);
+ } else {
+ store.remove(KEY_IMAGE);
+ }
+ }
+ /**
+ * Get the image
+ * @return the image of the choice
+ */
+ @SuppressWarnings("unchecked")
+ public Image getImage() {
+ Object obj = store.get(KEY_IMAGE);
+ if (obj instanceof Image) {
+ return (Image) obj;
+ } else if (obj instanceof Hashtable) {
+ try {
+ return new Image((Hashtable<String, Object>) obj);
+ } catch (Exception e) {
+ DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_IMAGE, e);
+ }
+ }
+ return null;
+ }
+
+ public String getSecondaryText() {
+ return (String) store.get(KEY_SECONDARY_TEXT);
+ }
+
+ public void setSecondaryText(String secondaryText) {
+ if (secondaryText != null) {
+ store.put(KEY_SECONDARY_TEXT, secondaryText);
+ }
+ else {
+ store.remove(KEY_SECONDARY_TEXT);
+ }
+ }
+
+ public String getTertiaryText() {
+ return (String) store.get(KEY_TERTIARY_TEXT);
+ }
+
+ public void setTertiaryText(String tertiaryText) {
+ if (tertiaryText != null) {
+ store.put(KEY_TERTIARY_TEXT, tertiaryText);
+ }
+ else {
+ store.remove(KEY_TERTIARY_TEXT);
+ }
+ }
+
+ public void setSecondaryImage(Image image) {
+ if (image != null) {
+ store.put(KEY_SECONDARY_IMAGE, image);
+ } else {
+ store.remove(KEY_SECONDARY_IMAGE);
+ }
+ }
+
+ @SuppressWarnings("unchecked")
+ public Image getSecondaryImage() {
+ Object obj = store.get(KEY_SECONDARY_IMAGE);
+ if (obj instanceof Image) {
+ return (Image) obj;
+ } else if (obj instanceof Hashtable) {
+ try {
+ return new Image((Hashtable<String, Object>) obj);
+ } catch (Exception e) {
+ DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_SECONDARY_IMAGE, e);
+ }
+ }
+ return null;
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/ClusterModeStatus.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/ClusterModeStatus.java
new file mode 100644
index 000000000..17e16af65
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/ClusterModeStatus.java
@@ -0,0 +1,129 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+
+import com.smartdevicelink.proxy.RPCStruct;
+import com.smartdevicelink.proxy.rpc.enums.CarModeStatus;
+import com.smartdevicelink.proxy.rpc.enums.PowerModeQualificationStatus;
+import com.smartdevicelink.proxy.rpc.enums.PowerModeStatus;
+/** <p>The status modes of the instrument panel cluster.</p>
+ *
+ *
+ * <p><b>Parameter List</b></p>
+ * <table border="1" rules="all">
+ * <tr>
+ * <th>Param Name</th>
+ * <th>Type</th>
+ * <th>Mandatory</th>
+ * <th>Description</th>
+ * </tr>
+ * <tr>
+ * <td>powerModeActive</td>
+ * <td>Boolean</td>
+ * <td></td>
+ * <td>References signal "PowerMode_UB".</td>
+ * </tr>
+ * <tr>
+ * <td>powerModeQualificationStatus</td>
+ * <td>PowerModeQualificationStatus</td>
+ * <td></td>
+ * <td>References signal "PowerModeQF".</td>
+ * </tr>
+ * <tr>
+ * <td>carModeStatus</td>
+ * <td>CarModeStatus</td>
+ * <td></td>
+ * <td>Describes the carmode the vehicle is in.</td>
+ * </tr>
+ * <tr>
+ * <td>powerModeStatus</td>
+ * <td>PowerModeStatus</td>
+ * <td>true</td>
+ * <td>Describes the different powermodes</td>
+ * </tr>
+ *
+ * </table>
+ * @since SmartDeviceLink 1.0
+ *
+ * @see SubscribeVehicleData
+ * @see SubscribeVehicleData
+ * @see Image
+ *
+ */
+
+public class ClusterModeStatus extends RPCStruct {
+ public static final String KEY_POWER_MODE_ACTIVE = "powerModeActive";
+ public static final String KEY_POWER_MODE_QUALIFICATION_STATUS = "powerModeQualificationStatus";
+ public static final String KEY_CAR_MODE_STATUS = "carModeStatus";
+ public static final String KEY_POWER_MODE_STATUS = "powerModeStatus";
+ /** <p>Constructs a new ClusterModeStatus object indicated by the Hashtable
+ * parameter</p>
+ * @param hash
+ * The hash table to use
+ *
+ */
+
+ public ClusterModeStatus() { }
+ public ClusterModeStatus(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+
+ public void setPowerModeActive(Boolean powerModeActive) {
+ if (powerModeActive != null) {
+ store.put(KEY_POWER_MODE_ACTIVE, powerModeActive);
+ } else {
+ store.remove(KEY_POWER_MODE_ACTIVE);
+ }
+ }
+ public Boolean getPowerModeActive() {
+ return (Boolean) store.get(KEY_POWER_MODE_ACTIVE);
+ }
+ public void setPowerModeQualificationStatus(PowerModeQualificationStatus powerModeQualificationStatus) {
+ if (powerModeQualificationStatus != null) {
+ store.put(KEY_POWER_MODE_QUALIFICATION_STATUS, powerModeQualificationStatus);
+ } else {
+ store.remove(KEY_POWER_MODE_QUALIFICATION_STATUS);
+ }
+ }
+ public PowerModeQualificationStatus getPowerModeQualificationStatus() {
+ Object obj = store.get(KEY_POWER_MODE_QUALIFICATION_STATUS);
+ if (obj instanceof PowerModeQualificationStatus) {
+ return (PowerModeQualificationStatus) obj;
+ } else if (obj instanceof String) {
+ return PowerModeQualificationStatus.valueForString((String) obj);
+ }
+ return null;
+ }
+ public void setCarModeStatus(CarModeStatus carModeStatus) {
+ if (carModeStatus != null) {
+ store.put(KEY_CAR_MODE_STATUS, carModeStatus);
+ } else {
+ store.remove(KEY_CAR_MODE_STATUS);
+ }
+ }
+ public CarModeStatus getCarModeStatus() {
+ Object obj = store.get(KEY_CAR_MODE_STATUS);
+ if (obj instanceof CarModeStatus) {
+ return (CarModeStatus) obj;
+ } else if (obj instanceof String) {
+ return CarModeStatus.valueForString((String) obj);
+ }
+ return null;
+ }
+ public void setPowerModeStatus(PowerModeStatus powerModeStatus) {
+ if (powerModeStatus != null) {
+ store.put(KEY_POWER_MODE_STATUS, powerModeStatus);
+ } else {
+ store.remove(KEY_POWER_MODE_STATUS);
+ }
+ }
+ public PowerModeStatus getPowerModeStatus() {
+ Object obj = store.get(KEY_POWER_MODE_STATUS);
+ if (obj instanceof PowerModeStatus) {
+ return (PowerModeStatus) obj;
+ } else if (obj instanceof String) {
+ return PowerModeStatus.valueForString((String) obj);
+ }
+ return null;
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/Coordinate.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/Coordinate.java
new file mode 100644
index 000000000..7e899168c
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/Coordinate.java
@@ -0,0 +1,44 @@
+package com.smartdevicelink.proxy.rpc;
+
+import com.smartdevicelink.proxy.RPCStruct;
+import com.smartdevicelink.util.SdlDataTypeConverter;
+
+import java.util.Hashtable;
+
+public class Coordinate extends RPCStruct{
+ public static final String KEY_LATITUDE_DEGREES = "latitudeDegrees";
+ public static final String KEY_LONGITUDE_DEGREES = "longitudeDegrees";
+
+ public Coordinate() {
+ }
+
+ public Coordinate(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+
+ public Float getLatitudeDegrees() {
+ Object value = store.get(KEY_LATITUDE_DEGREES);
+ return SdlDataTypeConverter.objectToFloat(value);
+ }
+
+ public void setLatitudeDegrees(Float latitudeDegrees) {
+ if (latitudeDegrees != null) {
+ store.put(KEY_LATITUDE_DEGREES, latitudeDegrees);
+ } else {
+ store.remove(KEY_LATITUDE_DEGREES);
+ }
+ }
+
+ public Float getLongitudeDegrees() {
+ Object value = store.get(KEY_LONGITUDE_DEGREES);
+ return SdlDataTypeConverter.objectToFloat(value);
+ }
+
+ public void setLongitudeDegrees(Float longitudeDegrees) {
+ if (longitudeDegrees != null) {
+ store.put(KEY_LONGITUDE_DEGREES, longitudeDegrees);
+ } else {
+ store.remove(KEY_LONGITUDE_DEGREES);
+ }
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/CreateInteractionChoiceSet.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/CreateInteractionChoiceSet.java
new file mode 100644
index 000000000..97793558f
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/CreateInteractionChoiceSet.java
@@ -0,0 +1,161 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.ArrayList;
+import java.util.Hashtable;
+import java.util.List;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCRequest;
+
+/**
+ * Creates a Choice Set which can be used in subsequent <i>
+ * {@linkplain PerformInteraction}</i> Operations.
+ *
+ * <p>Function Group: Base </p>
+ *
+ * <p><b>HMILevel needs to be FULL, LIMITED or BACKGROUND</b></p>
+ *
+ * <p>AudioStreamingState : ANY</p>
+ *
+ * <p>SystemContext: MAIN, MENU, VR</p>
+ *
+ * <p><b>Parameter List</b></p>
+ * <table border="1" rules="all">
+ * <tr>
+ * <th>Name</th>
+ * <th>Type</th>
+ * <th>Description</th>
+ * <th>Reg.</th>
+ * <th>Notes</th>
+ * <th>Version</th>
+ * </tr>
+ * <tr>
+ * <td>interactionChoiceSetID</td>
+ * <td>Integer</td>
+ * <td>A unique ID that identifies the Choice Set</td>
+ * <td>Y</td>
+ * <td>Min Value: 0; Max Value: 2000000000</td>
+ * <td>SmartDeviceLink 1.0</td>
+ * </tr>
+ * <tr>
+ * <td>choiceSet</td>
+ * <td>Choice[]</td>
+ * <td>Array of one or more elements.</td>
+ * <td>Y</td>
+ * <td>Min Value: 1; Max Value: 100</td>
+ * <td>SmartDeviceLink 1.0 </td>
+ * </tr>
+ * </table>
+ *
+ *
+ * <p> <b>Note:</b></p>Second Utterance issue with CreateInteractionChoiceSet RPC. Before a perform interaction
+ * is sent you MUST wait for the success from the CreateInteractionChoiceSet RPC.
+ * If you do not wait the system may not recognize the first utterance from the user.
+ *
+ * <p><b>Response</b></p>
+ *
+ * Indicates that the corresponding request either failed or succeeded. If the response returns with a SUCCESS result code, this means the Choice Set was created.
+ *
+ * <p><b>Non-default Result Codes:</b></p>
+ * <p>SUCCESS</p>
+ * <p>INVALID_DATA</p>
+ * <p>OUT_OF_MEMORY</p>
+ * <p>TOO_MANY_PENDING_REQUESTS</p>
+ * <p>APPLICATION_NOT_REGISTERED</p>
+ * <p>GENERIC_ERROR</p>
+ * <p> REJECTED</p>
+ * <p> INVALID_ID</p>
+ * <p> DUPLICATE_NAME</p>
+ * <p>UNSUPPORTED_RESOURCE </p>
+ *
+ *
+ * @since SmartDeviceLink 1.0
+ * @see DeleteInteractionChoiceSet
+ * @see PerformInteraction
+ */
+public class CreateInteractionChoiceSet extends RPCRequest {
+ public static final String KEY_CHOICE_SET = "choiceSet";
+ public static final String KEY_INTERACTION_CHOICE_SET_ID = "interactionChoiceSetID";
+
+ /**
+ * Constructs a new CreateInteractionChoiceSet object
+ */
+ public CreateInteractionChoiceSet() {
+ super(FunctionID.CREATE_INTERACTION_CHOICE_SET.toString());
+ }
+ /**
+ * <p>Constructs a new CreateInteractionChoiceSet object indicated by the
+ * Hashtable parameter</p>
+ *
+ *
+ * @param hash
+ * The Hashtable to use
+ */
+ public CreateInteractionChoiceSet(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+ /**
+ * Gets the Choice Set unique ID
+ *
+ * @return Integer -an Integer representing the Choice Set ID
+ */
+ public Integer getInteractionChoiceSetID() {
+ return (Integer) parameters.get( KEY_INTERACTION_CHOICE_SET_ID );
+ }
+ /**
+ * Sets a unique ID that identifies the Choice Set
+ *
+ * @param interactionChoiceSetID
+ * an Integer value representing the Choice Set ID
+ *
+ * <b>Notes: </b>Min Value: 0; Max Value: 2000000000
+ */
+ public void setInteractionChoiceSetID( Integer interactionChoiceSetID ) {
+ if (interactionChoiceSetID != null) {
+ parameters.put(KEY_INTERACTION_CHOICE_SET_ID, interactionChoiceSetID );
+ } else {
+ parameters.remove(KEY_INTERACTION_CHOICE_SET_ID);
+ }
+ }
+ /**
+ * Gets Choice Set Array of one or more elements
+ *
+ * @return List<Choice> -a List<Choice> representing the array of one or
+ * more elements
+ */
+ @SuppressWarnings("unchecked")
+ public List<Choice> getChoiceSet() {
+ if (parameters.get(KEY_CHOICE_SET) instanceof List<?>) {
+ List<?> list = (List<?>)parameters.get(KEY_CHOICE_SET);
+ if (list != null && list.size() > 0) {
+ Object obj = list.get(0);
+ if (obj instanceof Choice) {
+ return (List<Choice>) list;
+ } else if (obj instanceof Hashtable) {
+ List<Choice> newList = new ArrayList<Choice>();
+ for (Object hashObj : list) {
+ newList.add(new Choice((Hashtable<String, Object>)hashObj));
+ }
+ return newList;
+ }
+ }
+ }
+ return null;
+ }
+ /**
+ * Sets a Choice Set that is an Array of one or more elements
+ *
+ * @param choiceSet
+ * a List<Choice> representing the array of one or more
+ * elements
+ *
+ * <b>Notes: </b>Min Value: 1; Max Value: 100
+ */
+ public void setChoiceSet( List<Choice> choiceSet ) {
+ if (choiceSet != null) {
+ parameters.put(KEY_CHOICE_SET, choiceSet );
+ } else {
+ parameters.remove(KEY_CHOICE_SET);
+ }
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/CreateInteractionChoiceSetResponse.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/CreateInteractionChoiceSetResponse.java
new file mode 100644
index 000000000..36adc2857
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/CreateInteractionChoiceSetResponse.java
@@ -0,0 +1,25 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCResponse;
+
+/**
+ * Create Interaction ChoiceSet Response is sent, when CreateInteractionChoiceSet
+ * has been called
+ *
+ * @since SmartDeviceLink 1.0
+ */
+public class CreateInteractionChoiceSetResponse extends RPCResponse {
+ /**
+ * Constructs a new CreateInteractionChoiceSetResponse object
+ */
+
+ public CreateInteractionChoiceSetResponse() {
+ super(FunctionID.CREATE_INTERACTION_CHOICE_SET.toString());
+ }
+ public CreateInteractionChoiceSetResponse(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+} \ No newline at end of file
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/DIDResult.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/DIDResult.java
new file mode 100644
index 000000000..84afe2a70
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/DIDResult.java
@@ -0,0 +1,97 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+
+import com.smartdevicelink.proxy.RPCStruct;
+import com.smartdevicelink.proxy.rpc.enums.VehicleDataResultCode;
+/** Individual requested DID result and data.
+ *
+ * <p><b>Parameter List</b></p>
+ * <table border="1" rules="all">
+ * <tr>
+ * <th>Param Name</th>
+ * <th>Type</th>
+ * <th>Mandatory</th>
+ * <th> Additional</th>
+ * <th>Description</th>
+ * </tr>
+ * <tr>
+ * <td>resultCode</td>
+ * <td>VehicleDataResultCode</td>
+ * <td>true</td>
+ * <td></td>
+ * <td>Individual DID result code </td>
+ * </tr>
+ * <tr>
+ * <td>didLocation</td>
+ * <td>Integer</td>
+ * <td>true</td>
+ * <td>minvalue = 0 maxvalue = 65535 </td>
+ * <td>The address of DID location from the ReadDID request.</td>
+ * </tr>
+ *
+ * <tr>
+ * <td>data</td>
+ * <td>String</td>
+ * <td>false</td>
+ * <td>maxlength = 5000 </td>
+ * <td>The DID data which is the hex byte string of however many bytes are stored at that location</td>
+ * </tr>
+ * </table>
+ * @since SmartDeviceLink 1.0
+ *
+ * @see VehicleDataResultCode
+ * @see ReadDID
+ */
+
+public class DIDResult extends RPCStruct {
+ public static final String KEY_RESULT_CODE = "resultCode";
+ public static final String KEY_DATA = "data";
+ public static final String KEY_DID_LOCATION = "didLocation";
+ /** <p>Constructs a new DIDResult object indicated by the Hashtable
+ * parameter</p>
+ * @param hash
+ * The hash table to use
+ */
+
+ public DIDResult() {}
+ public DIDResult(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+ public void setResultCode(VehicleDataResultCode resultCode) {
+ if (resultCode != null) {
+ store.put(KEY_RESULT_CODE, resultCode);
+ } else {
+ store.remove(KEY_RESULT_CODE);
+ }
+ }
+ public VehicleDataResultCode getResultCode() {
+ Object obj = store.get(KEY_RESULT_CODE);
+ if (obj instanceof VehicleDataResultCode) {
+ return (VehicleDataResultCode) obj;
+ } else if (obj instanceof String) {
+ return VehicleDataResultCode.valueForString((String) obj);
+ }
+ return null;
+ }
+ public void setDidLocation(Integer didLocation) {
+ if (didLocation != null) {
+ store.put(KEY_DID_LOCATION, didLocation);
+ } else {
+ store.remove(KEY_DID_LOCATION);
+ }
+ }
+ public Integer getDidLocation() {
+ return (Integer) store.get(KEY_DID_LOCATION);
+ }
+ public void setData(String data) {
+ if (data != null) {
+ store.put(KEY_DATA, data);
+ } else {
+ store.remove(KEY_DATA);
+ }
+ }
+ public String getData() {
+ return (String) store.get(KEY_DATA);
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/DTC.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/DTC.java
new file mode 100644
index 000000000..e8ff471d8
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/DTC.java
@@ -0,0 +1,85 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+
+import com.smartdevicelink.proxy.RPCStruct;
+
+/**
+ * String containing hexadecimal identifier as well as other common names.
+ * <p><b>Parameter List</b></p>
+ * <table border="1" rules="all">
+ * <tr>
+ * <th>Name</th>
+ * <th>Type</th>
+ * <th>Description</th>
+ * <th>SmartDeviceLink Ver. Available</th>
+ * </tr>
+ * <tr>
+ * <td>statusByte</td>
+ * <td>String</td>
+ * <td>Hexadecimal byte string
+ * <ul>
+ * <li>Maxlength = 500</li>
+ * </ul>
+ * </td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * </table>
+ * @since SmartDeviceLink 2.0
+ */
+public class DTC extends RPCStruct {
+ public static final String KEY_IDENTIFIER = "identifier";
+ public static final String KEY_STATUS_BYTE = "statusByte";
+ /**
+ * Constructs a newly allocated DTC object
+ */
+ public DTC() { }
+
+ /**
+ * Constructs a newly allocated DTC object indicated by the Hashtable parameter
+ * @param hash The Hashtable to use
+ */
+ public DTC(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+
+ /**
+ * set identifier
+ * @param identifier
+ */
+ public void setIdentifier(String identifier) {
+ if (identifier != null) {
+ store.put(KEY_IDENTIFIER, identifier);
+ } else {
+ store.remove(KEY_IDENTIFIER);
+ }
+ }
+
+ /**
+ * get identifier
+ * @return identifier
+ */
+ public String getIdentifier() {
+ return (String) store.get(KEY_IDENTIFIER);
+ }
+
+ /**
+ * set Hexadecimal byte string
+ * @param statusByte Hexadecimal byte string
+ */
+ public void setStatusByte(String statusByte) {
+ if (statusByte != null) {
+ store.put(KEY_STATUS_BYTE, statusByte);
+ } else {
+ store.remove(KEY_STATUS_BYTE);
+ }
+ }
+
+ /**
+ * get Hexadecimal byte string
+ * @return Hexadecimal byte string
+ */
+ public String getStatusByte() {
+ return (String) store.get(KEY_STATUS_BYTE);
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/DateTime.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/DateTime.java
new file mode 100644
index 000000000..aeb302ffb
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/DateTime.java
@@ -0,0 +1,251 @@
+package com.smartdevicelink.proxy.rpc;
+
+import com.smartdevicelink.proxy.RPCStruct;
+
+import java.util.Hashtable;
+
+public class DateTime extends RPCStruct{
+ public static final String KEY_MILLISECOND = "millisecond";
+ public static final String KEY_SECOND = "second";
+ public static final String KEY_MINUTE = "minute";
+ public static final String KEY_HOUR = "hour";
+ public static final String KEY_DAY = "day";
+ public static final String KEY_MONTH = "month";
+ public static final String KEY_YEAR = "year";
+ public static final String KEY_TZ_HOUR = "tz_hour";
+ public static final String KEY_TZ_MINUTE = "tz_minute";
+
+ public DateTime() {
+ }
+
+ public DateTime(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+
+
+ /**
+ * Gets the Milliseconds portion of the DateTime class
+ *
+ * @return Integer - Milliseconds associated with this DateTime class
+ *
+ */
+ public Integer getMilliSecond() {
+ return (Integer) store.get(KEY_MILLISECOND);
+ }
+
+ /**
+ * Sets the Milliseconds portion of the DateTime class
+ *
+ * @param milliSecond
+ * The milliseconds associated with this DateTime class
+ *
+ */
+ public void setMilliSecond(Integer milliSecond) {
+ if (milliSecond != null) {
+ store.put(KEY_MILLISECOND, milliSecond);
+ } else {
+ store.remove(KEY_MILLISECOND);
+ }
+ }
+
+
+ /**
+ * Gets the Seconds portion of the DateTime class
+ *
+ * @return Integer - Seconds associated with this DateTime class
+ *
+ */
+ public Integer getSecond() {
+ return (Integer) store.get(KEY_SECOND);
+ }
+
+ /**
+ * Sets the Seconds portion of the DateTime class
+ *
+ * @param second
+ * The Seconds associated with this DateTime class
+ *
+ */
+ public void setSecond(Integer second) {
+ if (second != null) {
+ store.put(KEY_SECOND, second);
+ } else {
+ store.remove(KEY_SECOND);
+ }
+ }
+
+
+ /**
+ * Gets the Minutes portion of the DateTime class
+ *
+ * @return Integer - Minutes associated with this DateTime class
+ *
+ */
+ public Integer getMinute() {
+ return (Integer) store.get(KEY_MINUTE);
+ }
+
+ /**
+ * Sets the Minutes portion of the DateTime class
+ *
+ * @param minute
+ * The Minutes associated with this DateTime class
+ *
+ */
+ public void setMinute(Integer minute) {
+ if (minute != null) {
+ store.put(KEY_MINUTE, minute);
+ } else {
+ store.remove(KEY_MINUTE);
+ }
+ }
+
+ /**
+ * Gets the Hours portion of the DateTime class.
+ *
+ * @return Integer - Hours associated with this DateTime class.
+ *
+ */
+ public Integer getHour() {
+ return (Integer) store.get(KEY_HOUR);
+ }
+
+ /**
+ * Sets the Hours portion of the DateTime class.
+ *
+ * @param hour
+ * The Hours associated with this DateTime class. This structure is used to store hours in a 24 hour format.
+ *
+ */
+ public void setHour(Integer hour) {
+ if (hour != null) {
+ store.put(KEY_HOUR, hour);
+ } else {
+ store.remove(KEY_HOUR);
+ }
+ }
+
+ /**
+ * Gets the Day portion of the DateTime class.
+ *
+ * @return Integer - Day of the month associated with this DateTime class
+ *
+ */
+ public Integer getDay() {
+ return (Integer) store.get(KEY_DAY);
+ }
+
+ /**
+ * Sets the Day portion of the DateTime class
+ *
+ * @param day
+ * The Day of the month associated with this DateTime class
+ *
+ */
+ public void setDay(Integer day) {
+ if (day != null) {
+ store.put(KEY_DAY, day);
+ } else {
+ store.remove(KEY_DAY);
+ }
+ }
+
+ /**
+ * Gets the Month portion of the DateTime class.
+ *
+ * @return Integer - Month of the year associated with this DateTime class
+ *
+ */
+ public Integer getMonth() {
+ return (Integer) store.get(KEY_MONTH);
+ }
+
+ /**
+ * Sets the Month portion of the DateTime class
+ *
+ * @param month
+ * The Month of the year associate with this DateTime class
+ *
+ */
+ public void setMonth(Integer month) {
+ if (month != null) {
+ store.put(KEY_MONTH, month);
+ } else {
+ store.remove(KEY_MONTH);
+ }
+ }
+
+ /**
+ * Gets the Year portion of the DateTime class.
+ *
+ * @return Integer - The year in YYYY format associated with this DateTime class
+ *
+ */
+ public Integer getYear() {
+ return (Integer) store.get(KEY_YEAR);
+ }
+
+ /**
+ * Sets the Year portion of the DateTime class
+ *
+ * @param year
+ * The Year in YYYY format associated with this DateTime class
+ *
+ */
+ public void setYear(Integer year) {
+ if (year != null) {
+ store.put(KEY_YEAR, year);
+ } else {
+ store.remove(KEY_YEAR);
+ }
+ }
+
+ /**
+ * Gets the Time Zone Hours portion of the DateTime class.
+ *
+ * @return Integer - The time zone offset in Hours with regard to UTC time associated with this DateTime class
+ *
+ */
+ public Integer getTzHour() {
+ return (Integer) store.get(KEY_TZ_HOUR);
+ }
+
+ /**
+ * Sets the Time Zone Hours portion of the DateTime class
+ *
+ * @param tzHour
+ * The time zone offset in Hours with regard to UTC time associated with this DateTime class
+ *
+ */
+ public void setTzHour(Integer tzHour) {
+ if (tzHour != null) {
+ store.put(KEY_TZ_HOUR, tzHour);
+ } else {
+ store.remove(KEY_TZ_HOUR);
+ }
+ }
+
+ /**
+ * Gets the Time Zone Minutes portion of the DateTime class.
+ *
+ * @return Integer - The time zone offset in minutes with regard to UTC associated with this DateTime class
+ *
+ */
+ public Integer getTzMinute() {
+ return (Integer) store.get(KEY_TZ_MINUTE);
+ }
+
+ /**
+ * Sets the Time Zone Minutes portion of the DateTime class
+ *
+ * @param tzMinute
+ * The time zone offset in Minutes with regard to UTC associated with this DateTime class
+ */
+ public void setTzMinute(Integer tzMinute) {
+ if (tzMinute != null) {
+ store.put(KEY_TZ_MINUTE, tzMinute);
+ } else {
+ store.remove(KEY_TZ_MINUTE);
+ }
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/DeleteCommand.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/DeleteCommand.java
new file mode 100644
index 000000000..635f85814
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/DeleteCommand.java
@@ -0,0 +1,100 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCRequest;
+
+/**
+ * Removes a command from the Command Menu.
+ *
+ * <p><b>HMI Status Requirements:</b></p>
+ * <p>HMILevel: FULL, LIMITED or BACKGROUND</p>
+ * AudioStreamingState: N/A
+ * <p>SystemContext: Should not be attempted when VRSESSION or MENU</p>
+ *
+ * <p><b>Parameter List</b></p>
+ * <table border="1" rules="all">
+ * <tr>
+ * <th>Name</th>
+ * <th>Type</th>
+ * <th>Description</th>
+ * <th>Reg.</th>
+ * <th>Notes</th>
+ * <th>Version</th>
+ * </tr>
+ * <tr>
+ * <td>cmdID</td>
+ * <td>Integer</td>
+ * <td>Unique ID that identifies the Command to be deleted from Command Menu</td>
+ * <td>Y</td>
+ * <td>Min Value: 0;Max Value: 2000000000</td>
+ * <td>SmartDeviceLink 1.0</td>
+ * </tr>
+ * </table>
+ *
+ *<p><b> Response:</b></p>
+ *
+ * Indicates that the corresponding request either failed or succeeded. If the response returns with a SUCCESS result code,this means a command was removed from the Command Menu successfully.
+ *
+ *<p><b> Non-default Result Codes:</b></p>
+ * <p>SUCCESS</p>
+ * <p>INVALID_DATA</p>
+ * <p>OUT_OF_MEMORY</p>
+ * <p>TOO_MANY_PENDING_REQUESTS</p>
+ * <p>APPLICATION_NOT_REGISTERED</p>
+ * <p> GENERIC_ERROR</p>
+ * <p>REJECTED</p>
+ * <p> INVALID_ID</p>
+ * <p> IN_USER</p>
+ * @since SmartDeviceLink 1.0
+ * @see AddCommand
+ * @see AddSubMenu
+ * @see DeleteSubMenu
+ */
+public class DeleteCommand extends RPCRequest {
+ public static final String KEY_CMD_ID = "cmdID";
+
+ /**
+ * Constructs a new DeleteCommand object
+ */
+ public DeleteCommand() {
+ super(FunctionID.DELETE_COMMAND.toString());
+ }
+ /**
+ * Constructs a new DeleteCommand object indicated by the Hashtable
+ * parameter
+ *
+ *
+ * @param hash
+ * The Hashtable to use
+ */
+ public DeleteCommand(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+ /**
+ * Gets the Command ID that identifies the Command to be deleted from
+ * Command Menu
+ *
+ * @return Integer - Integer value representing Command ID that identifies
+ * the Command to be deleted from Command Menu
+ */
+ public Integer getCmdID() {
+ return (Integer) parameters.get( KEY_CMD_ID );
+ }
+ /**
+ * Sets the Command ID that identifies the Command to be deleted from Command Menu
+ *
+ * @param cmdID
+ * an Integer value representing Command ID
+ *
+ * <p><b>Notes: </b>Min Value: 0; Max Value: 2000000000</p>
+ */
+ public void setCmdID( Integer cmdID ) {
+ if (cmdID != null) {
+ parameters.put(KEY_CMD_ID, cmdID );
+ } else {
+ parameters.remove(KEY_CMD_ID);
+ }
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/DeleteCommandResponse.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/DeleteCommandResponse.java
new file mode 100644
index 000000000..ad905b1e0
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/DeleteCommandResponse.java
@@ -0,0 +1,24 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCResponse;
+
+/**
+ * Delete Command Response is sent, when DeleteCommand has been called.
+ *
+ * @since SmartDeviceLink 1.0
+ */
+public class DeleteCommandResponse extends RPCResponse {
+ /** Constructs a new DeleteCommandResponse object
+ *
+ */
+
+ public DeleteCommandResponse() {
+ super(FunctionID.DELETE_COMMAND.toString());
+ }
+ public DeleteCommandResponse(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+} \ No newline at end of file
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/DeleteFile.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/DeleteFile.java
new file mode 100644
index 000000000..4d35c6fd3
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/DeleteFile.java
@@ -0,0 +1,89 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCRequest;
+
+/**
+ * Used to delete a file resident on the SDL module in the app's local cache.
+ * Not supported on first generation SDL vehicles
+ *
+ * <p><b>Parameter List</b></p>
+ * <table border="1" rules="all">
+ * <tr>
+ * <th>Name</th>
+ * <th>Type</th>
+ * <th>Description</th>
+ * <th>Reg.</th>
+ * <th>Notes</th>
+ * <th>SmartDeviceLink 2.0</th>
+ * </tr>
+ * <tr>
+ * <td>SDLFileName</td>
+ * <td>String</td>
+ * <td> File reference name.</td>
+ * <td>Y</td>
+ * <td>maxlength:500</td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * </table>
+ *
+ * <p><b>Response </b></p>
+ *
+ * <p><b>Non-default Result Codes:</b></p>
+ * <p> SUCCESS</p>
+ * <p> INVALID_DATA</p>
+ * <p> OUT_OF_MEMORY</p>
+ * <p> TOO_MANY_PENDING_REQUESTS</p>
+ * <p> APPLICATION_NOT_REGISTERED</p>
+ * <p>GENERIC_ERROR</p>
+ * <p>REJECTED</p>
+ * @since SmartDeviceLink 2.0
+ * @see PutFile
+ * @see ListFiles
+ */
+public class DeleteFile extends RPCRequest {
+ public static final String KEY_SDL_FILE_NAME = "syncFileName";
+
+ /**
+ * Constructs a new DeleteFile object
+ */
+ public DeleteFile() {
+ super(FunctionID.DELETE_FILE.toString());
+ }
+
+ /**
+ * <p>Constructs a new DeleteFile object indicated by the Hashtable parameter</p>
+ *
+ *
+ * @param hash
+ * The Hashtable to use
+ */
+ public DeleteFile(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+
+ /**
+ * Sets a file reference name
+ *
+ * @param sdlFileName
+ * a String value representing a file reference name
+ */
+ public void setSdlFileName(String sdlFileName) {
+ if (sdlFileName != null) {
+ parameters.put(KEY_SDL_FILE_NAME, sdlFileName);
+ } else {
+ parameters.remove(KEY_SDL_FILE_NAME);
+ }
+ }
+
+ /**
+ * Gets a file reference name
+ *
+ * @return String -a String value representing a file reference name
+ */
+ public String getSdlFileName() {
+ return (String) parameters.get(KEY_SDL_FILE_NAME);
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/DeleteFileResponse.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/DeleteFileResponse.java
new file mode 100644
index 000000000..9916b95dc
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/DeleteFileResponse.java
@@ -0,0 +1,35 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCResponse;
+
+/**
+ * Delete File Response is sent, when DeleteFile has been called
+ *
+ * @since SmartDeviceLink 2.0
+ */
+public class DeleteFileResponse extends RPCResponse {
+ public static final String KEY_SPACE_AVAILABLE = "spaceAvailable";
+ /** Constructs a new DeleteFileResponse object
+ *
+ */
+
+ public DeleteFileResponse() {
+ super(FunctionID.DELETE_FILE.toString());
+ }
+ public DeleteFileResponse(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+ public void setSpaceAvailable(Integer spaceAvailable) {
+ if (spaceAvailable != null) {
+ parameters.put(KEY_SPACE_AVAILABLE, spaceAvailable);
+ } else {
+ parameters.remove(KEY_SPACE_AVAILABLE);
+ }
+ }
+ public Integer getSpaceAvailable() {
+ return (Integer) parameters.get(KEY_SPACE_AVAILABLE);
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/DeleteInteractionChoiceSet.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/DeleteInteractionChoiceSet.java
new file mode 100644
index 000000000..87f8cdbc3
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/DeleteInteractionChoiceSet.java
@@ -0,0 +1,100 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCRequest;
+
+/**
+ * Deletes an existing Choice Set identified by the parameter
+ * interactionChoiceSetID. If the specified interactionChoiceSetID is currently
+ * in use by an active <i> {@linkplain PerformInteraction}</i> this call to
+ * delete the Choice Set will fail returning an IN_USE resultCode
+ *
+ * <p>Function Group: Base</p>
+ *
+ * <p><b>HMILevel needs to be FULL, LIMITED or BACKGROUD</b></p>
+ *
+ * <p>AudioStreamingState: Any</p>
+ *
+ * <p>SystemContext: MAIN, MENU, VR </p>
+ *
+ * <p><b>Parameter List</b></p>
+ *
+ * <table border="1" rules="all">
+ * <tr>
+ * <th>Name</th>
+ * <th>Type</th>
+ * <th>Description</th>
+ * <th>Reg.</th>
+ * <th>Notes</th>
+ * <th>Version</th>
+ * </tr>
+ * <tr>
+ * <td>interactionChoiceSetID</td>
+ * <td>Integer</td>
+ * <td> A unique ID that identifies the Choice Set (specified in a previous call to CreateInteractionChoiceSet)</td>
+ * <td>Y</td>
+ * <td>Min Value: 0 ; Max Value: 2000000000</td>
+ * <td>SmartDeviceLink 1.0</td>
+ * </tr>
+ * </table>
+ *
+ * <p><b>Response </b></p>
+ *
+ * If a resultCode of "SUCCESS" is returned, the requested choice set has been created and can now be referenced by the application using the value of interactionChoiceSetID provided by the application.
+ *
+ * <p><b>Non-default Result Codes:</b></p>
+ * <p>SUCCESS</p>
+ * <p>INVALID_DATA</p>
+ * <p>OUT_OF_MEMORY</p>
+ * <p>TOO_MANY_PENDING_REQUESTS</p>
+ * <p>APPLICATION_NOT_REGISTERED</p>
+ * <p>GENERIC_ERROR</p>
+ * <p>REJECTED</p>
+ * <p>INVALID_ID</p>
+
+ * @since SmartDeviceLink 1.0
+ * @see CreateInteractionChoiceSet
+ * @see PerformInteraction
+ */
+public class DeleteInteractionChoiceSet extends RPCRequest {
+ public static final String KEY_INTERACTION_CHOICE_SET_ID = "interactionChoiceSetID";
+
+ /**
+ * Constructs a new DeleteInteractionChoiceSet object
+ */
+ public DeleteInteractionChoiceSet() {
+ super(FunctionID.DELETE_INTERACTION_CHOICE_SET.toString());
+ }
+ /**
+ * <p>Constructs a new DeleteInteractionChoiceSet object indicated by the
+ * Hashtable parameter</p>
+ *
+ *
+ * @param hash
+ * The Hashtable to use
+ */
+ public DeleteInteractionChoiceSet(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+ /**
+ * Gets a unique ID that identifies the Choice Set
+ * @return Integer -an Integer value representing the unique Choice Set ID
+ */
+ public Integer getInteractionChoiceSetID() {
+ return (Integer) parameters.get( KEY_INTERACTION_CHOICE_SET_ID );
+ }
+ /**
+ * Sets a unique ID that identifies the Choice Set
+ * @param interactionChoiceSetID a unique ID that identifies the Choice Set
+ * <p><b>Notes: </b>Min Value: 0; Max Value: 2000000000 </p>
+ */
+ public void setInteractionChoiceSetID( Integer interactionChoiceSetID ) {
+ if (interactionChoiceSetID != null) {
+ parameters.put(KEY_INTERACTION_CHOICE_SET_ID, interactionChoiceSetID );
+ } else {
+ parameters.remove(KEY_INTERACTION_CHOICE_SET_ID);
+ }
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/DeleteInteractionChoiceSetResponse.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/DeleteInteractionChoiceSetResponse.java
new file mode 100644
index 000000000..5f29ed567
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/DeleteInteractionChoiceSetResponse.java
@@ -0,0 +1,21 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCResponse;
+
+/**
+ * Delete Interaction ChoiceSet Response is sent, when DeleteInteractionChoiceSet has been called
+ *
+ * @since SmartDeviceLink 1.0
+ */
+public class DeleteInteractionChoiceSetResponse extends RPCResponse {
+
+ public DeleteInteractionChoiceSetResponse() {
+ super(FunctionID.DELETE_INTERACTION_CHOICE_SET.toString());
+ }
+ public DeleteInteractionChoiceSetResponse(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+} \ No newline at end of file
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/DeleteSubMenu.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/DeleteSubMenu.java
new file mode 100644
index 000000000..aac605f51
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/DeleteSubMenu.java
@@ -0,0 +1,90 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCRequest;
+
+/**
+ * Deletes a submenu from the Command Menu.
+ *
+ * <p><b>Notes: </b>When an app deletes a submenu that has child commands, those
+ * child commands are also deleted</p>
+ *
+ * <p><b>HMILevel needs to be FULL, LIMITED or BACKGROUND</b></p>
+ *
+ *
+ * <p><b>Parameter List</b></p>
+ * <table border="1" rules="all">
+ * <tr>
+ * <th>Name</th>
+ * <th>Type</th>
+ * <th>Description</th>
+ * <th>Reg.</th>
+ * <th>Notes</th>
+ * <th>Version</th>
+ * </tr>
+ * <tr>
+ * <td>menuID</td>
+ * <td>Integer</td>
+ * <td>Unique ID that identifies the SubMenu to be delete</td>
+ * <td>Y</td>
+ * <td>Min Value: 0; Max Value: 2000000000</td>
+ * <td>SmartDeviceLink 1.0</td>
+ * </tr>
+ * </table>
+ *
+ *<p> <b>Response </b></p>
+ *
+ * <p><b>Non-default Result Codes:</b></p>
+ *<p>SUCCESS</p>
+ *<p> INVALID_DATA</p>
+ * <p> OUT_OF_MEMORY</p>
+ * <p> TOO_MANY_PENDING_REQUESTS</p>
+ * <p> APPLICATION_NOT_REGISTERED</p>
+ * <p> GENERIC_ERROR</p>
+ * <p> REJECTED</p>
+ * <p> INVALID_ID</p>
+ * <p> IN_USE </p>
+ *
+ * @since SmartDeviceLink 1.0
+ * @see AddCommand
+ * @see AddSubMenu
+ * @see DeleteCommand
+ */
+public class DeleteSubMenu extends RPCRequest {
+ public static final String KEY_MENU_ID = "menuID";
+ /**
+ * Constructs a new DeleteSubMenu object
+ */
+ public DeleteSubMenu() {
+ super(FunctionID.DELETE_SUB_MENU.toString());
+ }
+ /**
+ * Constructs a new DeleteSubMenu object indicated by the Hashtable parameter
+ * @param hash The Hashtable to use
+ */
+ public DeleteSubMenu(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+ /**
+ * Gets the Menu ID that identifies the SubMenu to be delete
+ * @return Integer -an Integer value representing menuID that identifies the SubMenu to be delete
+ */
+ public Integer getMenuID() {
+ return (Integer) parameters.get( KEY_MENU_ID );
+ }
+ /**
+ * Sets the MenuID that identifies the SubMenu to be delete
+ * @param menuID an Integer value representing menuID that identifies the SubMenu to be delete
+ *
+ * <p><b>Notes: </b>Min Value: 0; Max Value: 2000000000</p>
+ */
+ public void setMenuID( Integer menuID ) {
+ if (menuID != null) {
+ parameters.put(KEY_MENU_ID, menuID );
+ } else {
+ parameters.remove(KEY_MENU_ID);
+ }
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/DeleteSubMenuResponse.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/DeleteSubMenuResponse.java
new file mode 100644
index 000000000..3e2c36dd4
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/DeleteSubMenuResponse.java
@@ -0,0 +1,24 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCResponse;
+
+/**
+ * Delete SubMenu Response is sent, when DeleteSubMenu has been called
+ *
+ * @since SmartDeviceLink 1.0
+ */
+public class DeleteSubMenuResponse extends RPCResponse {
+ /**
+ * Constructs a new DeleteSubMenuResponse object
+ */
+
+ public DeleteSubMenuResponse() {
+ super(FunctionID.DELETE_SUB_MENU.toString());
+ }
+ public DeleteSubMenuResponse(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+} \ No newline at end of file
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/DeviceInfo.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/DeviceInfo.java
new file mode 100644
index 000000000..b7d8ea5cf
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/DeviceInfo.java
@@ -0,0 +1,170 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+
+import com.smartdevicelink.proxy.RPCStruct;
+/**
+ * Various information about connecting device.
+ *
+ *
+ *
+ * <p><b>Parameter List</b></p>
+ *
+ * <table border="1" rules="all">
+ * <tr>
+ * <th>Name</th>
+ * <th>Type</th>
+ * <th>Description</th>
+ * <th>Reg.</th>
+ * <th>Notes</th>
+ * <th>Version</th>
+ * </tr>
+ * <tr>
+ * <td>hardware</td>
+ * <td>String</td>
+ * <td>Device model</td>
+ * <td>N</td>
+ * <td>Max Length: 500</td>
+ * <td>SmartDeviceLink 3.0 </td>
+ * </tr>
+ * <tr>
+ * <td>firmwareRev</td>
+ * <td>String</td>
+ * <td>Device firmware revision</td>
+ * <td>N</td>
+ * <td>Max Length: 500</td>
+ * <td>SmartDeviceLink 3.0 </td>
+ * </tr>
+ * <tr>
+ * <td>os</td>
+ * <td>String</td>
+ * <td>Device OS version</td>
+ * <td>N</td>
+ * <td>Max Length: 500</td>
+ * <td>SmartDeviceLink 3.0 </td>
+ * </tr>
+ * <tr>
+ * <td>osVersion</td>
+ * <td>String</td>
+ * <td>Device OS version</td>
+ * <td>N</td>
+ * <td>Max Length: 500</td>
+ * <td>SmartDeviceLink 3.0 </td>
+ * </tr>
+ * <tr>
+ * <td>carrier</td>
+ * <td>String</td>
+ * <td>Device mobile carrier (if applicable)</td>
+ * <td>N</td>
+ * <td>Max Length: 500</td>
+ * <td>SmartDeviceLink 3.0 </td>
+ * </tr>
+ * <tr>
+ * <td>maxNumberRFCOMMPorts</td>
+ * <td>Integer</td>
+ * <td>Omitted if connected not via BT.</td>
+ * <td>N</td>
+ * <td>Min Value: 0; Max Value: 100</td>
+ * <td>SmartDeviceLink 3.0 </td>
+ * </tr>
+ * </table>
+ *
+ */
+public class DeviceInfo extends RPCStruct{
+ public static final String KEY_HARDWARE = "hardware";
+ public static final String KEY_FIRMWARE_REV = "firmwareRev";
+ public static final String KEY_OS = "os";
+ public static final String KEY_OS_VERSION = "osVersion";
+ public static final String KEY_CARRIER = "carrier";
+ public static final String KEY_MAX_NUMBER_RFCOMM_PORTS = "maxNumberRFCOMMPorts";
+ public static final String DEVICE_OS = "Android";
+
+ /** Constructs a new DeviceInfo object indicated by the Hashtable
+ * parameter
+ * @param hash
+ *
+ * The hash table to use
+ *
+ *
+ */
+
+ public DeviceInfo() { }
+
+ public DeviceInfo(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+
+ public void setHardware(String hardware) {
+ if (hardware != null) {
+ store.put(KEY_HARDWARE, hardware);
+ } else {
+ store.remove(KEY_HARDWARE);
+ }
+ }
+
+ public String getHardware() {
+ return (String) store.get(KEY_HARDWARE);
+ }
+
+ public void setFirmwareRev(String firmwareRev) {
+ if (firmwareRev != null) {
+ store.put(KEY_FIRMWARE_REV, firmwareRev);
+ } else {
+ store.remove(KEY_FIRMWARE_REV);
+ }
+ }
+
+ public String getFirmwareRev() {
+ return (String) store.get(KEY_FIRMWARE_REV);
+ }
+
+ public void setOs(String os) {
+ if (os != null) {
+ store.put(KEY_OS, os);
+ } else {
+ store.remove(KEY_OS);
+ }
+ }
+
+ public String getOs() {
+ return (String) store.get(KEY_OS);
+ }
+
+ public void setOsVersion(String osVersion) {
+ if (osVersion != null) {
+ store.put(KEY_OS_VERSION, osVersion);
+ } else {
+ store.remove(KEY_OS_VERSION);
+ }
+}
+
+public String getOsVersion() {
+ return (String) store.get(KEY_OS_VERSION);
+}
+
+public void setCarrier(String carrier) {
+ if (carrier != null) {
+ store.put(KEY_CARRIER, carrier);
+ } else {
+ store.remove(KEY_CARRIER);
+ }
+}
+
+public String getCarrier() {
+ return (String) store.get(KEY_CARRIER);
+}
+
+public Integer getMaxNumberRFCOMMPorts() {
+ return (Integer) store.get( KEY_MAX_NUMBER_RFCOMM_PORTS );
+}
+
+public void setMaxNumberRFCOMMPorts( Integer maxNumberRFCOMMPorts ) {
+ if (maxNumberRFCOMMPorts != null) {
+ store.put(KEY_MAX_NUMBER_RFCOMM_PORTS, maxNumberRFCOMMPorts );
+ }
+ else {
+ store.remove(KEY_MAX_NUMBER_RFCOMM_PORTS);
+ }
+}
+
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/DeviceStatus.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/DeviceStatus.java
new file mode 100644
index 000000000..51d5304b4
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/DeviceStatus.java
@@ -0,0 +1,352 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+
+import com.smartdevicelink.proxy.RPCStruct;
+import com.smartdevicelink.proxy.rpc.enums.DeviceLevelStatus;
+import com.smartdevicelink.proxy.rpc.enums.PrimaryAudioSource;
+
+/**
+ * Describes the status related to a connected mobile device or SDL and if or how it is represented in the vehicle.
+ * <p><b>Parameter List</b></p>
+ * <table border="1" rules="all">
+ * <tr>
+ * <th>Name</th>
+ * <th>Type</th>
+ * <th>Description</th>
+ * <th>SmartDeviceLink Ver. Available</th>
+ * </tr>
+ * <tr>
+ * <td>voiceRecOn</td>
+ * <td>Boolean</td>
+ * <td>Voice recognition is on
+ * </td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>btIconOn</td>
+ * <td>Boolean</td>
+ * <td>Bluetooth connection established
+ * </td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>callActive</td>
+ * <td>Boolean</td>
+ * <td>A call is being active
+ * </td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>phoneRoaming</td>
+ * <td>Boolean</td>
+ * <td>The phone is in roaming mode
+ * </td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>textMsgAvailable</td>
+ * <td>Boolean</td>
+ * <td>A textmessage is available
+ * </td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>battLevelStatus</td>
+ * <td>DeviceLevelStatus</td>
+ * <td>Battery level status
+ * </td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>stereoAudioOutputMuted</td>
+ * <td>Boolean</td>
+ * <td>Status of the stereo audio output channel
+ * </td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>monoAudioOutputMuted</td>
+ * <td>Boolean</td>
+ * <td>Status of the mono audio output channel
+ * </td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>signalLevelStatus</td>
+ * <td>DeviceLevelStatus</td>
+ * <td>Signal level status
+ * </td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>primaryAudioSource</td>
+ * <td>PrimaryAudioSource</td>
+ * <td>Reflects the current primary audio source of SDL (if selected).
+ * </td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>eCallEventActive</td>
+ * <td>Boolean</td>
+ * <td>Reflects, if an eCall event is active
+ * </td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * </table>
+ * @since SmartDeviceLink 2.0
+ *
+ * @see DeviceLevelStatus
+ * @see GetVehicleData
+ * @see OnVehicleData
+ *
+ */
+public class DeviceStatus extends RPCStruct {
+ public static final String KEY_VOICE_REC_ON = "voiceRecOn";
+ public static final String KEY_BT_ICON_ON = "btIconOn";
+ public static final String KEY_CALL_ACTIVE = "callActive";
+ public static final String KEY_PHONE_ROAMING = "phoneRoaming";
+ public static final String KEY_TEXT_MSG_AVAILABLE = "textMsgAvailable";
+ public static final String KEY_BATT_LEVEL_STATUS = "battLevelStatus";
+ public static final String KEY_STEREO_AUDIO_OUTPUT_MUTED = "stereoAudioOutputMuted";
+ public static final String KEY_MONO_AUDIO_OUTPUT_MUTED = "monoAudioOutputMuted";
+ public static final String KEY_SIGNAL_LEVEL_STATUS = "signalLevelStatus";
+ public static final String KEY_PRIMARY_AUDIO_SOURCE = "primaryAudioSource";
+ public static final String KEY_E_CALL_EVENT_ACTIVE = "eCallEventActive";
+
+ /**
+ * Constructs a newly allocated DeviceStatus object
+ */
+ public DeviceStatus() {}
+
+ /**
+ * Constructs a newly allocated DeviceStatus object indicated by the Hashtable parameter
+ * @param hash The Hashtable to use
+ */
+ public DeviceStatus(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+
+ /**
+ * set the voice recognition on or off
+ * @param voiceRecOn
+ */
+ public void setVoiceRecOn(Boolean voiceRecOn) {
+ if (voiceRecOn != null) {
+ store.put(KEY_VOICE_REC_ON, voiceRecOn);
+ } else {
+ store.remove(KEY_VOICE_REC_ON);
+ }
+ }
+
+ /**
+ * get whether the voice recognition is on
+ * @return whether the voice recognition is on
+ */
+ public Boolean getVoiceRecOn() {
+ return (Boolean) store.get(KEY_VOICE_REC_ON);
+ }
+
+ /**
+ * set the bluetooth connection established
+ * @param btIconOn the bluetooth connection established
+ */
+ public void setBtIconOn(Boolean btIconOn) {
+ if (btIconOn != null) {
+ store.put(KEY_BT_ICON_ON, btIconOn);
+ } else {
+ store.remove(KEY_BT_ICON_ON);
+ }
+ }
+
+ /**
+ * get the bluetooth connection established
+ * @return the bluetooth connection established
+ */
+ public Boolean getBtIconOn() {
+ return (Boolean) store.get(KEY_BT_ICON_ON);
+ }
+
+ /**
+ * set a call is being active
+ * @param callActive a call is being active
+ */
+ public void setCallActive(Boolean callActive) {
+ if (callActive != null) {
+ store.put(KEY_CALL_ACTIVE, callActive);
+ } else {
+ store.remove(KEY_CALL_ACTIVE);
+ }
+ }
+
+ /**
+ * get a call is being active
+ * @return a call is being active
+ */
+ public Boolean getCallActive() {
+ return (Boolean) store.get(KEY_CALL_ACTIVE);
+ }
+
+ /**
+ * set the phone is in roaming mode
+ * @param phoneRoaming the phone is in roaming mode
+ */
+ public void setPhoneRoaming(Boolean phoneRoaming) {
+ if (phoneRoaming != null) {
+ store.put(KEY_PHONE_ROAMING, phoneRoaming);
+ } else {
+ store.remove(KEY_PHONE_ROAMING);
+ }
+ }
+
+ /**
+ * get the phone is in roaming mode
+ * @return the phone is in roaming mode
+ */
+ public Boolean getPhoneRoaming() {
+ return (Boolean) store.get(KEY_PHONE_ROAMING);
+ }
+ public void setTextMsgAvailable(Boolean textMsgAvailable) {
+ if (textMsgAvailable != null) {
+ store.put(KEY_TEXT_MSG_AVAILABLE, textMsgAvailable);
+ } else {
+ store.remove(KEY_TEXT_MSG_AVAILABLE);
+ }
+ }
+
+ /**
+ * get a textmessage is available
+ * @return a textmessage is available
+ */
+ public Boolean getTextMsgAvailable() {
+ return (Boolean) store.get(KEY_TEXT_MSG_AVAILABLE);
+ }
+
+ /**
+ * set battery level status
+ * @param battLevelStatus battery level status
+ */
+ public void setBattLevelStatus(DeviceLevelStatus battLevelStatus) {
+ if (battLevelStatus != null) {
+ store.put(KEY_BATT_LEVEL_STATUS, battLevelStatus);
+ } else {
+ store.remove(KEY_BATT_LEVEL_STATUS);
+ }
+ }
+
+ /**
+ * get battery level status
+ * @return battery level status
+ */
+ public DeviceLevelStatus getBattLevelStatus() {
+ Object obj = store.get(KEY_BATT_LEVEL_STATUS);
+ if (obj instanceof DeviceLevelStatus) {
+ return (DeviceLevelStatus) obj;
+ } else if (obj instanceof String) {
+ return DeviceLevelStatus.valueForString((String) obj);
+ }
+ return null;
+ }
+
+ /**
+ * set the status of the stereo audio output channel
+ * @param stereoAudioOutputMuted the status of the stereo audio output channel
+ */
+ public void setStereoAudioOutputMuted(Boolean stereoAudioOutputMuted) {
+ if (stereoAudioOutputMuted != null) {
+ store.put(KEY_STEREO_AUDIO_OUTPUT_MUTED, stereoAudioOutputMuted);
+ } else {
+ store.remove(KEY_STEREO_AUDIO_OUTPUT_MUTED);
+ }
+ }
+
+ /**
+ * get the status of the stereo audio output channel
+ * @return the status of the stereo audio output channel
+ */
+ public Boolean getStereoAudioOutputMuted() {
+ return (Boolean) store.get(KEY_STEREO_AUDIO_OUTPUT_MUTED);
+ }
+
+ /**
+ * set the status of the mono audio output channel
+ * @param monoAudioOutputMuted the status of the mono audio output channel
+ */
+ public void setMonoAudioOutputMuted(Boolean monoAudioOutputMuted) {
+ if (monoAudioOutputMuted != null) {
+ store.put(KEY_MONO_AUDIO_OUTPUT_MUTED, monoAudioOutputMuted);
+ } else {
+ store.remove(KEY_MONO_AUDIO_OUTPUT_MUTED);
+ }
+ }
+
+ /**
+ * get the status of the mono audio output channel
+ * @return the status of the mono audio output channel
+ */
+ public Boolean getMonoAudioOutputMuted() {
+ return (Boolean) store.get(KEY_MONO_AUDIO_OUTPUT_MUTED);
+ }
+
+ /**
+ * set signal level status
+ * @param signalLevelStatus signal level status
+ */
+ public void setSignalLevelStatus(DeviceLevelStatus signalLevelStatus) {
+ if (signalLevelStatus != null) {
+ store.put(KEY_SIGNAL_LEVEL_STATUS, signalLevelStatus);
+ } else {
+ store.remove(KEY_SIGNAL_LEVEL_STATUS);
+ }
+ }
+
+ /**
+ * get signal level status
+ * @return signal level status
+ */
+ public DeviceLevelStatus getSignalLevelStatus() {
+ Object obj = store.get(KEY_SIGNAL_LEVEL_STATUS);
+ if (obj instanceof DeviceLevelStatus) {
+ return (DeviceLevelStatus) obj;
+ } else if (obj instanceof String) {
+ return DeviceLevelStatus.valueForString((String) obj);
+ }
+ return null;
+ }
+
+ /**
+ * set the current primary audio source of SDL (if selected).
+ * @param primaryAudioSource the current primary audio source of SDL (if selected).
+ */
+ public void setPrimaryAudioSource(PrimaryAudioSource primaryAudioSource) {
+ if (primaryAudioSource != null) {
+ store.put(KEY_PRIMARY_AUDIO_SOURCE, primaryAudioSource);
+ } else {
+ store.remove(KEY_PRIMARY_AUDIO_SOURCE);
+ }
+ }
+
+ /**
+ * get the current primary audio source of SDL (if selected).
+ * @return the current primary audio source of SDL (if selected).
+ */
+ public PrimaryAudioSource getPrimaryAudioSource() {
+ Object obj = store.get(KEY_PRIMARY_AUDIO_SOURCE);
+ if (obj instanceof PrimaryAudioSource) {
+ return (PrimaryAudioSource) obj;
+ } else if (obj instanceof String) {
+ return PrimaryAudioSource.valueForString((String) obj);
+ }
+ return null;
+ }
+ public void setECallEventActive(Boolean eCallEventActive) {
+ if (eCallEventActive != null) {
+ store.put(KEY_E_CALL_EVENT_ACTIVE, eCallEventActive);
+ } else {
+ store.remove(KEY_E_CALL_EVENT_ACTIVE);
+ }
+ }
+ public Boolean getECallEventActive() {
+ return (Boolean) store.get(KEY_E_CALL_EVENT_ACTIVE);
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/DiagnosticMessage.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/DiagnosticMessage.java
new file mode 100644
index 000000000..0a0d8f997
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/DiagnosticMessage.java
@@ -0,0 +1,134 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+import java.util.List;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCRequest;
+/** Non periodic vehicle diagnostic request.
+ *
+ * <p><b>Parameter List</b></p>
+ * <table border="1" rules="all">
+ * <tr>
+ * <th>Name</th>
+ * <th>Type</th>
+ * <th>Description</th>
+ * <th>Reg.</th>
+ * <th>Notes</th>
+ * <th>Version</th>
+ * </tr>
+ * <tr>
+ * <td>targetID</td>
+ * <td>Integer</td>
+ * <td>Name of target ECU.</td>
+ * <td>Y</td>
+ * <td>Min Value: 0; Max Value: 65535</td>
+ * <td>SmartDeviceLink 3.0 </td>
+ * </tr>
+ * <tr>
+ * <td>messageLength</td>
+ * <td>Integer</td>
+ * <td>Length of message (in bytes).</td>
+ * <td>Y</td>
+ * <td>Min Value: 0; Max Value:65535</td>
+ * <td>SmartDeviceLink 3.0 </td>
+ * </tr>
+ * <tr>
+ * <td>messageData</td>
+ * <td>Integer</td>
+ * <td>Array of bytes comprising CAN message.</td>
+ * <td>Y</td>
+ * <td>Min Value: 0; Max Value:255; Min Size:1; Max Size:65535</td>
+ * <td>SmartDeviceLink 3.0 </td>
+ * </tr>
+ * </table>
+ * <p><b>HMI must:</b> </p>
+ *
+ * <p>1. Check the requested data using provided information of targetID (name of ECU),messageLength and messageData.</p>
+ * <p> 2. Respond with one of the appropriate result codes.And in case of SUCCESS return messageDataResult which is an array of bytes comprising CAN message result.</p>
+ * @since SmartDeviceLink 3.0
+ *
+ */
+
+public class DiagnosticMessage extends RPCRequest {
+ public static final String KEY_TARGET_ID = "targetID";
+ public static final String KEY_MESSAGE_LENGTH = "messageLength";
+ public static final String KEY_MESSAGE_DATA = "messageData";
+ /**
+ * Constructs a new DiagnosticMessage object
+ */
+
+ public DiagnosticMessage() {
+ super(FunctionID.DIAGNOSTIC_MESSAGE.toString());
+ }
+ /**
+ * <p>
+ * Constructs a new DiagnosticMessage object indicated by the Hashtable
+ * parameter
+ * </p>
+ *
+ * @param hash
+ * The Hashtable to use
+ */
+
+ public DiagnosticMessage(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+ /** Sets TargetID
+ *
+ * @param targetID
+ */
+
+
+ public void setTargetID(Integer targetID) {
+ if (targetID != null) {
+ parameters.put(KEY_TARGET_ID, targetID);
+ } else {
+ parameters.remove(KEY_TARGET_ID);
+ }
+ }
+ /**
+ * <p>
+ * Returns an <i>Integer</i> object representing the Target ID that you want to add
+ * </p>
+ *
+ * @return Integer -an integer representation a Unique Target ID
+ */
+
+ public Integer getTargetID() {
+ return (Integer) parameters.get(KEY_TARGET_ID);
+ }
+
+ public void setMessageLength(Integer messageLength) {
+ if (messageLength != null) {
+ parameters.put(KEY_MESSAGE_LENGTH, messageLength);
+ } else {
+ parameters.remove(KEY_MESSAGE_LENGTH);
+ }
+ }
+ public Integer getMessageLength() {
+ return (Integer) parameters.get(KEY_MESSAGE_LENGTH);
+ }
+
+ @SuppressWarnings("unchecked")
+ public List<Integer> getMessageData() {
+ if(parameters.get(KEY_MESSAGE_DATA) instanceof List<?>){
+ List<?> list = (List<?>)parameters.get(KEY_MESSAGE_DATA);
+ if(list != null && list.size()>0){
+ Object obj = list.get(0);
+ if(obj instanceof Integer){
+ return (List<Integer>) list;
+ }
+ }
+ }
+ return null;
+ }
+
+ public void setMessageData(List<Integer> messageData) {
+ if (messageData != null) {
+ parameters.put(KEY_MESSAGE_DATA, messageData);
+ } else {
+ parameters.remove(KEY_MESSAGE_DATA);
+ }
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/DiagnosticMessageResponse.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/DiagnosticMessageResponse.java
new file mode 100644
index 000000000..8cb0bc8d4
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/DiagnosticMessageResponse.java
@@ -0,0 +1,46 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+import java.util.List;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCResponse;
+/**
+ * Diagnostic Message Response is sent, when DiagnosticMessage has been called.
+ *
+ * @since SmartDeviceLink 3.0
+ */
+public class DiagnosticMessageResponse extends RPCResponse {
+ public static final String KEY_MESSAGE_DATA_RESULT = "messageDataResult";
+ /**
+ * Constructs a new DiagnosticMessageResponse object
+ */
+
+ public DiagnosticMessageResponse() {
+ super(FunctionID.DIAGNOSTIC_MESSAGE.toString());
+ }
+ public DiagnosticMessageResponse(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+ @SuppressWarnings("unchecked")
+ public List<Integer> getMessageDataResult() {
+ if(parameters.get(KEY_MESSAGE_DATA_RESULT) instanceof List<?>){
+ List<?> list = (List<?>)parameters.get(KEY_MESSAGE_DATA_RESULT);
+ if(list != null && list.size()>0){
+ Object obj = list.get(0);
+ if(obj instanceof Integer){
+ return (List<Integer>) list;
+ }
+ }
+ }
+ return null;
+ }
+
+ public void setMessageDataResult(List<Integer> messageDataResult) {
+ if (messageDataResult != null) {
+ parameters.put(KEY_MESSAGE_DATA_RESULT, messageDataResult);
+ } else {
+ parameters.remove(KEY_MESSAGE_DATA_RESULT);
+ }
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/DialNumber.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/DialNumber.java
new file mode 100644
index 000000000..4651e1f20
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/DialNumber.java
@@ -0,0 +1,51 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCRequest;
+
+/**
+ * Dials a phone number and switches to phone application.
+ *
+ * @since SmartDeviceLink 4.0
+ */
+public class DialNumber extends RPCRequest {
+ public static final String KEY_NUMBER = "number";
+
+
+ public DialNumber(){
+ super(FunctionID.DIAL_NUMBER.toString());
+ }
+
+ public DialNumber(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+
+ /**
+ * Sets a number to dial
+ *
+ * @param number
+ * a phone number is a string, which can be up to 40 chars.
+ * <p>
+ * <b>Notes: </b>Maxlength=40</p>
+ * All characters shall be stripped from string except digits 0-9 and * # , ; +
+ */
+ public void setNumber(String number) {
+ if (number != null) {
+ number = number.replaceAll("[^0-9*#,;+]", ""); //This will sanitize the input
+ parameters.put(KEY_NUMBER, number);
+ } else {
+ parameters.remove(KEY_NUMBER);
+ }
+ }
+
+ /**
+ * Gets a number to dial
+ *
+ * @return String - a String value representing a number to dial
+ */
+ public String getNumber() {
+ return (String) parameters.get(KEY_NUMBER);
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/DialNumberResponse.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/DialNumberResponse.java
new file mode 100644
index 000000000..613755442
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/DialNumberResponse.java
@@ -0,0 +1,23 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCResponse;
+
+/**
+ * Dial Number Response is sent, when DialNumber has been called
+ *
+ * @since SmartDeviceLink 4.0
+ */
+public class DialNumberResponse extends RPCResponse {
+
+ public DialNumberResponse() {
+ super(FunctionID.DIAL_NUMBER.toString());
+ }
+
+ public DialNumberResponse(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/DisplayCapabilities.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/DisplayCapabilities.java
new file mode 100644
index 000000000..f0739e371
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/DisplayCapabilities.java
@@ -0,0 +1,290 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.ArrayList;
+import java.util.Hashtable;
+import java.util.List;
+
+import com.smartdevicelink.proxy.RPCStruct;
+import com.smartdevicelink.proxy.rpc.enums.DisplayType;
+import com.smartdevicelink.proxy.rpc.enums.MediaClockFormat;
+import com.smartdevicelink.util.DebugTool;
+/**
+ * Contains information about the display for the SDL system to which the application is currently connected.
+ * <p><b> Parameter List</b></p>
+ * <table border="1" rules="all">
+ * <tr>
+ * <th>Name</th>
+ * <th>Type</th>
+ * <th>Description</th>
+ * <th>SmartDeviceLink Ver. Available</th>
+ * </tr>
+ * <tr>
+ * <td>displayType</td>
+ * <td>DisplayType</td>
+ * <td>The type of display
+ * </td>
+ * <td>SmartDeviceLink 1.0</td>
+ * </tr>
+ * <tr>
+ * <td>textField</td>
+ * <td>TextField[]</td>
+ * <td>An array of TextField structures, each of which describes a field in the HMI which the application can write to using operations such as <i>{@linkplain Show}</i>, <i>{@linkplain SetMediaClockTimer}</i>, etc.
+ * This array of TextField structures identify all the text fields to which the application can write on the current display (identified by DisplayType ).
+ * </td>
+ * <td>SmartDeviceLink 1.0</td>
+ * </tr>
+ * <tr>
+ * <td>mediaClockFormats</td>
+ * <td>MediaClockFormat[]</td>
+ * <td>An array of MediaClockFormat elements, defining the valid string formats used in specifying the contents of the media clock field</td>
+ * <td>SmartDeviceLink 1.0</td>
+ * </tr>
+ * <tr>
+ * <td>graphicSupported</td>
+ * <td>Boolean</td>
+ * <td>The display's persistent screen supports referencing a static or dynamic image.</td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * </table>
+ * @since SmartDeviceLink 1.0
+ * @see DisplayType
+ * @see MediaClockFormat
+ * @see TextFieldName
+ * @see ImageType
+ *
+ */
+public class DisplayCapabilities extends RPCStruct {
+ public static final String KEY_DISPLAY_TYPE = "displayType";
+ public static final String KEY_MEDIA_CLOCK_FORMATS = "mediaClockFormats";
+ public static final String KEY_TEXT_FIELDS = "textFields";
+ public static final String KEY_IMAGE_FIELDS = "imageFields";
+ public static final String KEY_GRAPHIC_SUPPORTED = "graphicSupported";
+ public static final String KEY_SCREEN_PARAMS = "screenParams";
+ public static final String KEY_TEMPLATES_AVAILABLE = "templatesAvailable";
+ public static final String KEY_NUM_CUSTOM_PRESETS_AVAILABLE = "numCustomPresetsAvailable";
+ /**
+ * Constructs a newly allocated DisplayCapabilities object
+ */
+ public DisplayCapabilities() { }
+ /**
+ * Constructs a newly allocated DisplayCapabilities object indicated by the Hashtable parameter
+ * @param hash The Hashtable to use
+ */
+ public DisplayCapabilities(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+ /**
+ * Get the type of display
+ * @return the type of display
+ */
+ public DisplayType getDisplayType() {
+ Object obj = store.get(KEY_DISPLAY_TYPE);
+ if (obj instanceof DisplayType) {
+ return (DisplayType) obj;
+ } else if (obj instanceof String) {
+ return DisplayType.valueForString((String) obj);
+ }
+ return null;
+ }
+ /**
+ * Set the type of display
+ * @param displayType the display type
+ */
+ public void setDisplayType( DisplayType displayType ) {
+ if (displayType != null) {
+ store.put(KEY_DISPLAY_TYPE, displayType );
+ } else {
+ store.remove(KEY_DISPLAY_TYPE);
+ }
+ }
+ /**
+ *Get an array of TextField structures, each of which describes a field in the HMI which the application can write to using operations such as <i>{@linkplain Show}</i>, <i>{@linkplain SetMediaClockTimer}</i>, etc.
+ * This array of TextField structures identify all the text fields to which the application can write on the current display (identified by DisplayType ).
+ * @return the List of textFields
+ */
+ @SuppressWarnings("unchecked")
+ public List<TextField> getTextFields() {
+ if (store.get(KEY_TEXT_FIELDS) instanceof List<?>) {
+ List<?> list = (List<?>)store.get(KEY_TEXT_FIELDS);
+ if (list != null && list.size() > 0) {
+ Object obj = list.get(0);
+ if (obj instanceof TextField) {
+ return (List<TextField>) list;
+ } else if (obj instanceof Hashtable) {
+ List<TextField> newList = new ArrayList<TextField>();
+ for (Object hashObj : list) {
+ newList.add(new TextField((Hashtable<String, Object>)hashObj));
+ }
+ return newList;
+ }
+ }
+ }
+ return null;
+ }
+ /**
+ * Set an array of TextField structures, each of which describes a field in the HMI which the application can write to using operations such as <i>{@linkplain Show}</i>, <i>{@linkplain SetMediaClockTimer}</i>, etc.
+ * This array of TextField structures identify all the text fields to which the application can write on the current display (identified by DisplayType ).
+ * @param textFields the List of textFields
+ */
+ public void setTextFields( List<TextField> textFields ) {
+ if (textFields != null) {
+ store.put(KEY_TEXT_FIELDS, textFields );
+ } else {
+ store.remove(KEY_TEXT_FIELDS);
+ }
+ }
+
+
+
+ @SuppressWarnings("unchecked")
+ public List<ImageField> getImageFields() {
+ if (store.get(KEY_IMAGE_FIELDS) instanceof List<?>) {
+ List<?> list = (List<?>)store.get(KEY_IMAGE_FIELDS);
+ if (list != null && list.size() > 0) {
+ Object obj = list.get(0);
+ if (obj instanceof ImageField) {
+ return (List<ImageField>) list;
+ } else if (obj instanceof Hashtable) {
+ List<ImageField> newList = new ArrayList<ImageField>();
+ for (Object hashObj : list) {
+ newList.add(new ImageField((Hashtable<String, Object>)hashObj));
+ }
+ return newList;
+ }
+ }
+ }
+ return null;
+ }
+
+ public void setImageFields( List<ImageField> imageFields ) {
+ if (imageFields != null) {
+ store.put(KEY_IMAGE_FIELDS, imageFields );
+ }
+ else
+ {
+ store.remove(KEY_IMAGE_FIELDS);
+ }
+ }
+
+ public Integer getNumCustomPresetsAvailable() {
+ return (Integer) store.get(KEY_NUM_CUSTOM_PRESETS_AVAILABLE);
+ }
+
+ public void setNumCustomPresetsAvailable(Integer numCustomPresetsAvailable) {
+ if (numCustomPresetsAvailable != null) {
+ store.put(KEY_NUM_CUSTOM_PRESETS_AVAILABLE, numCustomPresetsAvailable);
+ }
+ else
+ {
+ store.remove(KEY_NUM_CUSTOM_PRESETS_AVAILABLE);
+ }
+ }
+
+ /**
+ * Get an array of MediaClockFormat elements, defining the valid string formats used in specifying the contents of the media clock field
+ * @return the Veotor of mediaClockFormat
+ */
+ @SuppressWarnings("unchecked")
+ public List<MediaClockFormat> getMediaClockFormats() {
+ if (store.get(KEY_MEDIA_CLOCK_FORMATS) instanceof List<?>) {
+ List<?> list = (List<?>)store.get(KEY_MEDIA_CLOCK_FORMATS);
+ if (list != null && list.size() > 0) {
+ Object obj = list.get(0);
+ if (obj instanceof MediaClockFormat) {
+ return (List<MediaClockFormat>) list;
+ } else if (obj instanceof String) {
+ List<MediaClockFormat> newList = new ArrayList<MediaClockFormat>();
+ for (Object hashObj : list) {
+ String strFormat = (String)hashObj;
+ MediaClockFormat toAdd = MediaClockFormat.valueForString(strFormat);
+ if (toAdd != null) {
+ newList.add(toAdd);
+ }
+ }
+ return newList;
+ }
+ }
+ }
+ return null;
+ }
+ /**
+ * Set an array of MediaClockFormat elements, defining the valid string formats used in specifying the contents of the media clock field
+ * @param mediaClockFormats the List of MediaClockFormat
+ */
+ public void setMediaClockFormats( List<MediaClockFormat> mediaClockFormats ) {
+ if (mediaClockFormats != null) {
+ store.put(KEY_MEDIA_CLOCK_FORMATS, mediaClockFormats );
+ } else {
+ store.remove(KEY_MEDIA_CLOCK_FORMATS);
+ }
+ }
+
+ /**
+ * set the display's persistent screen supports.
+ * @param graphicSupported
+ * @since SmartDeviceLink 2.0
+ */
+ public void setGraphicSupported(Boolean graphicSupported) {
+ if (graphicSupported != null) {
+ store.put(KEY_GRAPHIC_SUPPORTED, graphicSupported);
+ } else {
+ store.remove(KEY_GRAPHIC_SUPPORTED);
+ }
+ }
+
+ /**
+ * Get the display's persistent screen supports.
+ * @return Boolean get the value of graphicSupported
+ * @since SmartDeviceLink 2.0
+ */
+ public Boolean getGraphicSupported() {
+ return (Boolean) store.get(KEY_GRAPHIC_SUPPORTED);
+ }
+
+ @SuppressWarnings("unchecked")
+ public List<String> getTemplatesAvailable() {
+ if (store.get(KEY_TEMPLATES_AVAILABLE) instanceof List<?>) {
+ List<?> list = (List<?>)store.get( KEY_TEMPLATES_AVAILABLE);
+ if (list != null && list.size() > 0) {
+ Object obj = list.get(0);
+ if (obj instanceof String) {
+ return (List<String>) list;
+ }
+ }
+ }
+ return null;
+ }
+
+ public void setTemplatesAvailable(List<String> templatesAvailable) {
+ if (templatesAvailable != null) {
+ store.put(KEY_TEMPLATES_AVAILABLE, templatesAvailable);
+ }
+ else
+ {
+ store.remove(KEY_TEMPLATES_AVAILABLE);
+ }
+ }
+
+ public void setScreenParams(ScreenParams screenParams) {
+ if (screenParams != null) {
+ store.put(KEY_SCREEN_PARAMS, screenParams);
+ } else {
+ store.remove(KEY_SCREEN_PARAMS);
+ }
+ }
+
+ @SuppressWarnings("unchecked")
+ public ScreenParams getScreenParams() {
+ Object obj = store.get(KEY_SCREEN_PARAMS);
+ if (obj instanceof ScreenParams) {
+ return (ScreenParams) obj;
+ } else if (obj instanceof Hashtable) {
+ try {
+ return new ScreenParams((Hashtable<String, Object>) obj);
+ } catch (Exception e) {
+ DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_SCREEN_PARAMS, e);
+ }
+ }
+ return null;
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/ECallInfo.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/ECallInfo.java
new file mode 100644
index 000000000..88eb89e03
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/ECallInfo.java
@@ -0,0 +1,117 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+
+import com.smartdevicelink.proxy.RPCStruct;
+import com.smartdevicelink.proxy.rpc.enums.ECallConfirmationStatus;
+import com.smartdevicelink.proxy.rpc.enums.VehicleDataNotificationStatus;
+/** Emergency Call notification and confirmation data.
+ *
+ * <p><b>Parameter List</b></p>
+ * <table border="1" rules="all">
+ * <tr>
+ * <th>Param Name</th>
+ * <th>Type</th>
+ * <th>Description</th>
+ * <th> Req.</th>
+ * <th>Notes</th>
+ * <th>Version Available</th>
+ * </tr>
+ * <tr>
+ * <td>eCallNotificationStatus</td>
+ * <td>VehicleDataNotificationStatus</td>
+ * <td>References signal "eCallNotification_4A".</td>
+ * <td></td>
+ * <td></td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>auxECallNotificationStatus</td>
+ * <td>VehicleDataNotificationStatus</td>
+ * <td>References signal "eCallNotification". This is an alternative signal available on some carlines replacing the eCallNotificationStatus, but showing the same values.</td>
+ * <td></td>
+ * <td></td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>eCallConfirmationStatus</td>
+ * <td>ECallConfirmationStatus</td>
+ * <td>References signal "eCallConfirmation"</td>
+ * <td></td>
+ * <td></td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * </table>
+ * @since SmartDeviceLink 2.0
+ * @see SubscribeVehicleData
+ *
+ *
+ * @see TextFieldName
+ * @see Image
+ *
+ */
+
+public class ECallInfo extends RPCStruct {
+ public static final String KEY_E_CALL_NOTIFICATION_STATUS = "eCallNotificationStatus";
+ public static final String KEY_AUX_E_CALL_NOTIFICATION_STATUS = "auxECallNotificationStatus";
+ public static final String KEY_E_CALL_CONFIRMATION_STATUS = "eCallConfirmationStatus";
+ /** Constructs a new ECallInfo object indicated by the Hashtable
+ * parameter
+ * @param hash
+ *
+ * <p>The hash table to use</p>
+ */
+ public ECallInfo() { }
+ public ECallInfo(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+
+ public void setECallNotificationStatus(VehicleDataNotificationStatus eCallNotificationStatus) {
+ if (eCallNotificationStatus != null) {
+ store.put(KEY_E_CALL_NOTIFICATION_STATUS, eCallNotificationStatus);
+ } else {
+ store.remove(KEY_E_CALL_NOTIFICATION_STATUS);
+ }
+ }
+ public VehicleDataNotificationStatus getECallNotificationStatus() {
+ Object obj = store.get(KEY_E_CALL_NOTIFICATION_STATUS);
+ if (obj instanceof VehicleDataNotificationStatus) {
+ return (VehicleDataNotificationStatus) obj;
+ } else if (obj instanceof String) {
+ return VehicleDataNotificationStatus.valueForString((String) obj);
+ }
+ return null;
+ }
+ public void setAuxECallNotificationStatus(VehicleDataNotificationStatus auxECallNotificationStatus) {
+ if (auxECallNotificationStatus != null) {
+ store.put(KEY_AUX_E_CALL_NOTIFICATION_STATUS, auxECallNotificationStatus);
+ } else {
+ store.remove(KEY_AUX_E_CALL_NOTIFICATION_STATUS);
+ }
+ }
+ public VehicleDataNotificationStatus getAuxECallNotificationStatus() {
+ Object obj = store.get(KEY_AUX_E_CALL_NOTIFICATION_STATUS);
+ if (obj instanceof VehicleDataNotificationStatus) {
+ return (VehicleDataNotificationStatus) obj;
+ } else if (obj instanceof String) {
+ return VehicleDataNotificationStatus.valueForString((String) obj);
+ }
+ return null;
+ }
+ public void setECallConfirmationStatus(ECallConfirmationStatus eCallConfirmationStatus) {
+ if (eCallConfirmationStatus != null) {
+ store.put(KEY_E_CALL_CONFIRMATION_STATUS, eCallConfirmationStatus);
+ } else {
+ store.remove(KEY_E_CALL_CONFIRMATION_STATUS);
+ }
+ }
+ public ECallConfirmationStatus getECallConfirmationStatus() {
+ Object obj = store.get(KEY_E_CALL_CONFIRMATION_STATUS);
+ if (obj instanceof ECallConfirmationStatus) {
+ return (ECallConfirmationStatus) obj;
+ } else if (obj instanceof String) {
+ return ECallConfirmationStatus.valueForString((String) obj);
+ }
+ return null;
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/EmergencyEvent.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/EmergencyEvent.java
new file mode 100644
index 000000000..5e1f2ede1
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/EmergencyEvent.java
@@ -0,0 +1,164 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+
+import com.smartdevicelink.proxy.RPCStruct;
+import com.smartdevicelink.proxy.rpc.enums.EmergencyEventType;
+import com.smartdevicelink.proxy.rpc.enums.FuelCutoffStatus;
+import com.smartdevicelink.proxy.rpc.enums.VehicleDataEventStatus;
+/** Information related to an emergency event (and if it occurred).
+ *
+ * <p><b>Parameter List</b></p>
+ * <table border="1" rules="all">
+ * <tr>
+ * <th>Param Name</th>
+ * <th>Type</th>
+ * <th>Mandatory</th>
+ * <th>Description</th>
+ * <th>Notes</th>
+ * <th>Version Available</th>
+ * </tr>
+ * <tr>
+ * <td>emergencyEventType</td>
+ * <td>EmergencyEventType</td>
+ * <td></td>
+ * <td>References signal "VedsEvntType_D_Ltchd". See{@linkplain EmergencyEventType}</td>
+ * <td></td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>fuelCutoffStatus</td>
+ * <td>FuelCutoffStatus</td>
+ * <td></td>
+ * <td>References signal "RCM_FuelCutoff". See{@linkplain FuelCutoffStatus}</td>
+ * <td></td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>rolloverEvent</td>
+ * <td>VehicleDataEventStatus</td>
+ * <td></td>
+ * <td>References signal "VedsEvntRoll_D_Ltchd". See{@linkplain VehicleDataEventStatus}</td>
+ * <td></td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>maximumChangeVelocity</td>
+ * <td>Integer</td>
+ * <td></td>
+ * <td>References signal "VedsMaxDeltaV_D_Ltchd".</td>
+ * <td>minvalue=0; maxvalue=255;<p> Additional reserved values:</p> <p>0x00 No event; 0xFE Not supported; 0xFF Fault</p> </td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ *
+ *
+ * <tr>
+ * <td>multipleEvents</td>
+ * <td>VehicleDataEventStatus</td>
+ * <td></td>
+ * <td>References signal "VedsMultiEvnt_D_Ltchd". See{@linkplain VehicleDataEventStatus}</td>
+ * <td></td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * </table>
+ *
+ * @see Image
+ * @see SubscribeVehicleData
+ * @since SmartDeviceLink 2.0
+ *
+ */
+
+public class EmergencyEvent extends RPCStruct {
+ public static final String KEY_EMERGENCY_EVENT_TYPE = "emergencyEventType";
+ public static final String KEY_FUEL_CUTOFF_STATUS = "fuelCutoffStatus";
+ public static final String KEY_ROLLOVER_EVENT = "rolloverEvent";
+ public static final String KEY_MAXIMUM_CHANGE_VELOCITY = "maximumChangeVelocity";
+ public static final String KEY_MULTIPLE_EVENTS = "multipleEvents";
+
+ /** Constructs a new EmergencyEvent object indicated by the Hashtable
+ * parameter
+ * @param hash
+ *
+ * <p>The hash table to use</p>
+ */
+
+ public EmergencyEvent() { }
+ public EmergencyEvent(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+
+ public void setEmergencyEventType(EmergencyEventType emergencyEventType) {
+ if (emergencyEventType != null) {
+ store.put(KEY_EMERGENCY_EVENT_TYPE, emergencyEventType);
+ } else {
+ store.remove(KEY_EMERGENCY_EVENT_TYPE);
+ }
+ }
+ public EmergencyEventType getEmergencyEventType() {
+ Object obj = store.get(KEY_EMERGENCY_EVENT_TYPE);
+ if (obj instanceof EmergencyEventType) {
+ return (EmergencyEventType) obj;
+ } else if (obj instanceof String) {
+ return EmergencyEventType.valueForString((String) obj);
+ }
+ return null;
+ }
+ public void setFuelCutoffStatus(FuelCutoffStatus fuelCutoffStatus) {
+ if (fuelCutoffStatus != null) {
+ store.put(KEY_FUEL_CUTOFF_STATUS, fuelCutoffStatus);
+ } else {
+ store.remove(KEY_FUEL_CUTOFF_STATUS);
+ }
+ }
+ public FuelCutoffStatus getFuelCutoffStatus() {
+ Object obj = store.get(KEY_FUEL_CUTOFF_STATUS);
+ if (obj instanceof FuelCutoffStatus) {
+ return (FuelCutoffStatus) obj;
+ } else if (obj instanceof String) {
+ return FuelCutoffStatus.valueForString((String) obj);
+ }
+ return null;
+ }
+ public void setRolloverEvent(VehicleDataEventStatus rolloverEvent) {
+ if (rolloverEvent != null) {
+ store.put(KEY_ROLLOVER_EVENT, rolloverEvent);
+ } else {
+ store.remove(KEY_ROLLOVER_EVENT);
+ }
+ }
+ public VehicleDataEventStatus getRolloverEvent() {
+ Object obj = store.get(KEY_ROLLOVER_EVENT);
+ if (obj instanceof VehicleDataEventStatus) {
+ return (VehicleDataEventStatus) obj;
+ } else if (obj instanceof String) {
+ return VehicleDataEventStatus.valueForString((String) obj);
+ }
+ return null;
+ }
+ public void setMaximumChangeVelocity(Integer maximumChangeVelocity) {
+ if (maximumChangeVelocity != null) {
+ store.put(KEY_MAXIMUM_CHANGE_VELOCITY, maximumChangeVelocity);
+ } else {
+ store.remove(KEY_MAXIMUM_CHANGE_VELOCITY);
+ }
+ }
+ public Integer getMaximumChangeVelocity() {
+ return (Integer) store.get(KEY_MAXIMUM_CHANGE_VELOCITY);
+ }
+ public void setMultipleEvents(VehicleDataEventStatus multipleEvents) {
+ if (multipleEvents != null) {
+ store.put(KEY_MULTIPLE_EVENTS, multipleEvents);
+ } else {
+ store.remove(KEY_MULTIPLE_EVENTS);
+ }
+ }
+ public VehicleDataEventStatus getMultipleEvents() {
+ Object obj = store.get(KEY_MULTIPLE_EVENTS);
+ if (obj instanceof VehicleDataEventStatus) {
+ return (VehicleDataEventStatus) obj;
+ } else if (obj instanceof String) {
+ return VehicleDataEventStatus.valueForString((String) obj);
+ }
+ return null;
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/EndAudioPassThru.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/EndAudioPassThru.java
new file mode 100644
index 000000000..ab61c548e
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/EndAudioPassThru.java
@@ -0,0 +1,51 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCRequest;
+
+/**
+ * When this request is invoked, the audio capture stops
+ *
+ * <p>Function Group: AudioPassThru</p>
+ *
+ * <b>HMILevel needs to be FULL, LIMITED or BACKGROUND</b>
+ *
+ * <p><b>Request</b></p>
+ *
+ * <p>No parameters.</p>
+ * <p><b>Response</b> </p>
+ * <p><b>Non-default Result Codes:</b></p>
+ * <p>SUCCESS</p>
+ * <p>INVALID_DATA</p>
+ * <p>OUT_OF_MEMORY</p>
+ * <p>TOO_MANY_PENDING_REQUESTS</p>
+ * <p>APPLICATION_NOT_REGISTERED</p>
+ * <p>GENERIC_ERROR</p>
+ * <p>REJECTED</p>
+ * <p>DISALLOWED</p>
+ * @since SmartDeviceLink 2.0
+ * @see PerformAudioPassThru
+ */
+public class EndAudioPassThru extends RPCRequest {
+
+ /**
+ * Constructs a new EndAudioPassThru object
+ */
+ public EndAudioPassThru() {
+ super(FunctionID.END_AUDIO_PASS_THRU.toString());
+ }
+
+ /**
+ * <p>Constructs a new EndAudioPassThru object indicated by the Hashtable
+ * parameter</p>
+ *
+ *
+ * @param hash
+ * The Hashtable to use
+ */
+ public EndAudioPassThru(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/EndAudioPassThruResponse.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/EndAudioPassThruResponse.java
new file mode 100644
index 000000000..4f7a09f7b
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/EndAudioPassThruResponse.java
@@ -0,0 +1,24 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCResponse;
+
+/**
+ * End Audio Pass Thru Response is sent, when EndAudioPassThru has been called
+ *
+ * @since SmartDeviceLink 2.0
+ */
+public class EndAudioPassThruResponse extends RPCResponse {
+
+ /**
+ * Constructs a new EndAudioPassThruResponse object
+ */
+ public EndAudioPassThruResponse() {
+ super(FunctionID.END_AUDIO_PASS_THRU.toString());
+ }
+ public EndAudioPassThruResponse(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+} \ No newline at end of file
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/GPSData.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/GPSData.java
new file mode 100644
index 000000000..d76b11355
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/GPSData.java
@@ -0,0 +1,535 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+
+import com.smartdevicelink.proxy.RPCStruct;
+import com.smartdevicelink.proxy.rpc.enums.CompassDirection;
+import com.smartdevicelink.proxy.rpc.enums.Dimension;
+import com.smartdevicelink.util.SdlDataTypeConverter;
+/**
+ * Describes the GPS data. Not all data will be available on all carlines.
+ * <p><b>Parameter List</b></p>
+ * <table border="1" rules="all">
+ * <tr>
+ * <th>Name</th>
+ * <th>Type</th>
+ * <th>Description</th>
+ * <th>SmartDeviceLink Ver. Available</th>
+ * </tr>
+ * <tr>
+ * <td>longitudeDegrees</td>
+ * <td>Double</td>
+ * <td>Minvalue: - 180
+ * <b>Maxvalue: 180
+ * </td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>latitudeDegrees</td>
+ * <td>Double</td>
+ * <td>Minvalue: - 90<b>Maxvalue: 90
+ * </td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>utcYear</td>
+ * <td>Integer</td>
+ * <td>Minvalue: 2010<b>Maxvalue: 2100
+ * </td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>utcMonth</td>
+ * <td>Integer</td>
+ * <td>Minvalue: 1<b>Maxvalue: 12
+ * </td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>utcDay</td>
+ * <td>Integer</td>
+ * <td>Minvalue: 1<b>Maxvalue: 31
+ * </td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>utcHours</td>
+ * <td>Integer</td>
+ * <td>Minvalue: 0<b>Maxvalue: 23
+ * </td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>utcMinutes</td>
+ * <td>Integer</td>
+ * <td>Minvalue: 0<b>Maxvalue: 59
+ * </td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>utcSeconds</td>
+ * <td>Integer</td>
+ * <td>Minvalue: 0<b>Maxvalue: 59
+ * </td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>pdop</td>
+ * <td>Integer</td>
+ * <td>Positional Dilution of Precision<b>Minvalue: 0<b>Maxvalue: 31
+ * </td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>hdop</td>
+ * <td>Integer</td>
+ * <td>Horizontal Dilution of Precision<b>Minvalue: 0<b>Maxvalue: 31
+ * </td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>vdop</td>
+ * <td>Integer</td>
+ * <td>Vertical Dilution of Precision<b>Minvalue: 0<b>Maxvalue: 31
+ * </td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>actual</td>
+ * <td>Boolean</td>
+ * <td>True, if coordinates are based on satellites.
+ * False, if based on dead reckoning
+ * </td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>satellites</td>
+ * <td>Integer</td>
+ * <td>Number of satellites in view
+ * <b>Minvalue: 0
+ * <b>Maxvalue: 31
+ * </td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>altitude</td>
+ * <td>Integer</td>
+ * <td>Altitude in meters
+ * <b>Minvalue: -10000</b>
+ * <b>Maxvalue: 10000</b>
+ * <b>Note:</b> SYNC uses Mean Sea Level for calculating GPS. </td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>heading</td>
+ * <td>Double</td>
+ * <td>The heading. North is 0, East is 90, etc.
+ * <b>Minvalue: 0
+ * <b>Maxvalue: 359.99
+ * <b>Resolution is 0.01
+ * </td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>speed</td>
+ * <td>Integer</td>
+ * <td>The speed in KPH
+ * <b>Minvalue: 0
+ * <b>Maxvalue: 400
+ * </td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * </table>
+ * @since SmartDeviceLink 2.0
+ */
+public class GPSData extends RPCStruct {
+ public static final String KEY_LONGITUDE_DEGREES = "longitudeDegrees";
+ public static final String KEY_LATITUDE_DEGREES = "latitudeDegrees";
+ public static final String KEY_UTC_YEAR = "utcYear";
+ public static final String KEY_UTC_MONTH = "utcMonth";
+ public static final String KEY_UTC_DAY = "utcDay";
+ public static final String KEY_UTC_HOURS = "utcHours";
+ public static final String KEY_UTC_MINUTES = "utcMinutes";
+ public static final String KEY_UTC_SECONDS = "utcSeconds";
+ public static final String KEY_COMPASS_DIRECTION = "compassDirection";
+ public static final String KEY_PDOP = "pdop";
+ public static final String KEY_VDOP = "vdop";
+ public static final String KEY_HDOP = "hdop";
+ public static final String KEY_ACTUAL = "actual";
+ public static final String KEY_SATELLITES = "satellites";
+ public static final String KEY_DIMENSION = "dimension";
+ public static final String KEY_ALTITUDE = "altitude";
+ public static final String KEY_HEADING = "heading";
+ public static final String KEY_SPEED = "speed";
+
+ /**
+ * Constructs a newly allocated GPSData object
+ */
+ public GPSData() { }
+
+ /**
+ * Constructs a newly allocated GPSData object indicated by the Hashtable parameter
+ * @param hash The Hashtable to use
+ */
+ public GPSData(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+
+ /**
+ * set longitude degrees
+ * @param longitudeDegrees
+ */
+ public void setLongitudeDegrees(Double longitudeDegrees) {
+ if (longitudeDegrees != null) {
+ store.put(KEY_LONGITUDE_DEGREES, longitudeDegrees);
+ } else {
+ store.remove(KEY_LONGITUDE_DEGREES);
+ }
+ }
+
+ /**
+ * get longitude degrees
+ * @return longitude degrees
+ */
+ public Double getLongitudeDegrees() {
+ Object object = store.get(KEY_LONGITUDE_DEGREES);
+ return SdlDataTypeConverter.objectToDouble(object);
+ }
+
+ /**
+ * set latitude degrees
+ * @param latitudeDegrees latitude degrees
+ */
+ public void setLatitudeDegrees(Double latitudeDegrees) {
+ if (latitudeDegrees != null) {
+ store.put(KEY_LATITUDE_DEGREES, latitudeDegrees);
+ } else {
+ store.remove(KEY_LATITUDE_DEGREES);
+ }
+ }
+
+ /**
+ * get latitude degrees
+ * @return latitude degrees
+ */
+ public Double getLatitudeDegrees() {
+ Object object = store.get(KEY_LATITUDE_DEGREES);
+ return SdlDataTypeConverter.objectToDouble(object);
+ }
+
+ /**
+ * set utc year
+ * @param utcYear utc year
+ */
+ public void setUtcYear(Integer utcYear) {
+ if (utcYear != null) {
+ store.put(KEY_UTC_YEAR, utcYear);
+ } else {
+ store.remove(KEY_UTC_YEAR);
+ }
+ }
+
+ /**
+ * get utc year
+ * @return utc year
+ */
+ public Integer getUtcYear() {
+ return (Integer) store.get(KEY_UTC_YEAR);
+ }
+
+ /**
+ * set utc month
+ * @param utcMonth utc month
+ */
+ public void setUtcMonth(Integer utcMonth) {
+ if (utcMonth != null) {
+ store.put(KEY_UTC_MONTH, utcMonth);
+ } else {
+ store.remove(KEY_UTC_MONTH);
+ }
+ }
+
+ /**
+ * get utc month
+ * @return utc month
+ */
+ public Integer getUtcMonth() {
+ return (Integer) store.get(KEY_UTC_MONTH);
+ }
+
+ /**
+ * set utc day
+ * @param utcDay utc day
+ */
+ public void setUtcDay(Integer utcDay) {
+ if (utcDay != null) {
+ store.put(KEY_UTC_DAY, utcDay);
+ } else {
+ store.remove(KEY_UTC_DAY);
+ }
+ }
+
+ /**
+ * get utc day
+ * @return utc day
+ */
+ public Integer getUtcDay() {
+ return (Integer) store.get(KEY_UTC_DAY);
+ }
+
+ /**
+ * set utc hours
+ * @param utcHours utc hours
+ */
+ public void setUtcHours(Integer utcHours) {
+ if (utcHours != null) {
+ store.put(KEY_UTC_HOURS, utcHours);
+ } else {
+ store.remove(KEY_UTC_HOURS);
+ }
+ }
+
+ /**
+ * get utc hours
+ * @return utc hours
+ */
+ public Integer getUtcHours() {
+ return (Integer) store.get(KEY_UTC_HOURS);
+ }
+
+ /**
+ * set utc minutes
+ * @param utcMinutes utc minutes
+ */
+ public void setUtcMinutes(Integer utcMinutes) {
+ if (utcMinutes != null) {
+ store.put(KEY_UTC_MINUTES, utcMinutes);
+ } else {
+ store.remove(KEY_UTC_MINUTES);
+ }
+ }
+
+ /**
+ * get utc minutes
+ * @return utc minutes
+ */
+ public Integer getUtcMinutes() {
+ return (Integer) store.get(KEY_UTC_MINUTES);
+ }
+
+ /**
+ * set utc seconds
+ * @param utcSeconds utc seconds
+ */
+ public void setUtcSeconds(Integer utcSeconds) {
+ if (utcSeconds != null) {
+ store.put(KEY_UTC_SECONDS, utcSeconds);
+ } else {
+ store.remove(KEY_UTC_SECONDS);
+ }
+ }
+
+ /**
+ * get utc seconds
+ * @return utc seconds
+ */
+ public Integer getUtcSeconds() {
+ return (Integer) store.get(KEY_UTC_SECONDS);
+ }
+ public void setCompassDirection(CompassDirection compassDirection) {
+ if (compassDirection != null) {
+ store.put(KEY_COMPASS_DIRECTION, compassDirection);
+ } else {
+ store.remove(KEY_COMPASS_DIRECTION);
+ }
+ }
+ public CompassDirection getCompassDirection() {
+ Object obj = store.get(KEY_COMPASS_DIRECTION);
+ if (obj instanceof CompassDirection) {
+ return (CompassDirection) obj;
+ } else if (obj instanceof String) {
+ return CompassDirection.valueForString((String) obj);
+ }
+ return null;
+ }
+
+ /**
+ * set the positional dilution of precision
+ * @param pdop the positional dilution of precision
+ */
+ public void setPdop(Double pdop) {
+ if (pdop != null) {
+ store.put(KEY_PDOP, pdop);
+ } else {
+ store.remove(KEY_PDOP);
+ }
+ }
+
+ /**
+ * get the positional dilution of precision
+ */
+ public Double getPdop() {
+ Object object = store.get(KEY_PDOP);
+ return SdlDataTypeConverter.objectToDouble(object);
+ }
+
+ /**
+ * set the horizontal dilution of precision
+ * @param hdop the horizontal dilution of precision
+ */
+ public void setHdop(Double hdop) {
+ if (hdop != null) {
+ store.put(KEY_HDOP, hdop);
+ } else {
+ store.remove(KEY_HDOP);
+ }
+ }
+
+ /**
+ * get the horizontal dilution of precision
+ * @return the horizontal dilution of precision
+ */
+ public Double getHdop() {
+ Object object = store.get(KEY_HDOP);
+ return SdlDataTypeConverter.objectToDouble(object);
+ }
+
+ /**
+ * set the vertical dilution of precision
+ * @param vdop the vertical dilution of precision
+ */
+ public void setVdop(Double vdop) {
+ if (vdop != null) {
+ store.put(KEY_VDOP, vdop);
+ } else {
+ store.remove(KEY_VDOP);
+ }
+ }
+
+ /**
+ * get the vertical dilution of precision
+ * @return the vertical dilution of precision
+ */
+ public Double getVdop() {
+ Object object = store.get(KEY_VDOP);
+ return SdlDataTypeConverter.objectToDouble(object);
+ }
+
+ /**
+ * set what coordinates based on
+ * @param actual True, if coordinates are based on satellites.False, if based on dead reckoning
+ */
+ public void setActual(Boolean actual) {
+ if (actual != null) {
+ store.put(KEY_ACTUAL, actual);
+ } else {
+ store.remove(KEY_ACTUAL);
+ }
+ }
+
+ /**
+ * get what coordinates based on
+ * @return True, if coordinates are based on satellites.False, if based on dead reckoning
+ */
+ public Boolean getActual() {
+ return (Boolean) store.get(KEY_ACTUAL);
+ }
+
+ /**
+ * set the number of satellites in view
+ * @param satellites the number of satellites in view
+ */
+ public void setSatellites(Integer satellites) {
+ if (satellites != null) {
+ store.put(KEY_SATELLITES, satellites);
+ } else {
+ store.remove(KEY_SATELLITES);
+ }
+ }
+
+ /**
+ * get the number of satellites in view
+ * @return the number of satellites in view
+ */
+ public Integer getSatellites() {
+ return (Integer) store.get(KEY_SATELLITES);
+ }
+ public void setDimension(Dimension dimension) {
+ if (dimension != null) {
+ store.put(KEY_DIMENSION, dimension);
+ } else {
+ store.remove(KEY_DIMENSION);
+ }
+ }
+ public Dimension getDimension() {
+ Object obj = store.get(KEY_DIMENSION);
+ if (obj instanceof Dimension) {
+ return (Dimension) obj;
+ } else if (obj instanceof String) {
+ return Dimension.valueForString((String) obj);
+ }
+ return null;
+ }
+
+ /**
+ * set altitude in meters
+ * @param altitude altitude in meters
+ */
+ public void setAltitude(Double altitude) {
+ if (altitude != null) {
+ store.put(KEY_ALTITUDE, altitude);
+ } else {
+ store.remove(KEY_ALTITUDE);
+ }
+ }
+
+ /**
+ * get altitude in meters
+ * @return altitude in meters
+ */
+ public Double getAltitude() {
+ Object object = store.get(KEY_ALTITUDE);
+ return SdlDataTypeConverter.objectToDouble(object);
+ }
+
+ /**
+ * set the heading.North is 0, East is 90, etc.
+ * @param heading the heading.
+ */
+ public void setHeading(Double heading) {
+ if (heading != null) {
+ store.put(KEY_HEADING, heading);
+ } else {
+ store.remove(KEY_HEADING);
+ }
+ }
+
+ /**
+ * get the heading
+ */
+ public Double getHeading() {
+ Object object = store.get(KEY_HEADING);
+ return SdlDataTypeConverter.objectToDouble(object);
+ }
+
+ /**
+ * set speed in KPH
+ * @param speed the speed
+ */
+ public void setSpeed(Double speed) {
+ if (speed != null) {
+ store.put(KEY_SPEED, speed);
+ } else {
+ store.remove(KEY_SPEED);
+ }
+ }
+
+ /**
+ * get the speed in KPH
+ * @return the speed in KPH
+ */
+ public Double getSpeed() {
+ Object object = store.get(KEY_SPEED);
+ return SdlDataTypeConverter.objectToDouble(object);
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/GenericResponse.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/GenericResponse.java
new file mode 100644
index 000000000..4618fd857
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/GenericResponse.java
@@ -0,0 +1,57 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCResponse;
+
+/**
+ * Generic Response is sent, when the name of a received msg cannot be
+ * retrieved. Only used in case of an error. Currently, only resultCode
+ * INVALID_DATA is used.
+ * <p><b>Parameter List</b></p>
+ * <table border="1" rules="all">
+ * <tr>
+ * <th>Param Name</th>
+ * <th>Type</th>
+ * <th>Description</th>
+ * <th> Req.</th>
+ * <th>Notes</th>
+ * <th>Version Available</th>
+ * </tr>
+ * <tr>
+ * <td>success</td>
+ * <td>Boolean</td>
+ * <td>true, if successful; false, if failed</td>
+ * <td></td>
+ * <td></td>
+ * <td>SmartDeviceLink 1.0</td>
+ * </tr>
+ * <tr>
+ * <td>resultCode</td>
+ * <td>Result</td>
+ * <td>Defines the possible result codes returned by SDL to the application in a Response to a requested operation</td>
+ * <td></td>
+ * <td></td>
+ * <td>SmartDeviceLink 1.0</td>
+ * </tr>
+ * <tr>
+ * <td>info</td>
+ * <td>String</td>
+ * <td>Provides additional human readable info regarding the result.</td>
+ * <td>N</td>
+ * <td>maxlength=1000</td>
+ * <td>SmartDeviceLink 1.0</td>
+ * </tr>
+ * </table>
+ * @since SmartDeviceLink 1.0
+ */
+public class GenericResponse extends RPCResponse {
+
+ public GenericResponse() {
+ super(FunctionID.GENERIC_RESPONSE.toString());
+ }
+ public GenericResponse(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+} \ No newline at end of file
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/GetDTCs.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/GetDTCs.java
new file mode 100644
index 000000000..fa3ba1c01
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/GetDTCs.java
@@ -0,0 +1,115 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCRequest;
+
+/**
+ * This RPC allows to request diagnostic module trouble codes from a certain
+ * vehicle module.
+ *
+ *<p> Function Group: ProprietaryData</p>
+ *
+ *<p> <b>HMILevel needs to be FULL, LIMITED or BACKGROUND</b></p>
+ *
+ * <p><b>Parameter List</b></p>
+ * <table border="1" rules="all">
+ * <tr>
+ * <th>Name</th>
+ * <th>Type</th>
+ * <th>Description</th>
+ * <th>Reg.</th>
+ * <th>Notes</th>
+ * <th>Version</th>
+ * </tr>
+ * <tr>
+ * <td>ecuName</td>
+ * <td>Integer</td>
+ * <td>Name of ECU.</td>
+ * <td>Y</td>
+ * <td>Min Value: 0; Max Value: 65535</td>
+ * <td>SmartDeviceLink 2.0 </td>
+ * </tr>
+ * <tr>
+ * <td>dtcMask</td>
+ * <td>Integer</td>
+ * <td>DTC Mask Byte to be sent in diagnostic request to module.</td>
+ * <td>N</td>
+ * <td>Min Value: 0; Max Value: 255</td>
+ * <td>SmartDeviceLink 2.0 </td>
+ * </tr>
+ * </table>
+ * <p><b>Response</b></p>
+ *
+ * <p><b>Non-default Result Codes:</b></p>
+ *<p> SUCCESS</p>
+ * <p>INVALID_DATA</p>
+ *<p> OUT_OF_MEMORY</p>
+ * <p>TOO_MANY_PENDING_REQUESTS</p>
+ * <p>APPLICATION_NOT_REGISTERED</p>
+ *<p>GENERIC_ERROR</p>
+ * <p>REJECTED</p>
+ * <p>DISALLOWED </p>
+ * <p>USER_DISALLOWED</p>
+ * @since SmartDeviceLink 2.0
+ */
+public class GetDTCs extends RPCRequest {
+ public static final String KEY_DTC_MASK = "dtcMask";
+ public static final String KEY_ECU_NAME = "ecuName";
+
+ /**
+ * Constructs a new GetDTCs object
+ */
+ public GetDTCs() {
+ super(FunctionID.GET_DTCS.toString());
+ }
+
+ /**
+ * <p>Constructs a new GetDTCs object indicated by the Hashtable parameter
+ * </p>
+ *
+ * @param hash
+ * The Hashtable to use
+ */
+ public GetDTCs(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+
+ /**
+ * Sets a name of the module to receive the DTC form
+ *
+ * @param ecuName
+ * an Integer value representing a name of the module to receive
+ * the DTC form
+ * <p>
+ * <b>Notes:</p> </b>Minvalue:0; Maxvalue:65535
+ */
+ public void setEcuName(Integer ecuName) {
+ if (ecuName != null) {
+ parameters.put(KEY_ECU_NAME, ecuName);
+ } else {
+ parameters.remove(KEY_ECU_NAME);
+ }
+ }
+
+ /**
+ * Gets a name of the module to receive the DTC form
+ *
+ * @return Integer -an Integer value representing a name of the module to
+ * receive the DTC form
+ */
+ public Integer getEcuName() {
+ return (Integer) parameters.get(KEY_ECU_NAME);
+ }
+ public void setDtcMask(Integer dtcMask) {
+ if (dtcMask != null) {
+ parameters.put(KEY_DTC_MASK, dtcMask);
+ } else {
+ parameters.remove(KEY_DTC_MASK);
+ }
+ }
+ public Integer getDtcMask() {
+ return (Integer) parameters.get(KEY_DTC_MASK);
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/GetDTCsResponse.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/GetDTCsResponse.java
new file mode 100644
index 000000000..b3c49b251
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/GetDTCsResponse.java
@@ -0,0 +1,62 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+import java.util.List;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCResponse;
+
+/**
+ * Get DTCs Response is sent, when GetDTCs has been called
+ *
+ * @since SmartDeviceLink 2.0
+ */
+public class GetDTCsResponse extends RPCResponse{
+
+ public static final String KEY_ECU_HEADER = "ecuHeader";
+ public static final String KEY_DTC = "dtc";
+
+ public GetDTCsResponse(){
+ super(FunctionID.GET_DTCS.toString());
+ }
+
+ public GetDTCsResponse(Hashtable<String, Object> hash){
+ super(hash);
+ }
+
+ @SuppressWarnings("unchecked")
+ public List<String> getDtc(){
+ if(parameters.get(KEY_DTC) instanceof List<?>){
+ List<?> list = (List<?>) parameters.get(KEY_DTC);
+ if(list != null && list.size() > 0){
+ Object obj = list.get(0);
+ if(obj instanceof String){
+ return (List<String>) list;
+ }
+ }
+ }
+ return null;
+ }
+
+ public void setDtc(List<String> dtc){
+ if(dtc != null){
+ parameters.put(KEY_DTC, dtc);
+ }
+ else{
+ parameters.remove(KEY_DTC);
+ }
+ }
+
+ public Integer getEcuHeader(){
+ return (Integer) parameters.get(KEY_ECU_HEADER);
+ }
+
+ public void setEcuHeader(Integer ecuHeader){
+ if(ecuHeader != null){
+ parameters.put(KEY_ECU_HEADER, ecuHeader);
+ }
+ else{
+ parameters.remove(KEY_ECU_HEADER);
+ }
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/GetVehicleData.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/GetVehicleData.java
new file mode 100644
index 000000000..0c15c02c9
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/GetVehicleData.java
@@ -0,0 +1,512 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCRequest;
+/**
+ * Non periodic vehicle data read request.
+ *
+ * <p><b>Parameter List</b></p>
+ * <table border="1" rules="all">
+ * <tr>
+ * <th>Name</th>
+ * <th>Type</th>
+ * <th>Description</th>
+ * <th>Reg.</th>
+ * <th>Notes</th>
+ * <th>Version</th>
+ * </tr>
+ * <tr>
+ * <td>gps</td>
+ * <td>Boolean</td>
+ * <td>GPS data. See {@linkplain GPS data }for details</td>
+ * <td>N</td>
+ * <td>Subscribable</td>
+ * <td>SmartDeviceLink 2.0 </td>
+ * </tr>
+ * <tr>
+ * <td>speed</td>
+ * <td>Boolean</td>
+ * <td>The vehicle speed in kilometers per hour</td>
+ * <td>N</td>
+ * <td>Subscribable</td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>rpm</td>
+ * <td>Boolean</td>
+ * <td>The number of revolutions per minute of the engine</td>
+ * <td>N</td>
+ * <td>Subscribable</td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>fuelLevel</td>
+ * <td>Boolean</td>
+ * <td>The fuel level in the tank (percentage)</td>
+ * <td>N</td>
+ * <td>Subscribable</td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>fuelLevel_State</td>
+ * <td>Boolean</td>
+ * <td>The fuel level state</td>
+ * <td>N</td>
+ * <td>Subscribable</td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>instantFuelConsumption</td>
+ * <td>Boolean</td>
+ * <td>The instantaneous fuel consumption in microlitres</td>
+ * <td>N</td>
+ * <td>Subscribable</td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>externalTemperature</td>
+ * <td>Boolean</td>
+ * <td>The external temperature in degrees celsius</td>
+ * <td>N</td>
+ * <td>Subscribable</td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>vin</td>
+ * <td>Boolean</td>
+ * <td>Vehicle identification number</td>
+ * <td>N</td>
+ * <td>Subscribable</td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>prndl</td>
+ * <td>Boolean</td>
+ * <td>Currently selected gear.</td>
+ * <td>N</td>
+ * <td>Subscribable</td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>tirePressure</td>
+ * <td>Boolean</td>
+ * <td>Tire pressure status</td>
+ * <td>N</td>
+ * <td>Subscribable</td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>odometer</td>
+ * <td>Boolean</td>
+ * <td>Odometer in km</td>
+ * <td>N</td>
+ * <td>Max Length: 500</td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>beltStatus</td>
+ * <td>Boolean</td>
+ * <td>The status of the seat belts</td>
+ * <td>N</td>
+ * <td>Subscribable</td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>bodyInformation</td>
+ * <td>Boolean</td>
+ * <td>The body information including ignition status and internal temp</td>
+ * <td>N</td>
+ * <td>Subscribable</td>
+ * <td>SmartDeviceLink 2.0 </td>
+ * </tr>
+ * <tr>
+ * <td>deviceStatus</td>
+ * <td>Boolean</td>
+ * <td>The device status including signal and battery strength</td>
+ * <td>N</td>
+ * <td>Subscribable</td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>driverBraking</td>
+ * <td>Boolean</td>
+ * <td>The status of the brake pedal</td>
+ * <td>N</td>
+ * <td>Subscribable</td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>wiperStatus</td>
+ * <td>Boolean</td>
+ * <td>The status of the wipers</td>
+ * <td>N</td>
+ * <td>Subscribable</td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>headLampStatus</td>
+ * <td>Boolean</td>
+ * <td>Status of the head lamps</td>
+ * <td>N</td>
+ * <td>Subscribable</td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>engineTorque</td>
+ * <td>Boolean</td>
+ * <td>Torque value for engine (in Nm) on non-diesel variants</td>
+ * <td>N</td>
+ * <td>Subscribable</td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>accPedalPosition</td>
+ * <td>Boolean</td>
+ * <td>Accelerator pedal position (percentage depressed)</td>
+ * <td>N</td>
+ * <td>Subscribable</td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>steeringWheelAngle</td>
+ * <td>Boolean</td>
+ * <td>Current angle of the steering wheel (in deg)</td>
+ * <td>N</td>
+ * <td>Subscribable</td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * </table>
+ *
+ *
+ * <p><b>Response</b></p>
+ *
+ * <p> <b>Non-default Result Codes:</b></p>
+ * <p> SUCCESS</p>
+ * <p> INVALID_DATA</p>
+ * <p>OUT_OF_MEMORY</p>
+ * <p>TOO_MANY_PENDING_REQUESTS</p>
+ * <p>APPLICATION_NOT_REGISTERED</p>
+ * <p> GENERIC_ERROR</p>
+ * <p> REJECTED</p>
+ * <p> VEHICLE_DATA_NOT_ALLOWED</p>
+ * <p>VEHICLE_DATA_NOT_AVAILABLE</p>
+ * <p> USER_DISALLOWED</p>
+ *
+ * @see SubscribeVehicleData
+ * @see UnSubscribeVehicleData
+ * @since SmartDeviceLink 2.0
+ *
+ *
+ */
+public class GetVehicleData extends RPCRequest {
+ public static final String KEY_SPEED = "speed";
+ public static final String KEY_RPM = "rpm";
+ public static final String KEY_EXTERNAL_TEMPERATURE = "externalTemperature";
+ public static final String KEY_FUEL_LEVEL = "fuelLevel";
+ public static final String KEY_VIN = "vin";
+ public static final String KEY_PRNDL = "prndl";
+ public static final String KEY_TIRE_PRESSURE = "tirePressure";
+ public static final String KEY_ENGINE_TORQUE = "engineTorque";
+ public static final String KEY_ODOMETER = "odometer";
+ public static final String KEY_GPS = "gps";
+ public static final String KEY_FUEL_LEVEL_STATE = "fuelLevel_State";
+ public static final String KEY_INSTANT_FUEL_CONSUMPTION = "instantFuelConsumption";
+ public static final String KEY_BELT_STATUS = "beltStatus";
+ public static final String KEY_BODY_INFORMATION = "bodyInformation";
+ public static final String KEY_DEVICE_STATUS = "deviceStatus";
+ public static final String KEY_DRIVER_BRAKING = "driverBraking";
+ public static final String KEY_WIPER_STATUS = "wiperStatus";
+ public static final String KEY_HEAD_LAMP_STATUS = "headLampStatus";
+ public static final String KEY_ACC_PEDAL_POSITION = "accPedalPosition";
+ public static final String KEY_STEERING_WHEEL_ANGLE = "steeringWheelAngle";
+ public static final String KEY_E_CALL_INFO = "eCallInfo";
+ public static final String KEY_AIRBAG_STATUS = "airbagStatus";
+ public static final String KEY_EMERGENCY_EVENT = "emergencyEvent";
+ public static final String KEY_CLUSTER_MODE_STATUS = "clusterModeStatus";
+ public static final String KEY_MY_KEY = "myKey";
+ /**
+ * Constructs a new GetVehicleData object
+ */
+
+ public GetVehicleData() {
+ super(FunctionID.GET_VEHICLE_DATA.toString());
+ }
+ /**
+ * <p>
+ * Constructs a new GetVehicleDta object indicated by the Hashtable
+ * parameter
+ * </p>
+ *
+ * @param hash
+ * The Hashtable to use
+ */
+
+ public GetVehicleData(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+ public void setGps(Boolean gps) {
+ if (gps != null) {
+ parameters.put(KEY_GPS, gps);
+ } else {
+ parameters.remove(KEY_GPS);
+ }
+ }
+ public Boolean getGps() {
+ return (Boolean) parameters.get(KEY_GPS);
+ }
+ public void setSpeed(Boolean speed) {
+ if (speed != null) {
+ parameters.put(KEY_SPEED, speed);
+ } else {
+ parameters.remove(KEY_SPEED);
+ }
+ }
+ public Boolean getSpeed() {
+ return (Boolean) parameters.get(KEY_SPEED);
+ }
+ public void setRpm(Boolean rpm) {
+ if (rpm != null) {
+ parameters.put(KEY_RPM, rpm);
+ } else {
+ parameters.remove(KEY_RPM);
+ }
+ }
+ public Boolean getRpm() {
+ return (Boolean) parameters.get(KEY_RPM);
+ }
+ public void setFuelLevel(Boolean fuelLevel) {
+ if (fuelLevel != null) {
+ parameters.put(KEY_FUEL_LEVEL, fuelLevel);
+ } else {
+ parameters.remove(KEY_FUEL_LEVEL);
+ }
+ }
+ public Boolean getFuelLevel() {
+ return (Boolean) parameters.get(KEY_FUEL_LEVEL);
+ }
+ @Deprecated
+ public void setFuelLevel_State(Boolean fuelLevel_State) {
+ setFuelLevelState(fuelLevel_State);
+ }
+ @Deprecated
+ public Boolean getFuelLevel_State() {
+ return getFuelLevelState();
+ }
+ public void setFuelLevelState(Boolean fuelLevelState) {
+ if (fuelLevelState != null) {
+ parameters.put(KEY_FUEL_LEVEL_STATE, fuelLevelState);
+ } else {
+ parameters.remove(KEY_FUEL_LEVEL_STATE);
+ }
+ }
+ public Boolean getFuelLevelState() {
+ return (Boolean) parameters.get(KEY_FUEL_LEVEL_STATE);
+ }
+ public void setInstantFuelConsumption(Boolean instantFuelConsumption) {
+ if (instantFuelConsumption != null) {
+ parameters.put(KEY_INSTANT_FUEL_CONSUMPTION, instantFuelConsumption);
+ } else {
+ parameters.remove(KEY_INSTANT_FUEL_CONSUMPTION);
+ }
+ }
+ public Boolean getInstantFuelConsumption() {
+ return (Boolean) parameters.get(KEY_INSTANT_FUEL_CONSUMPTION);
+ }
+ public void setExternalTemperature(Boolean externalTemperature) {
+ if (externalTemperature != null) {
+ parameters.put(KEY_EXTERNAL_TEMPERATURE, externalTemperature);
+ } else {
+ parameters.remove(KEY_EXTERNAL_TEMPERATURE);
+ }
+ }
+ public Boolean getExternalTemperature() {
+ return (Boolean) parameters.get(KEY_EXTERNAL_TEMPERATURE);
+ }
+
+ public void setVin(Boolean vin) {
+ if (vin != null) {
+ parameters.put(KEY_VIN, vin);
+ } else {
+ parameters.remove(KEY_VIN);
+ }
+ }
+ public Boolean getVin() {
+ return (Boolean) parameters.get(KEY_VIN);
+ }
+
+ public void setPrndl(Boolean prndl) {
+ if (prndl != null) {
+ parameters.put(KEY_PRNDL, prndl);
+ } else {
+ parameters.remove(KEY_PRNDL);
+ }
+ }
+ public Boolean getPrndl() {
+ return (Boolean) parameters.get(KEY_PRNDL);
+ }
+ public void setTirePressure(Boolean tirePressure) {
+ if (tirePressure != null) {
+ parameters.put(KEY_TIRE_PRESSURE, tirePressure);
+ } else {
+ parameters.remove(KEY_TIRE_PRESSURE);
+ }
+ }
+ public Boolean getTirePressure() {
+ return (Boolean) parameters.get(KEY_TIRE_PRESSURE);
+ }
+ public void setOdometer(Boolean odometer) {
+ if (odometer != null) {
+ parameters.put(KEY_ODOMETER, odometer);
+ } else {
+ parameters.remove(KEY_ODOMETER);
+ }
+ }
+ public Boolean getOdometer() {
+ return (Boolean) parameters.get(KEY_ODOMETER);
+ }
+ public void setBeltStatus(Boolean beltStatus) {
+ if (beltStatus != null) {
+ parameters.put(KEY_BELT_STATUS, beltStatus);
+ } else {
+ parameters.remove(KEY_BELT_STATUS);
+ }
+ }
+ public Boolean getBeltStatus() {
+ return (Boolean) parameters.get(KEY_BELT_STATUS);
+ }
+ public void setBodyInformation(Boolean bodyInformation) {
+ if (bodyInformation != null) {
+ parameters.put(KEY_BODY_INFORMATION, bodyInformation);
+ } else {
+ parameters.remove(KEY_BODY_INFORMATION);
+ }
+ }
+ public Boolean getBodyInformation() {
+ return (Boolean) parameters.get(KEY_BODY_INFORMATION);
+ }
+ public void setDeviceStatus(Boolean deviceStatus) {
+ if (deviceStatus != null) {
+ parameters.put(KEY_DEVICE_STATUS, deviceStatus);
+ } else {
+ parameters.remove(KEY_DEVICE_STATUS);
+ }
+ }
+ public Boolean getDeviceStatus() {
+ return (Boolean) parameters.get(KEY_DEVICE_STATUS);
+ }
+ public void setDriverBraking(Boolean driverBraking) {
+ if (driverBraking != null) {
+ parameters.put(KEY_DRIVER_BRAKING, driverBraking);
+ } else {
+ parameters.remove(KEY_DRIVER_BRAKING);
+ }
+ }
+ public Boolean getDriverBraking() {
+ return (Boolean) parameters.get(KEY_DRIVER_BRAKING);
+ }
+ public void setWiperStatus(Boolean wiperStatus) {
+ if (wiperStatus != null) {
+ parameters.put(KEY_WIPER_STATUS, wiperStatus);
+ } else {
+ parameters.remove(KEY_WIPER_STATUS);
+ }
+ }
+ public Boolean getWiperStatus() {
+ return (Boolean) parameters.get(KEY_WIPER_STATUS);
+ }
+ public void setHeadLampStatus(Boolean headLampStatus) {
+ if (headLampStatus != null) {
+ parameters.put(KEY_HEAD_LAMP_STATUS, headLampStatus);
+ } else {
+ parameters.remove(KEY_HEAD_LAMP_STATUS);
+ }
+ }
+ public Boolean getHeadLampStatus() {
+ return (Boolean) parameters.get(KEY_HEAD_LAMP_STATUS);
+ }
+ public void setEngineTorque(Boolean engineTorque) {
+ if (engineTorque != null) {
+ parameters.put(KEY_ENGINE_TORQUE, engineTorque);
+ } else {
+ parameters.remove(KEY_ENGINE_TORQUE);
+ }
+ }
+ public Boolean getEngineTorque() {
+ return (Boolean) parameters.get(KEY_ENGINE_TORQUE);
+ }
+ public void setAccPedalPosition(Boolean accPedalPosition) {
+ if (accPedalPosition != null) {
+ parameters.put(KEY_ACC_PEDAL_POSITION, accPedalPosition);
+ } else {
+ parameters.remove(KEY_ACC_PEDAL_POSITION);
+ }
+ }
+ public Boolean getAccPedalPosition() {
+ return (Boolean) parameters.get(KEY_ACC_PEDAL_POSITION);
+ }
+
+ public void setSteeringWheelAngle(Boolean steeringWheelAngle) {
+ if (steeringWheelAngle != null) {
+ parameters.put(KEY_STEERING_WHEEL_ANGLE, steeringWheelAngle);
+ } else {
+ parameters.remove(KEY_STEERING_WHEEL_ANGLE);
+ }
+ }
+ public Boolean getSteeringWheelAngle() {
+ return (Boolean) parameters.get(KEY_STEERING_WHEEL_ANGLE);
+ }
+ public void setECallInfo(Boolean eCallInfo) {
+ if (eCallInfo != null) {
+ parameters.put(KEY_E_CALL_INFO, eCallInfo);
+ } else {
+ parameters.remove(KEY_E_CALL_INFO);
+ }
+ }
+ public Boolean getECallInfo() {
+ return (Boolean) parameters.get(KEY_E_CALL_INFO);
+ }
+
+
+ public void setAirbagStatus(Boolean airbagStatus) {
+ if (airbagStatus != null) {
+ parameters.put(KEY_AIRBAG_STATUS, airbagStatus);
+ } else {
+ parameters.remove(KEY_AIRBAG_STATUS);
+ }
+ }
+ public Boolean getAirbagStatus() {
+ return (Boolean) parameters.get(KEY_AIRBAG_STATUS);
+ }
+ public void setEmergencyEvent(Boolean emergencyEvent) {
+ if (emergencyEvent != null) {
+ parameters.put(KEY_EMERGENCY_EVENT, emergencyEvent);
+ } else {
+ parameters.remove(KEY_EMERGENCY_EVENT);
+ }
+ }
+ public Boolean getEmergencyEvent() {
+ return (Boolean) parameters.get(KEY_EMERGENCY_EVENT);
+ }
+ public void setClusterModeStatus(Boolean clusterModeStatus) {
+ if (clusterModeStatus != null) {
+ parameters.put(KEY_CLUSTER_MODE_STATUS, clusterModeStatus);
+ } else {
+ parameters.remove(KEY_CLUSTER_MODE_STATUS);
+ }
+ }
+ public Boolean getClusterModeStatus() {
+ return (Boolean) parameters.get(KEY_CLUSTER_MODE_STATUS);
+ }
+ public void setMyKey(Boolean myKey) {
+ if (myKey != null) {
+ parameters.put(KEY_MY_KEY, myKey);
+ } else {
+ parameters.remove(KEY_MY_KEY);
+ }
+ }
+ public Boolean getMyKey() {
+ return (Boolean) parameters.get(KEY_MY_KEY);
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/GetVehicleDataResponse.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/GetVehicleDataResponse.java
new file mode 100644
index 000000000..51eb7a4b7
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/GetVehicleDataResponse.java
@@ -0,0 +1,481 @@
+package com.smartdevicelink.proxy.rpc;
+
+
+import java.util.Hashtable;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCResponse;
+import com.smartdevicelink.proxy.rpc.enums.ComponentVolumeStatus;
+import com.smartdevicelink.proxy.rpc.enums.PRNDL;
+import com.smartdevicelink.proxy.rpc.enums.VehicleDataEventStatus;
+import com.smartdevicelink.proxy.rpc.enums.WiperStatus;
+import com.smartdevicelink.util.DebugTool;
+import com.smartdevicelink.util.SdlDataTypeConverter;
+
+/**
+ * Get Vehicle Data Response is sent, when GetVehicleData has been called.
+ *
+ * @since SmartDeviceLink 2.0
+ */
+public class GetVehicleDataResponse extends RPCResponse {
+ public static final String KEY_SPEED = "speed";
+ public static final String KEY_RPM = "rpm";
+ public static final String KEY_EXTERNAL_TEMPERATURE = "externalTemperature";
+ public static final String KEY_FUEL_LEVEL = "fuelLevel";
+ public static final String KEY_VIN = "vin";
+ public static final String KEY_PRNDL = "prndl";
+ public static final String KEY_TIRE_PRESSURE = "tirePressure";
+ public static final String KEY_ENGINE_TORQUE = "engineTorque";
+ public static final String KEY_ODOMETER = "odometer";
+ public static final String KEY_GPS = "gps";
+ public static final String KEY_FUEL_LEVEL_STATE = "fuelLevel_State";
+ public static final String KEY_INSTANT_FUEL_CONSUMPTION = "instantFuelConsumption";
+ public static final String KEY_BELT_STATUS = "beltStatus";
+ public static final String KEY_BODY_INFORMATION = "bodyInformation";
+ public static final String KEY_DEVICE_STATUS = "deviceStatus";
+ public static final String KEY_DRIVER_BRAKING = "driverBraking";
+ public static final String KEY_WIPER_STATUS = "wiperStatus";
+ public static final String KEY_HEAD_LAMP_STATUS = "headLampStatus";
+ public static final String KEY_ACC_PEDAL_POSITION = "accPedalPosition";
+ public static final String KEY_STEERING_WHEEL_ANGLE = "steeringWheelAngle";
+ public static final String KEY_E_CALL_INFO = "eCallInfo";
+ public static final String KEY_AIRBAG_STATUS = "airbagStatus";
+ public static final String KEY_EMERGENCY_EVENT = "emergencyEvent";
+ public static final String KEY_CLUSTER_MODE_STATUS = "clusterModeStatus";
+ public static final String KEY_MY_KEY = "myKey";
+
+ /**
+ * Constructs a new GetVehicleDataResponse object
+ */
+
+ public GetVehicleDataResponse() {
+ super(FunctionID.GET_VEHICLE_DATA.toString());
+ }
+ public GetVehicleDataResponse(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+ public void setGps(GPSData gps) {
+ if (gps != null) {
+ parameters.put(KEY_GPS, gps);
+ } else {
+ parameters.remove(KEY_GPS);
+ }
+ }
+ @SuppressWarnings("unchecked")
+ public GPSData getGps() {
+ Object obj = parameters.get(KEY_GPS);
+ if (obj instanceof GPSData) {
+ return (GPSData) obj;
+ } else if (obj instanceof Hashtable) {
+ GPSData theCode = null;
+ try {
+ theCode = new GPSData((Hashtable<String, Object>) obj);
+ } catch (Exception e) {
+ DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_GPS, e);
+ }
+ return theCode;
+ }
+ return null;
+ }
+ public void setSpeed(Double speed) {
+ if (speed != null) {
+ parameters.put(KEY_SPEED, speed);
+ } else {
+ parameters.remove(KEY_SPEED);
+ }
+ }
+ public Double getSpeed() {
+ Object object = parameters.get(KEY_SPEED);
+ return SdlDataTypeConverter.objectToDouble(object);
+ }
+ public void setRpm(Integer rpm) {
+ if (rpm != null) {
+ parameters.put(KEY_RPM, rpm);
+ } else {
+ parameters.remove(KEY_RPM);
+ }
+ }
+ public Integer getRpm() {
+ return (Integer) parameters.get(KEY_RPM);
+ }
+ public void setFuelLevel(Double fuelLevel) {
+ if (fuelLevel != null) {
+ parameters.put(KEY_FUEL_LEVEL, fuelLevel);
+ } else {
+ parameters.remove(KEY_FUEL_LEVEL);
+ }
+ }
+ public Double getFuelLevel() {
+ Object object = parameters.get(KEY_FUEL_LEVEL);
+ return SdlDataTypeConverter.objectToDouble(object);
+ }
+ @Deprecated
+ public void setFuelLevel_State(ComponentVolumeStatus fuelLevel_State) {
+ setFuelLevelState(fuelLevel_State);
+ }
+ @Deprecated
+ public ComponentVolumeStatus getFuelLevel_State() {
+ return getFuelLevelState();
+ }
+ public void setFuelLevelState(ComponentVolumeStatus fuelLevelState) {
+ if (fuelLevelState != null) {
+ parameters.put(KEY_FUEL_LEVEL_STATE, fuelLevelState);
+ } else {
+ parameters.remove(KEY_FUEL_LEVEL_STATE);
+ }
+ }
+ public ComponentVolumeStatus getFuelLevelState() {
+ Object obj = parameters.get(KEY_FUEL_LEVEL_STATE);
+ if (obj instanceof ComponentVolumeStatus) {
+ return (ComponentVolumeStatus) obj;
+ } else if (obj instanceof String) {
+ ComponentVolumeStatus theCode = null;
+ try {
+ theCode = ComponentVolumeStatus.valueForString((String) obj);
+ } catch (Exception e) {
+ DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_FUEL_LEVEL_STATE, e);
+ }
+ return theCode;
+ }
+ return null;
+ }
+ public void setInstantFuelConsumption(Double instantFuelConsumption) {
+ if (instantFuelConsumption != null) {
+ parameters.put(KEY_INSTANT_FUEL_CONSUMPTION, instantFuelConsumption);
+ } else {
+ parameters.remove(KEY_INSTANT_FUEL_CONSUMPTION);
+ }
+ }
+ public Double getInstantFuelConsumption() {
+ Object object = parameters.get(KEY_INSTANT_FUEL_CONSUMPTION);
+ return SdlDataTypeConverter.objectToDouble(object);
+ }
+ public void setExternalTemperature(Double externalTemperature) {
+ if (externalTemperature != null) {
+ parameters.put(KEY_EXTERNAL_TEMPERATURE, externalTemperature);
+ } else {
+ parameters.remove(KEY_EXTERNAL_TEMPERATURE);
+ }
+ }
+ public Double getExternalTemperature() {
+ Object object = parameters.get(KEY_EXTERNAL_TEMPERATURE);
+ return SdlDataTypeConverter.objectToDouble(object);
+ }
+ public void setVin(String vin) {
+ if (vin != null) {
+ parameters.put(KEY_VIN, vin);
+ } else {
+ parameters.remove(KEY_VIN);
+ }
+ }
+ public String getVin() {
+ return (String) parameters.get(KEY_VIN);
+ }
+ public void setPrndl(PRNDL prndl) {
+ if (prndl != null) {
+ parameters.put(KEY_PRNDL, prndl);
+ } else {
+ parameters.remove(KEY_PRNDL);
+ }
+ }
+ public PRNDL getPrndl() {
+ Object obj = parameters.get(KEY_PRNDL);
+ if (obj instanceof PRNDL) {
+ return (PRNDL) obj;
+ } else if (obj instanceof String) {
+ return PRNDL.valueForString((String) obj);
+ }
+ return null;
+ }
+ public void setTirePressure(TireStatus tirePressure) {
+ if (tirePressure != null) {
+ parameters.put(KEY_TIRE_PRESSURE, tirePressure);
+ } else {
+ parameters.remove(KEY_TIRE_PRESSURE);
+ }
+ }
+ @SuppressWarnings("unchecked")
+ public TireStatus getTirePressure() {
+ Object obj = parameters.get(KEY_TIRE_PRESSURE);
+ if (obj instanceof TireStatus) {
+ return (TireStatus) obj;
+ } else if (obj instanceof Hashtable) {
+ try {
+ return new TireStatus((Hashtable<String, Object>) obj);
+ } catch (Exception e) {
+ DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_TIRE_PRESSURE, e);
+ }
+ }
+ return null;
+ }
+ public void setOdometer(Integer odometer) {
+ if (odometer != null) {
+ parameters.put(KEY_ODOMETER, odometer);
+ } else {
+ parameters.remove(KEY_ODOMETER);
+ }
+ }
+ public Integer getOdometer() {
+ return (Integer) parameters.get(KEY_ODOMETER);
+ }
+ public void setBeltStatus(BeltStatus beltStatus) {
+ if (beltStatus != null) {
+ parameters.put(KEY_BELT_STATUS, beltStatus);
+ } else {
+ parameters.remove(KEY_BELT_STATUS);
+ }
+ }
+ @SuppressWarnings("unchecked")
+ public BeltStatus getBeltStatus() {
+ Object obj = parameters.get(KEY_BELT_STATUS);
+ if (obj instanceof BeltStatus) {
+ return (BeltStatus) obj;
+ } else if (obj instanceof Hashtable) {
+ try {
+ return new BeltStatus((Hashtable<String, Object>) obj);
+ } catch (Exception e) {
+ DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_BELT_STATUS, e);
+ }
+ }
+ return null;
+ }
+ public void setBodyInformation(BodyInformation bodyInformation) {
+ if (bodyInformation != null) {
+ parameters.put(KEY_BODY_INFORMATION, bodyInformation);
+ } else {
+ parameters.remove(KEY_BODY_INFORMATION);
+ }
+ }
+ @SuppressWarnings("unchecked")
+ public BodyInformation getBodyInformation() {
+ Object obj = parameters.get(KEY_BODY_INFORMATION);
+ if (obj instanceof BodyInformation) {
+ return (BodyInformation) obj;
+ } else if (obj instanceof Hashtable) {
+ try {
+ return new BodyInformation((Hashtable<String, Object>) obj);
+ } catch (Exception e) {
+ DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_BODY_INFORMATION, e);
+ }
+ }
+ return null;
+ }
+ public void setDeviceStatus(DeviceStatus deviceStatus) {
+ if (deviceStatus != null) {
+ parameters.put(KEY_DEVICE_STATUS, deviceStatus);
+ } else {
+ parameters.remove(KEY_DEVICE_STATUS);
+ }
+ }
+ @SuppressWarnings("unchecked")
+ public DeviceStatus getDeviceStatus() {
+ Object obj = parameters.get(KEY_DEVICE_STATUS);
+ if (obj instanceof DeviceStatus) {
+ return (DeviceStatus) obj;
+ } else if (obj instanceof Hashtable) {
+ try {
+ return new DeviceStatus((Hashtable<String, Object>) obj);
+ } catch (Exception e) {
+ DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_DEVICE_STATUS, e);
+ }
+ }
+ return null;
+ }
+ public void setDriverBraking(VehicleDataEventStatus driverBraking) {
+ if (driverBraking != null) {
+ parameters.put(KEY_DRIVER_BRAKING, driverBraking);
+ } else {
+ parameters.remove(KEY_DRIVER_BRAKING);
+ }
+ }
+ public VehicleDataEventStatus getDriverBraking() {
+ Object obj = parameters.get(KEY_DRIVER_BRAKING);
+ if (obj instanceof VehicleDataEventStatus) {
+ return (VehicleDataEventStatus) obj;
+ } else if (obj instanceof String) {
+ return VehicleDataEventStatus.valueForString((String) obj);
+ }
+ return null;
+ }
+ public void setWiperStatus(WiperStatus wiperStatus) {
+ if (wiperStatus != null) {
+ parameters.put(KEY_WIPER_STATUS, wiperStatus);
+ } else {
+ parameters.remove(KEY_WIPER_STATUS);
+ }
+ }
+ public WiperStatus getWiperStatus() {
+ Object obj = parameters.get(KEY_WIPER_STATUS);
+ if (obj instanceof WiperStatus) {
+ return (WiperStatus) obj;
+ } else if (obj instanceof String) {
+ return WiperStatus.valueForString((String) obj);
+ }
+ return null;
+ }
+
+ public void setHeadLampStatus(HeadLampStatus headLampStatus) {
+ if (headLampStatus != null) {
+ parameters.put(KEY_HEAD_LAMP_STATUS, headLampStatus);
+ } else {
+ parameters.remove(KEY_HEAD_LAMP_STATUS);
+ }
+ }
+ @SuppressWarnings("unchecked")
+ public HeadLampStatus getHeadLampStatus() {
+ Object obj = parameters.get(KEY_HEAD_LAMP_STATUS);
+ if (obj instanceof HeadLampStatus) {
+ return (HeadLampStatus) obj;
+ } else if (obj instanceof Hashtable) {
+ try {
+ return new HeadLampStatus((Hashtable<String, Object>) obj);
+ } catch (Exception e) {
+ DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_HEAD_LAMP_STATUS, e);
+ }
+ }
+ return null;
+ }
+ public void setEngineTorque(Double engineTorque) {
+ if (engineTorque != null) {
+ parameters.put(KEY_ENGINE_TORQUE, engineTorque);
+ } else {
+ parameters.remove(KEY_ENGINE_TORQUE);
+ }
+ }
+ public Double getEngineTorque() {
+ Object object = parameters.get(KEY_ENGINE_TORQUE);
+ return SdlDataTypeConverter.objectToDouble(object);
+ }
+
+ public void setAccPedalPosition(Double accPedalPosition) {
+ if (accPedalPosition != null) {
+ parameters.put(KEY_ACC_PEDAL_POSITION, accPedalPosition);
+ } else {
+ parameters.remove(KEY_ACC_PEDAL_POSITION);
+ }
+ }
+ public Double getAccPedalPosition() {
+ Object object = parameters.get(KEY_ACC_PEDAL_POSITION);
+ return SdlDataTypeConverter.objectToDouble(object);
+ }
+
+ public void setSteeringWheelAngle(Double steeringWheelAngle) {
+ if (steeringWheelAngle != null) {
+ parameters.put(KEY_STEERING_WHEEL_ANGLE, steeringWheelAngle);
+ } else {
+ parameters.remove(KEY_STEERING_WHEEL_ANGLE);
+ }
+ }
+ public Double getSteeringWheelAngle() {
+ Object object = parameters.get(KEY_STEERING_WHEEL_ANGLE);
+ return SdlDataTypeConverter.objectToDouble(object);
+ }
+
+ public void setECallInfo(ECallInfo eCallInfo) {
+ if (eCallInfo != null) {
+ parameters.put(KEY_E_CALL_INFO, eCallInfo);
+ } else {
+ parameters.remove(KEY_E_CALL_INFO);
+ }
+ }
+ @SuppressWarnings("unchecked")
+ public ECallInfo getECallInfo() {
+ Object obj = parameters.get(KEY_E_CALL_INFO);
+ if (obj instanceof ECallInfo) {
+ return (ECallInfo) obj;
+ } else if (obj instanceof Hashtable) {
+ try {
+ return new ECallInfo((Hashtable<String, Object>) obj);
+ } catch (Exception e) {
+ DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_E_CALL_INFO, e);
+ }
+ }
+ return null;
+ }
+
+ public void setAirbagStatus(AirbagStatus airbagStatus) {
+ if (airbagStatus != null) {
+ parameters.put(KEY_AIRBAG_STATUS, airbagStatus);
+ } else {
+ parameters.remove(KEY_AIRBAG_STATUS);
+ }
+ }
+ @SuppressWarnings("unchecked")
+ public AirbagStatus getAirbagStatus() {
+ Object obj = parameters.get(KEY_AIRBAG_STATUS);
+ if (obj instanceof AirbagStatus) {
+ return (AirbagStatus) obj;
+ } else if (obj instanceof Hashtable) {
+ try {
+ return new AirbagStatus((Hashtable<String, Object>) obj);
+ } catch (Exception e) {
+ DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_AIRBAG_STATUS, e);
+ }
+ }
+ return null;
+ }
+
+ public void setEmergencyEvent(EmergencyEvent emergencyEvent) {
+ if (emergencyEvent != null) {
+ parameters.put(KEY_EMERGENCY_EVENT, emergencyEvent);
+ } else {
+ parameters.remove(KEY_EMERGENCY_EVENT);
+ }
+ }
+ @SuppressWarnings("unchecked")
+ public EmergencyEvent getEmergencyEvent() {
+ Object obj = parameters.get(KEY_EMERGENCY_EVENT);
+ if (obj instanceof EmergencyEvent) {
+ return (EmergencyEvent) obj;
+ } else if (obj instanceof Hashtable) {
+ try {
+ return new EmergencyEvent((Hashtable<String, Object>) obj);
+ } catch (Exception e) {
+ DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_EMERGENCY_EVENT, e);
+ }
+ }
+ return null;
+ }
+ public void setClusterModeStatus(ClusterModeStatus clusterModeStatus) {
+ if (clusterModeStatus != null) {
+ parameters.put(KEY_CLUSTER_MODE_STATUS, clusterModeStatus);
+ } else {
+ parameters.remove(KEY_CLUSTER_MODE_STATUS);
+ }
+ }
+ @SuppressWarnings("unchecked")
+ public ClusterModeStatus getClusterModeStatus() {
+ Object obj = parameters.get(KEY_CLUSTER_MODE_STATUS);
+ if (obj instanceof ClusterModeStatus) {
+ return (ClusterModeStatus) obj;
+ } else if (obj instanceof Hashtable) {
+ try {
+ return new ClusterModeStatus((Hashtable<String, Object>) obj);
+ } catch (Exception e) {
+ DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_CLUSTER_MODE_STATUS, e);
+ }
+ }
+ return null;
+ }
+ public void setMyKey(MyKey myKey) {
+ if (myKey != null) {
+ parameters.put(KEY_MY_KEY, myKey);
+ } else {
+ parameters.remove(KEY_MY_KEY);
+ }
+ }
+ @SuppressWarnings("unchecked")
+ public MyKey getMyKey() {
+ Object obj = parameters.get(KEY_MY_KEY);
+ if (obj instanceof MyKey) {
+ return (MyKey) obj;
+ } else if (obj instanceof Hashtable) {
+ try {
+ return new MyKey((Hashtable<String, Object>) obj);
+ } catch (Exception e) {
+ DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_MY_KEY, e);
+ }
+ }
+ return null;
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/GetWayPoints.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/GetWayPoints.java
new file mode 100644
index 000000000..f9832da0e
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/GetWayPoints.java
@@ -0,0 +1,37 @@
+package com.smartdevicelink.proxy.rpc;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCRequest;
+import com.smartdevicelink.proxy.rpc.enums.WayPointType;
+
+import java.util.Hashtable;
+
+public class GetWayPoints extends RPCRequest {
+ public static final String KEY_WAY_POINT_TYPE = "wayPointType";
+
+ public GetWayPoints() {
+ super(FunctionID.GET_WAY_POINTS.toString());
+ }
+
+ public GetWayPoints(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+
+ public WayPointType getWayPointType() {
+ Object obj = parameters.get(KEY_WAY_POINT_TYPE);
+ if (obj instanceof WayPointType) {
+ return (WayPointType) obj;
+ } else if (obj instanceof String) {
+ return WayPointType.valueForString((String) obj);
+ }
+ return null;
+ }
+
+ public void setWayPointType(WayPointType wayPointType) {
+ if (wayPointType != null) {
+ parameters.put(KEY_WAY_POINT_TYPE, wayPointType);
+ } else {
+ parameters.remove(KEY_WAY_POINT_TYPE);
+ }
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/GetWayPointsResponse.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/GetWayPointsResponse.java
new file mode 100644
index 000000000..24048c826
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/GetWayPointsResponse.java
@@ -0,0 +1,46 @@
+package com.smartdevicelink.proxy.rpc;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCResponse;
+
+import java.util.ArrayList;
+import java.util.Hashtable;
+import java.util.List;
+
+public class GetWayPointsResponse extends RPCResponse {
+ public static final String KEY_WAY_POINTS = "wayPoints";
+
+ public GetWayPointsResponse() {
+ super(FunctionID.GET_WAY_POINTS.toString());
+ }
+ public GetWayPointsResponse(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+
+ public void setWayPoints(List<LocationDetails> wayPoints) {
+ if (wayPoints != null) {
+ parameters.put(KEY_WAY_POINTS, wayPoints);
+ } else {
+ parameters.remove(KEY_WAY_POINTS);
+ }
+ }
+ @SuppressWarnings("unchecked")
+ public List<LocationDetails> getWayPoints() {
+ if (parameters.get(KEY_WAY_POINTS) instanceof List<?>) {
+ List<?> list = (List<?>)parameters.get(KEY_WAY_POINTS);
+ if (list != null && list.size() > 0) {
+ Object obj = list.get(0);
+ if (obj instanceof LocationDetails) {
+ return (List<LocationDetails>) list;
+ } else if (obj instanceof Hashtable) {
+ List<LocationDetails> newList = new ArrayList<LocationDetails>();
+ for (Object hashObj : list) {
+ newList.add(new LocationDetails((Hashtable<String, Object>)hashObj));
+ }
+ return newList;
+ }
+ }
+ }
+ return null;
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/HMICapabilities.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/HMICapabilities.java
new file mode 100644
index 000000000..efc94f57c
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/HMICapabilities.java
@@ -0,0 +1,49 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+
+import com.smartdevicelink.proxy.RPCStruct;
+
+public class HMICapabilities extends RPCStruct{
+ public static final String KEY_NAVIGATION = "navigation";
+ public static final String KEY_PHONE_CALL = "phoneCall";
+
+ public HMICapabilities() { }
+
+ public HMICapabilities(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+
+ public boolean isNavigationAvailable(){
+ Object available = store.get(KEY_NAVIGATION);
+ if(available == null){
+ return false;
+ }
+ return (Boolean)available;
+ }
+
+ public void setNavigationAvilable(Boolean available){
+ if (available) {
+ store.put(KEY_NAVIGATION, available);
+ } else {
+ store.remove(KEY_NAVIGATION);
+ }
+ }
+
+ public boolean isPhoneCallAvailable(){
+ Object available = store.get(KEY_PHONE_CALL);
+ if(available == null){
+ return false;
+ }
+ return (Boolean)available;
+ }
+
+ public void setPhoneCallAvilable(Boolean available){
+ if (available) {
+ store.put(KEY_PHONE_CALL, available);
+ } else {
+ store.remove(KEY_PHONE_CALL);
+ }
+ }
+
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/HMIPermissions.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/HMIPermissions.java
new file mode 100644
index 000000000..d8223279a
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/HMIPermissions.java
@@ -0,0 +1,139 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.ArrayList;
+import java.util.Hashtable;
+import java.util.List;
+
+import com.smartdevicelink.proxy.RPCStruct;
+import com.smartdevicelink.proxy.rpc.enums.HMILevel;
+/**
+ * Defining sets of HMI levels, which are permitted or prohibited for a given RPC.
+ * <p><b>Parameter List</b></p>
+ * <table border="1" rules="all">
+ * <tr>
+ * <th>Name</th>
+ * <th>Type</th>
+ * <th>Description</th>
+ * <th>SmartDeviceLink Ver. Available</th>
+ * </tr>
+ * <tr>
+ * <td>allowed</td>
+ * <td>HMILevel</td>
+ * <td>A set of all HMI levels that are permitted for this given RPC.
+ * <ul>
+ * <li>Min: 0</li>
+ * <li>Max: 100</li>
+ * </ul>
+ * </td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>userDisallowed</td>
+ * <td>HMILevel</td>
+ * <td>A set of all HMI levels that are prohibited for this given RPC.
+ * <ul>
+ * <li>Min: 0</li>
+ * <li>Max: 100</li>
+ * </ul>
+ * </td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * </table>
+ * @since SmartDeviceLink 2.0
+ */
+public class HMIPermissions extends RPCStruct {
+ public static final String KEY_ALLOWED = "allowed";
+ public static final String KEY_USER_DISALLOWED = "userDisallowed";
+ /**
+ * Constructs a newly allocated HMIPermissions object
+ */
+ public HMIPermissions() { }
+
+ /**
+ * Constructs a newly allocated HMIPermissions object indicated by the Hashtable parameter
+ * @param hash The Hashtable to use
+ */
+ public HMIPermissions(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+
+ /**
+ * get a set of all HMI levels that are permitted for this given RPC.
+ * @return a set of all HMI levels that are permitted for this given RPC
+ */
+ @SuppressWarnings("unchecked")
+ public List<HMILevel> getAllowed() {
+ if (store.get(KEY_ALLOWED) instanceof List<?>) {
+ List<?> list = (List<?>)store.get(KEY_ALLOWED);
+ if (list != null && list.size() > 0) {
+ Object obj = list.get(0);
+ if (obj instanceof HMILevel) {
+ return (List<HMILevel>) list;
+ } else if (obj instanceof String) {
+ List<HMILevel> newList = new ArrayList<HMILevel>();
+ for (Object hashObj : list) {
+ String strFormat = (String)hashObj;
+ HMILevel toAdd = HMILevel.valueForString(strFormat);
+ if (toAdd != null) {
+ newList.add(toAdd);
+ }
+ }
+ return newList;
+ }
+ }
+ }
+ return null;
+ }
+
+ /**
+ * set HMI level that is permitted for this given RPC.
+ * @param allowed HMI level that is permitted for this given RPC
+ */
+ public void setAllowed(List<HMILevel> allowed) {
+ if (allowed != null) {
+ store.put(KEY_ALLOWED, allowed);
+ } else {
+ store.remove(KEY_ALLOWED);
+ }
+ }
+
+ /**
+ * get a set of all HMI levels that are prohibited for this given RPC
+ * @return a set of all HMI levels that are prohibited for this given RPC
+ */
+ @SuppressWarnings("unchecked")
+ public List<HMILevel> getUserDisallowed() {
+ if (store.get(KEY_USER_DISALLOWED) instanceof List<?>) {
+ List<?> list = (List<?>)store.get(KEY_USER_DISALLOWED);
+ if (list != null && list.size() > 0) {
+ Object obj = list.get(0);
+ if (obj instanceof HMILevel) {
+ return (List<HMILevel>) list;
+ } else if (obj instanceof String) {
+ List<HMILevel> newList = new ArrayList<HMILevel>();
+ for (Object hashObj : list) {
+ String strFormat = (String)hashObj;
+ HMILevel toAdd = HMILevel.valueForString(strFormat);
+ if (toAdd != null) {
+ newList.add(toAdd);
+ }
+ }
+ return newList;
+ }
+ }
+ }
+ return null;
+ }
+
+ /**
+ * set a set of all HMI levels that are prohibited for this given RPC
+ * @param userDisallowed HMI level that is prohibited for this given RPC
+ */
+ public void setUserDisallowed(List<HMILevel> userDisallowed) {
+ if (userDisallowed != null) {
+ store.put(KEY_USER_DISALLOWED, userDisallowed);
+ } else {
+ store.remove(KEY_USER_DISALLOWED);
+ }
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/HeadLampStatus.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/HeadLampStatus.java
new file mode 100644
index 000000000..46a982fe2
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/HeadLampStatus.java
@@ -0,0 +1,93 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+
+import com.smartdevicelink.proxy.RPCStruct;
+import com.smartdevicelink.proxy.rpc.enums.AmbientLightStatus;
+/** Status of the head lamps.
+ *
+ * <p><table border="1" rules="all"></p>
+ * <tr>
+ * <th>Param Name</th>
+ * <th>Type</th>
+ * <th>Mandatory</th>
+ * <th>Description</th>
+ * </tr>
+ * <tr>
+ * <td>lowBeamsOn</td>
+ * <td>Boolean</td>
+ * <td>true</td>
+ * <td>Status of the low beam lamps. </td>
+ * </tr>
+ * <tr>
+ * <td>highBeamsOn</td>
+ * <td>Boolean</td>
+ * <td>true</td>
+ * <td>Status of the high beam lamps. </td>
+ * </tr>
+ * <tr>
+ * <td>ambientLightSensorStatus</td>
+ * <td>AmbientLightStatus</td>
+ * <td>true</td>
+ * <td>Status of the ambient light sensor.</td>
+ * </tr>
+ *
+ *
+ * </table>
+ * @see OnVehicleData
+ * @see GetVehicleData
+ * @since SmartDeviceLink 1.0
+ *
+ */
+
+public class HeadLampStatus extends RPCStruct {
+ public static final String KEY_AMBIENT_LIGHT_SENSOR_STATUS = "ambientLightSensorStatus";
+ public static final String KEY_HIGH_BEAMS_ON = "highBeamsOn";
+ public static final String KEY_LOW_BEAMS_ON = "lowBeamsOn";
+ /**<p> Constructs a new HeadLampStatus object indicated by the Hashtable
+ * parameter</p>
+ * @param hash
+ * The hash table to use
+ */
+
+ public HeadLampStatus() {}
+ public HeadLampStatus(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+ public void setAmbientLightStatus(AmbientLightStatus ambientLightSensorStatus) {
+ if (ambientLightSensorStatus != null) {
+ store.put(KEY_AMBIENT_LIGHT_SENSOR_STATUS, ambientLightSensorStatus);
+ } else {
+ store.remove(KEY_AMBIENT_LIGHT_SENSOR_STATUS);
+ }
+ }
+ public AmbientLightStatus getAmbientLightStatus() {
+ Object obj = store.get(KEY_AMBIENT_LIGHT_SENSOR_STATUS);
+ if (obj instanceof AmbientLightStatus) {
+ return (AmbientLightStatus) obj;
+ } else if (obj instanceof String) {
+ return AmbientLightStatus.valueForString((String) obj);
+ }
+ return null;
+ }
+ public void setHighBeamsOn(Boolean highBeamsOn) {
+ if (highBeamsOn != null) {
+ store.put(KEY_HIGH_BEAMS_ON, highBeamsOn);
+ } else {
+ store.remove(KEY_HIGH_BEAMS_ON);
+ }
+ }
+ public Boolean getHighBeamsOn() {
+ return (Boolean) store.get(KEY_HIGH_BEAMS_ON);
+ }
+ public void setLowBeamsOn(Boolean lowBeamsOn) {
+ if (lowBeamsOn != null) {
+ store.put(KEY_LOW_BEAMS_ON, lowBeamsOn);
+ } else {
+ store.remove(KEY_LOW_BEAMS_ON);
+ }
+ }
+ public Boolean getLowBeamsOn() {
+ return (Boolean) store.get(KEY_LOW_BEAMS_ON);
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/Headers.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/Headers.java
new file mode 100644
index 000000000..2be4f1a17
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/Headers.java
@@ -0,0 +1,159 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+
+import com.smartdevicelink.proxy.RPCStruct;
+/**
+ *
+ * @since SmartDeviceLink 3.0
+ *
+ */
+
+public class Headers extends RPCStruct {
+ public static final String KEY_CONTENT_TYPE = "ContentType";
+ public static final String KEY_CONNECT_TIMEOUT = "ConnectTimeout";
+ public static final String KEY_DO_OUTPUT = "DoOutput";
+ public static final String KEY_DO_INPUT = "DoInput";
+ public static final String KEY_USE_CACHES = "UseCaches";
+ public static final String KEY_REQUEST_METHOD = "RequestMethod";
+ public static final String KEY_READ_TIMEOUT = "ReadTimeout";
+ public static final String KEY_INSTANCE_FOLLOW_REDIRECTS = "InstanceFollowRedirects";
+ public static final String KEY_CHARSET = "charset";
+ public static final String KEY_CONTENT_LENGTH = "Content-Length";
+
+ public Headers() { }
+ /**
+ * <p>
+ * Constructs a new Headers object indicated by the Hashtable
+ * parameter
+ * </p>
+ *
+ * @param hash
+ * The Hashtable to use
+ */
+
+ public Headers(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+
+ public void setContentType(String contenttype) {
+ if (contenttype != null) {
+ store.put(KEY_CONTENT_TYPE, contenttype);
+ } else {
+ store.remove(KEY_CONTENT_TYPE);
+ }
+ }
+
+ public String getContentType() {
+ return (String) store.get(KEY_CONTENT_TYPE);
+ }
+
+ public void setConnectTimeout(Integer connectiontimeout) {
+ if (connectiontimeout != null) {
+ store.put(KEY_CONNECT_TIMEOUT, connectiontimeout);
+ } else {
+ store.remove(KEY_CONNECT_TIMEOUT);
+ }
+ }
+
+ public Integer getConnectTimeout() {
+ return (Integer) store.get(KEY_CONNECT_TIMEOUT);
+ }
+
+ public void setDoOutput(Boolean dooutput) {
+ if (dooutput != null) {
+ store.put(KEY_DO_OUTPUT, dooutput);
+ } else {
+ store.remove(KEY_DO_OUTPUT);
+ }
+ }
+
+ public Boolean getDoOutput() {
+ return (Boolean) store.get(KEY_DO_OUTPUT);
+ }
+
+ public void setDoInput(Boolean dooutput) {
+ if (dooutput != null) {
+ store.put(KEY_DO_INPUT, dooutput);
+ } else {
+ store.remove(KEY_DO_INPUT);
+ }
+ }
+
+ public Boolean getDoInput() {
+ return (Boolean) store.get(KEY_DO_INPUT);
+ }
+
+ public void setUseCaches(Boolean usescaches) {
+ if (usescaches != null) {
+ store.put(KEY_USE_CACHES, usescaches);
+ } else {
+ store.remove(KEY_USE_CACHES);
+ }
+ }
+
+ public Boolean getUseCaches() {
+ return (Boolean) store.get(KEY_USE_CACHES);
+ }
+
+ public void setRequestMethod(String requestmethod) {
+ if (requestmethod != null) {
+ store.put(KEY_REQUEST_METHOD, requestmethod);
+ } else {
+ store.remove(KEY_REQUEST_METHOD);
+ }
+ }
+
+ public String getRequestMethod() {
+ return (String) store.get(KEY_REQUEST_METHOD);
+ }
+
+
+ public void setReadTimeout(Integer readtimeout) {
+ if (readtimeout != null) {
+ store.put(KEY_READ_TIMEOUT, readtimeout);
+ } else {
+ store.remove(KEY_READ_TIMEOUT);
+ }
+ }
+
+ public Integer getReadTimeout() {
+ return (Integer) store.get(KEY_READ_TIMEOUT);
+ }
+
+ public void setInstanceFollowRedirects(Boolean instancefollowredirects) {
+ if (instancefollowredirects != null) {
+ store.put(KEY_INSTANCE_FOLLOW_REDIRECTS, instancefollowredirects);
+ } else {
+ store.remove(KEY_INSTANCE_FOLLOW_REDIRECTS);
+ }
+ }
+
+ public Boolean getInstanceFollowRedirects() {
+ return (Boolean) store.get(KEY_INSTANCE_FOLLOW_REDIRECTS);
+ }
+
+ public void setCharset(String charset) {
+ if (charset != null) {
+ store.put(KEY_CHARSET, charset);
+ } else {
+ store.remove(KEY_CHARSET);
+ }
+ }
+
+ public String getCharset() {
+ return (String) store.get(KEY_CHARSET);
+ }
+
+ public void setContentLength(Integer contentlength) {
+ if (contentlength != null) {
+ store.put(KEY_CONTENT_LENGTH, contentlength);
+ } else {
+ store.remove(KEY_CONTENT_LENGTH);
+ }
+ }
+
+ public Integer getContentLength() {
+ return (Integer) store.get(KEY_CONTENT_LENGTH);
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/Image.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/Image.java
new file mode 100644
index 000000000..76ad2d224
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/Image.java
@@ -0,0 +1,100 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+
+import com.smartdevicelink.proxy.RPCStruct;
+import com.smartdevicelink.proxy.rpc.enums.ImageType;
+
+/**
+ *Specifies, which image shall be used, e.g. in Alerts or on Softbuttons provided the display supports it.
+ *<p><b>Parameter List</b></p>
+ * <table border="1" rules="all">
+ * <tr>
+ * <th>Name</th>
+ * <th>Type</th>
+ * <th>Description</th>
+ * <th>SmartDeviceLink Ver. Available</th>
+ * </tr>
+ * <tr>
+ * <td>value</td>
+ * <td>String</td>
+ * <td>Either the static hex icon value or the binary image file name identifier (sent by PutFile).
+ * <ul>
+ * <li>Min: 0</li>
+ * <li>Max: 65535</li>
+ * </ul>
+ * </td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>imageType</td>
+ * <td>ImageType</td>
+ * <td>Describes, whether it is a static or dynamic image.</td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * </table>
+ * @since SmartDeviceLink 2.0
+ */
+public class Image extends RPCStruct {
+ public static final String KEY_VALUE = "value";
+ public static final String KEY_IMAGE_TYPE = "imageType";
+
+ /**
+ * Constructs a newly allocated Image object
+ */
+ public Image() { }
+
+ /**
+ * Constructs a newly allocated Image object indicated by the Hashtable parameter
+ * @param hash The Hashtable to use
+ */
+ public Image(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+
+ /**
+ * set either the static hex icon value or the binary image file name identifier (sent by PutFile)
+ * @param value either the static hex icon value or the binary image file name identifier (sent by PutFile)
+ */
+ public void setValue(String value) {
+ if (value != null) {
+ store.put(KEY_VALUE, value);
+ } else {
+ store.remove(KEY_VALUE);
+ }
+ }
+
+ /**
+ * get either the static hex icon value or the binary image file name identifier (sent by PutFile)
+ * @return either the static hex icon value or the binary image file name identifier (sent by PutFile)
+ */
+ public String getValue() {
+ return (String) store.get(KEY_VALUE);
+ }
+
+ /**
+ * set the image type
+ * @param imageType whether it is a static or dynamic image
+ */
+ public void setImageType(ImageType imageType) {
+ if (imageType != null) {
+ store.put(KEY_IMAGE_TYPE, imageType);
+ } else {
+ store.remove(KEY_IMAGE_TYPE);
+ }
+ }
+
+ /**
+ * get image type
+ * @return the image type
+ */
+ public ImageType getImageType() {
+ Object obj = store.get(KEY_IMAGE_TYPE);
+ if (obj instanceof ImageType) {
+ return (ImageType) obj;
+ } else if (obj instanceof String) {
+ return ImageType.valueForString((String) obj);
+ }
+ return null;
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/ImageField.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/ImageField.java
new file mode 100644
index 000000000..9e38dc264
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/ImageField.java
@@ -0,0 +1,140 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.ArrayList;
+import java.util.Hashtable;
+import java.util.List;
+
+import com.smartdevicelink.proxy.RPCStruct;
+import com.smartdevicelink.proxy.rpc.enums.FileType;
+import com.smartdevicelink.proxy.rpc.enums.ImageFieldName;
+import com.smartdevicelink.util.DebugTool;
+/** <p>The name that identifies the field.For example AppIcon,SoftButton, LocationImage, etc.</p>
+ *
+ * <p><b>Parameter List</b></p>
+ * <table border="1" rules="all">
+ * <tr>
+ * <th>Name</th>
+ * <th>Type</th>
+ * <th>Description</th>
+ * <th>Reg.</th>
+ * <th>Notes</th>
+ * <th> Version</th>
+ * </tr>
+ * <tr>
+ * <td>name</td>
+ * <td>ImageFieldName</td>
+ * <td>The name that identifies the field.{@linkplain ImageFieldName}</td>
+ * <td></td>
+ * <td></td>
+ * <td>SmartDeviceLink 3.0 </td>
+ * </tr>
+ * <tr>
+ * <td>imageTypeSupported</td>
+ * <td>FileType</td>
+ * <td>The image types that are supported in this field. {@linkplain FileType}</td>
+ * <td></td>
+ * <td>maxlength: 100</td>
+ * <td>SmartDeviceLink 3.0 </td>
+ * </tr>
+ * <tr>
+ * <td>imageResolution</td>
+ * <td>ImageResolution</td>
+ * <td>The image resolution of this field.</td>
+ * <td>Y</td>
+ * <td></td>
+ * <td>SmartDeviceLink 3.0 </td>
+ * </tr>
+ * </table>
+ * @since SmartDeviceLink 3.0
+ * @see DisplayType
+ * @see MediaClockFormat
+ * @see TextFieldName
+ * @see ImageType
+ *
+ *
+ *
+ *
+ */
+
+public class ImageField extends RPCStruct {
+ public static final String KEY_IMAGE_TYPE_SUPPORTED = "imageTypeSupported";
+ public static final String KEY_IMAGE_RESOLUTION = "imageResolution";
+ public static final String KEY_NAME = "name";
+
+
+ public ImageField() { }
+
+ public ImageField(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+ public ImageFieldName getName() {
+ Object obj = store.get(KEY_NAME);
+ if (obj instanceof ImageFieldName) {
+ return (ImageFieldName) obj;
+ } else if (obj instanceof String) {
+ return ImageFieldName.valueForString((String) obj);
+ }
+ return null;
+ }
+ public void setName( ImageFieldName name ) {
+ if (name != null) {
+ store.put(KEY_NAME, name );
+ }
+ else {
+ store.remove(KEY_NAME);
+ }
+ }
+ @SuppressWarnings("unchecked")
+ public List<FileType> getImageTypeSupported() {
+ if (store.get(KEY_IMAGE_TYPE_SUPPORTED) instanceof List<?>) {
+ List<?> list = (List<?>)store.get(KEY_IMAGE_TYPE_SUPPORTED);
+ if (list != null && list.size() > 0) {
+ Object obj = list.get(0);
+ if (obj instanceof FileType) {
+ return (List<FileType>) list;
+ } else if (obj instanceof String) {
+ List<FileType> newList = new ArrayList<FileType>();
+ for (Object hashObj : list) {
+ String strFormat = (String)hashObj;
+ FileType theCode = FileType.valueForString(strFormat);
+ if (theCode != null) {
+ newList.add(theCode);
+ }
+ }
+ return newList;
+ }
+ }
+ }
+ return null;
+ }
+ public void setImageTypeSupported( List<FileType> imageTypeSupported ) {
+ if (imageTypeSupported != null) {
+ store.put(KEY_IMAGE_TYPE_SUPPORTED, imageTypeSupported );
+ }
+ else {
+ store.remove(KEY_IMAGE_TYPE_SUPPORTED);
+ }
+ }
+ @SuppressWarnings("unchecked")
+ public ImageResolution getImageResolution() {
+ Object obj = store.get(KEY_IMAGE_RESOLUTION);
+ if (obj instanceof ImageResolution) {
+ return (ImageResolution) obj;
+ } else if (obj instanceof Hashtable) {
+ try {
+ return new ImageResolution((Hashtable<String, Object>) obj);
+ } catch (Exception e) {
+ DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_IMAGE_RESOLUTION, e);
+ }
+ }
+ return null;
+ }
+ public void setImageResolution( ImageResolution imageResolution ) {
+ if (imageResolution != null) {
+ store.put(KEY_IMAGE_RESOLUTION, imageResolution );
+ }
+ else {
+ store.remove(KEY_IMAGE_RESOLUTION);
+ }
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/ImageResolution.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/ImageResolution.java
new file mode 100644
index 000000000..682092082
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/ImageResolution.java
@@ -0,0 +1,87 @@
+package com.smartdevicelink.proxy.rpc;
+
+import com.smartdevicelink.proxy.RPCStruct;
+
+import java.util.Hashtable;
+/** The image resolution of this field.
+ *
+ * <p><b>Parameter List</b></p>
+ *
+ * <table border="1" rules="all">
+ * <tr>
+ * <th>Name</th>
+ * <th>Type</th>
+ * <th>Description</th>
+ * <th>Reg.</th>
+ * <th>Notes</th>
+ * <th>Version</th>
+ * </tr>
+ * <tr>
+ * <td>resolutionWidth</td>
+ * <td>Integer</td>
+ * <td>The image resolution width.</td>
+ * <td></td>
+ * <td>minvalue:1; maxvalue: 10000</td>
+ * <td>SmartDeviceLink 3.0 </td>
+ * </tr>
+ * <tr>
+ * <td>resolutionHeight</td>
+ * <td>Integer</td>
+ * <td>The image resolution height.</td>
+ * <td></td>
+ * <td>minvalue:1; maxvalue: 10000</td>
+ * <td>SmartDeviceLink 3.0 </td>
+ * </tr>
+ *
+ * </table>
+ * @since SmartDeviceLink 3.0
+ * @see DisplayType
+ * @see MediaClockFormat
+ * @see TextFieldName
+ * @see ImageType
+ *
+ */
+
+public class ImageResolution extends RPCStruct {
+ public static final String KEY_RESOLUTION_WIDTH = "resolutionWidth";
+ public static final String KEY_RESOLUTION_HEIGHT = "resolutionHeight";
+
+ public ImageResolution() {}
+ /**
+ * <p>
+ * Constructs a new ImageResolution object indicated by the Hashtable
+ * parameter
+ * </p>
+ *
+ * @param hash
+ * The Hashtable to use
+ */
+
+ public ImageResolution(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+
+ public void setResolutionWidth(Integer resolutionWidth) {
+ if (resolutionWidth != null) {
+ store.put(KEY_RESOLUTION_WIDTH, resolutionWidth);
+ } else {
+ store.remove(KEY_RESOLUTION_WIDTH);
+ }
+ }
+
+ public Integer getResolutionWidth() {
+ return (Integer) store.get(KEY_RESOLUTION_WIDTH);
+ }
+
+ public void setResolutionHeight(Integer resolutionHeight) {
+ if (resolutionHeight != null) {
+ store.put(KEY_RESOLUTION_HEIGHT, resolutionHeight);
+ } else {
+ store.remove(KEY_RESOLUTION_HEIGHT);
+ }
+ }
+
+ public Integer getResolutionHeight() {
+ return (Integer) store.get(KEY_RESOLUTION_HEIGHT);
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/KeyboardProperties.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/KeyboardProperties.java
new file mode 100644
index 000000000..fb35dcf24
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/KeyboardProperties.java
@@ -0,0 +1,183 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+import java.util.List;
+
+import com.smartdevicelink.proxy.RPCStruct;
+import com.smartdevicelink.proxy.rpc.enums.KeyboardLayout;
+import com.smartdevicelink.proxy.rpc.enums.KeypressMode;
+import com.smartdevicelink.proxy.rpc.enums.Language;
+/** This mode causes the interaction to immediately display a keyboard entry through the HMI.
+ *
+ * <p><b>Parameter List</b></p>
+ * <table border="1" rules="all">
+ * <tr>
+ * <th>Name</th>
+ * <th>Type</th>
+ * <th>Mandatory</th>
+ * <th> Additional</th>
+ * <th>Description</th>
+ * </tr>
+ * <tr>
+ * <td>language</td>
+ * <td>Language</td>
+ * <td>false</td>
+ * <td></td>
+ * <td>The keyboard language. </td>
+ * </tr>
+ * <tr>
+ * <td>keyboardLayout</td>
+ * <td>KeyboardLayout</td>
+ * <td>false</td>
+ * <td></td>
+ * <td>Desired keyboard layout.</td>
+ * </tr>
+ * <tr>
+ * <td>sendDynamicEntry</td>
+ * <td>Boolean</td>
+ * <td>false</td>
+ * <td></td>
+ * <td>In this mode, all keypresses will be sent as they occur. If disabled, entire string of text will be returned only once submitted by user.If omitted, this value will be set to FALSE.</td>
+ * </tr>
+ * <tr>
+ * <td>keypressMode</td>
+ * <td>KeypressMode</td>
+ * <td>False</td>
+ * <td></td>
+ * <td>Desired keypress mode.If omitted, this value will be set to RESEND_CURRENT_ENTRY. </td>
+ * </tr>
+ * <tr>
+ * <td>limitedCharacterList</td>
+ * <td>String</td>
+ * <td>false</td>
+ * <td>Array = true maxlength = 1 minsize = 1 maxsize = 100</td>
+ * <td>Array of keyboard characters to enable. All omitted characters will be greyed out (disabled) on the keyboard. If omitted, the entire keyboard will be enabled.</td>
+ * </tr>
+ *
+ * <tr>
+ * <td>autoCompleteText</td>
+ * <td>String</td>
+ * <td>false</td>
+ * <td>maxlength = 1000 </td>
+ * <td>Allows an app to prepopulate the text field with a suggested or completed entry as the user types.</td>
+ * </tr>
+ * </table>
+ *
+ * @since SmartDeviceLink 3.0
+ *@see ButtonName
+ *
+ */
+
+public class KeyboardProperties extends RPCStruct {
+ public static final String KEY_KEYPRESS_MODE = "keypressMode";
+ public static final String KEY_KEYBOARD_LAYOUT = "keyboardLayout";
+ public static final String KEY_LIMITED_CHARACTER_LIST = "limitedCharacterList";
+ public static final String KEY_AUTO_COMPLETE_TEXT = "autoCompleteText";
+ public static final String KEY_LANGUAGE = "language";
+
+ private static final KeypressMode KEYPRESS_MODE_DEFAULT = KeypressMode.RESEND_CURRENT_ENTRY;
+
+ public KeyboardProperties() {
+ store.put(KEY_KEYPRESS_MODE, KEYPRESS_MODE_DEFAULT);
+ }
+
+ public KeyboardProperties(Hashtable<String, Object> hash) {
+ super(hash);
+ if (!store.containsKey(KEY_KEYPRESS_MODE)) {
+ store.put(KEY_KEYPRESS_MODE, KEYPRESS_MODE_DEFAULT);
+ }
+ }
+
+ public Language getLanguage() {
+ Object obj = store.get(KEY_LANGUAGE);
+ if (obj instanceof Language) {
+ return (Language) obj;
+ } else if (obj instanceof String) {
+ return Language.valueForString((String) obj);
+ }
+ return null;
+ }
+
+ public void setLanguage(Language language) {
+ if (language != null) {
+ store.put(KEY_LANGUAGE, language);
+ } else {
+ store.remove(KEY_LANGUAGE);
+ }
+ }
+
+ public KeyboardLayout getKeyboardLayout() {
+ Object obj = store.get(KEY_KEYBOARD_LAYOUT);
+ if (obj instanceof KeyboardLayout) {
+ return (KeyboardLayout) obj;
+ } else if (obj instanceof String) {
+ return KeyboardLayout.valueForString((String) obj);
+ }
+ return null;
+ }
+
+ public void setKeyboardLayout(KeyboardLayout keyboardLayout) {
+ if (keyboardLayout != null) {
+ store.put(KEY_KEYBOARD_LAYOUT, keyboardLayout);
+ } else {
+ store.remove(KEY_KEYBOARD_LAYOUT);
+ }
+ }
+
+ public KeypressMode getKeypressMode() {
+ Object obj = store.get(KEY_KEYPRESS_MODE);
+ if (obj instanceof KeypressMode) {
+ return (KeypressMode) obj;
+ } else if (obj instanceof String) {
+ return KeypressMode.valueForString((String) obj);
+ }
+ return KEYPRESS_MODE_DEFAULT;
+ }
+
+ public void setKeypressMode(KeypressMode keypressMode) {
+ if (keypressMode != null) {
+ store.put(KEY_KEYPRESS_MODE, keypressMode);
+ } else {
+ store.put(KEY_KEYPRESS_MODE, KEYPRESS_MODE_DEFAULT);
+ }
+ }
+
+ @SuppressWarnings("unchecked")
+ public List<String> getLimitedCharacterList() {
+ final Object listObj = store.get(KEY_LIMITED_CHARACTER_LIST);
+ if (listObj instanceof List<?>) {
+ List<?> list = (List<?>) listObj;
+ if (list != null && list.size() > 0) {
+ Object obj = list.get(0);
+ if (obj instanceof String) {
+ return (List<String>) list;
+ }
+ }
+ }
+ return null;
+ }
+
+ public void setLimitedCharacterList(List<String> limitedCharacterList) {
+ if (limitedCharacterList != null) {
+ store.put(KEY_LIMITED_CHARACTER_LIST, limitedCharacterList);
+ } else {
+ store.remove(KEY_LIMITED_CHARACTER_LIST);
+ }
+ }
+
+ public String getAutoCompleteText() {
+ final Object obj = store.get(KEY_AUTO_COMPLETE_TEXT);
+ if (obj instanceof String) {
+ return (String) obj;
+ }
+ return null;
+ }
+
+ public void setAutoCompleteText(String autoCompleteText) {
+ if (autoCompleteText != null) {
+ store.put(KEY_AUTO_COMPLETE_TEXT, autoCompleteText);
+ } else {
+ store.remove(KEY_AUTO_COMPLETE_TEXT);
+ }
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/ListFiles.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/ListFiles.java
new file mode 100644
index 000000000..faeaa7977
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/ListFiles.java
@@ -0,0 +1,45 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCRequest;
+
+/**
+ * Requests the current list of resident filenames for the registered app. Not
+ * supported on First generation SDL vehicles.
+ *
+ * <p><b>Request</b></p>
+ * <p>No parameters.</p>
+ * <p><b>Response:</b></p>
+ * Returns the current list of resident filenames for the registered app along with the current space available.
+ * <p><b>Non-default Result Codes:</b></p>
+ * <p>SUCCESS</p>
+ * <p>INVALID_DATA</p>
+ * <p>OUT_OF_MEMORY</p>
+ * <p>TOO_MANY_PENDING_REQUESTS</p>
+ * <p>APPLICATION_NOT_REGISTERED</p>
+ * <p>GENERIC_ERROR </p>
+ * <p>REJECTED</p>
+ * @since SmartDeviceLink 2.0
+ */
+public class ListFiles extends RPCRequest {
+
+ /**
+ * Constructs a new ListFiles object
+ */
+ public ListFiles() {
+ super(FunctionID.LIST_FILES.toString());
+ }
+
+ /**
+ * <p>Constructs a new ListFiles object indicated by the Hashtable parameter
+ * </p>
+ *
+ * @param hash
+ * The Hashtable to use
+ */
+ public ListFiles(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+} \ No newline at end of file
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/ListFilesResponse.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/ListFilesResponse.java
new file mode 100644
index 000000000..2c7a62e3e
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/ListFilesResponse.java
@@ -0,0 +1,57 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+import java.util.List;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCResponse;
+
+/**
+ * List Files Response is sent, when ListFiles has been called
+ *
+ * @since SmartDeviceLink 2.0
+ */
+public class ListFilesResponse extends RPCResponse {
+ public static final String KEY_FILENAMES = "filenames";
+ public static final String KEY_SPACE_AVAILABLE = "spaceAvailable";
+
+ /**
+ * Constructs a new ListFilesResponse object
+ */
+ public ListFilesResponse() {
+ super(FunctionID.LIST_FILES.toString());
+ }
+ public ListFilesResponse(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+ public void setFilenames(List<String> filenames) {
+ if (filenames != null) {
+ parameters.put(KEY_FILENAMES, filenames);
+ } else {
+ parameters.remove(KEY_FILENAMES);
+ }
+ }
+ @SuppressWarnings("unchecked")
+ public List<String> getFilenames() {
+ if (parameters.get(KEY_FILENAMES) instanceof List<?>) {
+ List<?> list = (List<?>)parameters.get(KEY_FILENAMES);
+ if (list != null && list.size()>0) {
+ Object obj = list.get(0);
+ if (obj instanceof String) {
+ return (List<String>) list;
+ }
+ }
+ }
+ return null;
+ }
+ public void setSpaceAvailable(Integer spaceAvailable) {
+ if (spaceAvailable != null) {
+ parameters.put(KEY_SPACE_AVAILABLE, spaceAvailable);
+ } else {
+ parameters.remove(KEY_SPACE_AVAILABLE);
+ }
+ }
+ public Integer getSpaceAvailable() {
+ return (Integer) parameters.get(KEY_SPACE_AVAILABLE);
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/LocationDetails.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/LocationDetails.java
new file mode 100644
index 000000000..50dcaf49b
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/LocationDetails.java
@@ -0,0 +1,150 @@
+package com.smartdevicelink.proxy.rpc;
+
+import com.smartdevicelink.proxy.RPCStruct;
+import com.smartdevicelink.util.DebugTool;
+
+import java.util.Hashtable;
+import java.util.List;
+
+public class LocationDetails extends RPCStruct{
+ public static final String KEY_COORDINATE = "coordinate";
+ public static final String KEY_LOCATION_NAME = "locationName";
+ public static final String KEY_ADDRESS_LINES = "addressLines";
+ public static final String KEY_LOCATION_DESCRIPTION = "locationDescription";
+ public static final String KEY_PHONE_NUMBER = "phoneNumber";
+ public static final String KEY_LOCATION_IMAGE = "locationImage";
+ public static final String KEY_SEARCH_ADDRESS = "searchAddress";
+
+ public LocationDetails() {
+ }
+
+ public LocationDetails(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+
+ @SuppressWarnings("unchecked")
+ public Coordinate getCoordinate() {
+ Object obj = store.get(KEY_COORDINATE);
+ if (obj instanceof Coordinate) {
+ return (Coordinate) obj;
+ } else if (obj instanceof Hashtable) {
+ try {
+ return new Coordinate((Hashtable<String, Object>) obj);
+ } catch (Exception e) {
+ DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_COORDINATE, e);
+ }
+ }
+ return null;
+ }
+ public void setCoordinate(Coordinate coordinate) {
+ if (coordinate != null) {
+ store.put(KEY_COORDINATE, coordinate);
+ } else {
+ store.remove(KEY_COORDINATE);
+ }
+ }
+
+ public String getLocationName() {
+ return (String) store.get(KEY_LOCATION_NAME);
+ }
+
+ public void setLocationName(String locationName) {
+ if (locationName != null) {
+ store.put(KEY_LOCATION_NAME, locationName);
+ } else {
+ store.remove(KEY_LOCATION_NAME);
+ }
+ }
+
+ @SuppressWarnings("unchecked")
+ public List<String> getAddressLines() {
+ final Object listObj = store.get(KEY_ADDRESS_LINES);
+ if (listObj instanceof List<?>) {
+ List<?> list = (List<?>) listObj;
+ if (list.size() > 0) {
+ Object obj = list.get(0);
+ if (obj instanceof String) {
+ return (List<String>) list;
+ }
+ }
+ }
+ return null;
+ }
+
+ public void setAddressLines(List<String> addressLines) {
+ if (addressLines != null) {
+ store.put(KEY_ADDRESS_LINES, addressLines);
+ } else {
+ store.remove(KEY_ADDRESS_LINES);
+ }
+ }
+
+ public String getLocationDescription() {
+ return (String) store.get(KEY_LOCATION_DESCRIPTION);
+ }
+
+ public void setLocationDescription(String locationDescription) {
+ if (locationDescription != null) {
+ store.put(KEY_LOCATION_DESCRIPTION, locationDescription);
+ } else {
+ store.remove(KEY_LOCATION_DESCRIPTION);
+ }
+ }
+
+ public String getPhoneNumber() {
+ return (String) store.get(KEY_PHONE_NUMBER);
+ }
+
+ public void setPhoneNumber(String phoneNumber) {
+ if (phoneNumber != null) {
+ store.put(KEY_PHONE_NUMBER, phoneNumber);
+ } else {
+ store.remove(KEY_PHONE_NUMBER);
+ }
+ }
+
+ @SuppressWarnings("unchecked")
+ public Image getLocationImage() {
+ Object obj = store.get(KEY_LOCATION_IMAGE);
+ if (obj instanceof Image) {
+ return (Image) obj;
+ } else if (obj instanceof Hashtable) {
+ try {
+ return new Image((Hashtable<String, Object>) obj);
+ } catch (Exception e) {
+ DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_LOCATION_IMAGE, e);
+ }
+ }
+ return null;
+ }
+
+ public void setLocationImage(Image locationImage) {
+ if (locationImage != null) {
+ store.put(KEY_LOCATION_IMAGE, locationImage);
+ } else {
+ store.remove(KEY_LOCATION_IMAGE);
+ }
+ }
+
+ @SuppressWarnings("unchecked")
+ public OasisAddress getSearchAddress() {
+ Object obj = store.get(KEY_SEARCH_ADDRESS);
+ if (obj instanceof OasisAddress) {
+ return (OasisAddress) obj;
+ } else if (obj instanceof Hashtable) {
+ try {
+ return new OasisAddress((Hashtable<String, Object>) obj);
+ } catch (Exception e) {
+ DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_SEARCH_ADDRESS, e);
+ }
+ }
+ return null;
+ }
+ public void setSearchAddress(OasisAddress searchAddress) {
+ if (searchAddress != null) {
+ store.put(KEY_SEARCH_ADDRESS, searchAddress);
+ } else {
+ store.remove(KEY_SEARCH_ADDRESS);
+ }
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/MenuParams.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/MenuParams.java
new file mode 100644
index 000000000..a9f22238a
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/MenuParams.java
@@ -0,0 +1,153 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+
+import com.smartdevicelink.proxy.RPCStruct;
+/**
+ * Used when adding a sub menu to an application menu or existing sub menu.
+ * <p><b> Parameter List</b></p>
+ * <table border="1" rules="all">
+ * <tr>
+ * <th>Name</th>
+ * <th>Type</th>
+ * <th>Description</th>
+ * <th>SmartDeviceLink Ver. Available</th>
+ * </tr>
+ * <tr>
+ * <td>parentID</td>
+ * <td>Integer</td>
+ * <td>The unique ID of an existing submenu to which a command will be added.
+ * If this element is not provided, the command will be added to the top level of the Command Menu.
+ * <ul>
+ * <li>Min: 0</li>
+ * <li>Max: 2000000000</li>
+ * </ul>
+ * </td>
+ * <td>SmartDeviceLink 1.0</td>
+ * </tr>
+ * <tr>
+ * <td>position</td>
+ * <td>Integer</td>
+ * <td>Position within the items of the parent Command Menu. 0 will insert at the front, 1 will insert after the first existing element, etc.
+ * Position of any submenu will always be located before the return and exit options.
+ * <ul>
+ * <li>Min Value: 0</li>
+ * <li>Max Value: 1000</li>
+ * <li>If position is greater or equal than the number of items in the parent Command Menu, the sub menu will be appended to the end of that Command Menu.</li>
+ * <li>If this element is omitted, the entry will be added at the end of the parent menu.</li>
+ * </ul>
+ * </td>
+ * <td>SmartDeviceLink 1.0</td>
+ * </tr>
+ * <tr>
+ * <td>menuName</td>
+ * <td>String</td>
+ * <td>Text which appears in menu, representing this command.
+ * <ul>
+ * <li>Min: 1</li>
+ * <li>Max: 100</li>
+ * </ul>
+ * </td>
+ * <td>SmartDeviceLink 1.0</td>
+ * </tr>
+ * </table>
+ * @since SmartDeviceLink 1.0
+ * @see AddCommand
+ * @see AddSubMenu
+ */
+public class MenuParams extends RPCStruct {
+ public static final String KEY_PARENT_ID = "parentID";
+ public static final String KEY_POSITION = "position";
+ public static final String KEY_MENU_NAME = "menuName";
+ /**
+ * Constructs a newly allocated MenuParams object
+ */
+ public MenuParams() { }
+ /**
+ * Constructs a newly allocated MenuParams object indicated by the Hashtable parameter
+ * @param hash The Hashtable to use
+ */
+ public MenuParams(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+ /**
+ * Get the unique ID of an existing submenu to which a command will be added.
+ * If this element is not provided, the command will be added to the top level of the Command Menu.
+ * @return parentID Min: 0 Max: 2000000000
+ */
+ public Integer getParentID() {
+ return (Integer) store.get( KEY_PARENT_ID );
+ }
+ /**
+ * Set the unique ID of an existing submenu to which a command will be added.
+ * If this element is not provided, the command will be added to the top level of the Command Menu.
+ * @param parentID Min: 0; Max: 2000000000
+ */
+ public void setParentID( Integer parentID ) {
+ if (parentID != null) {
+ store.put(KEY_PARENT_ID, parentID );
+ } else {
+ store.remove(KEY_PARENT_ID);
+ }
+ }
+ /**
+ * Get the position within the items of the parent Command Menu. 0 will insert at the front, 1 will insert after the first existing element, etc.
+ * Position of any submenu will always be located before the return and exit options.
+ * <ul>
+ * <li>Min Value: 0</li>
+ * <li>Max Value: 1000</li>
+ * <li>If position is greater or equal than the number of items in the parent Command Menu, the sub menu will be appended to the end of that Command Menu.</li>
+ * <li>If this element is omitted, the entry will be added at the end of the parent menu.</li>
+ * </ul>
+ * @return the position within the items of the parent Command Menu
+ */
+ public Integer getPosition() {
+ return (Integer) store.get( KEY_POSITION );
+ }
+ /**
+ * Set the position within the items of the parent Command Menu. 0 will insert at the front, 1 will insert after the first existing element, etc.
+ * Position of any submenu will always be located before the return and exit options.
+ * <ul>
+ * <li>Min Value: 0</li>
+ * <li>Max Value: 1000</li>
+ * <li>If position is greater or equal than the number of items in the parent Command Menu, the sub menu will be appended to the end of that Command Menu.</li>
+ * <li>If this element is omitted, the entry will be added at the end of the parent menu.</li>
+ * </ul>
+ * @param position Mix: 0 Max: 1000
+ */
+ public void setPosition( Integer position ) {
+ if (position != null) {
+ store.put(KEY_POSITION, position );
+ } else {
+ store.remove(KEY_POSITION);
+ }
+ }
+ /**
+ * Get the text which appears in menu, representing this command.
+ * <ul>
+ * <li>Min: 1</li>
+ * <li>Max: 100</li>
+ * </ul>
+ * @return menuName the menu name
+ */
+
+ public String getMenuName() {
+ return (String) store.get( KEY_MENU_NAME );
+ }
+ /**
+ * Set text which appears in menu, representing this command.
+ * <ul>
+ * <li>Min: 1</li>
+ * <li>Max: 100</li>
+ * </ul>
+ * @param menuName the menu name
+ */
+
+ public void setMenuName( String menuName ) {
+ if (menuName != null) {
+ store.put(KEY_MENU_NAME, menuName );
+ } else {
+ store.remove(KEY_MENU_NAME);
+ }
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/MyKey.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/MyKey.java
new file mode 100644
index 000000000..4936f9fec
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/MyKey.java
@@ -0,0 +1,66 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+
+import com.smartdevicelink.proxy.RPCStruct;
+import com.smartdevicelink.proxy.rpc.enums.VehicleDataStatus;
+/** Information related to the MyKey feature.
+ * <p><b>Parameter List</b></p>
+ * <table border="1" rules="all">
+ * <tr>
+ * <th>Param Name</th>
+ * <th>Type</th>
+ * <th>Mandatory</th>
+ * <th>Description</th>
+ * </tr>
+ * <tr>
+ * <td>e911Override</td>
+ * <td>VehicleDataStatus</td>
+ * <td>true</td>
+ * <td>Indicates whether e911 override is on.</td>
+ * </tr>
+ * </table>
+ *
+ *@since SmartDeviceLink 2.0
+ *
+ *@see GetVehicleData
+ *@see OnVehicleData
+ *@see VehicleDataStatus
+ *
+ *
+ */
+
+public class MyKey extends RPCStruct {
+ public static final String KEY_E_911_OVERRIDE = "e911Override";
+ /**
+ * <p>
+ * Constructs a new MyKey object indicated by the Hashtable
+ * parameter
+ * </p>
+ *
+ * @param hash
+ * The Hashtable to use
+ */
+
+ public MyKey() { }
+ public MyKey(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+
+ public void setE911Override(VehicleDataStatus e911Override) {
+ if (e911Override != null) {
+ store.put(KEY_E_911_OVERRIDE, e911Override);
+ } else {
+ store.remove(KEY_E_911_OVERRIDE);
+ }
+ }
+ public VehicleDataStatus getE911Override() {
+ Object obj = store.get(KEY_E_911_OVERRIDE);
+ if (obj instanceof VehicleDataStatus) {
+ return (VehicleDataStatus) obj;
+ } else if (obj instanceof String) {
+ return VehicleDataStatus.valueForString((String) obj);
+ }
+ return null;
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/OasisAddress.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/OasisAddress.java
new file mode 100644
index 000000000..131edaa9a
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/OasisAddress.java
@@ -0,0 +1,254 @@
+package com.smartdevicelink.proxy.rpc;
+
+import com.smartdevicelink.proxy.RPCStruct;
+
+import java.util.Hashtable;
+
+public class OasisAddress extends RPCStruct{
+ public static final String KEY_COUNTRY_NAME = "countryName";
+ public static final String KEY_COUNTRY_CODE = "countryCode";
+ public static final String KEY_POSTAL_CODE = "postalCode";
+ public static final String KEY_ADMINISTRATIVE_AREA = "administrativeArea";
+ public static final String KEY_SUB_ADMINISTRATIVE_AREA = "subAdministrativeArea";
+ public static final String KEY_LOCALITY = "locality";
+ public static final String KEY_SUB_LOCALITY = "subLocality";
+ public static final String KEY_THOROUGH_FARE = "thoroughfare";
+ public static final String KEY_SUB_THOROUGH_FARE = "subThoroughfare";
+
+ /**
+ * OASIS Address - A standard based address class that has been established by The Organization for the Advancement of Structured Information Standards (OASIS).
+ * Oasis is a global nonprofit consortium that works on the development, convergence, and adoption of standards for security,
+ * Internet of Things, energy, content technologies, emergency management, and other areas.
+ *
+ */
+ public OasisAddress() {
+ }
+
+ public OasisAddress(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+
+ /**
+ * Gets the localized Name of the country associated with the OasisAddress class.
+ *
+ * @return String - The localized Name of the country associated with the OasisAddress class.
+ *
+ */
+ public String getCountryName() {
+ return (String) store.get(KEY_COUNTRY_NAME);
+ }
+
+ /**
+ * Sets the localized Name of the country associated with the OasisAddress class.
+ *
+ * @param countryName
+ * The localized Name of the country associated with the OasisAddress class.
+ *
+ */
+ public void setCountryName(String countryName) {
+ if (countryName != null) {
+ store.put(KEY_COUNTRY_NAME, countryName);
+ } else {
+ store.remove(KEY_COUNTRY_NAME);
+ }
+ }
+
+ /**
+ * Gets the country code in ISO 3166-2 format associated with the OasisAddress class.
+ *
+ * @return String - The country code in ISO 3166-2 format associated with the OasisAddress class.
+ *
+ */
+ public String getCountryCode() {
+ return (String) store.get(KEY_COUNTRY_CODE);
+ }
+
+ /**
+ * Sets the country code in ISO 3166-2 format associated with the OasisAddress class.
+ *
+ * @param countryCode
+ * The country code in ISO 3166-2 format associated with the OasisAddress class.
+ *
+ */
+ public void setCountryCode(String countryCode) {
+ if (countryCode != null) {
+ store.put(KEY_COUNTRY_CODE, countryCode);
+ } else {
+ store.remove(KEY_COUNTRY_CODE);
+ }
+ }
+
+ /**
+ * Gets the Postal Code associated with the OasisAddress class.
+ *
+ * @return String - The Postal Code associated with the OasisAddress class.
+ *
+ */
+ public String getPostalCode() {
+ return (String) store.get(KEY_POSTAL_CODE);
+ }
+
+ /**
+ * Sets the Postal Code associated with the OasisAddress class.
+ *
+ * @param postalCode
+ * The Postal Code associated with the OasisAddress class.
+ *
+ */
+ public void setPostalCode(String postalCode) {
+ if (postalCode != null) {
+ store.put(KEY_POSTAL_CODE, postalCode);
+ } else {
+ store.remove(KEY_POSTAL_CODE);
+ }
+ }
+
+ /**
+ * Gets the Administrative Area associated with the OasisAddress class. A portion of the country - Administrative Area's can include details of the top-level area division in the country, such as state, district, province, island, region, etc.
+ *
+ * @return String - The Administrative Area associated with the OasisAddress class.
+ *
+ */
+ public String getAdministrativeArea() {
+ return (String) store.get(KEY_ADMINISTRATIVE_AREA);
+ }
+
+ /**
+ * Sets the Administrative Area associated with the OasisAddress class. A portion of the country - Administrative Area can include details of the top-level area division in the country, such as state, district, province, island, region, etc.
+ *
+ * @param administrativeArea
+ * The Administrative Area associated with the OasisAddress class.
+ *
+ */
+ public void setAdministrativeArea(String administrativeArea) {
+ if (administrativeArea != null) {
+ store.put(KEY_ADMINISTRATIVE_AREA, administrativeArea);
+ } else {
+ store.remove(KEY_ADMINISTRATIVE_AREA);
+ }
+ }
+
+ /**
+ * Gets the SubAdministrative Area associated with the OasisAddress class. A portion of the administrativeArea - The next level down division of the area. E.g. state / county, province / reservation.
+ *
+ * @return String - The SubAdministrative Area associated with the OasisAddress class.
+ *
+ */
+ public String getSubAdministrativeArea() {
+ return (String) store.get(KEY_SUB_ADMINISTRATIVE_AREA);
+ }
+
+ /**
+ * Sets the SubAdministrative Area associated with the OasisAddress class. A portion of the administrativeArea - The next level down division of the area. E.g. state / county, province / reservation.
+ *
+ * @param subAdministrativeArea
+ * The SubAdministrative Area associated with the OasisAddress class.
+ *
+ */
+ public void setSubAdministrativeArea(String subAdministrativeArea) {
+ if (subAdministrativeArea != null) {
+ store.put(KEY_SUB_ADMINISTRATIVE_AREA, subAdministrativeArea);
+ } else {
+ store.remove(KEY_SUB_ADMINISTRATIVE_AREA);
+ }
+ }
+
+ /**
+ * Gets the Locality associated with the OasisAddress class. - A hypernym for city/village
+ *
+ * @return String - The Locality associated with the OasisAddress class.
+ *
+ */
+ public String getLocality() {
+ return (String) store.get(KEY_LOCALITY);
+ }
+
+ /**
+ * Sets the Locality associated with the OasisAddress class. - A hypernym for city/village.
+ *
+ * @param locality
+ * The Locality associated with the OasisAddress class.
+ *
+ */
+ public void setLocality(String locality) {
+ if (locality != null) {
+ store.put(KEY_LOCALITY, locality);
+ } else {
+ store.remove(KEY_LOCALITY);
+ }
+ }
+
+ /**
+ * Gets the Sub-Locality associated with the OasisAddress class. - Hypernym for district.
+ *
+ * @return String - The Sub-Locality associated with the OasisAddress class.
+ *
+ */
+ public String getSubLocality() {
+ return (String) store.get(KEY_SUB_LOCALITY);
+ }
+
+ /**
+ * Sets the Sub-Locality associated with the OasisAddress class. A hypernym for district.
+ *
+ * @param subLocality
+ * The Sub-Locality associated with the OasisAddress class.
+ *
+ */
+ public void setSubLocality(String subLocality) {
+ if (subLocality != null) {
+ store.put(KEY_SUB_LOCALITY, subLocality);
+ } else {
+ store.remove(KEY_SUB_LOCALITY);
+ }
+ }
+
+ /**
+ * Gets the Thoroughfare associated with the OasisAddress class. - A hypernym for street, road etc.
+ *
+ * @return String - The Thoroughfare associated with the OasisAddress class.
+ *
+ */
+ public String getThoroughfare() {
+ return (String) store.get(KEY_THOROUGH_FARE);
+ }
+
+ /**
+ * Sets the Thoroughfare associated with the OasisAddress class. A hypernym for street, road etc.
+ *
+ * @param thoroughFare
+ * The Thoroughfare associated with the OasisAddress class.
+ *
+ */
+ public void setThoroughfare(String thoroughFare) {
+ if (thoroughFare != null) {
+ store.put(KEY_THOROUGH_FARE, thoroughFare);
+ } else {
+ store.remove(KEY_THOROUGH_FARE);
+ }
+ }
+
+ /**
+ * Gets the Sub-Thoroughfare associated with the OasisAddress class. - A Portion of thoroughfare (e.g. house number).
+ *
+ * @return String - The Sub-Thoroughfare associated with the OasisAddress class.
+ */
+ public String getSubThoroughfare() {
+ return (String) store.get(KEY_SUB_THOROUGH_FARE);
+ }
+
+ /**
+ * Sets the Sub-Thoroughfare associated with the OasisAddress class. - A Portion of thoroughfare (e.g. house number).
+ *
+ * @param subThoroughfare
+ * The Sub-Thoroughfare associated with the OasisAddress class.
+ *
+ */
+ public void setSubThoroughfare(String subThoroughfare) {
+ if (subThoroughfare != null) {
+ store.put(KEY_SUB_THOROUGH_FARE, subThoroughfare);
+ } else {
+ store.remove(KEY_SUB_THOROUGH_FARE);
+ }
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/OnAppInterfaceUnregistered.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/OnAppInterfaceUnregistered.java
new file mode 100644
index 000000000..af155226e
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/OnAppInterfaceUnregistered.java
@@ -0,0 +1,81 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCNotification;
+import com.smartdevicelink.proxy.rpc.enums.AppInterfaceUnregisteredReason;
+
+/**
+ * <p>Notifies an application that its interface registration has been terminated. This means that all SDL resources
+ * associated with the application are discarded, including the Command Menu, Choice Sets, button subscriptions, etc.</p>
+ * For more information about SDL resources related to an interface registration, see {@linkplain RegisterAppInterface}.
+ * <p></p>
+ * <b>HMI Status Requirements:</b>
+ * <ul>
+ * HMILevel:
+ * <ul><li>Any</li></ul>
+ * AudioStreamingState:
+ * <ul><li>Any</li></ul>
+ * SystemContext:
+ * <ul><li>Any</li></ul>
+ * </ul>
+ * <p></p>
+ * <b>Parameter List:</b>
+ * <table border="1" rules="all">
+ * <tr>
+ * <th>Name</th>
+ * <th>Type</th>
+ * <th>Description</th>
+ * <th>SmartDeviceLink Ver Available</th>
+ * </tr>
+ * <tr>
+ * <td>reason</td>
+ * <td>{@linkplain AppInterfaceUnregisteredReason}</td>
+ * <td>The reason the application's interface registration was terminated</td>
+ * <td>SmartDeviceLink 1.0</td>
+ * </tr>
+ * </table>
+ * @since SmartDeviceLink 1.0
+ * @see RegisterAppInterface
+ */
+public class OnAppInterfaceUnregistered extends RPCNotification {
+ public static final String KEY_REASON = "reason";
+ /**
+ *Constructs a newly allocated OnAppInterfaceUnregistered object
+ */
+ public OnAppInterfaceUnregistered() {
+ super(FunctionID.ON_APP_INTERFACE_UNREGISTERED.toString());
+ }
+ /**
+ *<p>Constructs a newly allocated OnAppInterfaceUnregistered object indicated by the Hashtable parameter</p>
+ *@param hash The Hashtable to use
+ */
+ public OnAppInterfaceUnregistered(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+ /**
+ * <p>Get the reason the registration was terminated</p>
+ * @return {@linkplain AppInterfaceUnregisteredReason} the reason the application's interface registration was terminated
+ */
+ public AppInterfaceUnregisteredReason getReason() {
+ Object obj = parameters.get(KEY_REASON);
+ if (obj instanceof AppInterfaceUnregisteredReason) {
+ return (AppInterfaceUnregisteredReason) obj;
+ } else if (obj instanceof String) {
+ return AppInterfaceUnregisteredReason.valueForString((String) obj);
+ }
+ return null;
+ }
+ /**
+ * <p>Set the reason application's interface was terminated</p>
+ * @param reason The reason application's interface registration was terminated
+ */
+ public void setReason( AppInterfaceUnregisteredReason reason ) {
+ if (reason != null) {
+ parameters.put(KEY_REASON, reason );
+ } else {
+ parameters.remove(KEY_REASON);
+ }
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/OnAudioPassThru.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/OnAudioPassThru.java
new file mode 100644
index 000000000..40186c63d
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/OnAudioPassThru.java
@@ -0,0 +1,62 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCNotification;
+
+/**
+ * Binary data is in binary part of hybrid msg.
+ * <p>
+ * </p>
+ * <b>HMI Status Requirements:</b>
+ * <ul>
+ * HMILevel:
+ * <ul>
+ * <li>BACKGROUND, FULL, LIMITED</li>
+ * </ul>
+ * AudioStreamingState:
+ * <ul>
+ * <li>TBD</li>
+ * </ul>
+ * SystemContext:
+ * <ul>
+ * <li>TBD</li>
+ * </ul>
+ * </ul>
+ * <p>
+ * <b>Parameter List:</b>
+ * <table border="1" rules="all">
+ * <tr>
+ * <th>Name</th>
+ * <th>Type</th>
+ * <th>Description</th>
+ * <th>Req</th>
+ * <th>Notes</th>
+ * <th>SmartDeviceLink Ver Available</th>
+ * </tr>
+ * </table>
+ * </p>
+ *
+ */
+public class OnAudioPassThru extends RPCNotification {
+ /**
+ *Constructs a newly allocated OnCommand object
+ */
+ public OnAudioPassThru() {
+ super(FunctionID.ON_AUDIO_PASS_THRU.toString());
+ }
+ /**
+ *<p>Constructs a newly allocated OnAudioPassThru object indicated by the Hashtable parameter</p>
+ *@param hash The Hashtable to use
+ */
+ public OnAudioPassThru(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+ public void setAPTData(byte[] aptData) {
+ setBulkData(aptData);
+ }
+ public byte[] getAPTData() {
+ return getBulkData();
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/OnButtonEvent.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/OnButtonEvent.java
new file mode 100644
index 000000000..7f9afb627
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/OnButtonEvent.java
@@ -0,0 +1,166 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCNotification;
+import com.smartdevicelink.proxy.rpc.enums.ButtonEventMode;
+import com.smartdevicelink.proxy.rpc.enums.ButtonName;
+
+/**
+ * Notifies application that user has depressed or released a button to which
+ * the application has subscribed.Further information about button events
+ * and button-presses can be found at {@linkplain SubscribeButton}.
+ * <p>
+ * </p>
+ * <b>HMI Status Requirements:</b>
+ * <ul>
+ * HMILevel:
+ * <ul>
+ * <li>The application will receive OnButtonEvent notifications for all
+ * subscribed buttons when HMILevel is FULL.</li>
+ * <li>The application will receive OnButtonEvent notifications for subscribed
+ * media buttons when HMILevel is LIMITED.</li>
+ * <li>Media buttons include SEEKLEFT, SEEKRIGHT, TUNEUP, TUNEDOWN, and
+ * PRESET_0-PRESET_9.</li>
+ * <li>The application will not receive OnButtonEvent notification when HMILevel
+ * is BACKGROUND.</li>
+ * </ul>
+ * AudioStreamingState:
+ * <ul>
+ * <li> Any </li>
+ * </ul>
+ * SystemContext:
+ * <ul>
+ * <li>MAIN, VR. In MENU, only PRESET buttons. In VR, pressing any subscribable
+ * button will cancel VR.</li>
+ * </ul>
+ * </ul>
+ * <p></p>
+ * <b>Parameter List:</b>
+ * <table border="1" rules="all">
+ * <tr>
+ * <th>Name</th>
+ * <th>Type</th>
+ * <th>Description</th>
+ * <th>Req</th>
+ * <th>Notes</th>
+ * <th>SmartDeviceLink Ver Available</th>
+ * </tr>
+ * <tr>
+ * <td>buttonName</td>
+ * <td>{@linkplain ButtonName}</td>
+ * <td>Name of the button which triggered this event</td>
+ * <td></td>
+ * <td></td>
+ * <td>SmartDeviceLink 1.0</td>
+ * </tr>
+ * <tr>
+ * <td>buttonEventMode</td>
+ * <td>{@linkplain ButtonEventMode}</td>
+ * <td>Indicats button was depressed (DOWN) or released (UP)</td>
+ * <td></td>
+ * <td></td>
+ * <td>SmartDeviceLink 1.0</td>
+ * </tr>
+ * <tr>
+ * <td>customButtonID</td>
+ * <td>Integer</td>
+ * <td>If ButtonName is CUSTOM_BUTTON", this references the integer ID passed
+ * by a custom button. (e.g. softButton ID)</td>
+ * <td>N</td>
+ * <td>Minvalue=0 Maxvalue=65536</td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * </table>
+ * <p></p>
+ *
+ * @since SmartDeviceLink 1.0
+ *
+ * @see SubscribeButton
+ * @see UnsubscribeButton
+ *
+ *
+ */
+public class OnButtonEvent extends RPCNotification {
+ public static final String KEY_BUTTON_EVENT_MODE = "buttonEventMode";
+ public static final String KEY_BUTTON_NAME = "buttonName";
+ public static final String KEY_CUSTOM_BUTTON_ID = "customButtonID";
+ /**
+ *Constructs a newly allocated OnButtonEvent object
+ */
+ public OnButtonEvent() {
+ super(FunctionID.ON_BUTTON_EVENT.toString());
+ }
+ /**
+ * <p>
+ * Constructs a newly allocated OnButtonEvent object indicated by the
+ * Hashtable parameter
+ * </p>
+ *
+ * @param hash
+ * The Hashtable to use
+ */
+ public OnButtonEvent(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+ /**
+ * <p>Returns <i>{@linkplain ButtonName}</i> the button's name</p>
+ * @return ButtonName Name of the button
+ */
+ public ButtonName getButtonName() {
+ Object obj = parameters.get(KEY_BUTTON_NAME);
+ if (obj instanceof ButtonName) {
+ return (ButtonName) obj;
+ } else if (obj instanceof String) {
+ return ButtonName.valueForString((String) obj);
+ }
+ return null;
+ }
+ /**
+ * <p>Set the button's name</p>
+ * @param buttonName name of the button
+ */
+ public void setButtonName(ButtonName buttonName) {
+ if (buttonName != null) {
+ parameters.put(KEY_BUTTON_NAME, buttonName);
+ } else {
+ parameters.remove(KEY_BUTTON_NAME);
+ }
+ }
+ /**
+ * <p>Return <i>{@linkplain ButtonEventMode} indicates the button was depressed or released</i></p>
+ * @return ButtonEventMode the button depressed or released
+ */
+ public ButtonEventMode getButtonEventMode() {
+ Object obj = parameters.get(KEY_BUTTON_EVENT_MODE);
+ if (obj instanceof ButtonEventMode) {
+ return (ButtonEventMode) obj;
+ } else if (obj instanceof String) {
+ return ButtonEventMode.valueForString((String) obj);
+ }
+ return null;
+ }
+ /**
+ * <p> Set the event mode of the button,pressed or released</p>
+ * @param buttonEventMode indicates the button is pressed or released
+ * @see ButtonEventMode
+ */
+ public void setButtonEventMode(ButtonEventMode buttonEventMode) {
+ if (buttonEventMode != null) {
+ parameters.put(KEY_BUTTON_EVENT_MODE, buttonEventMode);
+ } else {
+ parameters.remove(KEY_BUTTON_EVENT_MODE);
+ }
+ }
+ public void setCustomButtonID(Integer customButtonID) {
+ if (customButtonID != null) {
+ parameters.put(KEY_CUSTOM_BUTTON_ID, customButtonID);
+ } else {
+ parameters.remove(KEY_CUSTOM_BUTTON_ID);
+ }
+ }
+ public Integer getCustomButtonID() {
+ return (Integer) parameters.get(KEY_CUSTOM_BUTTON_ID);
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/OnButtonPress.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/OnButtonPress.java
new file mode 100644
index 000000000..c881cc297
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/OnButtonPress.java
@@ -0,0 +1,169 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCNotification;
+import com.smartdevicelink.proxy.rpc.enums.ButtonName;
+import com.smartdevicelink.proxy.rpc.enums.ButtonPressMode;
+
+/**
+ * <p>
+ * Notifies application of button press events for buttons to which the
+ * application is subscribed. SDL supports two button press events defined as
+ * follows:
+ * </p>
+ * <ul>
+ * <li>SHORT - Occurs when a button is depressed, then released within two
+ * seconds. The event is considered to occur immediately after the button is
+ * released.</li>
+ * <li>LONG - Occurs when a button is depressed and held for two seconds or
+ * more. The event is considered to occur immediately after the two second
+ * threshold has been crossed, before the button is released</li>
+ * </ul>
+ * <b>HMI Status Requirements:</b>
+ * <ul>
+ * HMILevel:
+ * <ul>
+ * <li>The application will receive OnButtonPress notifications for all
+ * subscribed buttons when HMILevel is FULL.</li>
+ * <li>The application will receive OnButtonPress notifications for subscribed
+ * media buttons when HMILevel is LIMITED.</li>
+ * <li>Media buttons include SEEKLEFT, SEEKRIGHT, TUNEUP, TUNEDOWN, and
+ * PRESET_0-PRESET_9.</li>
+ * <li>The application will not receive OnButtonPress notification when HMILevel
+ * is BACKGROUND or NONE.</li>
+ * </ul>
+ * AudioStreamingState:
+ * <ul>
+ * <li> Any </li>
+ * </ul>
+ * SystemContext:
+ * <ul>
+ * <li>MAIN, VR. In MENU, only PRESET buttons. In VR, pressing any subscribable
+ * button will cancel VR.</li>
+ * </ul>
+ * </ul>
+ * <p>
+ * <b>Parameter List:</b>
+ * <table border="1" rules="all">
+ * <tr>
+ * <th>Name</th>
+ * <th>Type</th>
+ * <th>Description</th>
+ * <th>Req</th>
+ * <th>Notes</th>
+ * <th>SmartDeviceLink Ver Available</th>
+ * </tr>
+ * <tr>
+ * <td>buttonName</td>
+ * <td>{@linkplain ButtonName}</td>
+ * <td>Name of the button which triggered this event</td>
+ * <td></td>
+ * <td></td>
+ * <td>SmartDeviceLink 1.0</td>
+ * </tr>
+ * <tr>
+ * <td>buttonPressMode</td>
+ * <td>{@linkplain ButtonPressMode}</td>
+ * <td>Indicates whether this is an SHORT or LONG button press event.</td>
+ * <td></td>
+ * <td></td>
+ * <td>SmartDeviceLink 1.0</td>
+ * </tr>
+ * <tr>
+ * <td>customButtonID</td>
+ * <td>Integer</td>
+ * <td>If ButtonName is "CUSTOM_BUTTON", this references the integer ID passed
+ * by a custom button. (e.g. softButton ID)</td>
+ * <td>N</td>
+ * <td>Minvalue=0 Maxvalue=65536</td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * </table>
+ * </p>
+ *
+ * @since SmartDeviceLink 1.0
+ * @see SubscribeButton
+ * @see UnsubscribeButton
+ */
+public class OnButtonPress extends RPCNotification {
+ public static final String KEY_BUTTON_PRESS_MODE = "buttonPressMode";
+ public static final String KEY_BUTTON_NAME = "buttonName";
+ public static final String KEY_CUSTOM_BUTTON_ID = "customButtonID";
+ /**
+ *Constructs a newly allocated OnButtonPress object
+ */
+ public OnButtonPress() {
+ super(FunctionID.ON_BUTTON_PRESS.toString());
+ }
+ /**
+ * <p>
+ * Constructs a newly allocated OnButtonPress object indicated by the
+ * Hashtable parameter
+ * </p>
+ *
+ * @param hash
+ * The Hashtable to use
+ */
+ public OnButtonPress(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+ /**
+ * <p>Returns an <i>{@linkplain ButtonName}</i> the button's name</p>
+ * @return ButtonName Name of the button
+ */
+ public ButtonName getButtonName() {
+ Object obj = parameters.get(KEY_BUTTON_NAME);
+ if (obj instanceof ButtonName) {
+ return (ButtonName) obj;
+ } else if (obj instanceof String) {
+ return ButtonName.valueForString((String) obj);
+ }
+ return null;
+ }
+ /**
+ * <p>Set the button's name</p>
+ * @param buttonName name of the button
+ */
+ public void setButtonName( ButtonName buttonName ) {
+ if (buttonName != null) {
+ parameters.put(KEY_BUTTON_NAME, buttonName );
+ } else {
+ parameters.remove(KEY_BUTTON_NAME);
+ }
+ }
+ /**<p>Returns <i>{@linkplain ButtonPressMode}</i></p>
+ * @return ButtonPressMode whether this is a long or short button press event
+ */
+ public ButtonPressMode getButtonPressMode() {
+ Object obj = parameters.get(KEY_BUTTON_PRESS_MODE);
+ if (obj instanceof ButtonPressMode) {
+ return (ButtonPressMode) obj;
+ } else if (obj instanceof String) {
+ return ButtonPressMode.valueForString((String) obj);
+ }
+ return null;
+ }
+ /**
+ * <p>Set the button press mode of the event</p>
+ * @param buttonPressMode indicates whether this is a short or long press
+ */
+ public void setButtonPressMode( ButtonPressMode buttonPressMode ) {
+ if (buttonPressMode != null) {
+ parameters.put(KEY_BUTTON_PRESS_MODE, buttonPressMode );
+ } else {
+ parameters.remove(KEY_BUTTON_PRESS_MODE);
+ }
+ }
+ public void setCustomButtonName(Integer customButtonID) {
+ if (customButtonID != null) {
+ parameters.put(KEY_CUSTOM_BUTTON_ID, customButtonID);
+ } else {
+ parameters.remove(KEY_CUSTOM_BUTTON_ID);
+ }
+ }
+ public Integer getCustomButtonName() {
+ return (Integer) parameters.get(KEY_CUSTOM_BUTTON_ID);
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/OnCommand.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/OnCommand.java
new file mode 100644
index 000000000..eae7e77f8
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/OnCommand.java
@@ -0,0 +1,113 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCNotification;
+import com.smartdevicelink.proxy.rpc.enums.TriggerSource;
+
+/**
+ * This is called when a command was selected via VR after pressing the PTT button, or selected from the menu after
+ * pressing the MENU button. <p>
+ * <b>Note: </b>Sequence of OnHMIStatus and OnCommand notifications for user-initiated interactions is indeterminate.
+ * <p></p>
+ * <b>HMI Status Requirements:</b>
+ * <ul>
+ * HMILevel:
+ * <ul><li>FULL,LIMITED</li></ul>
+ * AudioStreamingState:
+ * <ul><li>Any</li></ul>
+ * SystemContext:
+ * <ul><li>Any</li></ul>
+ * </ul>
+ * <p>
+ * <b>Parameter List:</b>
+ * <table border="1" rules="all">
+ * <tr>
+ * <th>Name</th>
+ * <th>Type</th>
+ * <th>Description</th>
+ * <th>Notes</th>
+ * <th>SmartDeviceLink Ver Available</th>
+ * </tr>
+ * <tr>
+ * <td>cmdID</td>
+ * <td>Integer</td>
+ * <td>The cmdID of the command the user selected. This is the cmdID value provided by the application in the AddCommand operation that created the command.</td>
+ * <td></td>
+ * <td>SmartDeviceLink 1.0</td>
+ * </tr>
+ * <tr>
+ * <td>triggerSource</td>
+ * <td>{@linkplain TriggerSource}</td>
+ * <td>Indicates whether command was selected via VR or via a menu selection (using the OKbutton).</td>
+ * <td></td>
+ * <td>SmartDeviceLink 1.0</td>
+ * </tr>
+ * </table>
+ * </p>
+ * @since SmartDeviceLink 1.0
+ * @see AddCommand
+ * @see DeleteCommand
+ * @see DeleteSubMenu
+ */
+public class OnCommand extends RPCNotification {
+ public static final String KEY_CMD_ID = "cmdID";
+ public static final String KEY_TRIGGER_SOURCE = "triggerSource";
+ /**
+ *Constructs a newly allocated OnCommand object
+ */
+ public OnCommand() {
+ super(FunctionID.ON_COMMAND.toString());
+ }
+ /**
+ *<p>Constructs a newly allocated OnCommand object indicated by the Hashtable parameter</p>
+ *@param hash The Hashtable to use
+ */
+ public OnCommand(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+ /**
+ * <p>Returns an <i>Integer</i> object representing the Command ID</p>
+ * @return Integer an integer representation of this object
+ */
+ public Integer getCmdID() {
+ return (Integer) parameters.get( KEY_CMD_ID );
+ }
+ /**
+ * <p>Sets a Command ID</p>
+ * @param cmdID an integer object representing a Command ID
+ */
+ public void setCmdID( Integer cmdID ) {
+ if (cmdID != null) {
+ parameters.put(KEY_CMD_ID, cmdID );
+ } else {
+ parameters.remove(KEY_CMD_ID);
+ }
+ }
+ /**
+ * <p>Returns a <I>TriggerSource</I> object which will be shown in the HMI</p>
+ * @return TriggerSource a TriggerSource object
+ */
+ public TriggerSource getTriggerSource() {
+ Object obj = parameters.get(KEY_TRIGGER_SOURCE);
+ if (obj instanceof TriggerSource) {
+ return (TriggerSource) obj;
+ } else if (obj instanceof String) {
+ return TriggerSource.valueForString((String) obj);
+ }
+ return null;
+ }
+ /**
+ * <p>Sets TriggerSource</p>
+ * <p>Indicates whether command was selected via VR or via a menu selection (using the OK button).</p>
+ * @param triggerSource a TriggerSource object
+ */
+ public void setTriggerSource( TriggerSource triggerSource ) {
+ if (triggerSource != null) {
+ parameters.put(KEY_TRIGGER_SOURCE, triggerSource );
+ } else {
+ parameters.remove(KEY_TRIGGER_SOURCE);
+ }
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/OnDriverDistraction.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/OnDriverDistraction.java
new file mode 100644
index 000000000..69280ad21
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/OnDriverDistraction.java
@@ -0,0 +1,80 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCNotification;
+import com.smartdevicelink.proxy.rpc.enums.DriverDistractionState;
+
+/**
+ * <p>Notifies the application of the current driver distraction state (whether driver distraction rules are in effect, or
+ * not).</p>
+ *
+ * <p></p>
+ * <b>HMI Status Requirements:</b>
+ * <ul>
+ * HMILevel:
+ * <ul><li>Can be sent with FULL, LIMITED or BACKGROUND</li></ul>
+ * AudioStreamingState:
+ * <ul><li>Any</li></ul>
+ * SystemContext:
+ * <ul><li>Any</li></ul>
+ * </ul>
+ * <p></p>
+ * <b>Parameter List:</b>
+ * <table border="1" rules="all">
+ * <tr>
+ * <th>Name</th>
+ * <th>Type</th>
+ * <th>Description</th>
+ * <th>SmartDeviceLink Ver Available</th>
+ * </tr>
+ * <tr>
+ * <td>state</td>
+ * <td>{@linkplain DriverDistractionState}</td>
+ * <td>Current driver distraction state (i.e. whether driver distraction rules are in effect, or not). </td>
+ * <td>SmartDeviceLink 1.0</td>
+ * </tr>
+ * </table>
+ * @since SmartDeviceLink 1.0
+ */
+public class OnDriverDistraction extends RPCNotification {
+ public static final String KEY_STATE = "state";
+ /**
+ *Constructs a newly allocated OnDriverDistraction object
+ */
+ public OnDriverDistraction() {
+ super(FunctionID.ON_DRIVER_DISTRACTION.toString());
+ }
+ /**
+ *<p>Constructs a newly allocated OnDriverDistraction object indicated by the Hashtable parameter</p>
+ *@param hash The Hashtable to use
+ */
+ public OnDriverDistraction(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+ /**
+ * <p>Called to get the current driver distraction state(i.e. whether driver distraction rules are in effect, or not)</p>
+ * @return {@linkplain DriverDistractionState} the Current driver distraction state.
+ */
+ public DriverDistractionState getState() {
+ Object obj = parameters.get(KEY_STATE);
+ if (obj instanceof DriverDistractionState) {
+ return (DriverDistractionState)obj;
+ } else if(obj instanceof String) {
+ return DriverDistractionState.valueForString((String) obj);
+ }
+ return null;
+ }
+ /**
+ * <p>Called to set the driver distraction state(i.e. whether driver distraction rules are in effect, or not)</p>
+ * @param state the current driver distraction state
+ */
+ public void setState( DriverDistractionState state ) {
+ if (state != null) {
+ parameters.put(KEY_STATE, state );
+ } else {
+ parameters.remove(KEY_STATE);
+ }
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/OnHMIStatus.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/OnHMIStatus.java
new file mode 100644
index 000000000..31161f2f1
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/OnHMIStatus.java
@@ -0,0 +1,171 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCNotification;
+import com.smartdevicelink.proxy.rpc.enums.AudioStreamingState;
+import com.smartdevicelink.proxy.rpc.enums.HMILevel;
+import com.smartdevicelink.proxy.rpc.enums.SystemContext;
+/**
+ * <p>Notifies an application that HMI conditions have changed for the application. This indicates whether the application
+ * can speak phrases, display text, perform interactions, receive button presses and events, stream audio, etc. This
+ * notification will be sent to the application when there has been a change in any one or several of the indicated
+ * states ({@linkplain HMILevel}, {@linkplain AudioStreamingState} or {@linkplain SystemContext}) for the application</p>
+ * <p>All three values are, in principle, independent of each other (though there may be some relationships). A value for
+ * one parameter should not be interpreted from the value of another parameter.</p>
+ * <p>There are no guarantees about the timeliness or latency of the OnHMIStatus notification. Therefore, for example,
+ * information such as {@linkplain AudioStreamingState} may not indicate that the audio stream became inaudible to the user
+ * exactly when the OnHMIStatus notification was received.</p>
+ *
+ * <p>
+ * <b>Parameter List:</b>
+ * <table border="1" rules="all">
+ * <tr>
+ * <th>Name</th>
+ * <th>Type</th>
+ * <th>Description</th>
+ * <th>SmartDeviceLink Ver Available</th>
+ * </tr>
+ * <tr>
+ * <td>hmiLevel</td>
+ * <td>{@linkplain HMILevel}</td>
+ * <td>The current HMI Level in effect for the application.</td>
+ * <td>SmartDeviceLink 1.0</td>
+ * </tr>
+ * <tr>
+ * <td>audioStreamingState</td>
+ * <td>{@linkplain AudioStreamingState}</td>
+ * <td>Current state of audio streaming for the application.
+ * When this parameter has a value of NOT_AUDIBLE,
+ * the application must stop streaming audio to SDL.
+ * Informs app whether any currently streaming audio is
+ * audible to user (AUDIBLE) or not (NOT_AUDIBLE). A
+ * value of NOT_AUDIBLE means that either the
+ * application's audio will not be audible to the user, or
+ * that the application's audio should not be audible to
+ * the user (i.e. some other application on the mobile
+ * device may be streaming audio and the application's
+ * audio would be blended with that other audio). </td>
+ * <td>SmartDeviceLink 1.0</td>
+ * </tr>
+ * <tr>
+ * <td>systemContext</td>
+ * <td>{@linkplain SystemContext}</td>
+ * <td>Indicates that a user-initiated interaction is in-progress
+ * (VRSESSION or MENU), or not (MAIN)</td>
+ * <td>SmartDeviceLink 1.0</td>
+ * </tr>
+ * </table>
+ * </p>
+ * @since SmartDeviceLink 1.0
+ * @see RegisterAppInterface
+ */
+public class OnHMIStatus extends RPCNotification {
+ public static final String KEY_AUDIO_STREAMING_STATE = "audioStreamingState";
+ public static final String KEY_SYSTEM_CONTEXT = "systemContext";
+ public static final String KEY_HMI_LEVEL = "hmiLevel";
+
+ private Boolean firstRun;
+
+ /**
+ *Constructs a newly allocated OnHMIStatus object
+ */
+ public OnHMIStatus() {
+ super(FunctionID.ON_HMI_STATUS.toString());
+ }
+ /**
+ *<p>Constructs a newly allocated OnHMIStatus object indicated by the Hashtable parameter</p>
+ *@param hash The Hashtable to use
+ */
+ public OnHMIStatus(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+ /**
+ * <p>Get HMILevel in effect for the application</p>
+ * @return {@linkplain HMILevel} the current HMI Level in effect for the application
+ */
+ public HMILevel getHmiLevel() {
+ Object obj = parameters.get(KEY_HMI_LEVEL);
+ if (obj instanceof HMILevel) {
+ return (HMILevel) obj;
+ } else if (obj instanceof String) {
+ return HMILevel.valueForString((String) obj);
+ }
+ return null;
+ }
+ /**
+ * <p>Set the HMILevel of OnHMIStatus</p>
+ * @param hmiLevel the HMILevel to set
+ */
+ public void setHmiLevel( HMILevel hmiLevel ) {
+ if (hmiLevel != null) {
+ parameters.put(KEY_HMI_LEVEL, hmiLevel );
+ } else {
+ parameters.remove(KEY_HMI_LEVEL);
+ }
+ }
+ /**
+ * <p>Get current state of audio streaming for the application</p>
+ * @return {@linkplain AudioStreamingState} Returns current state of audio streaming for the application
+ */
+ public AudioStreamingState getAudioStreamingState() {
+ Object obj = parameters.get(KEY_AUDIO_STREAMING_STATE);
+ if (obj instanceof AudioStreamingState) {
+ return (AudioStreamingState) obj;
+ } else if (obj instanceof String) {
+ return AudioStreamingState.valueForString((String) obj);
+ }
+ return null;
+ }
+ /**
+ * <p>Set the audio streaming state</p>
+ * @param audioStreamingState the state of audio streaming of the application
+ */
+ public void setAudioStreamingState( AudioStreamingState audioStreamingState ) {
+ if (audioStreamingState != null) {
+ parameters.put(KEY_AUDIO_STREAMING_STATE, audioStreamingState );
+ } else {
+ parameters.remove(KEY_AUDIO_STREAMING_STATE);
+ }
+ }
+ /**
+ * <p>Get the System Context</p>
+ * @return {@linkplain SystemContext} whether a user-initiated interaction is in-progress (VRSESSION or MENU), or not (MAIN).
+ */
+ public SystemContext getSystemContext() {
+ Object obj = parameters.get(KEY_SYSTEM_CONTEXT);
+ if (obj instanceof SystemContext) {
+ return (SystemContext) obj;
+ } else if (obj instanceof String) {
+ return SystemContext.valueForString((String) obj);
+ }
+ return null;
+ }
+ /**
+ * <p>Set the System Context of OnHMIStatus</p>
+ * @param systemContext Indicates that a user-initiated interaction is in-progress
+ * (VRSESSION or MENU), or not (MAIN)
+ */
+ public void setSystemContext( SystemContext systemContext ) {
+ if (systemContext != null) {
+ parameters.put(KEY_SYSTEM_CONTEXT, systemContext );
+ } else {
+ parameters.remove(KEY_SYSTEM_CONTEXT);
+ }
+ }
+ /**
+ * <p>Query whether it's the first run</p>
+ * @return boolean whether it's the first run
+ */
+ public Boolean getFirstRun() {
+ return this.firstRun;
+ }
+ /**
+ * <p>Set the firstRun value</p>
+ * @param firstRun True if it is the first run, False or not
+ */
+ public void setFirstRun(Boolean firstRun) {
+ this.firstRun = firstRun;
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/OnHashChange.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/OnHashChange.java
new file mode 100644
index 000000000..776d69e4a
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/OnHashChange.java
@@ -0,0 +1,68 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCNotification;
+/**
+ * Notification containing an updated hashID which can be used over connection cycles (i.e. loss of connection, ignition cycles, etc.).
+ * Sent after initial registration and subsequently after any change in the calculated hash of all persisted app data.
+ * <p></p>
+ * <p><b>Parameter List</b></p>
+ * <table border="1" rules="all">
+ * <tr>
+ * <th>Name</th>
+ * <th>Type</th>
+ * <th>Description</th>
+ * <th>Reg.</th>
+ * <th>Notes</th>
+ * <th>Version</th>
+ * </tr>
+ * <tr>
+ * <td>hashID</td>
+ * <td>String</td>
+ * <td>Calculated hash ID to be referenced during RegisterAppInterface.</td>
+ * <td>Y</td>
+ * <td>maxlength: 100</td>
+ * <td>SmartDeviceLink 3.0 </td>
+ * </tr>
+ * </table>
+ * @since SmartDeviceLink 3.0
+ *
+ */
+public class OnHashChange extends RPCNotification {
+ public static final String KEY_HASH_ID = "hashID";
+ /**
+ * Constructs a new OnHashChange object
+ */
+
+ public OnHashChange() {
+ super(FunctionID.ON_HASH_CHANGE.toString());
+ }
+ /**
+ * <p>
+ * Constructs a new OnKeyboardInput object indicated by the Hashtable
+ * parameter
+ * </p>
+ *
+ * @param hash
+ * The Hashtable to use
+ */
+
+ public OnHashChange(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+
+ public String getHashID() {
+ return (String) parameters.get(KEY_HASH_ID);
+ }
+
+ public void setHashID(String hashID) {
+ if (hashID != null) {
+ parameters.put(KEY_HASH_ID, hashID);
+ } else {
+ parameters.remove(KEY_HASH_ID);
+ }
+ }
+
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/OnKeyboardInput.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/OnKeyboardInput.java
new file mode 100644
index 000000000..e71cda0a8
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/OnKeyboardInput.java
@@ -0,0 +1,106 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCNotification;
+import com.smartdevicelink.proxy.rpc.enums.KeyboardEvent;
+
+/**
+ * On-screen keyboard event. Can be full string or individual keypresses depending on keyboard mode.
+ * <p></p>
+ * <p><b>Parameter List</b></p>
+ * <table border="1" rules="all">
+ * <tr>
+ * <th>Name</th>
+ * <th>Type</th>
+ * <th>Description</th>
+ * <th>Reg.</th>
+ * <th>Notes</th>
+ * <th>Version</th>
+ * </tr>
+ * <tr>
+ * <td>event</td>
+ * <td>KeyboardEvent</td>
+ * <td>On-screen keyboard input data.</td>
+ * <td>Y</td>
+ * <td></td>
+ * <td>SmartDeviceLink 3.0</td>
+ * </tr>
+ * <tr>
+ * <td>data</td>
+ * <td>String</td>
+ * <td>On-screen keyboard input data.For dynamic keypress events, this will be the current compounded string of entry text.For entry cancelled and entry aborted events, this data param will be omitted.</td>
+ * <td></td>
+ * <td>Maxlength: 500</td>
+ * <td>SmartDeviceLink 3.0 </td>
+ * </tr>
+ *
+ * </table>
+ *
+ */
+
+public class OnKeyboardInput extends RPCNotification {
+ public static final String KEY_DATA = "data";
+ public static final String KEY_EVENT = "event";
+ /**
+ * Constructs a new OnKeyboardInput object
+ */
+
+ public OnKeyboardInput() {
+ super(FunctionID.ON_KEYBOARD_INPUT.toString());
+ }
+ /**
+ * <p>
+ * Constructs a new OnKeyboardInput object indicated by the Hashtable
+ * parameter
+ * </p>
+ *
+ * @param hash
+ * The Hashtable to use
+ */
+
+ public OnKeyboardInput(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+
+ public KeyboardEvent getEvent() {
+ Object obj = parameters.get(KEY_EVENT);
+ if (obj instanceof KeyboardEvent) {
+ return (KeyboardEvent) obj;
+ } else if (obj instanceof String) {
+ return KeyboardEvent.valueForString((String) obj);
+ }
+ return null;
+ }
+
+ public void setEvent(KeyboardEvent event) {
+ if (event != null) {
+ parameters.put(KEY_EVENT, event);
+ } else {
+ parameters.remove(KEY_EVENT);
+ }
+ }
+
+ public void setData(String data) {
+ if (data != null) {
+ parameters.put(KEY_DATA, data);
+ } else {
+ parameters.remove(KEY_DATA);
+ }
+ }
+ public String getData() {
+ Object obj = parameters.get(KEY_DATA);
+ if (obj instanceof String) {
+ return (String) obj;
+ }
+ return null;
+ }
+
+ @Override
+ public String toString(){
+ String result = this.getFunctionName() +": " + " data: " + this.getData() + " event:" + this.getEvent().toString();
+ return result;
+ }
+
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/OnLanguageChange.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/OnLanguageChange.java
new file mode 100644
index 000000000..4f39d55cb
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/OnLanguageChange.java
@@ -0,0 +1,123 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCNotification;
+import com.smartdevicelink.proxy.rpc.enums.Language;
+
+/**
+ * Provides information to what language the Sdl HMI language was changed
+ * <p>
+ * </p>
+ * <b>HMI Status Requirements:</b>
+ * <ul>
+ * HMILevel:
+ * <ul>
+ * <li>TBD</li>
+ * </ul>
+ * AudioStreamingState:
+ * <ul>
+ * <li>TBD</li>
+ * </ul>
+ * SystemContext:
+ * <ul>
+ * <li>TBD</li>
+ * </ul>
+ * </ul>
+ * <p>
+ * <b>Parameter List:</b>
+ * <table border="1" rules="all">
+ * <tr>
+ * <th>Name</th>
+ * <th>Type</th>
+ * <th>Description</th>
+ * <th>Req</th>
+ * <th>Notes</th>
+ * <th>SmartDeviceLink Ver Available</th>
+ * </tr>
+ * <tr>
+ * <td>language</td>
+ * <td>{@linkplain Language}</td>
+ * <td>Current SDL voice engine (VR+TTS) language</td>
+ * <td>Y</td>
+ * <td></td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>hmiDisplayLanguage</td>
+ * <td>{@linkplain Language}</td>
+ * <td>Current display language</td>
+ * <td>Y</td>
+ * <td></td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * </table>
+ * </p>
+ *
+ */
+public class OnLanguageChange extends RPCNotification {
+ public static final String KEY_LANGUAGE = "language";
+ public static final String KEY_HMI_DISPLAY_LANGUAGE = "hmiDisplayLanguage";
+ /**
+ *Constructs a newly allocated OnCommand object
+ */
+ public OnLanguageChange() {
+ super(FunctionID.ON_LANGUAGE_CHANGE.toString());
+ }
+ /**
+ *<p>Constructs a newly allocated OnLanguageChange object indicated by the Hashtable parameter</p>
+ *@param hash The Hashtable to use
+ */
+ public OnLanguageChange(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+ /**
+ * <p>Sets language that current SDL voice engine(VR+TTS) use</p>
+ * @param language language that current SDL voice engine(VR+TTS) use
+ */
+ public void setLanguage(Language language) {
+ if (language != null) {
+ parameters.put(KEY_LANGUAGE, language);
+ } else {
+ parameters.remove(KEY_LANGUAGE);
+ }
+ }
+ /**
+ * <p>Returns language that current SDL voice engine(VR+TTS) use</p>
+ * @return {@linkplain Language} language that current SDL voice engine(VR+TTS) use
+ */
+ public Language getLanguage() {
+ Object obj = parameters.get(KEY_LANGUAGE);
+ if (obj instanceof Language) {
+ return (Language) obj;
+ } else if (obj instanceof String) {
+ return Language.valueForString((String) obj);
+ }
+ return null;
+ }
+ /**
+ * <p>Sets language that current display use</p>
+ * @param hmiDisplayLanguage language that current SDL voice engine(VR+TTS) use
+ */
+ public void setHmiDisplayLanguage(Language hmiDisplayLanguage) {
+ if (hmiDisplayLanguage != null) {
+ parameters.put(KEY_HMI_DISPLAY_LANGUAGE, hmiDisplayLanguage);
+ } else {
+ parameters.remove(KEY_HMI_DISPLAY_LANGUAGE);
+ }
+ }
+ /**
+ * <p>Returns language that current display use</p>
+ * @return {@linkplain Language} language that current display use
+ */
+ public Language getHmiDisplayLanguage() {
+ Object obj = parameters.get(KEY_HMI_DISPLAY_LANGUAGE);
+ if (obj instanceof Language) {
+ return (Language) obj;
+ } else if (obj instanceof String) {
+ return Language.valueForString((String) obj);
+ }
+ return null;
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/OnLockScreenStatus.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/OnLockScreenStatus.java
new file mode 100644
index 000000000..11f6469ef
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/OnLockScreenStatus.java
@@ -0,0 +1,89 @@
+package com.smartdevicelink.proxy.rpc;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCNotification;
+import com.smartdevicelink.proxy.rpc.enums.HMILevel;
+import com.smartdevicelink.proxy.rpc.enums.LockScreenStatus;
+import com.smartdevicelink.proxy.rpc.OnHMIStatus;
+/**
+ * The lockscreen must perform the following:
+ * Limit all application control usability from the mobile device with a full-screen static image overlay or separate view.
+ * For simplicity, the OnLockScreenStatus RPC will be provided via the onOnLockScreenNotification call back. The call back will include the LockScreenStatus enum which indicates if the lockscreen is required, optional or not required.
+ * The call back also includes details regarding the current HMI_Status level, driver distraction status and user selection status of the application.
+ *
+ *
+ */
+public class OnLockScreenStatus extends RPCNotification {
+ public static final String KEY_DRIVER_DISTRACTION = "driverDistraction";
+ public static final String KEY_SHOW_LOCK_SCREEN = "showLockScreen";
+ public static final String KEY_USER_SELECTED = "userSelected";
+
+ public OnLockScreenStatus() {
+ super(FunctionID.ON_LOCK_SCREEN_STATUS.toString());
+ }
+ /**
+ * <p>Get the current driver distraction status(i.e. whether driver distraction rules are in effect, or not)</p>
+ * @return Boolean
+ */
+
+ public Boolean getDriverDistractionStatus() {
+ return (Boolean)parameters.get(KEY_DRIVER_DISTRACTION);
+ }
+
+ public void setDriverDistractionStatus(Boolean driverDistractionStatus) {
+
+ if (driverDistractionStatus != null){
+ parameters.put(KEY_DRIVER_DISTRACTION, driverDistractionStatus);
+ } else {
+ parameters.remove(KEY_DRIVER_DISTRACTION);
+ }
+ }
+ /**
+ * <p>Get the {@linkplain LockScreenStatus} enumeration, indicating if the lockscreen should be required, optional or off </p>
+ * @return {@linkplain LockScreenStatus}
+ */
+
+ public LockScreenStatus getShowLockScreen() {
+ return (LockScreenStatus)parameters.get(KEY_SHOW_LOCK_SCREEN);
+ }
+
+ public void setShowLockScreen(LockScreenStatus showLockScreen) {
+ if (showLockScreen != null) {
+ parameters.put(KEY_SHOW_LOCK_SCREEN, showLockScreen );
+ } else {
+ parameters.remove(KEY_SHOW_LOCK_SCREEN);
+ }
+ }
+ /**
+ * <p>Get user selection status for the application (has the app been selected via hmi or voice command)</p>
+ * @return Boolean the current user selection status
+ */
+
+ public Boolean getUserSelected() {
+ return (Boolean)parameters.get(KEY_USER_SELECTED);
+ }
+
+ public void setUserSelected(Boolean userSelected) {
+ if (userSelected != null) {
+ parameters.put(KEY_USER_SELECTED, userSelected );
+ } else {
+ parameters.remove(KEY_USER_SELECTED);
+ }
+ }
+ /**
+ * <p>Get HMILevel in effect for the application</p>
+ * @return {@linkplain HMILevel} the current HMI Level in effect for the application
+ */
+
+ public HMILevel getHMILevel() {
+ return (HMILevel)parameters.get(OnHMIStatus.KEY_HMI_LEVEL);
+ }
+
+ public void setHMILevel(HMILevel setHMILevel) {
+ if (setHMILevel != null) {
+ parameters.put(OnHMIStatus.KEY_HMI_LEVEL, setHMILevel );
+ } else {
+ parameters.remove(OnHMIStatus.KEY_HMI_LEVEL);
+ }
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/OnPermissionsChange.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/OnPermissionsChange.java
new file mode 100644
index 000000000..4c88c9baa
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/OnPermissionsChange.java
@@ -0,0 +1,98 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.ArrayList;
+import java.util.Hashtable;
+import java.util.List;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCNotification;
+
+/**
+ * Provides update to app of which sets of functions are available
+ * <p>
+ * </p>
+ * <b>HMI Status Requirements:</b>
+ * <ul>
+ * HMILevel:
+ * <ul>
+ * <li>Any</li>
+ * </ul>
+ * AudioStreamingState:
+ * <ul>
+ * <li>TBD</li>
+ * </ul>
+ * SystemContext:
+ * <ul>
+ * <li>TBD</li>
+ * </ul>
+ * </ul>
+ * <p>
+ * <b>Parameter List:</b>
+ * <table border="1" rules="all">
+ * <tr>
+ * <th>Name</th>
+ * <th>Type</th>
+ * <th>Description</th>
+ * <th>Req</th>
+ * <th>Notes</th>
+ * <th>SmartDeviceLink Ver Available</th>
+ * </tr>
+ * <tr>
+ * <td>permissionItem</td>
+ * <td>PermissionItem[]</td>
+ * <td>Change in permissions for a given set of RPCs</td>
+ * <td>Y</td>
+ * <td>Minsize=1 Maxsize=100</td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * </table>
+ * </p>
+ */
+public class OnPermissionsChange extends RPCNotification {
+ public static final String KEY_PERMISSION_ITEM = "permissionItem";
+ /**
+ *Constructs a newly allocated OnCommand object
+ */
+ public OnPermissionsChange() {
+ super(FunctionID.ON_PERMISSIONS_CHANGE.toString());
+ }
+ /**
+ *<p>Constructs a newly allocated OnPermissionsChange object indicated by the Hashtable parameter</p>
+ *@param hash The Hashtable to use
+ */
+ public OnPermissionsChange(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+ /**
+ * <p>Returns List<PermissionItem> object describing change in permissions for a given set of RPCs</p>
+ * @return List<{@linkplain PermissionItem}> an object describing describing change in permissions for a given set of RPCs
+ */
+ @SuppressWarnings("unchecked")
+ public List<PermissionItem> getPermissionItem() {
+ List<?> list = (List<?>)parameters.get(KEY_PERMISSION_ITEM);
+ if (list != null && list.size()>0) {
+ Object obj = list.get(0);
+ if(obj instanceof PermissionItem){
+ return (List<PermissionItem>) list;
+ } else if(obj instanceof Hashtable) {
+ List<PermissionItem> newList = new ArrayList<PermissionItem>();
+ for (Object hash:list) {
+ newList.add(new PermissionItem((Hashtable<String, Object>)hash));
+ }
+ return newList;
+ }
+ }
+ return null;
+ }
+ /**
+ * <p>Sets PermissionItems describing change in permissions for a given set of RPCs</p>
+ * @param permissionItem an List of PermissionItem describing change in permissions for a given set of RPCs
+ */
+ public void setPermissionItem(List<PermissionItem> permissionItem) {
+ if (permissionItem != null) {
+ parameters.put(KEY_PERMISSION_ITEM, permissionItem);
+ } else {
+ parameters.remove(KEY_PERMISSION_ITEM);
+ }
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/OnSdlChoiceChosen.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/OnSdlChoiceChosen.java
new file mode 100644
index 000000000..a878ade77
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/OnSdlChoiceChosen.java
@@ -0,0 +1,172 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+import java.util.List;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCNotification;
+import com.smartdevicelink.proxy.rpc.enums.TriggerSource;
+
+public class OnSdlChoiceChosen extends RPCNotification {
+ public static final String KEY_SDL_CHOICE = "sdlChoice";
+ public static final String KEY_TRIGGER_SOURCE = "triggerSource";
+
+ public class SdlSubMenu {
+ private Integer _menuID = null;
+ @SuppressWarnings("unused")
+ private Integer _position = null;
+ private String _menuName = null;
+
+ // Constructor
+ SdlSubMenu(Integer menuID, Integer position, String menuName) {
+ _menuID = menuID;
+ _position = position;
+ _menuName = menuName;
+ }
+
+ // Restrict no-arg constructor
+ @SuppressWarnings("unused")
+ private SdlSubMenu() {}
+
+ // Public Getters
+ public Integer getMenuID() {
+ return _menuID;
+ }
+
+ public String getMenuName() {
+ return _menuName;
+ }
+
+ public String toString() {
+ return _menuName;
+ }
+ }
+
+ public class SdlCommand {
+ private Integer _commandID = null;
+ private SdlSubMenu _parentSubMenu = null;
+ @SuppressWarnings("unused")
+ private Integer _position = null;
+ private String _menuName = null;
+ private List<String> _vrCommands = null;
+
+ // Constructor
+ SdlCommand(Integer commandID, SdlSubMenu parentSubMenu, Integer position, String menuName, List<String> vrCommands) {
+ _commandID = commandID;
+ _parentSubMenu = parentSubMenu;
+ _position = position;
+ _menuName = menuName;
+ _vrCommands = vrCommands;
+ }
+
+ // Restrict no-arg constructor
+ @SuppressWarnings("unused")
+ private SdlCommand() {}
+
+ // Public Getters
+ public Integer getCommandID() {
+ return _commandID;
+ }
+
+ public SdlSubMenu getParentSubMenu() {
+ return _parentSubMenu;
+ }
+
+ public String getMenuName() {
+ return _menuName;
+ }
+
+ public List<String> getVrCommands() {
+ return _vrCommands;
+ }
+
+ public String toString() {
+ return _menuName;
+ }
+ }
+
+ public class SdlChoice {
+
+ private Choice _choice = null;
+
+ // Constructor
+ public SdlChoice(Choice choice) {
+ _choice = choice;
+ }
+
+ public Choice getChoice() {
+ return _choice;
+ }
+
+ public Integer getChoiceID() {
+ return _choice.getChoiceID();
+ }
+
+ public String getMenuName() {
+ return _choice.getMenuName();
+ }
+
+ public List<String> getVrCommands() {
+ return _choice.getVrCommands();
+ }
+
+ public String toString() {
+ return _choice.getMenuName();
+ }
+ }
+
+ public class SdlChoiceSet {
+ private Integer _choiceSetID = null;
+ private List<SdlChoice> _choiceSet = null;
+
+ // Constructor
+ SdlChoiceSet(Integer choiceSetID, List<SdlChoice> choiceSet) {
+ _choiceSetID = choiceSetID;
+ _choiceSet = choiceSet;
+ }
+
+ public Integer getChoiceSetID() {
+ return _choiceSetID;
+ }
+
+ public List<SdlChoice> getChoiceSet() {
+ return _choiceSet;
+ }
+ }
+
+
+
+
+ public OnSdlChoiceChosen() {
+ super(FunctionID.ON_SDL_CHOICE_CHOSEN.toString());
+ }
+ public OnSdlChoiceChosen(Hashtable<String, Object> hash){
+ super(hash);
+ }
+ public SdlChoice getSdlChoice() {
+ return (SdlChoice) parameters.get(KEY_SDL_CHOICE);
+ }
+ public void setSdlChoice(SdlChoice sdlChoice) {
+ if (sdlChoice != null) {
+ parameters.put(KEY_SDL_CHOICE, sdlChoice);
+ } else {
+ parameters.remove(KEY_SDL_CHOICE);
+ }
+ }
+ public TriggerSource getTriggerSource() {
+ Object obj = parameters.get(KEY_TRIGGER_SOURCE);
+ if (obj instanceof TriggerSource) {
+ return (TriggerSource) obj;
+ } else if (obj instanceof String) {
+ return TriggerSource.valueForString((String) obj);
+ }
+ return null;
+ }
+ public void setTriggerSource( TriggerSource triggerSource ) {
+ if (triggerSource != null) {
+ parameters.put(KEY_TRIGGER_SOURCE, triggerSource );
+ } else {
+ parameters.remove(KEY_TRIGGER_SOURCE);
+ }
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/OnStreamRPC.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/OnStreamRPC.java
new file mode 100644
index 000000000..bb4bcc324
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/OnStreamRPC.java
@@ -0,0 +1,47 @@
+package com.smartdevicelink.proxy.rpc;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCNotification;
+
+public class OnStreamRPC extends RPCNotification {
+ public static final String KEY_FILENAME = "fileName";
+ public static final String KEY_BYTESCOMPLETE = "bytesComplete";
+ public static final String KEY_FILESIZE = "fileSize";
+
+ public OnStreamRPC() {
+ super(FunctionID.ON_STREAM_RPC.toString());
+ }
+
+ public void setFileName(String fileName) {
+ if (fileName != null) {
+ parameters.put(KEY_FILENAME, fileName);
+ } else {
+ parameters.remove(KEY_FILENAME);
+ }
+ }
+ public String getFileName() {
+ return (String) parameters.get(KEY_FILENAME);
+ }
+
+ public void setBytesComplete(Long bytesComplete) {
+ if (bytesComplete != null) {
+ parameters.put(KEY_BYTESCOMPLETE, bytesComplete);
+ } else {
+ parameters.remove(KEY_BYTESCOMPLETE);
+ }
+ }
+ public Long getBytesComplete() {
+ return (Long) parameters.get(KEY_BYTESCOMPLETE);
+ }
+
+ public void setFileSize(Long fileSize) {
+ if (fileSize != null) {
+ parameters.put(KEY_FILESIZE, fileSize);
+ } else {
+ parameters.remove(KEY_FILESIZE);
+ }
+ }
+ public Long getFileSize() {
+ return (Long) parameters.get(KEY_FILESIZE);
+ }
+} \ No newline at end of file
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/OnSystemRequest.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/OnSystemRequest.java
new file mode 100644
index 000000000..a034626a9
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/OnSystemRequest.java
@@ -0,0 +1,381 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+import java.util.List;
+
+import org.json.JSONException;
+import org.json.JSONObject;
+
+import android.util.Log;
+
+import com.smartdevicelink.marshal.JsonRPCMarshaller;
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCNotification;
+import com.smartdevicelink.proxy.RPCStruct;
+import com.smartdevicelink.proxy.rpc.enums.FileType;
+import com.smartdevicelink.proxy.rpc.enums.RequestType;
+/**
+ * An asynchronous request from the system for specific data from the device or the cloud or response to a request from the device or cloud. Binary data can be included in hybrid part of message for some requests (such as Authentication request responses)
+ *
+ * <p><b>Parameter List</b></p>
+ * <table border="1" rules="all">
+ * <tr>
+ * <th>Name</th>
+ * <th>Type</th>
+ * <th>Description</th>
+ * <th>Reg.</th>
+ * <th>Notes</th>
+ * <th>Version</th>
+ * </tr>
+ * <tr>
+ * <td>requestType</td>
+ * <td>RequestType</td>
+ * <td>The type of system request.</td>
+ * <td>Y</td>
+ * <td></td>
+ * <td>SmartDeviceLink 2.3.2 </td>
+ * </tr>
+ * <tr>
+ * <td>url</td>
+ * <td>Array of Strings</td>
+ * <td>Optional URL for HTTP requests.If blank, the binary data shall be forwarded to the app.If not blank, the binary data shall be forwarded to the url with a provided timeout in seconds.</td>
+ * <td>N</td>
+ * <td>maxlength: 1000; minsize:1; maxsize: 100</td>
+ * <td>SmartDeviceLink 2.3.2 </td>
+ * </tr>
+ * <tr>
+ * <td>timeout</td>
+ * <td>Integer</td>
+ * <td>Optional timeout for HTTP requests;Required if a URL is provided</td>
+ * <td>N</td>
+ * <td>minvalue:0; maxvalue: 2000000000</td>
+ * <td>SmartDeviceLink </td>
+ * </tr>
+ * <tr>
+ * <td>fileType</td>
+ * <td>FileType</td>
+ * <td>Optional file type (meant for HTTP file requests).</td>
+ * <td>N</td>
+ * <td></td>
+ * <td>SmartDeviceLink 2.3.2 </td>
+ * </tr>
+ * <tr>
+ * <td>offset</td>
+ * <td>Float</td>
+ * <td>Optional offset in bytes for resuming partial data chunks</td>
+ * <td>N</td>
+ * <td>minvalue:0; maxvalue:100000000000</td>
+ * <td>SmartDeviceLink 2.3.2 </td>
+ * </tr>
+ * <tr>
+ * <td>length</td>
+ * <td>Float</td>
+ * <td>Optional length in bytes for resuming partial data chunks</td>
+ * <td>N</td>
+ * <td>minvalue: 0; maxvalue:100000000000</td>
+ * <td>SmartDeviceLink 2.3.2 </td>
+ * </tr>
+ * </table>
+ * @since SmartDeviceLink 2.3.2
+ */
+public class OnSystemRequest extends RPCNotification {
+ public static final String KEY_URL_V1 = "URL";
+ public static final String KEY_URL = "url";
+ public static final String KEY_TIMEOUT_V1 = "Timeout";
+ public static final String KEY_TIMEOUT = "timeout";
+ public static final String KEY_HEADERS = "headers";
+ public static final String KEY_BODY = "body";
+ public static final String KEY_FILE_TYPE = "fileType";
+ public static final String KEY_REQUEST_TYPE = "requestType";
+ public static final String KEY_DATA = "data";
+ public static final String KEY_OFFSET = "offset";
+ public static final String KEY_LENGTH = "length";
+
+ private String body;
+ private Headers headers;
+
+ /** Constructs a new OnSystemsRequest object
+ *
+ */
+
+ public OnSystemRequest() {
+ super(FunctionID.ON_SYSTEM_REQUEST.toString());
+ }
+
+ public OnSystemRequest(Hashtable<String, Object> hash) {
+ this(hash, (byte[]) hash.get(RPCStruct.KEY_BULK_DATA));
+ }
+
+ public OnSystemRequest(Hashtable<String, Object> hash, byte[] bulkData){
+ super(hash);
+ setBulkData(bulkData);
+ }
+
+ private void handleBulkData(byte[] bulkData){
+ if(bulkData == null){
+ return;
+ }
+
+ JSONObject httpJson;
+ String tempBody = null;
+ Headers tempHeaders = null;
+ if(RequestType.PROPRIETARY.equals(this.getRequestType())){
+ try{
+ JSONObject bulkJson = new JSONObject(new String(bulkData));
+
+ httpJson = bulkJson.getJSONObject("HTTPRequest");
+ tempBody = getBody(httpJson);
+ tempHeaders = getHeaders(httpJson);
+ }catch(JSONException e){
+ Log.e("OnSystemRequest", "HTTPRequest in bulk data was malformed.");
+ e.printStackTrace();
+ }catch(NullPointerException e){
+ Log.e("OnSystemRequest", "Invalid HTTPRequest object in bulk data.");
+ e.printStackTrace();
+ }
+ }else if(RequestType.HTTP.equals(this.getRequestType())){
+ tempHeaders = new Headers();
+ tempHeaders.setContentType("application/json");
+ tempHeaders.setConnectTimeout(7);
+ tempHeaders.setDoOutput(true);
+ tempHeaders.setDoInput(true);
+ tempHeaders.setUseCaches(false);
+ tempHeaders.setRequestMethod("POST");
+ tempHeaders.setReadTimeout(7);
+ tempHeaders.setInstanceFollowRedirects(false);
+ tempHeaders.setCharset("utf-8");
+ tempHeaders.setContentLength(bulkData.length);
+ }
+
+ this.body = tempBody;
+ this.headers = tempHeaders;
+ }
+
+ private String getBody(JSONObject httpJson){
+ String result = null;
+
+ try{
+ result = httpJson.getString("body");
+ }catch(JSONException e){
+ Log.e("OnSystemRequest", "\"body\" key doesn't exist in bulk data.");
+ e.printStackTrace();
+ }
+
+ return result;
+ }
+
+ private Headers getHeaders(JSONObject httpJson){
+ Headers result = null;
+
+ try{
+ JSONObject httpHeadersJson = httpJson.getJSONObject("headers");
+ Hashtable<String, Object> httpHeadersHash = JsonRPCMarshaller.deserializeJSONObject(httpHeadersJson);
+ result = new Headers(httpHeadersHash);
+ }catch(JSONException e){
+ Log.e("OnSystemRequest", "\"headers\" key doesn't exist in bulk data.");
+ e.printStackTrace();
+ }
+
+ return result;
+ }
+
+ @Deprecated
+ public void setBinData(byte[] aptData) {
+ setBulkData(aptData);
+ }
+
+ @Deprecated
+ public byte[] getBinData() {
+ return getBulkData();
+ }
+
+ @Override
+ public void setBulkData(byte[] bulkData){
+ super.setBulkData(bulkData);
+ handleBulkData(bulkData);
+ }
+
+
+ @SuppressWarnings("unchecked")
+ public List<String> getLegacyData() {
+ if (parameters.get(KEY_DATA) instanceof List<?>) {
+ List<?> list = (List<?>)parameters.get(KEY_DATA);
+ if (list != null && list.size()>0) {
+ Object obj = list.get(0);
+ if (obj instanceof String) {
+ return (List<String>)list;
+ }
+ }
+ }
+ return null;
+ }
+
+ public String getBody(){
+ return this.body;
+ }
+
+ public void setBody(String body) {
+ this.body = body;
+ }
+
+ public void setHeaders(Headers header) {
+ this.headers = header;
+ }
+
+ public Headers getHeader() {
+ return this.headers;
+ }
+
+ public RequestType getRequestType() {
+ Object obj = parameters.get(KEY_REQUEST_TYPE);
+ if (obj == null) return null;
+ if (obj instanceof RequestType) {
+ return (RequestType) obj;
+ } else if (obj instanceof String) {
+ return RequestType.valueForString((String) obj);
+ }
+ return null;
+ }
+
+ public void setRequestType(RequestType requestType) {
+ if (requestType != null) {
+ parameters.put(KEY_REQUEST_TYPE, requestType);
+ } else {
+ parameters.remove(KEY_REQUEST_TYPE);
+ }
+ }
+
+ public String getUrl() {
+ Object o = parameters.get(KEY_URL);
+ if (o == null)
+ {
+ //try again for gen 1.1
+ o = parameters.get(KEY_URL_V1);
+ }
+ if (o == null)
+ return null;
+
+ if (o instanceof String) {
+ return (String) o;
+ }
+ return null;
+ }
+
+ public void setUrl(String url) {
+ if (url != null) {
+ parameters.put(KEY_URL, url);
+ } else {
+ parameters.remove(KEY_URL);
+ }
+ }
+
+ public FileType getFileType() {
+ Object obj = parameters.get(KEY_FILE_TYPE);
+ if (obj == null) return null;
+ if (obj instanceof FileType) {
+ return (FileType) obj;
+ } else if (obj instanceof String) {
+ return FileType.valueForString((String) obj);
+ }
+ return null;
+ }
+
+ public void setFileType(FileType fileType) {
+ if (fileType != null) {
+ parameters.put(KEY_FILE_TYPE, fileType);
+ } else {
+ parameters.remove(KEY_FILE_TYPE);
+ }
+ }
+
+ /**
+ * @deprecated as of SmartDeviceLink 4.0
+ * @param offset
+ */
+ public void setOffset(Integer offset) {
+ if(offset == null){
+ setOffset((Long)null);
+ }else{
+ setOffset(offset.longValue());
+ }
+ }
+
+ public Long getOffset() {
+ final Object o = parameters.get(KEY_OFFSET);
+
+ if (o == null){
+ return null;
+ }
+
+ if (o instanceof Integer) {
+ return ((Integer) o).longValue();
+ }else if(o instanceof Long){
+ return (Long) o;
+ }
+ return null;
+ }
+
+ public void setOffset(Long offset) {
+ if (offset != null) {
+ parameters.put(KEY_OFFSET, offset);
+ } else {
+ parameters.remove(KEY_OFFSET);
+ }
+ }
+
+ public Integer getTimeout() {
+ Object o = parameters.get(KEY_TIMEOUT);
+
+ if (o == null){
+ o = parameters.get(KEY_TIMEOUT_V1);
+ if (o == null) return null;
+ }
+
+ if (o instanceof Integer) {
+ return (Integer) o;
+ }
+ return null;
+ }
+
+ public void setTimeout(Integer timeout) {
+ if (timeout != null) {
+ parameters.put(KEY_TIMEOUT, timeout);
+ } else {
+ parameters.remove(KEY_TIMEOUT);
+ }
+ }
+
+ public Long getLength() {
+ final Object o = parameters.get(KEY_LENGTH);
+ if (o == null){
+ return null;
+ }
+
+ if (o instanceof Integer) {
+ return ((Integer) o).longValue();
+ }else if(o instanceof Long){
+ return (Long) o;
+ }
+ return null;
+ }
+
+ /**
+ * @deprecated as of SmartDeviceLink 4.0
+ * @param length
+ */
+ public void setLength(Integer length) {
+ if(length == null){
+ setLength((Long)null);
+ }else{
+ setLength(length.longValue());
+ }
+ }
+
+ public void setLength(Long length) {
+ if (length != null) {
+ parameters.put(KEY_LENGTH, length);
+ } else {
+ parameters.remove(KEY_LENGTH);
+ }
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/OnTBTClientState.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/OnTBTClientState.java
new file mode 100644
index 000000000..26965c891
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/OnTBTClientState.java
@@ -0,0 +1,80 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCNotification;
+import com.smartdevicelink.proxy.rpc.enums.TBTState;
+
+/**
+ * <p>Notifies the application of the current TBT client status on the module.</p>
+ *
+ * <p></p>
+ * <b>HMI Status Requirements:</b>
+ * <ul>
+ * HMILevel:
+ * <ul><li>Can be sent with FULL, LIMITED or BACKGROUND</li></ul>
+ * AudioStreamingState:
+ * <ul><li>Any</li></ul>
+ * SystemContext:
+ * <ul><li>Any</li></ul>
+ * </ul>
+ * <p></p>
+ * <b>Parameter List:</b>
+ * <table border="1" rules="all">
+ * <tr>
+ * <th>Name</th>
+ * <th>Type</th>
+ * <th>Description</th>
+ * <th>SmartDeviceLink Ver Available</th>
+ * </tr>
+ * <tr>
+ * <td>state</td>
+ * <td>{@linkplain TBTState}</td>
+ * <td>Current state of TBT client.</td>
+ * <td>SmartDeviceLink 1.0</td>
+ * </tr>
+ * </table>
+ * @since SmartDeviceLink 1.0
+ *
+ */
+public class OnTBTClientState extends RPCNotification {
+ public static final String KEY_STATE = "state";
+ /**
+ *Constructs a newly allocated OnTBTClientState object
+ */
+ public OnTBTClientState() {
+ super(FunctionID.ON_TBT_CLIENT_STATE.toString());
+ }
+ /**
+ *<p>Constructs a newly allocated OnTBTClientState object indicated by the Hashtable parameter</p>
+ *@param hash The Hashtable to use
+ */
+ public OnTBTClientState(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+ /**
+ * <p>Called to get the current state of TBT client</p>
+ * @return {@linkplain TBTState} the current state of TBT client
+ */
+ public TBTState getState() {
+ Object obj = parameters.get(KEY_STATE);
+ if (obj instanceof TBTState) {
+ return (TBTState)obj;
+ } else if(obj instanceof String) {
+ return TBTState.valueForString((String) obj);
+ }
+ return null;
+ }
+ /**
+ * <p>Called to set the current state of TBT client</p>
+ * @param state current state of TBT client
+ */
+ public void setState( TBTState state ) {
+ if (state != null) {
+ parameters.put(KEY_STATE, state );
+ } else {
+ parameters.remove(KEY_STATE);
+ }
+ }
+} // end-class
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/OnTouchEvent.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/OnTouchEvent.java
new file mode 100644
index 000000000..bfb31d789
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/OnTouchEvent.java
@@ -0,0 +1,116 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.ArrayList;
+import java.util.Hashtable;
+import java.util.List;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCNotification;
+import com.smartdevicelink.proxy.rpc.enums.TouchType;
+
+/**
+ *
+ * Notifies about touch events on the screen's prescribed area.
+ * <p><b>Parameter List</b></p>
+ *
+ * <table border="1" rules="all">
+ * <tr>
+ * <th>Name</th>
+ * <th>Type</th>
+ * <th>Description</th>
+ * <th>Reg.</th>
+ * <th>Notes</th>
+ * <th>Version</th>
+ * </tr>
+ * <tr>
+ * <td>type</td>
+ * <td>TouchType</td>
+ * <td>The type of touch event.</td>
+ * <td>Y</td>
+ * <td></td>
+ * <td>SmartDeviceLink 3.0 </td>
+ * </tr>
+ * <tr>
+ * <td>event</td>
+ * <td>TouchEvent</td>
+ * <td>List of all individual touches involved in this event.</td>
+ * <td>Y</td>
+ * <td>minsize:1; maxsize:10</td>
+ * <td>SmartDeviceLink 3.0 </td>
+ * </tr>
+ * </table>
+ *
+ * <p><b>Note:</b></p>
+ * <p>SDL needs to be informed about every User`s touching the touch screen.</p>
+ *
+ */
+public class OnTouchEvent extends RPCNotification {
+ public static final String KEY_EVENT = "event";
+ public static final String KEY_TYPE = "type";
+ /**
+ * Constructs a new OnTouchEvent object
+ */
+
+ public OnTouchEvent() {
+ super(FunctionID.ON_TOUCH_EVENT.toString());
+ }
+ /**
+ * <p>
+ * Constructs a new OnTouchEvent object indicated by the Hashtable
+ * parameter
+ * </p>
+ *
+ * @param hash
+ * The Hashtable to use
+ */
+
+ public OnTouchEvent(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+
+ public void setType(TouchType type) {
+ if (type != null) {
+ parameters.put(KEY_TYPE, type);
+ } else {
+ parameters.remove(KEY_TYPE);
+ }
+ }
+
+ public TouchType getType() {
+ Object obj = parameters.get(KEY_TYPE);
+ if (obj instanceof TouchType) {
+ return (TouchType) obj;
+ } else if (obj instanceof String) {
+ return TouchType.valueForString((String) obj);
+ }
+ return null;
+ }
+
+ public void setEvent(List<TouchEvent> event) {
+ if (event != null) {
+ parameters.put(KEY_EVENT, event);
+ } else {
+ parameters.remove(KEY_EVENT);
+ }
+ }
+
+ @SuppressWarnings("unchecked")
+ public List<TouchEvent> getEvent() {
+ if (parameters.get(KEY_EVENT) instanceof List<?>) {
+ List<?> list = (List<?>)parameters.get(KEY_EVENT);
+ if (list != null && list.size() > 0) {
+ Object obj = list.get(0);
+ if (obj instanceof TouchEvent) {
+ return (List<TouchEvent>) list;
+ } else if (obj instanceof Hashtable) {
+ List<TouchEvent> newList = new ArrayList<TouchEvent>();
+ for (Object hashObj : list) {
+ newList.add(new TouchEvent((Hashtable<String, Object>) hashObj));
+ }
+ return newList;
+ }
+ }
+ }
+ return null;
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/OnVehicleData.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/OnVehicleData.java
new file mode 100644
index 000000000..1a6baefef
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/OnVehicleData.java
@@ -0,0 +1,697 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCNotification;
+import com.smartdevicelink.proxy.rpc.enums.ComponentVolumeStatus;
+import com.smartdevicelink.proxy.rpc.enums.PRNDL;
+import com.smartdevicelink.proxy.rpc.enums.VehicleDataEventStatus;
+import com.smartdevicelink.proxy.rpc.enums.WiperStatus;
+import com.smartdevicelink.util.DebugTool;
+import com.smartdevicelink.util.SdlDataTypeConverter;
+/**
+ *Individual requested DID result and data.
+ *
+ *
+ * <p>Callback for the periodic and non periodic vehicle data read function.</p>
+ *
+ * <p> <b>Note:</b></p>
+ *
+ * Initially SDL sends SubscribeVehicleData for getting the periodic updates from HMI whenever each of subscribed data types changes. OnVehicleData is expected to bring such updated values to SDL
+ *
+ *
+ *
+ *
+ * <p><b>Parameter List</b></p>
+ * <table border="1" rules="all">
+ * <tr>
+ * <th>Param Name</th>
+ * <th>Type</th>
+ * <th>Description</th>
+ * <th> Req.</th>
+ * <th>Notes</th>
+ * <th>Version Available</th>
+ * </tr>
+ * <tr>
+ * <td>Gps</td>
+ * <td>Boolean</td>
+ * <td>GPS data. See {@linkplain GPSdata} for details</td>
+ * <td>N</td>
+ * <td>Subscribable </td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>Speed</td>
+ * <td>Float</td>
+ * <td>The vehicle speed in kilometers per hour</td>
+ * <td>N</td>
+ * <td>Subscribable</td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>rpm</td>
+ * <td>Integer</td>
+ * <td>The number of revolutions per minute of the engine</td>
+ * <td>N</td>
+ * <td>Subscribable</td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>fuelLevel</td>
+ * <td>Float</td>
+ * <td>The fuel level in the tank (percentage)</td>
+ * <td>N</td>
+ * <td>Subscribable</td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>fuelLevel_State</td>
+ * <td>ComponentVolumeStatus</td>
+ * <td>The fuel level state (Ok/Low)</td>
+ * <td>N</td>
+ * <td>Subscribable</td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>instantFuelConsumption</td>
+ * <td>Float</td>
+ * <td>The instantaneous fuel consumption in microlitres</td>
+ * <td>N</td>
+ * <td>Subscribable </td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>externalTemperature</td>
+ * <td>Float</td>
+ * <td>The external temperature in degrees celsius.</td>
+ * <td>N</td>
+ * <td>Subscribable </td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>vin</td>
+ * <td>String</td>
+ * <td>Vehicle identification number.</td>
+ * <td>N</td>
+ * <td>Subscribable </td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>prndl</td>
+ * <td>PRNDL</td>
+ * <td>Currently selected gear.</td>
+ * <td>N</td>
+ * <td>Subscribable </td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>tirePressure</td>
+ * <td>TireStatus</td>
+ * <td>Tire pressure status</td>
+ * <td>N</td>
+ * <td>Subscribable</td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>odometer</td>
+ * <td>Integer</td>
+ * <td>Odometer in km</td>
+ * <td>N</td>
+ * <td>Subscribable </td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>beltStatus</td>
+ * <td>BeltStatus</td>
+ * <td>The status of the seat belts.</td>
+ * <td>N</td>
+ * <td>Subscribable </td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>bodyInformation</td>
+ * <td>BodyInformation</td>
+ * <td>The body information including power modes.</td>
+ * <td>N</td>
+ * <td>Subscribable</td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>deviceStatus</td>
+ * <td>DeviceStatus</td>
+ * <td>The connected mobile device status including signal and battery strength.</td>
+ * <td>N</td>
+ * <td>Subscribable</td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>eCallInfo</td>
+ * <td>ECallInfo</td>
+ * <td>Emergency Call notification and confirmation data.</td>
+ * <td>N</td>
+ * <td>Subscribable</td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>airbagStatus</td>
+ * <td>AirBagStatus</td>
+ * <td>The status of the air bags.</td>
+ * <td>N</td>
+ * <td>Subscribable</td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>emergencyEvent</td>
+ * <td>EmergencyEvernt</td>
+ * <td>Information related to an emergency event (and if it occurred).</td>
+ * <td>N</td>
+ * <td>Subscribable</td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>clusterModeStatus</td>
+ * <td>ClusterModeStatus</td>
+ * <td>The status modes of the instrument panel cluster.</td>
+ * <td>N</td>
+ * <td>Subscribable</td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>myKey</td>
+ * <td>MyKey</td>
+ * <td>Information related to the MyKey feature.</td>
+ * <td>N</td>
+ * <td>Subscribable</td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ *
+ * <tr>
+ * <td>driverBraking</td>
+ * <td>vehicleDataEventStatus</td>
+ * <td>The status of the brake pedal.</td>
+ * <td>N</td>
+ * <td>Subscribable</td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>wiperStatus</td>
+ * <td>WiperStatus</td>
+ * <td>The status of the wipers</td>
+ * <td>N</td>
+ * <td> </td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>headLampStatus</td>
+ * <td>headLampStatus</td>
+ * <td>Status of the head lamps</td>
+ * <td>N</td>
+ * <td></td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>engineTorque</td>
+ * <td>Float</td>
+ * <td>Torque value for engine (in Nm) on non-diesel variants</td>
+ * <td>N</td>
+ * <td>minvalue:-1000; maxvalue:2000</td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>accPedalPosition</td>
+ * <td>Float</td>
+ * <td>Accelerator pedal position (percentage depressed)</td>
+ * <td>N</td>
+ * <td>minvalue: 0; maxvalue:100</td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>steeringWheelAngle</td>
+ * <td>Float</td>
+ * <td>Current angle of the steering wheel (in deg)</td>
+ * <td>N</td>
+ * <td> minvalue: -2000; maxvalue:2000</td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * </table>
+ *
+ * @since SmartDeviceLink 1.0
+ *
+ * @see SubscribeVehicleData
+ * @see UnsubscribeVehicleData
+ *
+ *
+ */
+public class OnVehicleData extends RPCNotification {
+ public static final String KEY_SPEED = "speed";
+ public static final String KEY_RPM = "rpm";
+ public static final String KEY_EXTERNAL_TEMPERATURE = "externalTemperature";
+ public static final String KEY_FUEL_LEVEL = "fuelLevel";
+ public static final String KEY_VIN = "vin";
+ public static final String KEY_PRNDL = "prndl";
+ public static final String KEY_TIRE_PRESSURE = "tirePressure";
+ public static final String KEY_ENGINE_TORQUE = "engineTorque";
+ public static final String KEY_ODOMETER = "odometer";
+ public static final String KEY_GPS = "gps";
+ public static final String KEY_FUEL_LEVEL_STATE = "fuelLevel_State";
+ public static final String KEY_INSTANT_FUEL_CONSUMPTION = "instantFuelConsumption";
+ public static final String KEY_BELT_STATUS = "beltStatus";
+ public static final String KEY_BODY_INFORMATION = "bodyInformation";
+ public static final String KEY_DEVICE_STATUS = "deviceStatus";
+ public static final String KEY_DRIVER_BRAKING = "driverBraking";
+ public static final String KEY_WIPER_STATUS = "wiperStatus";
+ public static final String KEY_HEAD_LAMP_STATUS = "headLampStatus";
+ public static final String KEY_ACC_PEDAL_POSITION = "accPedalPosition";
+ public static final String KEY_STEERING_WHEEL_ANGLE = "steeringWheelAngle";
+ public static final String KEY_E_CALL_INFO = "eCallInfo";
+ public static final String KEY_AIRBAG_STATUS = "airbagStatus";
+ public static final String KEY_EMERGENCY_EVENT = "emergencyEvent";
+ public static final String KEY_CLUSTER_MODE_STATUS = "clusterModeStatus";
+ public static final String KEY_MY_KEY = "myKey";
+
+ public OnVehicleData() {
+ super(FunctionID.ON_VEHICLE_DATA.toString());
+ }
+ public OnVehicleData(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+ public void setGps(GPSData gps) {
+ if (gps != null) {
+ parameters.put(KEY_GPS, gps);
+ } else {
+ parameters.remove(KEY_GPS);
+ }
+ }
+ @SuppressWarnings("unchecked")
+ public GPSData getGps() {
+ Object obj = parameters.get(KEY_GPS);
+ if (obj instanceof GPSData) {
+ return (GPSData) obj;
+ } else if (obj instanceof Hashtable) {
+ GPSData theCode = null;
+ try {
+ theCode = new GPSData((Hashtable<String, Object>) obj);
+ } catch (Exception e) {
+ DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_GPS, e);
+ }
+ return theCode;
+ }
+ return null;
+ }
+ public void setSpeed(Double speed) {
+ if (speed != null) {
+ parameters.put(KEY_SPEED, speed);
+ } else {
+ parameters.remove(KEY_SPEED);
+ }
+ }
+ public Double getSpeed() {
+ Object object = parameters.get(KEY_SPEED);
+ return SdlDataTypeConverter.objectToDouble(object);
+ }
+ public void setRpm(Integer rpm) {
+ if (rpm != null) {
+ parameters.put(KEY_RPM, rpm);
+ } else {
+ parameters.remove(KEY_RPM);
+ }
+ }
+ public Integer getRpm() {
+ return (Integer) parameters.get(KEY_RPM);
+ }
+ public void setFuelLevel(Double fuelLevel) {
+ if (fuelLevel != null) {
+ parameters.put(KEY_FUEL_LEVEL, fuelLevel);
+ } else {
+ parameters.remove(KEY_FUEL_LEVEL);
+ }
+ }
+ public Double getFuelLevel() {
+ Object object = parameters.get(KEY_FUEL_LEVEL);
+ return SdlDataTypeConverter.objectToDouble(object);
+ }
+ @Deprecated
+ public void setFuelLevel_State(ComponentVolumeStatus fuelLevel_State) {
+ setFuelLevelState(fuelLevel_State);
+ }
+ @Deprecated
+ public ComponentVolumeStatus getFuelLevel_State() {
+ return getFuelLevelState();
+ }
+ public void setFuelLevelState(ComponentVolumeStatus fuelLevelState) {
+ if (fuelLevelState != null) {
+ parameters.put(KEY_FUEL_LEVEL_STATE, fuelLevelState);
+ } else {
+ parameters.remove(KEY_FUEL_LEVEL_STATE);
+ }
+ }
+ public ComponentVolumeStatus getFuelLevelState() {
+ Object obj = parameters.get(KEY_FUEL_LEVEL_STATE);
+ if (obj instanceof ComponentVolumeStatus) {
+ return (ComponentVolumeStatus) obj;
+ } else if (obj instanceof String) {
+ ComponentVolumeStatus theCode = null;
+ try {
+ theCode = ComponentVolumeStatus.valueForString((String) obj);
+ } catch (Exception e) {
+ DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_FUEL_LEVEL_STATE, e);
+ }
+ return theCode;
+ }
+ return null;
+ }
+ public void setInstantFuelConsumption(Double instantFuelConsumption) {
+ if (instantFuelConsumption != null) {
+ parameters.put(KEY_INSTANT_FUEL_CONSUMPTION, instantFuelConsumption);
+ } else {
+ parameters.remove(KEY_INSTANT_FUEL_CONSUMPTION);
+ }
+ }
+ public Double getInstantFuelConsumption() {
+ Object object = parameters.get(KEY_INSTANT_FUEL_CONSUMPTION);
+ return SdlDataTypeConverter.objectToDouble(object);
+ }
+ public void setExternalTemperature(Double externalTemperature) {
+ if (externalTemperature != null) {
+ parameters.put(KEY_EXTERNAL_TEMPERATURE, externalTemperature);
+ } else {
+ parameters.remove(KEY_EXTERNAL_TEMPERATURE);
+ }
+ }
+ public Double getExternalTemperature() {
+ Object object = parameters.get(KEY_EXTERNAL_TEMPERATURE);
+ return SdlDataTypeConverter.objectToDouble(object);
+ }
+ public void setVin(String vin) {
+ if (vin != null) {
+ parameters.put(KEY_VIN, vin);
+ } else {
+ parameters.remove(KEY_VIN);
+ }
+ }
+ public String getVin() {
+ return (String) parameters.get(KEY_VIN);
+ }
+ public void setPrndl(PRNDL prndl) {
+ if (prndl != null) {
+ parameters.put(KEY_PRNDL, prndl);
+ } else {
+ parameters.remove(KEY_PRNDL);
+ }
+ }
+ public PRNDL getPrndl() {
+ Object obj = parameters.get(KEY_PRNDL);
+ if (obj instanceof PRNDL) {
+ return (PRNDL) obj;
+ } else if (obj instanceof String) {
+ return PRNDL.valueForString((String) obj);
+ }
+ return null;
+ }
+ public void setTirePressure(TireStatus tirePressure) {
+ if (tirePressure != null) {
+ parameters.put(KEY_TIRE_PRESSURE, tirePressure);
+ } else {
+ parameters.remove(KEY_TIRE_PRESSURE);
+ }
+ }
+ @SuppressWarnings("unchecked")
+ public TireStatus getTirePressure() {
+ Object obj = parameters.get(KEY_TIRE_PRESSURE);
+ if (obj instanceof TireStatus) {
+ return (TireStatus) obj;
+ } else if (obj instanceof Hashtable) {
+ try {
+ return new TireStatus((Hashtable<String, Object>) obj);
+ } catch (Exception e) {
+ DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_TIRE_PRESSURE, e);
+ }
+ }
+ return null;
+ }
+ public void setOdometer(Integer odometer) {
+ if (odometer != null) {
+ parameters.put(KEY_ODOMETER, odometer);
+ } else {
+ parameters.remove(KEY_ODOMETER);
+ }
+ }
+ public Integer getOdometer() {
+ return (Integer) parameters.get(KEY_ODOMETER);
+ }
+ public void setBeltStatus(BeltStatus beltStatus) {
+ if (beltStatus != null) {
+ parameters.put(KEY_BELT_STATUS, beltStatus);
+ } else {
+ parameters.remove(KEY_BELT_STATUS);
+ }
+ }
+ @SuppressWarnings("unchecked")
+ public BeltStatus getBeltStatus() {
+ Object obj = parameters.get(KEY_BELT_STATUS);
+ if (obj instanceof BeltStatus) {
+ return (BeltStatus) obj;
+ } else if (obj instanceof Hashtable) {
+ try {
+ return new BeltStatus((Hashtable<String, Object>) obj);
+ } catch (Exception e) {
+ DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_BELT_STATUS, e);
+ }
+ }
+ return null;
+ }
+ public void setBodyInformation(BodyInformation bodyInformation) {
+ if (bodyInformation != null) {
+ parameters.put(KEY_BODY_INFORMATION, bodyInformation);
+ } else {
+ parameters.remove(KEY_BODY_INFORMATION);
+ }
+ }
+ @SuppressWarnings("unchecked")
+ public BodyInformation getBodyInformation() {
+ Object obj = parameters.get(KEY_BODY_INFORMATION);
+ if (obj instanceof BodyInformation) {
+ return (BodyInformation) obj;
+ } else if (obj instanceof Hashtable) {
+ try {
+ return new BodyInformation((Hashtable<String, Object>) obj);
+ } catch (Exception e) {
+ DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_BODY_INFORMATION, e);
+ }
+ }
+ return null;
+ }
+ public void setDeviceStatus(DeviceStatus deviceStatus) {
+ if (deviceStatus != null) {
+ parameters.put(KEY_DEVICE_STATUS, deviceStatus);
+ } else {
+ parameters.remove(KEY_DEVICE_STATUS);
+ }
+ }
+ @SuppressWarnings("unchecked")
+ public DeviceStatus getDeviceStatus() {
+ Object obj = parameters.get(KEY_DEVICE_STATUS);
+ if (obj instanceof DeviceStatus) {
+ return (DeviceStatus) obj;
+ } else if (obj instanceof Hashtable) {
+ try {
+ return new DeviceStatus((Hashtable<String, Object>) obj);
+ } catch (Exception e) {
+ DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_DEVICE_STATUS, e);
+ }
+ }
+ return null;
+ }
+ public void setDriverBraking(VehicleDataEventStatus driverBraking) {
+ if (driverBraking != null) {
+ parameters.put(KEY_DRIVER_BRAKING, driverBraking);
+ } else {
+ parameters.remove(KEY_DRIVER_BRAKING);
+ }
+ }
+ public VehicleDataEventStatus getDriverBraking() {
+ Object obj = parameters.get(KEY_DRIVER_BRAKING);
+ if (obj instanceof VehicleDataEventStatus) {
+ return (VehicleDataEventStatus) obj;
+ } else if (obj instanceof String) {
+ return VehicleDataEventStatus.valueForString((String) obj);
+ }
+ return null;
+ }
+ public void setWiperStatus(WiperStatus wiperStatus) {
+ if (wiperStatus != null) {
+ parameters.put(KEY_WIPER_STATUS, wiperStatus);
+ } else {
+ parameters.remove(KEY_WIPER_STATUS);
+ }
+ }
+ public WiperStatus getWiperStatus() {
+ Object obj = parameters.get(KEY_WIPER_STATUS);
+ if (obj instanceof WiperStatus) {
+ return (WiperStatus) obj;
+ } else if (obj instanceof String) {
+ return WiperStatus.valueForString((String) obj);
+ }
+ return null;
+ }
+ public void setHeadLampStatus(HeadLampStatus headLampStatus) {
+ if (headLampStatus != null) {
+ parameters.put(KEY_HEAD_LAMP_STATUS, headLampStatus);
+ } else {
+ parameters.remove(KEY_HEAD_LAMP_STATUS);
+ }
+ }
+ @SuppressWarnings("unchecked")
+ public HeadLampStatus getHeadLampStatus() {
+ Object obj = parameters.get(KEY_HEAD_LAMP_STATUS);
+ if (obj instanceof HeadLampStatus) {
+ return (HeadLampStatus) obj;
+ } else if (obj instanceof Hashtable) {
+ try {
+ return new HeadLampStatus((Hashtable<String, Object>) obj);
+ } catch (Exception e) {
+ DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_HEAD_LAMP_STATUS, e);
+ }
+ }
+ return null;
+ }
+ public void setEngineTorque(Double engineTorque) {
+ if (engineTorque != null) {
+ parameters.put(KEY_ENGINE_TORQUE, engineTorque);
+ } else {
+ parameters.remove(KEY_ENGINE_TORQUE);
+ }
+ }
+ public Double getEngineTorque() {
+ Object object = parameters.get(KEY_ENGINE_TORQUE);
+ return SdlDataTypeConverter.objectToDouble(object);
+ }
+ public void setAccPedalPosition(Double accPedalPosition) {
+ if (accPedalPosition != null) {
+ parameters.put(KEY_ACC_PEDAL_POSITION, accPedalPosition);
+ } else {
+ parameters.remove(KEY_ACC_PEDAL_POSITION);
+ }
+ }
+ public Double getAccPedalPosition() {
+ Object object = parameters.get(KEY_ACC_PEDAL_POSITION);
+ return SdlDataTypeConverter.objectToDouble(object);
+ }
+ public void setSteeringWheelAngle(Double steeringWheelAngle) {
+ if (steeringWheelAngle != null) {
+ parameters.put(KEY_STEERING_WHEEL_ANGLE, steeringWheelAngle);
+ } else {
+ parameters.remove(KEY_STEERING_WHEEL_ANGLE);
+ }
+ }
+ public Double getSteeringWheelAngle() {
+ Object object = parameters.get(KEY_STEERING_WHEEL_ANGLE);
+ return SdlDataTypeConverter.objectToDouble(object);
+ }
+ public void setECallInfo(ECallInfo eCallInfo) {
+ if (eCallInfo != null) {
+ parameters.put(KEY_E_CALL_INFO, eCallInfo);
+ } else {
+ parameters.remove(KEY_E_CALL_INFO);
+ }
+ }
+ @SuppressWarnings("unchecked")
+ public ECallInfo getECallInfo() {
+ Object obj = parameters.get(KEY_E_CALL_INFO);
+ if (obj instanceof ECallInfo) {
+ return (ECallInfo) obj;
+ } else if (obj instanceof Hashtable) {
+ try {
+ return new ECallInfo((Hashtable<String, Object>) obj);
+ } catch (Exception e) {
+ DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_E_CALL_INFO, e);
+ }
+ }
+ return null;
+ }
+ public void setAirbagStatus(AirbagStatus airbagStatus) {
+ if (airbagStatus != null) {
+ parameters.put(KEY_AIRBAG_STATUS, airbagStatus);
+ } else {
+ parameters.remove(KEY_AIRBAG_STATUS);
+ }
+ }
+ @SuppressWarnings("unchecked")
+ public AirbagStatus getAirbagStatus() {
+ Object obj = parameters.get(KEY_AIRBAG_STATUS);
+ if (obj instanceof AirbagStatus) {
+ return (AirbagStatus) obj;
+ } else if (obj instanceof Hashtable) {
+ try {
+ return new AirbagStatus((Hashtable<String, Object>) obj);
+ } catch (Exception e) {
+ DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_AIRBAG_STATUS, e);
+ }
+ }
+ return null;
+ }
+ public void setEmergencyEvent(EmergencyEvent emergencyEvent) {
+ if (emergencyEvent != null) {
+ parameters.put(KEY_EMERGENCY_EVENT, emergencyEvent);
+ } else {
+ parameters.remove(KEY_EMERGENCY_EVENT);
+ }
+ }
+ @SuppressWarnings("unchecked")
+ public EmergencyEvent getEmergencyEvent() {
+ Object obj = parameters.get(KEY_EMERGENCY_EVENT);
+ if (obj instanceof EmergencyEvent) {
+ return (EmergencyEvent) obj;
+ } else if (obj instanceof Hashtable) {
+ try {
+ return new EmergencyEvent((Hashtable<String, Object>) obj);
+ } catch (Exception e) {
+ DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_EMERGENCY_EVENT, e);
+ }
+ }
+ return null;
+ }
+ public void setClusterModeStatus(ClusterModeStatus clusterModeStatus) {
+ if (clusterModeStatus != null) {
+ parameters.put(KEY_CLUSTER_MODE_STATUS, clusterModeStatus);
+ } else {
+ parameters.remove(KEY_CLUSTER_MODE_STATUS);
+ }
+ }
+ @SuppressWarnings("unchecked")
+ public ClusterModeStatus getClusterModeStatus() {
+ Object obj = parameters.get(KEY_CLUSTER_MODE_STATUS);
+ if (obj instanceof ClusterModeStatus) {
+ return (ClusterModeStatus) obj;
+ } else if (obj instanceof Hashtable) {
+ try {
+ return new ClusterModeStatus((Hashtable<String, Object>) obj);
+ } catch (Exception e) {
+ DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_CLUSTER_MODE_STATUS, e);
+ }
+ }
+ return null;
+ }
+ public void setMyKey(MyKey myKey) {
+ if (myKey != null) {
+ parameters.put(KEY_MY_KEY, myKey);
+ } else {
+ parameters.remove(KEY_MY_KEY);
+ }
+ }
+ @SuppressWarnings("unchecked")
+ public MyKey getMyKey() {
+ Object obj = parameters.get(KEY_MY_KEY);
+ if (obj instanceof MyKey) {
+ return (MyKey) obj;
+ } else if (obj instanceof Hashtable) {
+ try {
+ return new MyKey((Hashtable<String, Object>) obj);
+ } catch (Exception e) {
+ DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_MY_KEY, e);
+ }
+ }
+ return null;
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/OnWayPointChange.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/OnWayPointChange.java
new file mode 100644
index 000000000..4e197b3eb
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/OnWayPointChange.java
@@ -0,0 +1,48 @@
+package com.smartdevicelink.proxy.rpc;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCNotification;
+
+import java.util.ArrayList;
+import java.util.Hashtable;
+import java.util.List;
+
+public class OnWayPointChange extends RPCNotification {
+ public static final String KEY_WAY_POINTS = "wayPoints";
+
+ public OnWayPointChange() {
+ super(FunctionID.ON_WAY_POINT_CHANGE.toString());
+ }
+
+ public OnWayPointChange(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+
+ @SuppressWarnings("unchecked")
+ public List<LocationDetails> getWayPoints() {
+ if (parameters.get(KEY_WAY_POINTS) instanceof List<?>) {
+ List<?> list = (List<?>)parameters.get(KEY_WAY_POINTS);
+ if (list != null && list.size()>0) {
+ Object obj = list.get(0);
+ if(obj instanceof LocationDetails){
+ return (List<LocationDetails>) list;
+ } else if(obj instanceof Hashtable) {
+ List<LocationDetails> newList = new ArrayList<LocationDetails>();
+ for (Object hash:list) {
+ newList.add(new LocationDetails((Hashtable<String, Object>)hash));
+ }
+ return newList;
+ }
+ }
+ }
+ return null;
+ }
+
+ public void setWayPoints(List<LocationDetails> wayPoints) {
+ if (wayPoints != null) {
+ parameters.put(KEY_WAY_POINTS, wayPoints);
+ } else {
+ parameters.remove(KEY_WAY_POINTS);
+ }
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/ParameterPermissions.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/ParameterPermissions.java
new file mode 100644
index 000000000..996de27ac
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/ParameterPermissions.java
@@ -0,0 +1,121 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+import java.util.List;
+
+import com.smartdevicelink.proxy.RPCStruct;
+
+/**
+ * Defining sets of parameters, which are permitted or prohibited for a given RPC.
+ * <p><b>Parameter List</b></p>
+ * <table border="1" rules="all">
+ * <tr>
+ * <th>Name</th>
+ * <th>Type</th>
+ * <th>Description</th>
+ * <th>SmartDeviceLink Ver. Available</th>
+ * </tr>
+ * <tr>
+ * <td>allowed</td>
+ * <td>String</td>
+ * <td>A set of all parameters that are permitted for this given RPC.
+ * <ul>
+ * <li>Min size: 0</li>
+ * <li>Max size: 100</li>
+ * <li>Max length: 100</li>
+ * </ul>
+ * </td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>userDisallowed</td>
+ * <td>String</td>
+ * <td>A set of all parameters that are prohibated for this given RPC.
+ * <ul>
+ * <li>Min size: 0</li>
+ * <li>Max size: 100</li>
+ * <li>Max length: 100</li>
+ * </ul>
+ * </td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * </table>
+ * @since SmartDeviceLink 2.0
+ */
+public class ParameterPermissions extends RPCStruct {
+ public static final String KEY_ALLOWED = "allowed";
+ public static final String KEY_USER_DISALLOWED = "userDisallowed";
+
+ /**
+ * Constructs a newly allocated ParameterPermissions object
+ */
+ public ParameterPermissions() { }
+
+ /**
+ * Constructs a newly allocated ParameterPermissions object indicated by the Hashtable parameter
+ * @param hash The Hashtable to use
+ */
+ public ParameterPermissions(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+
+ /**
+ * get a set of all parameters that are permitted for this given RPC.
+ * @return a set of all parameters that are permitted for this given RPC.
+ */
+ @SuppressWarnings("unchecked")
+ public List<String> getAllowed() {
+ if (store.get(KEY_ALLOWED) instanceof List<?>) {
+ List<?> list = (List<?>)store.get( KEY_ALLOWED);
+ if (list != null && list.size() > 0) {
+ Object obj = list.get(0);
+ if (obj instanceof String) {
+ return (List<String>) list;
+ }
+ }
+ }
+ return null;
+ }
+
+ /**
+ * set a set of all parameters that are permitted for this given RPC.
+ * @param allowed parameter that is permitted for this given RPC
+ */
+ public void setAllowed(List<String> allowed) {
+ if (allowed != null) {
+ store.put(KEY_ALLOWED, allowed);
+ } else {
+ store.remove(KEY_ALLOWED);
+ }
+ }
+
+ /**
+ * get a set of all parameters that are prohibited for this given RPC.
+ * @return a set of all parameters that are prohibited for this given RPC
+ */
+ @SuppressWarnings("unchecked")
+ public List<String> getUserDisallowed() {
+ if (store.get(KEY_USER_DISALLOWED) instanceof List<?>) {
+ List<?> list = (List<?>)store.get( KEY_USER_DISALLOWED);
+ if (list != null && list.size() > 0) {
+ Object obj = list.get(0);
+ if (obj instanceof String) {
+ return (List<String>) list;
+ }
+ }
+ }
+ return null;
+ }
+
+ /**
+ * set a set of all parameters that are prohibited for this given RPC.
+ * @param userDisallowed paramter that is prohibited for this given RPC
+ */
+ public void setUserDisallowed(List<String> userDisallowed) {
+ if (userDisallowed != null) {
+ store.put(KEY_USER_DISALLOWED, userDisallowed);
+ } else {
+ store.remove(KEY_USER_DISALLOWED);
+ }
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/PerformAudioPassThru.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/PerformAudioPassThru.java
new file mode 100644
index 000000000..0e663f63d
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/PerformAudioPassThru.java
@@ -0,0 +1,377 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.ArrayList;
+import java.util.Hashtable;
+import java.util.List;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCRequest;
+import com.smartdevicelink.proxy.rpc.enums.AudioType;
+import com.smartdevicelink.proxy.rpc.enums.BitsPerSample;
+import com.smartdevicelink.proxy.rpc.enums.SamplingRate;
+
+/**
+ * This will open an audio pass thru session. By doing so the app can receive
+ * audio data through the vehicles microphone
+ *
+ * <p>Function Group: AudioPassThru</p>
+ *
+ * <b>HMILevel needs to be FULL, LIMITED or BACKGROUND</b>
+ *
+ * <p><b>Parameter List</b></p>
+ * <table border="1" rules="all">
+ * <tr>
+ * <th>Name</th>
+ * <th>Type</th>
+ * <th>Description</th>
+ * <th>Reg.</th>
+ * <th>Notes</th>
+ * <th> Version</th>
+ * </tr>
+ * <tr>
+ * <td>initialPrompt</td>
+ * <td>TTSChunk[]</td>
+ * <td>SDL will speak this prompt before opening the audio pass thru session. </td>
+ * <td>N</td>
+ * <td>This is an array of text chunks of type TTSChunk. The array must have at least one item If omitted, then no initial prompt is spoken: <p>Array Minsize: 1</p> Array Maxsize: 100</td>
+ * <td>SmartDeviceLink 2.0 </td>
+ * </tr>
+ * <tr>
+ * <td>audioPassThruDisplayText1</td>
+ * <td>String</td>
+ * <td>First line of text displayed during audio capture.</td>
+ * <td>N</td>
+ * <td>Maxlength = 500</td>
+ * <td>SmartDeviceLink 2.0 </td>
+ * </tr>
+ * <tr>
+ * <td>samplingRate</td>
+ * <td>SamplingRate</td>
+ * <td>This value shall is allowed to be 8 or 16 or 22 or 44 khz.</td>
+ * <td>Y</td>
+ * <td></td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>maxDuration</td>
+ * <td>Integer</td>
+ * <td>The maximum duration of audio recording in milliseconds.</td>
+ * <td>Y</td>
+ * <td>Minvalue: 1; Maxvalue: 1000000</td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>bitsPerSample</td>
+ * <td>BitsPerSample</td>
+ * <td>Specifies the quality the audio is recorded - 8 bit or 16 bit.</td>
+ * <td>Y</td>
+ * <td></td>
+ * <td>SmartDeviceLink 2.0 </td>
+ * </tr>
+ * <tr>
+ * <td>audioType</td>
+ * <td>AudioType</td>
+ * <td>Specifies the type of audio data being requested.</td>
+ * <td>Y</td>
+ * <td></td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>muteAudio</td>
+ * <td>Boolean</td>
+ * <td>N</td>
+ * <td>N</td>
+ * <td></td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ *
+ *
+ *
+ *
+ *
+ * </table>
+ * @since SmartDeviceLink 2.0
+ * @see EndAudioPassThru
+ */
+public class PerformAudioPassThru extends RPCRequest {
+ public static final String KEY_MAX_DURATION = "maxDuration";
+ public static final String KEY_AUDIO_PASS_THRU_DISPLAY_TEXT_1 = "audioPassThruDisplayText1";
+ public static final String KEY_AUDIO_PASS_THRU_DISPLAY_TEXT_2 = "audioPassThruDisplayText2";
+ public static final String KEY_MUTE_AUDIO = "muteAudio";
+ public static final String KEY_SAMPLING_RATE = "samplingRate";
+ public static final String KEY_AUDIO_TYPE = "audioType";
+ public static final String KEY_INITIAL_PROMPT = "initialPrompt";
+ public static final String KEY_BITS_PER_SAMPLE = "bitsPerSample";
+
+ /**
+ * Constructs a new PerformAudioPassThru object
+ */
+ public PerformAudioPassThru() {
+ super(FunctionID.PERFORM_AUDIO_PASS_THRU.toString());
+ }
+
+ /**
+ * <p>Constructs a new PerformAudioPassThru object indicated by the Hashtable
+ * parameter</p>
+ *
+ *
+ * @param hash
+ * The Hashtable to use
+ */
+ public PerformAudioPassThru(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+
+ /**
+ * Sets initial prompt which will be spoken before opening the audio pass
+ * thru session by SDL
+ *
+ * @param initialPrompt
+ * a List<TTSChunk> value represents the initial prompt which
+ * will be spoken before opening the audio pass thru session by
+ * SDL
+ * <p></p>
+ * <b>Notes: </b>
+ * <ul>
+ * <li>This is an array of text chunks of type TTSChunk</li>
+ * <li>The array must have at least one item</li>
+ * <li>If omitted, then no initial prompt is spoken</li>
+ * <li>Array Minsize: 1</li>
+ * <li>Array Maxsize: 100</li>
+ * </ul>
+ */
+ public void setInitialPrompt(List<TTSChunk> initialPrompt) {
+ if (initialPrompt != null) {
+ parameters.put(KEY_INITIAL_PROMPT, initialPrompt);
+ } else {
+ parameters.remove(KEY_INITIAL_PROMPT);
+ }
+ }
+
+ /**
+ * Gets a List value representing an initial prompt which will be spoken
+ * before opening the audio pass thru session by SDL
+ *
+ * @return List<TTSChunk> -a List value representing an initial prompt
+ * which will be spoken before opening the audio pass thru session
+ * by SDL
+ */
+ @SuppressWarnings("unchecked")
+ public List<TTSChunk> getInitialPrompt() {
+ if (parameters.get(KEY_INITIAL_PROMPT) instanceof List<?>) {
+ List<?> list = (List<?>)parameters.get(KEY_INITIAL_PROMPT);
+ if (list != null && list.size() > 0) {
+ Object obj = list.get(0);
+ if (obj instanceof TTSChunk) {
+ return (List<TTSChunk>) list;
+ } else if (obj instanceof Hashtable) {
+ List<TTSChunk> newList = new ArrayList<TTSChunk>();
+ for (Object hashObj : list) {
+ newList.add(new TTSChunk((Hashtable<String, Object>)hashObj));
+ }
+ return newList;
+ }
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Sets a line of text displayed during audio capture
+ *
+ * @param audioPassThruDisplayText1
+ * <p>a String value representing the line of text displayed during
+ * audio capture</p>
+ * <p></p>
+ * <b>Notes: </b>Maxlength=500
+ */
+ public void setAudioPassThruDisplayText1(String audioPassThruDisplayText1) {
+ if (audioPassThruDisplayText1 != null) {
+ parameters.put(KEY_AUDIO_PASS_THRU_DISPLAY_TEXT_1, audioPassThruDisplayText1);
+ } else {
+ parameters.remove(KEY_AUDIO_PASS_THRU_DISPLAY_TEXT_1);
+ }
+ }
+
+ /**
+ * Gets a first line of text displayed during audio capture
+ *
+ * @return String -a String value representing a first line of text
+ * displayed during audio capture
+ */
+ public String getAudioPassThruDisplayText1() {
+ return (String) parameters.get(KEY_AUDIO_PASS_THRU_DISPLAY_TEXT_1);
+ }
+
+ /**
+ * Sets a line of text displayed during audio capture
+ *
+ * @param audioPassThruDisplayText2
+ * <p>a String value representing the line of text displayed during
+ * audio capture</p>
+ * <p></p>
+ * <b>Notes: </b>Maxlength=500
+ */
+ public void setAudioPassThruDisplayText2(String audioPassThruDisplayText2) {
+ if (audioPassThruDisplayText2 != null) {
+ parameters.put(KEY_AUDIO_PASS_THRU_DISPLAY_TEXT_2, audioPassThruDisplayText2);
+ } else {
+ parameters.remove(KEY_AUDIO_PASS_THRU_DISPLAY_TEXT_2);
+ }
+ }
+
+ /**
+ * Gets a second line of text displayed during audio capture
+ *
+ * @return String -a String value representing a first line of text
+ * displayed during audio capture
+ */
+ public String getAudioPassThruDisplayText2() {
+ return (String) parameters.get(KEY_AUDIO_PASS_THRU_DISPLAY_TEXT_2);
+ }
+
+ /**
+ * Sets a samplingRate
+ *
+ * @param samplingRate
+ * a SamplingRate value representing a 8 or 16 or 22 or 24 khz
+ */
+ public void setSamplingRate(SamplingRate samplingRate) {
+ if (samplingRate != null) {
+ parameters.put(KEY_SAMPLING_RATE, samplingRate);
+ } else {
+ parameters.remove(KEY_SAMPLING_RATE);
+ }
+ }
+
+ /**
+ * Gets a samplingRate
+ *
+ * @return SamplingRate -a SamplingRate value
+ */
+ public SamplingRate getSamplingRate() {
+ Object obj = parameters.get(KEY_SAMPLING_RATE);
+ if (obj instanceof SamplingRate) {
+ return (SamplingRate) obj;
+ } else if (obj instanceof String) {
+ return SamplingRate.valueForString((String) obj);
+ }
+ return null;
+ }
+
+ /**
+ * Sets the maximum duration of audio recording in milliseconds
+ *
+ * @param maxDuration
+ * an Integer value representing the maximum duration of audio
+ * recording in millisecond
+ * <p></p>
+ * <b>Notes: </b>Minvalue:1; Maxvalue:1000000
+ */
+ public void setMaxDuration(Integer maxDuration) {
+ if (maxDuration != null) {
+ parameters.put(KEY_MAX_DURATION, maxDuration);
+ } else {
+ parameters.remove(KEY_MAX_DURATION);
+ }
+ }
+
+ /**
+ * Gets a max duration of audio recording in milliseconds
+ *
+ * @return int -an int value representing the maximum duration of audio
+ * recording in milliseconds
+ */
+ public Integer getMaxDuration() {
+ return (Integer) parameters.get(KEY_MAX_DURATION);
+ }
+
+ /**
+ * Sets the quality the audio is recorded - 8 bit or 16 bit
+ *
+ * @param audioQuality
+ * a BitsPerSample value representing 8 bit or 16 bit
+ */
+ public void setBitsPerSample(BitsPerSample audioQuality) {
+ if (audioQuality != null) {
+ parameters.put(KEY_BITS_PER_SAMPLE, audioQuality);
+ } else {
+ parameters.remove(KEY_BITS_PER_SAMPLE);
+ }
+ }
+
+ /**
+ * Gets a BitsPerSample value, 8 bit or 16 bit
+ *
+ * @return BitsPerSample -a BitsPerSample value
+ */
+ public BitsPerSample getBitsPerSample() {
+ Object obj = parameters.get(KEY_BITS_PER_SAMPLE);
+ if (obj instanceof BitsPerSample) {
+ return (BitsPerSample) obj;
+ } else if (obj instanceof String) {
+ return BitsPerSample.valueForString((String) obj);
+ }
+ return null;
+ }
+
+ /**
+ * Sets an audioType
+ *
+ * @param audioType
+ * an audioType
+ */
+ public void setAudioType(AudioType audioType) {
+ if (audioType != null) {
+ parameters.put(KEY_AUDIO_TYPE, audioType);
+ } else {
+ parameters.remove(KEY_AUDIO_TYPE);
+ }
+ }
+
+ /**
+ * Gets a type of audio data
+ *
+ * @return AudioType -an AudioType
+ */
+ public AudioType getAudioType() {
+ Object obj = parameters.get(KEY_AUDIO_TYPE);
+ if (obj instanceof AudioType) {
+ return (AudioType) obj;
+ } else if (obj instanceof String) {
+ return AudioType.valueForString((String) obj);
+ }
+ return null;
+ }
+
+ /**
+ *<p> Gets a Boolean value representing if the current audio source should be
+ * muted during the APT session</p>
+ *
+ *
+ * @return Boolean -a Boolean value representing if the current audio source
+ * should be muted during the APT session
+ */
+ public Boolean getMuteAudio() {
+ return (Boolean) parameters.get(KEY_MUTE_AUDIO);
+ }
+
+ /**
+ * <p>Sets a muteAudio value representing if the current audio source should be
+ * muted during the APT session
+ * If not, the audio source will play without interruption. If omitted, the
+ * value is set to true</p>
+ *
+ *
+ * @param muteAudio
+ * a Boolean value representing if the current audio source
+ * should be muted during the APT session
+ */
+ public void setMuteAudio(Boolean muteAudio) {
+ if (muteAudio != null) {
+ parameters.put(KEY_MUTE_AUDIO, muteAudio);
+ } else {
+ parameters.remove(KEY_MUTE_AUDIO);
+ }
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/PerformAudioPassThruResponse.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/PerformAudioPassThruResponse.java
new file mode 100644
index 000000000..2e90356ed
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/PerformAudioPassThruResponse.java
@@ -0,0 +1,33 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCResponse;
+
+/**
+ * Perform Audio Pass Thru Response is sent, when PerformAudioPassThru has been called
+ *
+ * @since SmartDeviceLink 2.0
+ */
+public class PerformAudioPassThruResponse extends RPCResponse {
+
+ /**
+ * Constructs a new PerformAudioPassThruResponse object
+ */
+ public PerformAudioPassThruResponse() {
+ super(FunctionID.PERFORM_AUDIO_PASS_THRU.toString());
+ }
+
+ /**
+ * <p>Constructs a new PerformAudioPassThruResponse object indicated by the Hashtable
+ * parameter</p>
+ *
+ *
+ * @param hash
+ * The Hashtable to use
+ */
+ public PerformAudioPassThruResponse(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+} \ No newline at end of file
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/PerformInteraction.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/PerformInteraction.java
new file mode 100644
index 000000000..9ad8c1034
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/PerformInteraction.java
@@ -0,0 +1,472 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.ArrayList;
+import java.util.Hashtable;
+import java.util.List;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCRequest;
+import com.smartdevicelink.proxy.rpc.enums.InteractionMode;
+import com.smartdevicelink.proxy.rpc.enums.LayoutMode;
+/**
+ * Performs an application-initiated interaction in which the user can select a
+ * {@linkplain Choice} from among the specified Choice Sets. For instance, an
+ * application may use a PerformInteraction to ask a user to say the name of a
+ * song to play. The user's response is only valid if it appears in the
+ * specified Choice Sets and is recognized by SDL
+ * <p></p>
+ * <p>Function Group: Base</p>
+ *
+ * <p><b>HMILevel needs to be FULL</b></p>
+ *
+ * <p><b>Parameter List</b></p>
+ * <table border="1" rules="all">
+ * <tr>
+ * <th>Param Name</th>
+ * <th>Type</th>
+ * <th>Description</th>
+ * <th> Req.</th>
+ * <th>Notes</th>
+ * <th>Version Available</th>
+ * </tr>
+ * <tr>
+ * <td>initialText</td>
+ * <td>String</td>
+ * <td>Displayed when the interaction begins. This text may be overlaid by the "Listening" prompt during the interaction. Text is displayed on first line of multiline display, and is centered. If text does not fit on line, it will be truncated</td>
+ * <td>Y</td>
+ * <td>maxlength:500</td>
+ * <td>SmartDeviceLink 1.0</td>
+ * </tr>
+ * <tr>
+ * <td>initialPrompt</td>
+ * <td>TTSChunk</td>
+ * <td>An array of one or more TTSChunks that, taken together, specify what is to be spoken to the user at the start of an interaction.</td>
+ * <td>Y</td>
+ * <td>minsize:1; maxsize:100</td>
+ * <td>SmartDeviceLink 1.0</td>
+ * </tr>
+ * <tr>
+ * <td>interactionMode</td>
+ * <td>InteractionMode</td>
+ * <td>Indicates how user selects interaction choice. User can choose either by voice (VR_ONLY), by visual selection from the menu (MANUAL_ONLY), or by either mode (BOTH). </td>
+ * <td>Y</td>
+ * <td></td>
+ * <td>SmartDeviceLink 1.0</td>
+ * </tr>
+ * <tr>
+ * <td>interactionChoiceSetIDList</td>
+ * <td>Integer</td>
+ * <td>Array of one or more Choice Set IDs. User can select any choice from any of the specified Choice Sets.</td>
+ * <td>Y</td>
+ * <td>minsize:0; maxsize:100; minvalue:0; maxvalue:2000000000</td>
+ * <td>SmartDeviceLink 1.0</td>
+ * </tr>
+ * <tr>
+ * <td>helpPrompt</td>
+ * <td>TTSChunk</td>
+ * <td>An array of TTSChunks which, taken together, specify the help phrase to be spoken when the user says "help" during the VR session. If this parameter is omitted, the help prompt will be constructed by SDL from the first vrCommand of each choice of all the Choice Sets specified in the interactionChoiceSetIDList parameter. </td>
+ * <td>N</td>
+ * <td>minsize:1; maxsize:100; The helpPrompt specified in SetGlobalProperties is not used by PerformInteraction.</td>
+ * <td>SmartDeviceLink 1.0</td>
+ * </tr>
+ * <tr>
+ * <td>timeoutPrompt</td>
+ * <td>TTSChunk</td>
+ * <td>An array of TTSChunks which, taken together, specify the phrase to be spoken when the listen times out during the VR session. If this parameter is omitted, the timeout prompt will be the same as the help prompt (see helpPrompt parameter). </td>
+ * <td>N</td>
+ * <td>The timeoutPrompt specified in SetGlobalProperties is not used by PerformInteraction. minsize:1;maxsize:100</td>
+ * <td>SmartDeviceLink 1.0</td>
+ * </tr>
+ * <tr>
+ * <td>timeout</td>
+ * <td>Integer</td>
+ * <td>The amount of time, in milliseconds, SDL will wait for the user to make a choice (VR or Menu). If this time elapses without the user making a choice, the timeoutPrompt will be spoken. After this timeout value has been reached, the interaction will stop and a subsequent interaction will take place after SDL speaks the timeout prompt. If that times out as well, the interaction will end completely. If omitted, the default is 10000ms.</td>
+ * <td>N</td>
+ * <td>minvalue:5000; maxvalue:100000; defvalue:10000</td>
+ * <td>SmartDeviceLink 1.0</td>
+ * </tr>
+ * <tr>
+ * <td>vrHelp</td>
+ * <td>VrHelpItem</td>
+ * <td>Ability to send suggested VR Help Items to display on-screen during Perform Interaction If omitted on supported displays, the default SDL generated list of suggested choices will be displayed.</td>
+ * <td>N</td>
+ * <td>Min = 1;Max = 100</td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>interactionLayout</td>
+ * <td>LayoutMode</td>
+ * <td>See {@linkplain LayoutMode}</td>
+ * <td>N</td>
+ * <td></td>
+ * <td>SmartDeviceLink 3.0</td>
+ * </tr>
+ * </table>
+ *
+ *
+ * @since SmartDeviceLink 1.0
+ * @see CreateInteractionChoiceSet
+ * @see DeleteInteractionChoiceSet
+ */
+public class PerformInteraction extends RPCRequest {
+ public static final String KEY_INITIAL_TEXT = "initialText";
+ public static final String KEY_INTERACTION_MODE = "interactionMode";
+ public static final String KEY_INTERACTION_CHOICE_SET_ID_LIST = "interactionChoiceSetIDList";
+ public static final String KEY_INTERACTION_LAYOUT = "interactionLayout";
+ public static final String KEY_INITIAL_PROMPT = "initialPrompt";
+ public static final String KEY_HELP_PROMPT = "helpPrompt";
+ public static final String KEY_TIMEOUT_PROMPT = "timeoutPrompt";
+ public static final String KEY_TIMEOUT = "timeout";
+ public static final String KEY_VR_HELP = "vrHelp";
+ /**
+ * Constructs a new PerformInteraction object
+ */
+ public PerformInteraction() {
+ super(FunctionID.PERFORM_INTERACTION.toString());
+ }
+ /**
+ * Constructs a new PerformInteraction object indicated by the Hashtable
+ * parameter
+ *
+ *
+ * @param hash
+ * The Hashtable to use
+ */
+ public PerformInteraction(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+ /**
+ * Gets the Text that Displayed when the interaction begins. This text may
+ * be overlaid by the "Listening" prompt during the interaction. Text is
+ * displayed on first line of multiline display, and is centered. If text
+ * does not fit on line, it will be truncated
+ *
+ * @return String -the text displayed when the interaction begins
+ */
+ public String getInitialText() {
+ return (String) parameters.get(KEY_INITIAL_TEXT);
+ }
+ /**
+ * Sets the Text that Displayed when the interaction begins. This text may
+ * be overlaid by the "Listening" prompt during the interaction. Text is
+ * displayed on first line of multiline display, and is centered. If text
+ * does not fit on line, it will be truncated
+ *
+ * @param initialText
+ * a String value that Displayed when the interaction begins
+ */
+ public void setInitialText(String initialText) {
+ if (initialText != null) {
+ parameters.put(KEY_INITIAL_TEXT, initialText);
+ } else {
+ parameters.remove(KEY_INITIAL_TEXT);
+ }
+ }
+ /**
+ * Gets an An array of one or more TTSChunks that, taken together, specify
+ * what is to be spoken to the user at the start of an interaction
+ *
+ * @return List<TTSChunk> -a List<TTSChunk> value, specify what is to be
+ * spoken to the user at the start of an interaction
+ */
+ @SuppressWarnings("unchecked")
+ public List<TTSChunk> getInitialPrompt() {
+ if (parameters.get(KEY_INITIAL_PROMPT) instanceof List<?>) {
+ List<?> list = (List<?>)parameters.get(KEY_INITIAL_PROMPT);
+ if (list != null && list.size() > 0) {
+ Object obj = list.get(0);
+ if (obj instanceof TTSChunk) {
+ return (List<TTSChunk>) list;
+ } else if (obj instanceof Hashtable) {
+ List<TTSChunk> newList = new ArrayList<TTSChunk>();
+ for (Object hashObj : list) {
+ newList.add(new TTSChunk((Hashtable<String, Object>)hashObj));
+ }
+ return newList;
+ }
+ }
+ }
+ return null;
+ }
+ /**
+ * Sets An array of one or more TTSChunks that, taken together, specify what
+ * is to be spoken to the user at the start of an interaction
+ *
+ * @param initialPrompt
+ * a List<TTSChunk> value, specify what is to be spoken to the
+ * user at the start of an interaction
+ */
+ public void setInitialPrompt(List<TTSChunk> initialPrompt) {
+ if (initialPrompt != null) {
+ parameters.put(KEY_INITIAL_PROMPT, initialPrompt);
+ } else {
+ parameters.remove(KEY_INITIAL_PROMPT);
+ }
+ }
+ /**
+ * Gets the Indicates mode that indicate how user selects interaction
+ * choice. User can choose either by voice (VR_ONLY), by visual selection
+ * from the menu (MANUAL_ONLY), or by either mode (BOTH)
+ *
+ * @return InteractionMode -indicate how user selects interaction choice
+ * (VR_ONLY, MANUAL_ONLY or BOTH)
+ */
+ public InteractionMode getInteractionMode() {
+ Object obj = parameters.get(KEY_INTERACTION_MODE);
+ if (obj instanceof InteractionMode) {
+ return (InteractionMode) obj;
+ } else if (obj instanceof String) {
+ return InteractionMode.valueForString((String) obj);
+ }
+ return null;
+ }
+ /**
+ * Sets the Indicates mode that indicate how user selects interaction
+ * choice. User can choose either by voice (VR_ONLY), by visual selection
+ * from the menu (MANUAL_ONLY), or by either mode (BOTH)
+ *
+ * @param interactionMode
+ * indicate how user selects interaction choice (VR_ONLY,
+ * MANUAL_ONLY or BOTH)
+ */
+ public void setInteractionMode(InteractionMode interactionMode) {
+ if (interactionMode != null) {
+ parameters.put(KEY_INTERACTION_MODE, interactionMode);
+ } else {
+ parameters.remove(KEY_INTERACTION_MODE);
+ }
+ }
+ /**
+ * Gets a List<Integer> value representing an Array of one or more Choice
+ * Set IDs
+ *
+ * @return List<Integer> -a List<Integer> value representing an Array of
+ * one or more Choice Set IDs. User can select any choice from any
+ * of the specified Choice Sets
+ */
+ @SuppressWarnings("unchecked")
+ public List<Integer> getInteractionChoiceSetIDList() {
+ if(parameters.get(KEY_INTERACTION_CHOICE_SET_ID_LIST) instanceof List<?>){
+ List<?> list = (List<?>)parameters.get(KEY_INTERACTION_CHOICE_SET_ID_LIST);
+ if(list != null && list.size()>0){
+ Object obj = list.get(0);
+ if(obj instanceof Integer){
+ return (List<Integer>) list;
+ }
+ }
+ }
+ return null;
+ }
+ /**
+ * Sets a List<Integer> representing an Array of one or more Choice Set
+ * IDs. User can select any choice from any of the specified Choice Sets
+ *
+ * @param interactionChoiceSetIDList
+ * -a List<Integer> representing an Array of one or more Choice
+ * Set IDs. User can select any choice from any of the specified
+ * Choice Sets
+ * <p></p>
+ * <b>Notes: </b>Min Value: 0; Max Vlaue: 2000000000
+ */
+ public void setInteractionChoiceSetIDList(List<Integer> interactionChoiceSetIDList) {
+ if (interactionChoiceSetIDList != null) {
+ parameters.put(KEY_INTERACTION_CHOICE_SET_ID_LIST, interactionChoiceSetIDList);
+ } else {
+ parameters.remove(KEY_INTERACTION_CHOICE_SET_ID_LIST);
+ }
+ }
+ /**
+ * Gets a List<TTSChunk> which taken together, specify the help phrase to
+ * be spoken when the user says "help" during the VR session
+ *
+ * @return List<TTSChunk> -a List<TTSChunk> which taken together,
+ * specify the help phrase to be spoken when the user says "help"
+ * during the VR session
+ */
+ @SuppressWarnings("unchecked")
+ public List<TTSChunk> getHelpPrompt() {
+ if(parameters.get(KEY_HELP_PROMPT) instanceof List<?>){
+ List<?> list = (List<?>)parameters.get(KEY_HELP_PROMPT);
+ if (list != null && list.size() > 0) {
+ Object obj = list.get(0);
+ if (obj instanceof TTSChunk) {
+ return (List<TTSChunk>) list;
+ } else if (obj instanceof Hashtable) {
+ List<TTSChunk> newList = new ArrayList<TTSChunk>();
+ for (Object hashObj : list) {
+ newList.add(new TTSChunk((Hashtable<String, Object>)hashObj));
+ }
+ return newList;
+ }
+ }
+ }
+ return null;
+ }
+ /**
+ * Sets An array of TTSChunks which, taken together, specify the help phrase
+ * to be spoken when the user says "help" during the VR session
+ * <p></p>
+ * If this parameter is omitted, the help prompt will be constructed by SDL
+ * from the first vrCommand of each choice of all the Choice Sets specified
+ * in the interactionChoiceSetIDList parameter
+ * <P></p>
+ * <b>Notes: </b>The helpPrompt specified in
+ * {@linkplain SetGlobalProperties} is not used by PerformInteraction
+ *
+ * @param helpPrompt
+ * a List<TTSChunk> which taken together, specify the help
+ * phrase to be spoken when the user says "help" during the VR
+ * session
+ */
+ public void setHelpPrompt(List<TTSChunk> helpPrompt) {
+ if (helpPrompt != null) {
+ parameters.put(KEY_HELP_PROMPT, helpPrompt);
+ } else {
+ parameters.remove(KEY_HELP_PROMPT);
+ }
+ }
+ /**
+ * Gets An array of TTSChunks which, taken together, specify the phrase to
+ * be spoken when the listen times out during the VR session
+ *
+ * @return List<TTSChunk> -a List<TTSChunk> specify the phrase to be
+ * spoken when the listen times out during the VR session
+ */
+ @SuppressWarnings("unchecked")
+ public List<TTSChunk> getTimeoutPrompt() {
+ if (parameters.get(KEY_TIMEOUT_PROMPT) instanceof List<?>) {
+ List<?> list = (List<?>)parameters.get(KEY_TIMEOUT_PROMPT);
+ if (list != null && list.size() > 0) {
+ Object obj = list.get(0);
+ if (obj instanceof TTSChunk) {
+ return (List<TTSChunk>) list;
+ } else if (obj instanceof Hashtable) {
+ List<TTSChunk> newList = new ArrayList<TTSChunk>();
+ for (Object hashObj : list) {
+ newList.add(new TTSChunk((Hashtable<String, Object>)hashObj));
+ }
+ return newList;
+ }
+ }
+ }
+ return null;
+ }
+ /**
+ * Sets An array of TTSChunks which, taken together, specify the phrase to
+ * be spoken when the listen times out during the VR session
+ * <p></p>
+ * <b>Notes: </b>The timeoutPrompt specified in
+ * {@linkplain SetGlobalProperties} is not used by PerformInteraction
+ *
+ * @param timeoutPrompt
+ * a List<TTSChunk> specify the phrase to be spoken when the
+ * listen times out during the VR session
+ */
+ public void setTimeoutPrompt(List<TTSChunk> timeoutPrompt) {
+ if (timeoutPrompt != null) {
+ parameters.put(KEY_TIMEOUT_PROMPT, timeoutPrompt);
+ } else {
+ parameters.remove(KEY_TIMEOUT_PROMPT);
+ }
+ }
+ /**
+ * Gets a Integer value representing the amount of time, in milliseconds,
+ * SDL will wait for the user to make a choice (VR or Menu)
+ *
+ * @return Integer -a Integer representing the amount of time, in
+ * milliseconds, SDL will wait for the user to make a choice (VR or
+ * Menu)
+ */
+ public Integer getTimeout() {
+ return (Integer) parameters.get(KEY_TIMEOUT);
+ }
+ /**
+ * Sets the amount of time, in milliseconds, SDL will wait for the user to
+ * make a choice (VR or Menu). If this time elapses without the user making
+ * a choice, the timeoutPrompt will be spoken. After this timeout value has
+ * been reached, the interaction will stop and a subsequent interaction will
+ * take place after SDL speaks the timeout prompt. If that times out as
+ * well, the interaction will end completely. If omitted, the default is
+ * 10000ms
+ *
+ * @param timeout
+ * an Integer value representing the amount of time, in
+ * milliseconds, SDL will wait for the user to make a choice (VR
+ * or Menu)
+ * <p></p>
+ * <b>Notes: </b>Min Value: 5000; Max Value: 100000
+ */
+ public void setTimeout(Integer timeout) {
+ if (timeout != null) {
+ parameters.put(KEY_TIMEOUT, timeout);
+ } else {
+ parameters.remove(KEY_TIMEOUT);
+ }
+ }
+
+ /**
+ * Gets a Voice recognition Help, which is a suggested VR Help Items to
+ * display on-screen during Perform Interaction
+ *
+ * @return List<VrHelpItem> -a List value representing a suggested VR
+ * Help Items to display on-screen during Perform Interaction
+ * @since SmartDeviceLink 2.0
+ */
+ @SuppressWarnings("unchecked")
+ public List<VrHelpItem> getVrHelp() {
+ if (parameters.get(KEY_VR_HELP) instanceof List<?>) {
+ List<?> list = (List<?>)parameters.get(KEY_VR_HELP);
+ if (list != null && list.size() > 0) {
+ Object obj = list.get(0);
+ if (obj instanceof VrHelpItem) {
+ return (List<VrHelpItem>) list;
+ } else if (obj instanceof Hashtable) {
+ List<VrHelpItem> newList = new ArrayList<VrHelpItem>();
+ for (Object hashObj : list) {
+ newList.add(new VrHelpItem((Hashtable<String, Object>)hashObj));
+ }
+ return newList;
+ }
+ }
+ }
+ return null;
+ }
+
+ /**
+ *
+ * @param vrHelp
+ * a List representing a suggested VR Help Items to display
+ * on-screen during Perform Interaction
+ * If omitted on supported displays, the default SDL generated
+ * list of suggested choices will be displayed
+ * <p></p>
+ * <b>Notes: </b>Min=1; Max=100
+ * @since SmartDeviceLink 2.0
+ */
+ public void setVrHelp(List<VrHelpItem> vrHelp) {
+ if (vrHelp != null) {
+ parameters.put(KEY_VR_HELP, vrHelp);
+ } else {
+ parameters.remove(KEY_VR_HELP);
+ }
+ }
+
+ public LayoutMode getInteractionLayout() {
+ Object obj = parameters.get(KEY_INTERACTION_LAYOUT);
+ if (obj instanceof LayoutMode) {
+ return (LayoutMode) obj;
+ } else if (obj instanceof String) {
+ return LayoutMode.valueForString((String) obj);
+ }
+ return null;
+ }
+
+ public void setInteractionLayout( LayoutMode interactionLayout ) {
+ if (interactionLayout != null) {
+ parameters.put(KEY_INTERACTION_LAYOUT, interactionLayout );
+ }
+ else {
+ parameters.remove(KEY_INTERACTION_LAYOUT);
+ }
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/PerformInteractionResponse.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/PerformInteractionResponse.java
new file mode 100644
index 000000000..c2b56dcd0
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/PerformInteractionResponse.java
@@ -0,0 +1,91 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCResponse;
+import com.smartdevicelink.proxy.rpc.enums.TriggerSource;
+
+/**
+ * PerformInteraction Response is sent, when PerformInteraction has been called
+ *
+ * @since SmartDeviceLink 1.0
+ */
+public class PerformInteractionResponse extends RPCResponse {
+ public static final String KEY_MANUAL_TEXT_ENTRY = "manualTextEntry";
+ public static final String KEY_TRIGGER_SOURCE = "triggerSource";
+ public static final String KEY_CHOICE_ID = "choiceID";
+
+ /**
+ * Constructs a new PerformInteractionResponse object
+ */
+ public PerformInteractionResponse() {
+ super(FunctionID.PERFORM_INTERACTION.toString());
+ }
+
+ /**
+ * Constructs a new PerformInteractionResponse object indicated by the Hashtable
+ * parameter
+ * <p></p>
+ *
+ * @param hash
+ * The Hashtable to use
+ */
+ public PerformInteractionResponse(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+ /**
+ * Gets the application-scoped identifier that uniquely identifies this choice.
+ * @return choiceID Min: 0 Max: 65535
+ */
+ public Integer getChoiceID() {
+ return (Integer) parameters.get( KEY_CHOICE_ID );
+ }
+ /**
+ * Sets the application-scoped identifier that uniquely identifies this choice.
+ * @param choiceID Min: 0 Max: 65535
+ */
+ public void setChoiceID( Integer choiceID ) {
+ if (choiceID != null) {
+ parameters.put(KEY_CHOICE_ID, choiceID );
+ } else {
+ parameters.remove(KEY_CHOICE_ID);
+ }
+ }
+ /**
+ * <p>Returns a <I>TriggerSource</I> object which will be shown in the HMI</p>
+ * @return TriggerSource a TriggerSource object
+ */
+ public TriggerSource getTriggerSource() {
+ Object obj = parameters.get(KEY_TRIGGER_SOURCE);
+ if (obj instanceof TriggerSource) {
+ return (TriggerSource) obj;
+ } else if (obj instanceof String) {
+ return TriggerSource.valueForString((String) obj);
+ }
+ return null;
+ }
+ /**
+ * <p>Sets TriggerSource
+ * Indicates whether command was selected via VR or via a menu selection (using the OK button).</p>
+ * @param triggerSource a TriggerSource object
+ */
+ public void setTriggerSource( TriggerSource triggerSource ) {
+ if (triggerSource != null) {
+ parameters.put(KEY_TRIGGER_SOURCE, triggerSource );
+ } else {
+ parameters.remove(KEY_TRIGGER_SOURCE);
+ }
+ }
+
+ public void setManualTextEntry(String manualTextEntry) {
+ if (manualTextEntry != null) {
+ parameters.put(KEY_MANUAL_TEXT_ENTRY, manualTextEntry);
+ } else {
+ parameters.remove(KEY_MANUAL_TEXT_ENTRY);
+ }
+ }
+ public String getManualTextEntry() {
+ return (String) parameters.get(KEY_MANUAL_TEXT_ENTRY);
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/PermissionItem.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/PermissionItem.java
new file mode 100644
index 000000000..7776c12b7
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/PermissionItem.java
@@ -0,0 +1,120 @@
+package com.smartdevicelink.proxy.rpc;
+
+
+import java.util.Hashtable;
+
+import com.smartdevicelink.proxy.RPCStruct;
+import com.smartdevicelink.util.DebugTool;
+/**
+ * Change in permissions for a given set of RPCs
+ *
+ * <p><b>Parameter List</b></p>
+ * <table border="1" rules="all">
+ * <tr>
+ * <th>Param Name</th>
+ * <th>Type</th>
+ * <th>Description</th>
+ * <th> Req.</th>
+ * <th>Notes</th>
+ * <th>Version Available</th>
+ * </tr>
+ * <tr>
+ * <td>rpcName</td>
+ * <td>String</td>
+ * <td>Name of the individual RPC in the policy table.</td>
+ * <td></td>
+ * <td>maxlength:100</td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>hmiPermissions</td>
+ * <td>HMIPermissions</td>
+ * <td>Sets of parameters, which are permitted or prohibited for the given RPC.</td>
+ * <td></td>
+ * <td></td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ *
+ * <tr>
+ * <td>parameterPermissions</td>
+ * <td>ParameterPermissions</td>
+ * <td>Sets of parameters, which are permitted or prohibited for the given RPC.</td>
+ * <td></td>
+ * <td></td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * </table>
+ *
+ * @since SmartDeviceLink 2.0
+ */
+public class PermissionItem extends RPCStruct {
+ public static final String KEY_RPC_NAME = "rpcName";
+ public static final String KEY_HMI_PERMISSIONS = "hmiPermissions";
+ public static final String KEY_PARAMETER_PERMISSIONS = "parameterPermissions";
+ /**
+ * <p>
+ * Constructs a new PermissionItem object indicated by the Hashtable
+ * parameter
+ * </p>
+ *
+ * @param hash
+ * The Hashtable to use
+ */
+
+ public PermissionItem() { }
+ public PermissionItem(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+ public String getRpcName() {
+ return (String) store.get(KEY_RPC_NAME);
+ }
+ public void setRpcName(String rpcName) {
+ if (rpcName != null) {
+ store.put(KEY_RPC_NAME, rpcName);
+ } else {
+ store.remove(KEY_RPC_NAME);
+ }
+ }
+ @SuppressWarnings("unchecked")
+ public HMIPermissions getHMIPermissions() {
+ Object obj = store.get(KEY_HMI_PERMISSIONS);
+ if (obj instanceof HMIPermissions) {
+ return (HMIPermissions) obj;
+ } else if (obj instanceof Hashtable) {
+ try {
+ return new HMIPermissions((Hashtable<String, Object>) obj);
+ } catch (Exception e) {
+ DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_HMI_PERMISSIONS, e);
+ }
+ }
+ return null;
+ }
+ public void setHMIPermissions(HMIPermissions hmiPermissions) {
+ if (hmiPermissions != null) {
+ store.put(KEY_HMI_PERMISSIONS, hmiPermissions);
+ } else {
+ store.remove(KEY_HMI_PERMISSIONS);
+ }
+ }
+ @SuppressWarnings("unchecked")
+ public ParameterPermissions getParameterPermissions() {
+ Object obj = store.get(KEY_PARAMETER_PERMISSIONS);
+ if (obj instanceof ParameterPermissions) {
+ return (ParameterPermissions) obj;
+ } else if (obj instanceof Hashtable) {
+ try {
+ return new ParameterPermissions((Hashtable<String, Object>) obj);
+ } catch (Exception e) {
+ DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_PARAMETER_PERMISSIONS, e);
+ }
+ }
+ return null;
+ }
+ public void setParameterPermissions(ParameterPermissions parameterPermissions) {
+ if (parameterPermissions != null) {
+ store.put(KEY_PARAMETER_PERMISSIONS, parameterPermissions);
+ } else {
+ store.remove(KEY_PARAMETER_PERMISSIONS);
+ }
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/PresetBankCapabilities.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/PresetBankCapabilities.java
new file mode 100644
index 000000000..df28213c7
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/PresetBankCapabilities.java
@@ -0,0 +1,62 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+
+import com.smartdevicelink.proxy.RPCStruct;
+
+/**
+ * Contains information about on-screen preset capabilities.
+ * <p><b>Parameter List</b></p>
+ * <table border="1" rules="all">
+ * <tr>
+ * <th>Name</th>
+ * <th>Type</th>
+ * <th>Description</th>
+ * <th>SmartDeviceLink Ver. Available</th>
+ * </tr>
+ * <tr>
+ * <td>onScreenPresetsAvailable</td>
+ * <td>Boolean</td>
+ * <td>Defines, if Onscreen custom presets are available.
+ * </td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * </table>
+ * @since SmartDeviceLink 2.0
+ */
+public class PresetBankCapabilities extends RPCStruct {
+ public static final String KEY_ON_SCREEN_PRESETS_AVAILABLE = "OnScreenPresetsAvailable";
+
+ /**
+ * Constructs a newly allocated PresetBankCapabilities object
+ */
+ public PresetBankCapabilities() { }
+
+ /**
+ * Constructs a newly allocated PresetBankCapabilities object indicated by the Hashtable parameter
+ * @param hash The Hashtable to use
+ */
+ public PresetBankCapabilities(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+
+ /**
+ * set if Onscreen custom presets are available.
+ * @param onScreenPresetsAvailable if Onscreen custom presets are available.
+ */
+ public void setOnScreenPresetsAvailable(Boolean onScreenPresetsAvailable) {
+ if (onScreenPresetsAvailable != null) {
+ store.put(KEY_ON_SCREEN_PRESETS_AVAILABLE, onScreenPresetsAvailable);
+ } else {
+ store.remove(KEY_ON_SCREEN_PRESETS_AVAILABLE);
+ }
+ }
+
+ /**
+ * Defines, if Onscreen custom presets are available.
+ * @return if Onscreen custom presets are available
+ */
+ public Boolean onScreenPresetsAvailable() {
+ return (Boolean) store.get(KEY_ON_SCREEN_PRESETS_AVAILABLE);
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/PutFile.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/PutFile.java
new file mode 100644
index 000000000..065ad14d5
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/PutFile.java
@@ -0,0 +1,331 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCRequest;
+import com.smartdevicelink.proxy.rpc.enums.FileType;
+import com.smartdevicelink.proxy.rpc.listeners.OnPutFileUpdateListener;
+import com.smartdevicelink.proxy.rpc.listeners.OnRPCResponseListener;
+
+/**
+ * Used to push a binary data onto the SDL module from a mobile device, such as
+ * icons and album art.
+ *
+ * <p><b> Parameter List</b></p>
+ *
+ * <table border="1" rules="all">
+ * <tr>
+ * <th>Name</th>
+ * <th>Type</th>
+ * <th>Description</th>
+ * <th> Req.</th>
+ * <th>Notes</th>
+ * <th>Version Available</th>
+ * </tr>
+ * <tr>
+ * <td>FileName</td>
+ * <td>String</td>
+ * <td>File reference name.</td>
+ * <td>Y</td>
+ * <td>Maxlength=500</td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>fileType</td>
+ * <td>FileType</td>
+ * <td>Selected file type.</td>
+ * <td>Y</td>
+ * <td></td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>persistentFile</td>
+ * <td>Boolean</td>
+ * <td>Indicates if the file is meant to persist between sessions / ignition cycles. If set to TRUE,then the system will aim to persist this file through session / cycles. While files with this designation will have priority over others,they are subject to deletion by the system at any time.In the event of automatic deletion by the system, the app will receive a rejection and have to resend the file. If omitted, the value will be set to false.</td>
+ * <td>N</td>
+ * <td></td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>systemFile</td>
+ * <td>Boolean</td>
+ * <td>Indicates if the file is meant to be passed thru core to elsewhere on the system. If set to TRUE, then the system will instead pass the data thru as it arrives to a predetermined area outside of core. If omitted, the value will be set to false.</td>
+ * <td>N</td>
+ * <td></td>
+ * <td>SmartDeviceLink 2.3.2</td>
+ * </tr>
+ * <tr>
+ * <td>offset</td>
+ * <td>Float</td>
+ * <td>Optional offset in bytes for resuming partial data chunks</td>
+ * <td>N</td>
+ * <td>Minvalue=0; Maxvalue=100000000000</td>
+ * <td>SmartDeviceLink 2.3.2</td>
+ * </tr>
+ * <tr>
+ * <td>length</td>
+ * <td>Float</td>
+ * <td>Optional length in bytes for resuming partial data chunks. If offset is set to 0, then length is the total length of the file to be downloaded</td>
+ * <td>N</td>
+ * <td>Minvalue=0; Maxvalue=100000000000</td>
+ * <td>SmartDeviceLink 2.3.2</td>
+ * </tr>
+ * </table>
+ * <p> <b>Note: </b></p>
+ * When using PutFiles you may want to check for memory
+ *
+ * <p><b>Response</b> </p>
+ * Response is sent, when the file data was copied (success case). Or when an error occurred. Not supported on First generation SDL modules.
+ *
+ * <p><b> Non-default Result Codes:</b></p>
+ * <p> SUCCESS</p>
+ * <p> INVALID_DATA</p>
+ * <p> OUT_OF_MEMORY</p>
+ * <p> TOO_MANY_PENDING_REQUESTS</p>
+ * <p> APPLICATION_NOT_REGISTERED</p>
+ * <p> GENERIC_ERROR</p>
+ * <p>REJECTED</p>
+ *
+ * <p><table border="1" rules="all"></p>
+ * <tr>
+ * <th>Name</th>
+ * <th>Type</th>
+ * <th>Description</th>
+ * <th> Req.</th>
+ * <th>Notes</th>
+ * <th>Version Available</th>
+ * </tr>
+ * <tr>
+ * <td>spaceAvailable</td>
+ * <td>Integer</td>
+ * <td>Provides the total local space available on SDL for the registered app.</td>
+ * <td></td>
+ * <td>Minvalue=0; Maxvalue=2000000000</td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ *
+ * </table>
+ * @since SmartDeviceLink 2.0
+ * @see DeleteFile
+ * @see ListFiles
+ */
+public class PutFile extends RPCRequest {
+ public static final String KEY_PERSISTENT_FILE = "persistentFile";
+ public static final String KEY_SYSTEM_FILE = "systemFile";
+ public static final String KEY_FILE_TYPE = "fileType";
+ public static final String KEY_SDL_FILE_NAME = "syncFileName";
+ public static final String KEY_OFFSET = "offset";
+ public static final String KEY_LENGTH = "length";
+
+
+ /**
+ * Constructs a new PutFile object
+ */
+ public PutFile() {
+ super(FunctionID.PUT_FILE.toString());
+ }
+
+ /**
+ * Constructs a new PutFile object indicated by the Hashtable parameter
+ * <p></p>
+ *
+ * @param hash
+ * The Hashtable to use
+ */
+ public PutFile(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+
+ /**
+ * Sets a file reference name
+ *
+ * @param sdlFileName
+ * a String value representing a file reference name
+ * <p></p>
+ * <b>Notes: </b>Maxlength=500
+ */
+ public void setSdlFileName(String sdlFileName) {
+ if (sdlFileName != null) {
+ parameters.put(KEY_SDL_FILE_NAME, sdlFileName);
+ } else {
+ parameters.remove(KEY_SDL_FILE_NAME);
+ }
+ }
+
+ /**
+ * Gets a file reference name
+ *
+ * @return String - a String value representing a file reference name
+ */
+ public String getSdlFileName() {
+ return (String) parameters.get(KEY_SDL_FILE_NAME);
+ }
+
+ /**
+ * Sets file type
+ *
+ * @param fileType
+ * a FileType value representing a selected file type
+ */
+ public void setFileType(FileType fileType) {
+ if (fileType != null) {
+ parameters.put(KEY_FILE_TYPE, fileType);
+ } else {
+ parameters.remove(KEY_FILE_TYPE);
+ }
+ }
+
+ /**
+ * Gets a file type
+ *
+ * @return FileType -a FileType value representing a selected file type
+ */
+ public FileType getFileType() {
+ Object obj = parameters.get(KEY_FILE_TYPE);
+ if (obj instanceof FileType) {
+ return (FileType) obj;
+ } else if (obj instanceof String) {
+ return FileType.valueForString((String) obj);
+ }
+ return null;
+ }
+
+ /**
+ * Sets a value to indicates if the file is meant to persist between
+ * sessions / ignition cycles. If set to TRUE, then the system will aim to
+ * persist this file through session / cycles. While files with this
+ * designation will have priority over others, they are subject to deletion
+ * by the system at any time. In the event of automatic deletion by the
+ * system, the app will receive a rejection and have to resend the file. If
+ * omitted, the value will be set to false
+ * <p></p>
+ *
+ * @param persistentFile
+ * a Boolean value
+ */
+ public void setPersistentFile(Boolean persistentFile) {
+ if (persistentFile != null) {
+ parameters.put(KEY_PERSISTENT_FILE, persistentFile);
+ } else {
+ parameters.remove(KEY_PERSISTENT_FILE);
+ }
+ }
+
+ /**
+ * Gets a value to Indicates if the file is meant to persist between
+ * sessions / ignition cycles
+ *
+ * @return Boolean -a Boolean value to indicates if the file is meant to
+ * persist between sessions / ignition cycles
+ */
+ public Boolean getPersistentFile() {
+ return (Boolean) parameters.get(KEY_PERSISTENT_FILE);
+ }
+ public void setFileData(byte[] fileData) {
+ setBulkData(fileData);
+ }
+ public byte[] getFileData() {
+ return getBulkData();
+ }
+
+ /**
+ * @deprecated as of SmartDeviceLink 4.0
+ * @param offset
+ */
+ public void setOffset(Integer offset) {
+ if(offset == null){
+ setOffset((Long)null);
+ }else{
+ setOffset(offset.longValue());
+ }
+ }
+
+ public void setOffset(Long offset) {
+ if (offset != null) {
+ parameters.put(KEY_OFFSET, offset);
+ } else {
+ parameters.remove(KEY_OFFSET);
+ }
+ }
+
+ public Long getOffset() {
+ final Object o = parameters.get(KEY_OFFSET);
+ if (o == null){
+ return null;
+ }
+ if (o instanceof Integer) {
+ return ((Integer) o).longValue();
+ }else if(o instanceof Long){
+ return (Long) o;
+ }
+
+
+ return null;
+ }
+
+ /**
+ * @deprecated as of SmartDeviceLink 4.0
+ * @param length
+ */
+ public void setLength(Integer length) {
+ if(length == null){
+ setLength((Long)null);
+ }else{
+ setLength(length.longValue());
+ }
+ }
+
+ public void setLength(Long length) {
+ if (length != null) {
+ parameters.put(KEY_LENGTH, length);
+ } else {
+ parameters.remove(KEY_LENGTH);
+ }
+ }
+
+ public Long getLength() {
+ final Object o = parameters.get(KEY_LENGTH);
+ if (o == null){
+ return null;
+ }
+ if (o instanceof Integer) {
+ return ((Integer) o).longValue();
+ }else if(o instanceof Long){
+ return (Long) o;
+ }
+
+ return null;
+ }
+
+ public void setSystemFile(Boolean systemFile) {
+ if (systemFile != null) {
+ parameters.put(KEY_SYSTEM_FILE, systemFile);
+ } else {
+ parameters.remove(KEY_SYSTEM_FILE);
+ }
+ }
+
+ public Boolean getSystemFile() {
+ final Object o = parameters.get(KEY_SYSTEM_FILE);
+ if (o instanceof Boolean) {
+ return (Boolean) o;
+ }
+ else
+ return null;
+ }
+
+
+ @Override
+ public final void setOnRPCResponseListener(OnRPCResponseListener listener) {
+ super.setOnRPCResponseListener(listener);
+ }
+
+ public void setOnPutFileUpdateListener(OnPutFileUpdateListener listener) {
+ super.setOnRPCResponseListener(listener); //We can use the same method because it get stored as a parent class
+ }
+
+ public OnPutFileUpdateListener getOnPutFileUpdateListener() {
+ return (OnPutFileUpdateListener)getOnRPCResponseListener();
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/PutFileResponse.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/PutFileResponse.java
new file mode 100644
index 000000000..b9195981b
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/PutFileResponse.java
@@ -0,0 +1,44 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCResponse;
+
+/**
+ * Put File Response is sent, when PutFile has been called
+ *
+ * @since SmartDeviceLink 2.0
+ */
+public class PutFileResponse extends RPCResponse {
+ public static final String KEY_SPACE_AVAILABLE = "spaceAvailable";
+
+ /**
+ * Constructs a new PutFileResponse object
+ */
+ public PutFileResponse() {
+ super(FunctionID.PUT_FILE.toString());
+ }
+
+ /**
+ * Constructs a new PutFileResponse object indicated by the Hashtable
+ * parameter
+ * <p></p>
+ *
+ * @param hash
+ * The Hashtable to use
+ */
+ public PutFileResponse(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+ public void setSpaceAvailable(Integer spaceAvailable) {
+ if (spaceAvailable != null) {
+ parameters.put(KEY_SPACE_AVAILABLE, spaceAvailable);
+ } else {
+ parameters.remove(KEY_SPACE_AVAILABLE);
+ }
+ }
+ public Integer getSpaceAvailable() {
+ return (Integer) parameters.get(KEY_SPACE_AVAILABLE);
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/ReadDID.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/ReadDID.java
new file mode 100644
index 000000000..285416881
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/ReadDID.java
@@ -0,0 +1,158 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+import java.util.List;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCRequest;
+
+/**
+ * <p>Non periodic vehicle data read request. This is an RPC to get diagnostics
+ * data from certain vehicle modules. DIDs of a certain module might differ from
+ * vehicle type to vehicle type</p>
+ *
+ * <p>Function Group: ProprietaryData</p>
+ *
+ * <p><b>HMILevel needs to be FULL, LIMITED or BACKGROUND</b></p>
+ *
+ * <p><b>Parameter List</b></p>
+ * <table border="1" rules="all">
+ * <tr>
+ * <th>Param Name</th>
+ * <th>Type</th>
+ * <th>Description</th>
+ * <th> Req.</th>
+ * <th>Notes</th>
+ * <th>Version Available</th>
+ * </tr>
+ * <tr>
+ * <td>ecuName</td>
+ * <td>Integer</td>
+ * <td>Name of ECU.</td>
+ * <td>Y</td>
+ * <td>Minvalue: 0; Maxvalue: 65535</td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ *
+ * <tr>
+ * <td>didLocation</td>
+ * <td>Integer</td>
+ * <td>Get raw data from vehicle data DID location(s).</td>
+ * <td>Y</td>
+ * <td>Minvalue: 0; Maxvalue: 65535</td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <td>appID</td>
+ * <td>Integer</td>
+ * <td>ID of the application that requested this RPC.</td>
+ * <td>Y</td>
+ * <td></td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * </table>
+ *
+ * <p><b>Response</b></p>
+ *
+ * <p><b>Non-default Result Codes:</b></p>
+ * <p>SUCCESS</p>
+ * <p>INVALID_DATA</p>
+ * <p>OUT_OF_MEMORY</p>
+ * <p>TOO_MANY_PENDING_REQUESTS</p>
+ * <p>APPLICATION_NOT_REGISTERED</p>
+ * <p>GENERIC_ERROR</p>
+ * <p>REJECTED</p>
+ * <p> DISALLOWED</p>
+ * <p>USER_DISALLOWED </p>
+ * <p>TRUNCATED_DATA</p>
+ *
+ * @since SmartDeviceLink 2.0
+ */
+public class ReadDID extends RPCRequest {
+ public static final String KEY_ECU_NAME = "ecuName";
+ public static final String KEY_DID_LOCATION = "didLocation";
+
+ /**
+ * Constructs a new ReadDID object
+ */
+ public ReadDID() {
+ super(FunctionID.READ_DID.toString());
+ }
+
+ /**
+ * Constructs a new ReadDID object indicated by the Hashtable parameter
+ * <p></p>
+ *
+ * @param hash
+ * The Hashtable to use
+ */
+ public ReadDID(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+
+ /**
+ * Sets an ID of the vehicle module
+ *
+ * @param ecuName
+ * an Integer value representing the ID of the vehicle module
+ * <p></p>
+ * <b>Notes: </b>Minvalue:0; Maxvalue:65535
+ */
+ public void setEcuName(Integer ecuName) {
+ if (ecuName != null) {
+ parameters.put(KEY_ECU_NAME, ecuName);
+ } else {
+ parameters.remove(KEY_ECU_NAME);
+ }
+ }
+
+ /**
+ * Gets the ID of the vehicle module
+ *
+ * @return Integer -an Integer value representing the ID of the vehicle
+ * module
+ */
+ public Integer getEcuName() {
+ return (Integer) parameters.get(KEY_ECU_NAME);
+ }
+
+ /**
+ * Sets raw data from vehicle data DID location(s)
+ *
+ * @param didLocation
+ * a List<Integer> value representing raw data from vehicle
+ * data DID location(s)
+ * <p></p>
+ * <b>Notes: </b>
+ * <ul>
+ * <li>Minvalue:0; Maxvalue:65535</li>
+ * <li>ArrayMin:0; ArrayMax:1000</li>
+ * </ul>
+ */
+ public void setDidLocation(List<Integer> didLocation) {
+ if (didLocation != null) {
+ parameters.put(KEY_DID_LOCATION, didLocation);
+ } else {
+ parameters.remove(KEY_DID_LOCATION);
+ }
+ }
+
+ /**
+ * Gets raw data from vehicle data DID location(s)
+ *
+ * @return List<Integer> -a List<Integer> value representing raw data
+ * from vehicle data DID location(s)
+ */
+ @SuppressWarnings("unchecked")
+ public List<Integer> getDidLocation() {
+ if (parameters.get(KEY_DID_LOCATION) instanceof List<?>) {
+ List<?> list = (List<?>)parameters.get(KEY_DID_LOCATION);
+ if (list != null && list.size() > 0) {
+ Object obj = list.get(0);
+ if (obj instanceof Integer) {
+ return (List<Integer>) list;
+ }
+ }
+ }
+ return null;
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/ReadDIDResponse.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/ReadDIDResponse.java
new file mode 100644
index 000000000..b21395b48
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/ReadDIDResponse.java
@@ -0,0 +1,50 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.ArrayList;
+import java.util.Hashtable;
+import java.util.List;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCResponse;
+
+/**
+ * Read DID Response is sent, when ReadDID has been called
+ *
+ * @since SmartDeviceLink 2.0
+ */
+public class ReadDIDResponse extends RPCResponse {
+ public static final String KEY_DID_RESULT = "didResult";
+
+ public ReadDIDResponse() {
+ super(FunctionID.READ_DID.toString());
+ }
+ public ReadDIDResponse(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+ public void setDidResult(List<DIDResult> didResult) {
+ if (didResult != null) {
+ parameters.put(KEY_DID_RESULT, didResult);
+ } else {
+ parameters.remove(KEY_DID_RESULT);
+ }
+ }
+ @SuppressWarnings("unchecked")
+ public List<DIDResult> getDidResult() {
+ if (parameters.get(KEY_DID_RESULT) instanceof List<?>) {
+ List<?> list = (List<?>)parameters.get(KEY_DID_RESULT);
+ if (list != null && list.size() > 0) {
+ Object obj = list.get(0);
+ if (obj instanceof DIDResult) {
+ return (List<DIDResult>) list;
+ } else if (obj instanceof Hashtable) {
+ List<DIDResult> newList = new ArrayList<DIDResult>();
+ for (Object hashObj : list) {
+ newList.add(new DIDResult((Hashtable<String, Object>)hashObj));
+ }
+ return newList;
+ }
+ }
+ }
+ return null;
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/RegisterAppInterface.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/RegisterAppInterface.java
new file mode 100644
index 000000000..99bcba01a
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/RegisterAppInterface.java
@@ -0,0 +1,656 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.ArrayList;
+import java.util.Hashtable;
+import java.util.List;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCRequest;
+import com.smartdevicelink.proxy.rpc.enums.AppHMIType;
+import com.smartdevicelink.proxy.rpc.enums.Language;
+/**
+ * Registers the application's interface with SDL&reg;, declaring properties of
+ * the registration, including the messaging interface version, the app name,
+ * etc. The mobile application must establish its interface registration with
+ * SDL&reg; before any other interaction with SDL&reg; can take place. The
+ * registration lasts until it is terminated either by the application calling
+ * the <i> {@linkplain UnregisterAppInterface}</i> method, or by SDL&reg;
+ * sending an <i> {@linkplain OnAppInterfaceUnregistered}</i> notification, or
+ * by loss of the underlying transport connection, or closing of the underlying
+ * message transmission protocol RPC session
+ * <p></p>
+ * Until the application receives its first <i>{@linkplain OnHMIStatus}</i>
+ * Notification, its HMI Status is assumed to be: <i>
+ * {@linkplain com.smartdevicelink.proxy.rpc.enums.HMILevel}</i>=NONE, <i>
+ * {@linkplain com.smartdevicelink.proxy.rpc.enums.AudioStreamingState}
+ * </i>=NOT_AUDIBLE, <i>
+ * {@linkplain com.smartdevicelink.proxy.rpc.enums.SystemContext}</i>=MAIN
+ * <p></p>
+ * All SDL&reg; resources which the application creates or uses (e.g. Choice
+ * Sets, Command Menu, etc.) are associated with the application's interface
+ * registration. Therefore, when the interface registration ends, the SDL&reg;
+ * resources associated with the application are disposed of. As a result, even
+ * though the application itself may continue to run on its host platform (e.g.
+ * mobile device) after the interface registration terminates, the application
+ * will not be able to use the SDL&reg; HMI without first establishing a new
+ * interface registration and re-creating its required SDL&reg; resources. That
+ * is, SDL&reg; resources created by (or on behalf of) an application do not
+ * persist beyond the life-span of the interface registration
+ * <p></p>
+ * Resources and settings whose lifespan is tied to the duration of an
+ * application's interface registration:
+ * <ul>
+ * <li>Choice Sets</li>
+ * <li>Command Menus (built by successive calls to <i>{@linkplain AddCommand}
+ * </i>)</li>
+ * <li>Media clock timer display value</li>
+ * <li>Media clock timer display value</li>
+ * <li>Media clock timer display value</li>
+ * </ul>
+ * <p></p>
+ * The autoActivateID is used to grant an application the HMILevel and
+ * AudioStreamingState it had when it last disconnected
+ * <p></p>
+ * <b>Notes: </b>The autoActivateID parameter, and associated behavior, is
+ * currently ignored by SDL&reg;
+ * <p></p>
+ * When first calling this method (i.e. first time within life cycle of mobile
+ * app), an autoActivateID should not be included. After successfully
+ * registering an interface, an autoActivateID is returned to the mobile
+ * application for it to use in subsequent connections. If the connection
+ * between SDL&reg; and the mobile application is lost, such as the vehicle is
+ * turned off while the application is running, the autoActivateID can then be
+ * passed in another call to RegisterAppInterface to re-acquire <i>
+ * {@linkplain com.smartdevicelink.proxy.rpc.enums.HMILevel}</i>=FULL
+ * <p></p>
+ * If the application intends to stream audio it is important to indicate so via
+ * the isMediaApp parameter. When set to true, audio will reliably stream
+ * without any configuration required by the user. When not set, audio may
+ * stream, depending on what the user might have manually configured as a media
+ * source on SDL&reg;
+ * <p></p>
+ * There is no time limit for how long the autoActivateID is "valid" (i.e. would
+ * confer focus and opt-in)
+ *
+ *<p> <b>HMILevel is not defined before registering</b></p>
+ *
+ *
+ * <p><b>Parameter List</b></p>
+ * <table border="1" rules="all">
+ * <tr>
+ * <th>Name</th>
+ * <th>Type</th>
+ * <th>Description</th>
+ * <th>Reg.</th>
+ * <th>Notes</th>
+ * <th>Version</th>
+ * </tr>
+ * <tr>
+ * <td>MsgVersion</td>
+ * <td>MsgVersion</td>
+ * <td>Declares what version of the SDL interface the application expects to use with SDL</td>
+ * <td>Y</td>
+ * <td>To be compatible, app msg major version number must be less than or equal to SDL major version number. <p>If msg versions are incompatible, app has 20 seconds to attempt successful RegisterAppInterface (w.r.t. msg version) on underlying protocol session, else will be terminated. Major version number is a compatibility declaration. Minor version number indicates minor functional variations (e.g. features, capabilities, bug fixes) when sent from SDL to app (in RegisterAppInterface response).</p>However, the minor version number sent from the app to SDL (in RegisterAppInterface request) is ignored by SDL.</td>
+ * <td>SmartDeviceLink 1.0 </td>
+ * </tr>
+ * <tr>
+ * <td>appName</td>
+ * <td>String</td>
+ * <td>The mobile application's name. This name is displayed in the SDL Mobile Applications menu. It also serves as the unique identifier of the application for SDL .</td>
+ * <td>Y</td>
+ * <td><p> Must be 1-100 characters in length. Must consist of following characters: </p><p>May not be the same (by case insensitive comparison) as the name or any synonym of any currently registered application.</p> </td>
+ * <td>SmartDeviceLink 1.0 </td>
+ * </tr>
+ * <tr>
+ * <td>ttsName</td>
+ * <td>TTSChunk</td>
+ * <td>TTS string for VR recognition of the mobile application name. Meant to overcome any failing on speech engine in properly pronouncing / understanding app name.</td>
+ * <td>N</td>
+ * <td><p>Size must be 1-100 Needs to be unique over all applications. May not be empty.<p>May not start with a new line character.</p></td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>ngnMediaScreenAppName</td>
+ * <td>String</td>
+ * <td>Provides an abbreviated version of the app name (if necessary) that will be displayed on the NGN media screen.</td>
+ * <td>N</td>
+ * <td>- Must be 1-5 characters. If not provided, value will be derived from appName truncated to 5 characters.</td>
+ * <td>SmartDeviceLink 1.0 </td>
+ * </tr>
+ * <tr>
+ * <td>vrSynonyms</td>
+ * <td>String</td>
+ * <td>An array of 1-100 elements, each element containing a voice-recognition synonym by which this app can be called when being addressed in the mobile applications menu.</td>
+ * <td>N</td>
+ * <td>Each vr synonym is limited to 40 characters, and there can be 1-100 synonyms in array. May not be the same (by case insensitive comparison) as the name or any synonym of any currently-registered application.</td>
+ * <td>SmartDeviceLink 1.0 </td>
+ * </tr>
+ * <tr>
+ * <td>isMediaApplication</td>
+ * <td>Boolean</td>
+ * <td>Indicates that the application will be streaming audio to SDL (via A2DP) that is audible outside of the BT media source.</td>
+ * <td>Y</td>
+ * <td></td>
+ * <td>SmartDeviceLink 1.0 </td>
+ * </tr>
+ * <tr>
+ * <td>languageDesired</td>
+ * <td>Language</td>
+ * <td>An enumeration indicating what language the application intends to use for user interaction (Display, TTS and VR).</td>
+ * <td>Y</td>
+ * <td>If the language indicated does not match the active language on SDL, the interface registration will be rejected.If the user changes the SDL language while this interface registration is active, the interface registration will be terminated. </td>
+ * <td>SmartDeviceLink 1.0</td>
+ * </tr>
+ * <tr>
+ * <td>hmiDisplayLanguageDesired</td>
+ * <td>Language</td>
+ * <td>An enumeration indicating what language the application intends to use for user interaction ( Display).</td>
+ * <td>Y</td>
+ * <td></td>
+ * <td>SmartDeviceLink 2.0 </td>
+ * </tr>
+ * <tr>
+ * <td>appHMIType</td>
+ * <td>AppHMIType</td>
+ * <td>List of all applicable app types stating which classifications to be given to the app.e.g. for platforms , like GEN2, this will determine which "corner(s)" the app can populate</td>
+ * <td>N</td>
+ * <td>Array Minsize: 1; Array Maxsize: 100</td>
+ * <td>SmartDeviceLink 2.0 </td>
+ * </tr>
+ * <tr>
+ * <td>hashID</td>
+ * <td>String</td>
+ * <td>ID used to uniquely identify current state of all app data that can persist through connection cycles (e.g. ignition cycles).This registered data (commands, submenus, choice sets, etc.) can be reestablished without needing to explicitly reregister each piece. If omitted, then the previous state of an app's commands, etc. will not be restored.When sending hashID, all RegisterAppInterface parameters should still be provided (e.g. ttsName, etc.). </td>
+ * <td>N</td>
+ * <td>maxlength:100</td>
+ * <td>SmartDeviceLink 2.3.1 </td>
+ * </tr>
+ * <tr>
+ * <td>deviceInfo</td>
+ * <td>DeviceInfo</td>
+ * <td>Various information abount connecting device.</td>
+ * <td>N</td>
+ * <td></td>
+ * <td>SmartDeviceLink 2.3.1 </td>
+ * </tr>
+ * <tr>
+ * <td>appID</td>
+ * <td>String</td>
+ * <td>ID used to validate app with policy table entries</td>
+ * <td>Y</td>
+ * <td>Maxlength: 100</td>
+ * <td>SmartDeviceLink 2.0 </td>
+ * </tr>
+ *
+ * <tr>
+ * <td>hmiCapabilities</td>
+ * <td>HMICapabilities</td>
+ * <td>Specifies the HMI capabilities.</td>
+ * <td>N</td>
+ * <td></td>
+ * <td>SmartDeviceLink 2.3.2.2 </td>
+ * </tr>
+ *
+ * <tr>
+ * <td>sdlVersion</td>
+ * <td>String</td>
+ * <td>The SmartDeviceLink version.</td>
+ * <td>N</td>
+ * <td>Maxlength: 100</td>
+ * <td>SmartDeviceLink 2.3.2.2</td>
+ * </tr>
+ *
+ * <tr>
+ * <td>systemSoftwareVersion</td>
+ * <td>String</td>
+ * <td>The software version of the system that implements the SmartDeviceLink core.</td>
+ * <td>N</td>
+ * <td>Maxlength: 100</td>
+ * <td>SmartDeviceLink 2.3.2.2</td>
+ * </tr>
+ * </table>
+ * <p></p>
+ * @since SmartDeviceLink 1.0
+ * @see UnregisterAppInterface
+ * @see OnAppInterfaceUnregistered
+ */
+public class RegisterAppInterface extends RPCRequest {
+ public static final String KEY_TTS_NAME = "ttsName";
+ public static final String KEY_HMI_DISPLAY_LANGUAGE_DESIRED = "hmiDisplayLanguageDesired";
+ public static final String KEY_APP_HMI_TYPE = "appHMIType";
+ public static final String KEY_APP_ID = "appID";
+ public static final String KEY_LANGUAGE_DESIRED = "languageDesired";
+ public static final String KEY_DEVICE_INFO = "deviceInfo";
+ public static final String KEY_APP_NAME = "appName";
+ public static final String KEY_NGN_MEDIA_SCREEN_APP_NAME = "ngnMediaScreenAppName";
+ public static final String KEY_IS_MEDIA_APPLICATION = "isMediaApplication";
+ public static final String KEY_VR_SYNONYMS = "vrSynonyms";
+ public static final String KEY_SDL_MSG_VERSION = "syncMsgVersion";
+ public static final String KEY_HASH_ID = "hashID";
+ /**
+ * Constructs a new RegisterAppInterface object
+ */
+ public RegisterAppInterface() {
+ super(FunctionID.REGISTER_APP_INTERFACE.toString());
+ }
+ /**
+ * Constructs a new RegisterAppInterface object indicated by the Hashtable
+ * parameter
+ * <p></p>
+ *
+ * @param hash
+ * The Hashtable to use
+ */
+ public RegisterAppInterface(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+ /**
+ * Gets the version of the SDL&reg; SmartDeviceLink interface
+ *
+ * @return SdlMsgVersion -a SdlMsgVersion object representing version of
+ * the SDL&reg; SmartDeviceLink interface
+ */
+ @SuppressWarnings("unchecked")
+ public SdlMsgVersion getSdlMsgVersion() {
+ Object obj = parameters.get(KEY_SDL_MSG_VERSION);
+ if (obj instanceof SdlMsgVersion) {
+ return (SdlMsgVersion) obj;
+ } else if (obj instanceof Hashtable) {
+ return new SdlMsgVersion((Hashtable<String, Object>) obj);
+ }
+ return null;
+ }
+ /**
+ * Sets the version of the SDL&reg; SmartDeviceLink interface
+ *
+ * @param sdlMsgVersion
+ * a SdlMsgVersion object representing version of the SDL&reg;
+ * SmartDeviceLink interface
+ * <p></p>
+ * <b>Notes: </b>To be compatible, app msg major version number
+ * must be less than or equal to SDL&reg; major version number.
+ * If msg versions are incompatible, app has 20 seconds to
+ * attempt successful RegisterAppInterface (w.r.t. msg version)
+ * on underlying protocol session, else will be terminated. Major
+ * version number is a compatibility declaration. Minor version
+ * number indicates minor functional variations (e.g. features,
+ * capabilities, bug fixes) when sent from SDL&reg; to app (in
+ * RegisterAppInterface response). However, the minor version
+ * number sent from the app to SDL&reg; (in RegisterAppInterface
+ * request) is ignored by SDL&reg;
+ */
+ public void setSdlMsgVersion(SdlMsgVersion sdlMsgVersion) {
+ if (sdlMsgVersion != null) {
+ parameters.put(KEY_SDL_MSG_VERSION, sdlMsgVersion);
+ } else {
+ parameters.remove(KEY_SDL_MSG_VERSION);
+ }
+ }
+
+ @SuppressWarnings("unchecked")
+ public DeviceInfo getDeviceInfo() {
+ Object obj = parameters.get(KEY_DEVICE_INFO);
+ if (obj instanceof DeviceInfo) {
+ return (DeviceInfo) obj;
+ } else if (obj instanceof Hashtable) {
+ return new DeviceInfo((Hashtable<String, Object>) obj);
+ }
+ return null;
+ }
+
+ public void setDeviceInfo(DeviceInfo deviceInfo) {
+ if (deviceInfo != null) {
+ parameters.put(KEY_DEVICE_INFO, deviceInfo);
+ } else {
+ parameters.remove(KEY_DEVICE_INFO);
+ }
+ }
+ /**
+ * Gets Mobile Application's Name
+ *
+ * @return String -a String representing the Mobile Application's Name
+ */
+ public String getAppName() {
+ return (String) parameters.get(KEY_APP_NAME);
+ }
+ /**
+ * Sets Mobile Application's Name, This name is displayed in the SDL&reg;
+ * Mobile Applications menu. It also serves as the unique identifier of the
+ * application for SmartDeviceLink
+ *
+ * @param appName
+ * a String value representing the Mobile Application's Name
+ * <p></p>
+ * <b>Notes: </b>
+ * <ul>
+ * <li>Must be 1-100 characters in length</li>
+ * <li>May not be the same (by case insensitive comparison) as
+ * the name or any synonym of any currently-registered
+ * application</li>
+ * </ul>
+ */
+ public void setAppName(String appName) {
+ if (appName != null) {
+ parameters.put(KEY_APP_NAME, appName);
+ } else {
+ parameters.remove(KEY_APP_NAME);
+ }
+ }
+
+ /**
+ * Gets TTS string for VR recognition of the mobile application name
+ *
+ * @return List<TTSChunk> -List value representing the TTS string
+ * @since SmartDeviceLink 2.0
+ */
+ @SuppressWarnings("unchecked")
+ public List<TTSChunk> getTtsName() {
+ if (parameters.get(KEY_TTS_NAME) instanceof List<?>) {
+ List<?> list = (List<?>)parameters.get(KEY_TTS_NAME);
+ if (list != null && list.size() > 0) {
+ Object obj = list.get(0);
+ if (obj instanceof TTSChunk) {
+ return (List<TTSChunk>) list;
+ } else if (obj instanceof Hashtable) {
+ List<TTSChunk> newList = new ArrayList<TTSChunk>();
+ for (Object hashObj : list) {
+ newList.add(new TTSChunk((Hashtable<String, Object>) hashObj));
+ }
+ return newList;
+ }
+ }
+ }
+ return null;
+ }
+
+ /**
+ *
+ * @param ttsName
+ * a List<TTSChunk> value represeting the TTS Name
+ * <p></p>
+ * <b>Notes: </b>
+ * <ul>
+ * <li>Size must be 1-100</li>
+ * <li>Needs to be unique over all applications</li>
+ * <li>May not be empty</li>
+ * <li>May not start with a new line character</li>
+ * <li>May not interfere with any name or synonym of previously
+ * registered applications and the following list of words</li>
+ * <li>Needs to be unique over all applications. Applications
+ * with the same name will be rejected</li>
+ * </ul>
+ * @since SmartDeviceLink 2.0
+ */
+ public void setTtsName(List<TTSChunk> ttsName) {
+ if (ttsName != null) {
+ parameters.put(KEY_TTS_NAME, ttsName);
+ } else {
+ parameters.remove(KEY_TTS_NAME);
+ }
+ }
+ /**
+ * Gets a String representing an abbreviated version of the mobile
+ * applincation's name (if necessary) that will be displayed on the NGN
+ * media screen
+ *
+ * @return String -a String value representing an abbreviated version of the
+ * mobile applincation's name
+ */
+ public String getNgnMediaScreenAppName() {
+ return (String) parameters.get(KEY_NGN_MEDIA_SCREEN_APP_NAME);
+ }
+ /**
+ * Sets a String representing an abbreviated version of the mobile
+ * applincation's name (if necessary) that will be displayed on the NGN
+ * media screen
+ *
+ * @param ngnMediaScreenAppName
+ * a String value representing an abbreviated version of the
+ * mobile applincation's name
+ * <p></p>
+ * <b>Notes: </b>
+ * <ul>
+ * <li>Must be 1-5 characters</li>
+ * <li>If not provided, value will be derived from appName
+ * truncated to 5 characters</li>
+ * </ul>
+ */
+ public void setNgnMediaScreenAppName(String ngnMediaScreenAppName) {
+ if (ngnMediaScreenAppName != null) {
+ parameters.put(KEY_NGN_MEDIA_SCREEN_APP_NAME, ngnMediaScreenAppName);
+ } else {
+ parameters.remove(KEY_NGN_MEDIA_SCREEN_APP_NAME);
+ }
+ }
+ /**
+ * Gets the List<String> representing the an array of 1-100 elements, each
+ * element containing a voice-recognition synonym
+ *
+ * @return List<String> -a List value representing the an array of
+ * 1-100 elements, each element containing a voice-recognition
+ * synonym
+ */
+ @SuppressWarnings("unchecked")
+ public List<String> getVrSynonyms() {
+ if (parameters.get(KEY_VR_SYNONYMS) instanceof List<?>) {
+ List<?> list = (List<?>)parameters.get(KEY_VR_SYNONYMS);
+ if (list != null && list.size()>0) {
+ Object obj = list.get(0);
+ if (obj instanceof String) {
+ return (List<String>) list;
+ }
+ }
+ }
+ return null;
+ }
+ /**
+ * Sets a vrSynonyms representing the an array of 1-100 elements, each
+ * element containing a voice-recognition synonym
+ *
+ * @param vrSynonyms
+ * a List<String> value representing the an array of 1-100
+ * elements
+ * <p></p>
+ * <b>Notes: </b>
+ * <ul>
+ * <li>Each vr synonym is limited to 40 characters, and there can
+ * be 1-100 synonyms in array</li>
+ * <li>May not be the same (by case insensitive comparison) as
+ * the name or any synonym of any currently-registered
+ * application</li>
+ * </ul>
+ */
+ public void setVrSynonyms(List<String> vrSynonyms) {
+ if (vrSynonyms != null) {
+ parameters.put(KEY_VR_SYNONYMS, vrSynonyms);
+ } else {
+ parameters.remove(KEY_VR_SYNONYMS);
+ }
+ }
+ /**
+ * Gets a Boolean representing MediaApplication
+ *
+ * @return Boolean -a Boolean value representing a mobile application that is
+ * a media application or not
+ */
+ public Boolean getIsMediaApplication() {
+ return (Boolean) parameters.get(KEY_IS_MEDIA_APPLICATION);
+ }
+ /**
+ * Sets a Boolean to indicate a mobile application that is a media
+ * application or not
+ *
+ * @param isMediaApplication
+ * a Boolean value
+ */
+ public void setIsMediaApplication(Boolean isMediaApplication) {
+ if (isMediaApplication != null) {
+ parameters.put(KEY_IS_MEDIA_APPLICATION, isMediaApplication);
+ } else {
+ parameters.remove(KEY_IS_MEDIA_APPLICATION);
+ }
+ }
+ /**
+ * Gets a Language enumeration indicating what language the application
+ * intends to use for user interaction (Display, TTS and VR)
+ *
+ * @return Enumeration -a language enumeration
+ */
+ public Language getLanguageDesired() {
+ Object obj = parameters.get(KEY_LANGUAGE_DESIRED);
+ if (obj instanceof Language) {
+ return (Language) obj;
+ } else if (obj instanceof String) {
+ return Language.valueForString((String) obj);
+ }
+ return null;
+ }
+ /**
+ * Sets an enumeration indicating what language the application intends to
+ * use for user interaction (Display, TTS and VR)
+ *
+ * @param languageDesired
+ * a Language Enumeration
+ *
+ *
+ */
+ public void setLanguageDesired(Language languageDesired) {
+ if (languageDesired != null) {
+ parameters.put(KEY_LANGUAGE_DESIRED, languageDesired);
+ } else {
+ parameters.remove(KEY_LANGUAGE_DESIRED);
+ }
+ }
+
+ /**
+ * Gets an enumeration indicating what language the application intends to
+ * use for user interaction ( Display)
+ *
+ * @return Language - a Language value representing an enumeration
+ * indicating what language the application intends to use for user
+ * interaction ( Display)
+ * @since SmartDeviceLink 2.0
+ */
+ public Language getHmiDisplayLanguageDesired() {
+ Object obj = parameters.get(KEY_HMI_DISPLAY_LANGUAGE_DESIRED);
+ if (obj instanceof Language) {
+ return (Language) obj;
+ } else if (obj instanceof String) {
+ return Language.valueForString((String) obj);
+ }
+ return null;
+ }
+
+ /**
+ * Sets an enumeration indicating what language the application intends to
+ * use for user interaction ( Display)
+ *
+ * @param hmiDisplayLanguageDesired
+ * @since SmartDeviceLink 2.0
+ */
+ public void setHmiDisplayLanguageDesired(Language hmiDisplayLanguageDesired) {
+ if (hmiDisplayLanguageDesired != null) {
+ parameters.put(KEY_HMI_DISPLAY_LANGUAGE_DESIRED, hmiDisplayLanguageDesired);
+ } else {
+ parameters.remove(KEY_HMI_DISPLAY_LANGUAGE_DESIRED);
+ }
+ }
+
+ /**
+ * Gets a list of all applicable app types stating which classifications to
+ * be given to the app.e.g. for platforms , like GEN2, this will determine
+ * which "corner(s)" the app can populate
+ *
+ * @return List<AppHMIType> - a List value representing a list of all
+ * applicable app types stating which classifications to be given to
+ * the app
+ * @since SmartDeviceLinke 2.0
+ */
+ @SuppressWarnings("unchecked")
+ public List<AppHMIType> getAppHMIType() {
+ if (parameters.get(KEY_APP_HMI_TYPE) instanceof List<?>) {
+ List<?> list = (List<?>)parameters.get(KEY_APP_HMI_TYPE);
+ if (list != null && list.size() > 0) {
+ Object obj = list.get(0);
+ if (obj instanceof AppHMIType) {
+ return (List<AppHMIType>) list;
+ } else if (obj instanceof String) {
+ List<AppHMIType> newList = new ArrayList<AppHMIType>();
+ for (Object hashObj : list) {
+ String strFormat = (String)hashObj;
+ AppHMIType toAdd = AppHMIType.valueForString(strFormat);
+ if (toAdd != null) {
+ newList.add(toAdd);
+ }
+ }
+ return newList;
+ }
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Sets a a list of all applicable app types stating which classifications
+ * to be given to the app. e.g. for platforms , like GEN2, this will
+ * determine which "corner(s)" the app can populate
+ *
+ * @param appHMIType
+ * a List<AppHMIType>
+ * <p></p>
+ * <b>Notes: </b>
+ * <ul>
+ * <li>Array Minsize: = 1</li>
+ * <li>Array Maxsize = 100</li>
+ * </ul>
+ * @since SmartDeviceLink 2.0
+ */
+ public void setAppHMIType(List<AppHMIType> appHMIType) {
+ if (appHMIType != null) {
+ parameters.put(KEY_APP_HMI_TYPE, appHMIType);
+ } else {
+ parameters.remove(KEY_APP_HMI_TYPE);
+ }
+ }
+
+ public String getHashID() {
+ return (String) parameters.get(KEY_HASH_ID);
+ }
+
+ public void setHashID(String hashID) {
+ if (hashID != null) {
+ parameters.put(KEY_HASH_ID, hashID);
+ } else {
+ parameters.remove(KEY_HASH_ID);
+ }
+ }
+
+ /**
+ * Gets the unique ID, which an app will be given when approved
+ *
+ * @return String - a String value representing the unique ID, which an app
+ * will be given when approved
+ * @since SmartDeviceLink 2.0
+ */
+ public String getAppID() {
+ return (String) parameters.get(KEY_APP_ID);
+ }
+
+ /**
+ * Sets a unique ID, which an app will be given when approved
+ *
+ * @param appID
+ * a String value representing a unique ID, which an app will be
+ * given when approved
+ * <p></p>
+ * <b>Notes: </b>Maxlength = 100
+ * @since SmartDeviceLink 2.0
+ */
+ public void setAppID(String appID) {
+ if (appID != null) {
+ parameters.put(KEY_APP_ID, appID);
+ } else {
+ parameters.remove(KEY_APP_ID);
+ }
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/RegisterAppInterfaceResponse.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/RegisterAppInterfaceResponse.java
new file mode 100644
index 000000000..f89e1a8b8
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/RegisterAppInterfaceResponse.java
@@ -0,0 +1,585 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.ArrayList;
+import java.util.Hashtable;
+import java.util.List;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCResponse;
+import com.smartdevicelink.proxy.Version;
+import com.smartdevicelink.proxy.rpc.enums.HmiZoneCapabilities;
+import com.smartdevicelink.proxy.rpc.enums.Language;
+import com.smartdevicelink.proxy.rpc.enums.PrerecordedSpeech;
+import com.smartdevicelink.proxy.rpc.enums.SpeechCapabilities;
+import com.smartdevicelink.proxy.rpc.enums.VrCapabilities;
+
+/**
+ * Register AppInterface Response is sent, when RegisterAppInterface has been called
+ *
+ * @since SmartDeviceLink 1.0
+ */
+public class RegisterAppInterfaceResponse extends RPCResponse {
+ public static final String KEY_VEHICLE_TYPE = "vehicleType";
+ public static final String KEY_SPEECH_CAPABILITIES = "speechCapabilities";
+ public static final String KEY_VR_CAPABILITIES = "vrCapabilities";
+ public static final String KEY_AUDIO_PASS_THRU_CAPABILITIES = "audioPassThruCapabilities";
+ public static final String KEY_HMI_ZONE_CAPABILITIES = "hmiZoneCapabilities";
+ public static final String KEY_PRERECORDED_SPEECH = "prerecordedSpeech";
+ public static final String KEY_SUPPORTED_DIAG_MODES = "supportedDiagModes";
+ public static final String KEY_SDL_MSG_VERSION = "syncMsgVersion";
+ public static final String KEY_LANGUAGE = "language";
+ public static final String KEY_BUTTON_CAPABILITIES = "buttonCapabilities";
+ public static final String KEY_DISPLAY_CAPABILITIES = "displayCapabilities";
+ public static final String KEY_HMI_DISPLAY_LANGUAGE = "hmiDisplayLanguage";
+ public static final String KEY_SOFT_BUTTON_CAPABILITIES = "softButtonCapabilities";
+ public static final String KEY_PRESET_BANK_CAPABILITIES = "presetBankCapabilities";
+ public static final String KEY_HMI_CAPABILITIES = "hmiCapabilities"; //As of v4.0
+ public static final String KEY_SDL_VERSION = "sdlVersion"; //As of v4.0
+ public static final String KEY_SYSTEM_SOFTWARE_VERSION = "systemSoftwareVersion"; //As of v4.0
+
+
+ /**
+ * Constructs a new RegisterAppInterfaceResponse object
+ */
+ public RegisterAppInterfaceResponse() {
+ super(FunctionID.REGISTER_APP_INTERFACE.toString());
+ }
+
+ /**
+ * Constructs a new RegisterAppInterfaceResponse object indicated by the Hashtable
+ * parameter
+ * <p>
+ *
+ * @param hash
+ * The Hashtable to use
+ */
+ public RegisterAppInterfaceResponse(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+
+ /**
+ * Gets the version of the SDL&reg; SmartDeviceLink interface
+ *
+ * @return SdlMsgVersion -a SdlMsgVersion object representing version of
+ * the SDL&reg; SmartDeviceLink interface
+ */
+ @SuppressWarnings("unchecked")
+ public SdlMsgVersion getSdlMsgVersion() {
+ Object obj = parameters.get(KEY_SDL_MSG_VERSION);
+ if (obj instanceof SdlMsgVersion) {
+ return (SdlMsgVersion)obj;
+ } else if (obj instanceof Hashtable) {
+ return new SdlMsgVersion((Hashtable<String, Object>)obj);
+ }
+ return null;
+ }
+
+ /**
+ * Sets the version of the SDL&reg; SmartDeviceLink interface
+ *
+ * @param sdlMsgVersion
+ * a SdlMsgVersion object representing version of the SDL&reg;
+ * SmartDeviceLink interface
+ * <p></p>
+ * <b>Notes: </b>To be compatible, app msg major version number
+ * must be less than or equal to SDL&reg; major version number.
+ * If msg versions are incompatible, app has 20 seconds to
+ * attempt successful RegisterAppInterface (w.r.t. msg version)
+ * on underlying protocol session, else will be terminated. Major
+ * version number is a compatibility declaration. Minor version
+ * number indicates minor functional variations (e.g. features,
+ * capabilities, bug fixes) when sent from SDL&reg; to app (in
+ * RegisterAppInterface response). However, the minor version
+ * number sent from the app to SDL&reg; (in RegisterAppInterface
+ * request) is ignored by SDL&reg;
+ */
+ public void setSdlMsgVersion(SdlMsgVersion sdlMsgVersion) {
+ if (sdlMsgVersion != null) {
+ parameters.put(KEY_SDL_MSG_VERSION, sdlMsgVersion);
+ } else {
+ parameters.remove(KEY_SDL_MSG_VERSION);
+ }
+ }
+
+ /**
+ * Gets a Language enumeration indicating what language the application
+ * intends to use for user interaction (Display, TTS and VR)
+ *
+ * @return Enumeration -a language enumeration
+ */
+ public Language getLanguage() {
+ Object obj = parameters.get(KEY_LANGUAGE);
+ if (obj instanceof Language) {
+ return (Language) obj;
+ } else if (obj instanceof String) {
+ return Language.valueForString((String) obj);
+ }
+ return null;
+ }
+
+ /**
+ * Sets an enumeration indicating what language the application intends to
+ * use for user interaction (Display, TTS and VR)
+ *
+ * @param language
+ * a Language Enumeration
+ *
+ *
+ */
+ public void setLanguage(Language language) {
+ if (language != null) {
+ parameters.put(KEY_LANGUAGE, language);
+ } else {
+ parameters.remove(KEY_LANGUAGE);
+ }
+ }
+
+ /**
+ * Gets an enumeration indicating what language the application intends to
+ * use for user interaction ( Display)
+ *
+ * @return Language - a Language value representing an enumeration
+ * indicating what language the application intends to use for user
+ * interaction ( Display)
+ * @since SmartDeviceLink 2.0
+ */
+ public Language getHmiDisplayLanguage() {
+ Object obj = parameters.get(KEY_HMI_DISPLAY_LANGUAGE);
+ if (obj instanceof Language) {
+ return (Language) obj;
+ } else if (obj instanceof String) {
+ return Language.valueForString((String) obj);
+ }
+ return null;
+ }
+
+ /**
+ * Sets an enumeration indicating what language the application intends to
+ * use for user interaction ( Display)
+ *
+ * @param hmiDisplayLanguage
+ * @since SmartDeviceLink 2.0
+ */
+ public void setHmiDisplayLanguage(Language hmiDisplayLanguage) {
+ if (hmiDisplayLanguage != null) {
+ parameters.put(KEY_HMI_DISPLAY_LANGUAGE, hmiDisplayLanguage);
+ } else {
+ parameters.remove(KEY_HMI_DISPLAY_LANGUAGE);
+ }
+ }
+
+ /**
+ * Gets getDisplayCapabilities set when application interface is registered.
+ *
+ * @return DisplayCapabilities
+ */
+ @SuppressWarnings("unchecked")
+ public DisplayCapabilities getDisplayCapabilities() {
+ Object obj = parameters.get(KEY_DISPLAY_CAPABILITIES);
+ if (obj instanceof DisplayCapabilities) {
+ return (DisplayCapabilities)obj;
+ } else if (obj instanceof Hashtable) {
+ return new DisplayCapabilities((Hashtable<String, Object>)obj);
+ }
+ return null;
+ }
+ /**
+ * Sets Display Capabilities
+ * @param displayCapabilities
+ */
+ public void setDisplayCapabilities(DisplayCapabilities displayCapabilities) {
+ if (displayCapabilities != null) {
+ parameters.put(KEY_DISPLAY_CAPABILITIES, displayCapabilities);
+ } else {
+ parameters.remove(KEY_DISPLAY_CAPABILITIES);
+ }
+ }
+
+ /**
+ * Gets buttonCapabilities set when application interface is registered.
+ *
+ * @return buttonCapabilities
+ */
+ @SuppressWarnings("unchecked")
+ public List<ButtonCapabilities> getButtonCapabilities() {
+ if (parameters.get(KEY_BUTTON_CAPABILITIES) instanceof List<?>) {
+ List<?> list = (List<?>)parameters.get(KEY_BUTTON_CAPABILITIES);
+ if (list != null && list.size() > 0) {
+ Object obj = list.get(0);
+ if (obj instanceof ButtonCapabilities) {
+ return (List<ButtonCapabilities>) list;
+ } else if (obj instanceof Hashtable) {
+ List<ButtonCapabilities> newList = new ArrayList<ButtonCapabilities>();
+ for (Object hashObj : list) {
+ newList.add(new ButtonCapabilities((Hashtable<String, Object>)hashObj));
+ }
+ return newList;
+ }
+ }
+ }
+ return null;
+ }
+ /**
+ * Sets Button Capabilities
+ * @param buttonCapabilities
+ */
+ public void setButtonCapabilities(List<ButtonCapabilities> buttonCapabilities) {
+ if (buttonCapabilities != null) {
+ parameters.put(KEY_BUTTON_CAPABILITIES, buttonCapabilities);
+ } else {
+ parameters.remove(KEY_BUTTON_CAPABILITIES);
+ }
+ }
+ /**
+ * Gets getSoftButtonCapabilities set when application interface is registered.
+ *
+ * @return SoftButtonCapabilities
+ */
+ @SuppressWarnings("unchecked")
+ public List<SoftButtonCapabilities> getSoftButtonCapabilities() {
+ if (parameters.get(KEY_SOFT_BUTTON_CAPABILITIES) instanceof List<?>) {
+ List<?> list = (List<?>)parameters.get(KEY_SOFT_BUTTON_CAPABILITIES);
+ if (list != null && list.size() > 0) {
+ Object obj = list.get(0);
+ if (obj instanceof SoftButtonCapabilities) {
+ return (List<SoftButtonCapabilities>) list;
+ } else if (obj instanceof Hashtable) {
+ List<SoftButtonCapabilities> newList = new ArrayList<SoftButtonCapabilities>();
+ for (Object hashObj : list) {
+ newList.add(new SoftButtonCapabilities((Hashtable<String, Object>)hashObj));
+ }
+ return newList;
+ }
+ }
+ }
+ return null;
+ }
+ /**
+ * Sets softButtonCapabilities
+ * @param softButtonCapabilities
+ */
+ public void setSoftButtonCapabilities(List<SoftButtonCapabilities> softButtonCapabilities) {
+ if (softButtonCapabilities != null) {
+ parameters.put(KEY_SOFT_BUTTON_CAPABILITIES, softButtonCapabilities);
+ } else {
+ parameters.remove(KEY_SOFT_BUTTON_CAPABILITIES);
+ }
+ }
+
+ /**
+ * Gets getPresetBankCapabilities set when application interface is registered.
+ *
+ * @return PresetBankCapabilities
+ */
+ @SuppressWarnings("unchecked")
+ public PresetBankCapabilities getPresetBankCapabilities() {
+ Object obj = parameters.get(KEY_PRESET_BANK_CAPABILITIES);
+ if (obj instanceof PresetBankCapabilities) {
+ return (PresetBankCapabilities)obj;
+ } else if (obj instanceof Hashtable) {
+ return new PresetBankCapabilities((Hashtable<String, Object>)obj);
+ }
+ return null;
+ }
+ /**
+ * Sets presetBankCapabilities
+ * @param presetBankCapabilities
+ */
+ public void setPresetBankCapabilities(PresetBankCapabilities presetBankCapabilities) {
+ if (presetBankCapabilities != null) {
+ parameters.put(KEY_PRESET_BANK_CAPABILITIES, presetBankCapabilities);
+ } else {
+ parameters.remove(KEY_PRESET_BANK_CAPABILITIES);
+ }
+ }
+
+ /**
+ * Gets hmiZoneCapabilities set when application interface is registered.
+ *
+ * @return HmiZoneCapabilities
+ */
+ @SuppressWarnings("unchecked")
+ public List<HmiZoneCapabilities> getHmiZoneCapabilities() {
+ if (parameters.get(KEY_HMI_ZONE_CAPABILITIES) instanceof List<?>) {
+ List<?> list = (List<?>)parameters.get(KEY_HMI_ZONE_CAPABILITIES);
+ if (list != null && list.size() > 0) {
+ Object obj = list.get(0);
+ if (obj instanceof HmiZoneCapabilities) {
+ return (List<HmiZoneCapabilities>) list;
+ } else if (obj instanceof String) {
+ List<HmiZoneCapabilities> newList = new ArrayList<HmiZoneCapabilities>();
+ for (Object hashObj : list) {
+ String strFormat = (String)hashObj;
+ HmiZoneCapabilities toAdd = HmiZoneCapabilities.valueForString(strFormat);
+ if (toAdd != null) {
+ newList.add(toAdd);
+ }
+ }
+ return newList;
+ }
+ }
+ }
+ return null;
+ }
+ /**
+ * Sets hmiZoneCapabilities
+ * @param hmiZoneCapabilities
+ */
+ public void setHmiZoneCapabilities(List<HmiZoneCapabilities> hmiZoneCapabilities) {
+ if (hmiZoneCapabilities != null) {
+ parameters.put(KEY_HMI_ZONE_CAPABILITIES, hmiZoneCapabilities);
+ } else {
+ parameters.remove(KEY_HMI_ZONE_CAPABILITIES);
+ }
+ }
+
+ /**
+ * Gets speechCapabilities set when application interface is registered.
+ *
+ * @return SpeechCapabilities
+ */
+ @SuppressWarnings("unchecked")
+ public List<SpeechCapabilities> getSpeechCapabilities() {
+ if (parameters.get(KEY_SPEECH_CAPABILITIES) instanceof List<?>) {
+ List<?> list = (List<?>)parameters.get(KEY_SPEECH_CAPABILITIES);
+ if (list != null && list.size() > 0) {
+ Object obj = list.get(0);
+ if (obj instanceof SpeechCapabilities) {
+ return (List<SpeechCapabilities>) list;
+ } else if (obj instanceof String) {
+ List<SpeechCapabilities> newList = new ArrayList<SpeechCapabilities>();
+ for (Object hashObj : list) {
+ String strFormat = (String)hashObj;
+ SpeechCapabilities toAdd = SpeechCapabilities.valueForString(strFormat);
+ if (toAdd != null) {
+ newList.add(toAdd);
+ }
+ }
+ return newList;
+ }
+ }
+ }
+ return null;
+ }
+ /**
+ * Sets speechCapabilities
+ * @param speechCapabilities
+ */
+ public void setSpeechCapabilities(List<SpeechCapabilities> speechCapabilities) {
+ if (speechCapabilities != null) {
+ parameters.put(KEY_SPEECH_CAPABILITIES, speechCapabilities);
+ } else {
+ parameters.remove(KEY_SPEECH_CAPABILITIES);
+ }
+ }
+
+
+ @SuppressWarnings("unchecked")
+ public List<PrerecordedSpeech> getPrerecordedSpeech() {
+ if (parameters.get(KEY_PRERECORDED_SPEECH) instanceof List<?>) {
+ List<?> list = (List<?>)parameters.get(KEY_PRERECORDED_SPEECH);
+ if (list != null && list.size() > 0) {
+ Object obj = list.get(0);
+ if (obj instanceof PrerecordedSpeech) {
+ return (List<PrerecordedSpeech>) list;
+ } else if (obj instanceof String) {
+ List<PrerecordedSpeech> newList = new ArrayList<PrerecordedSpeech>();
+ for (Object hashObj : list) {
+ String strFormat = (String)hashObj;
+ PrerecordedSpeech toAdd = PrerecordedSpeech.valueForString(strFormat);
+ if (toAdd != null) {
+ newList.add(toAdd);
+ }
+ }
+ return newList;
+ }
+ }
+ }
+ return null;
+ }
+
+ public void setPrerecordedSpeech(List<PrerecordedSpeech> prerecordedSpeech) {
+ if (prerecordedSpeech != null) {
+ parameters.put(KEY_PRERECORDED_SPEECH, prerecordedSpeech);
+ } else {
+ parameters.remove(KEY_PRERECORDED_SPEECH);
+ }
+ }
+
+
+ /**
+ * Gets vrCapabilities set when application interface is registered.
+ *
+ * @return VrCapabilities
+ */
+ @SuppressWarnings("unchecked")
+ public List<VrCapabilities> getVrCapabilities() {
+ if (parameters.get(KEY_VR_CAPABILITIES) instanceof List<?>) {
+ List<?> list = (List<?>)parameters.get(KEY_VR_CAPABILITIES);
+ if (list != null && list.size() > 0) {
+ Object obj = list.get(0);
+ if (obj instanceof VrCapabilities) {
+ return (List<VrCapabilities>) list;
+ } else if (obj instanceof String) {
+ List<VrCapabilities> newList = new ArrayList<VrCapabilities>();
+ for (Object hashObj : list) {
+ String strFormat = (String)hashObj;
+ VrCapabilities toAdd = VrCapabilities.valueForString(strFormat);
+ if (toAdd != null) {
+ newList.add(toAdd);
+ }
+ }
+ return newList;
+ }
+ }
+ }
+ return null;
+ }
+ /**
+ * Sets VrCapabilities
+ * @param vrCapabilities
+ */
+ public void setVrCapabilities(List<VrCapabilities> vrCapabilities) {
+ if (vrCapabilities != null) {
+ parameters.put(KEY_VR_CAPABILITIES, vrCapabilities);
+ } else {
+ parameters.remove(KEY_VR_CAPABILITIES);
+ }
+ }
+
+ /**
+ * Gets getVehicleType set when application interface is registered.
+ *
+ * @return vehicleType
+ */
+ @SuppressWarnings("unchecked")
+ public VehicleType getVehicleType() {
+ Object obj = parameters.get(KEY_VEHICLE_TYPE);
+ if (obj instanceof VehicleType) {
+ return (VehicleType)obj;
+ } else if (obj instanceof Hashtable) {
+ return new VehicleType((Hashtable<String, Object>)obj);
+ }
+ return null;
+ }
+ /**
+ * Sets vehicleType
+ * @param vehicleType
+ */
+ public void setVehicleType(VehicleType vehicleType) {
+ if (vehicleType != null) {
+ parameters.put(KEY_VEHICLE_TYPE, vehicleType);
+ } else {
+ parameters.remove(KEY_VEHICLE_TYPE);
+ }
+ }
+
+ /**
+ * Gets AudioPassThruCapabilities set when application interface is registered.
+ *
+ * @return AudioPassThruCapabilities
+ */
+ @SuppressWarnings("unchecked")
+ public List<AudioPassThruCapabilities> getAudioPassThruCapabilities() {
+ if (parameters.get(KEY_AUDIO_PASS_THRU_CAPABILITIES) instanceof List<?>) {
+ List<?> list = (List<?>)parameters.get(KEY_AUDIO_PASS_THRU_CAPABILITIES);
+ if (list != null && list.size() > 0) {
+ Object obj = list.get(0);
+ if (obj instanceof AudioPassThruCapabilities) {
+ return (List<AudioPassThruCapabilities>) list;
+ } else if (obj instanceof Hashtable) {
+ List<AudioPassThruCapabilities> newList = new ArrayList<AudioPassThruCapabilities>();
+ for (Object hashObj : list) {
+ newList.add(new AudioPassThruCapabilities((Hashtable<String, Object>)hashObj));
+ }
+ return newList;
+ }
+ }
+ }
+ return null;
+ }
+ /**
+ * Sets AudioPassThruCapabilities
+ * @param audioPassThruCapabilities
+ */
+ public void setAudioPassThruCapabilities(List<AudioPassThruCapabilities> audioPassThruCapabilities) {
+ if (audioPassThruCapabilities != null) {
+ parameters.put(KEY_AUDIO_PASS_THRU_CAPABILITIES, audioPassThruCapabilities);
+ } else {
+ parameters.remove(KEY_AUDIO_PASS_THRU_CAPABILITIES);
+ }
+ }
+ public String getProxyVersionInfo() {
+ if (Version.VERSION != null)
+ return Version.VERSION;
+
+ return null;
+ }
+ public void setSupportedDiagModes(List<Integer> supportedDiagModes) {
+ if (supportedDiagModes != null) {
+ parameters.put(KEY_SUPPORTED_DIAG_MODES, supportedDiagModes);
+ }
+ else
+ {
+ parameters.remove(KEY_SUPPORTED_DIAG_MODES);
+ }
+ }
+
+ @SuppressWarnings("unchecked")
+ public List<Integer> getSupportedDiagModes() {
+
+ if (parameters.get(KEY_SUPPORTED_DIAG_MODES) instanceof List<?>) {
+ List<?> list = (List<?>)parameters.get( KEY_SUPPORTED_DIAG_MODES);
+ if (list != null && list.size() > 0) {
+ Object obj = list.get(0);
+ if (obj instanceof Integer) {
+ return (List<Integer>) list;
+ }
+ }
+ }
+ return null;
+ }
+
+ public void setHmiCapabilities(HMICapabilities hmiCapabilities) {
+ if (hmiCapabilities != null) {
+ parameters.put(KEY_HMI_CAPABILITIES, hmiCapabilities);
+ }else{
+ parameters.remove(KEY_HMI_CAPABILITIES);
+ }
+ }
+
+ @SuppressWarnings("unchecked")
+ public HMICapabilities getHmiCapabilities() {
+ Object obj = parameters.get(KEY_HMI_CAPABILITIES);
+ if (obj instanceof HMICapabilities) {
+ return (HMICapabilities)obj;
+ } else if (obj instanceof Hashtable) {
+ return new HMICapabilities((Hashtable<String, Object>)obj);
+ }
+ return null;
+ }
+
+ public void setSdlVersion(String sdlVersion) {
+ if (sdlVersion != null) {
+ parameters.put(KEY_SDL_VERSION, sdlVersion);
+ }else{
+ parameters.remove(KEY_SDL_VERSION);
+ }
+ }
+
+ public String getSdlVersion() {
+ return (String) parameters.get(KEY_SDL_VERSION);
+ }
+
+ public void setSystemSoftwareVersion(String systemSoftwareVersion) {
+ if (systemSoftwareVersion != null) {
+ parameters.put(KEY_SYSTEM_SOFTWARE_VERSION, systemSoftwareVersion);
+ }else{
+ parameters.remove(KEY_SYSTEM_SOFTWARE_VERSION);
+ }
+ }
+
+ public String getSystemSoftwareVersion() {
+ return (String) parameters.get(KEY_SYSTEM_SOFTWARE_VERSION);
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/ResetGlobalProperties.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/ResetGlobalProperties.java
new file mode 100644
index 000000000..4a9f18d7f
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/ResetGlobalProperties.java
@@ -0,0 +1,127 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.ArrayList;
+import java.util.Hashtable;
+import java.util.List;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCRequest;
+import com.smartdevicelink.proxy.rpc.enums.GlobalProperty;
+/**
+ * Resets the passed global properties to their default values as defined by
+ * SDL
+ * <p></p>
+ * The HELPPROMPT global property default value is generated by SDL consists of
+ * the first vrCommand of each Command Menu item defined at the moment PTT is
+ * pressed
+ * <p>The TIMEOUTPROMPT global property default value is the same as the HELPPROMPT
+ * global property default value</p>
+ *
+ * <p><b>HMILevel needs to be FULL, LIMITED or BACKGROUND</b></p>
+ *
+ *
+ * <p><b>Parameter List</b></p>
+ * <table border="1" rules="all">
+ * <tr>
+ * <th>Param Name</th>
+ * <th>Type</th>
+ * <th>Description</th>
+ * <th> Req.</th>
+ * <th>Notes</th>
+ * <th>Version Available</th>
+ * </tr>
+ * <tr>
+ * <td>properties</td>
+ * <td>GlobalProperty</td>
+ * <td>An array of one or more GlobalProperty enumeration elements indicating which global properties to reset to their default value.</td>
+ * <td>Y</td>
+ * <td>Array must have at least one element.; minsize:1; maxsize:100</td>
+ * <td>SmartDeviceLink 1.0</td>
+ * </tr>
+ *
+ * </table>
+ * <p><b>Response</b></p>
+ *
+ * <p>Indicates whether the Global Properties were successfully set to their default values.</p>
+ *
+ * <p><b>Non-default Result Codes:</b></p>
+ *
+ * <p> SUCCESS</p>
+ * <p>INVALID_DATA</p>
+ * <p> OUT_OF_MEMORY</p>
+ * <p> TOO_MANY_PENDING_REQUESTS</p>
+ * <p> APPLICATION_NOT_REGISTERED</p>
+ * <p> GENERIC_ERROR </p>
+ * <p> REJECTED </p>
+ * <p>DISALLOWED </p>
+ * @since SmartDeviceLink 1.0
+ * @see SetGlobalProperties
+ */
+public class ResetGlobalProperties extends RPCRequest {
+ public static final String KEY_PROPERTIES = "properties";
+ /**
+ * Constructs a new ResetGlobalProperties object
+ */
+ public ResetGlobalProperties() {
+ super(FunctionID.RESET_GLOBAL_PROPERTIES.toString());
+ }
+ /**
+ * Constructs a new ResetGlobalProperties object indicated by the Hashtable
+ * parameter
+ *
+ *
+ * @param hash
+ * The Hashtable to use
+ */
+ public ResetGlobalProperties(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+ /**
+ * Gets an array of one or more GlobalProperty enumeration elements
+ * indicating which global properties to reset to their default value
+ *
+ * @return List<GlobalProperty> -an array of one or more GlobalProperty
+ * enumeration elements
+ */
+ @SuppressWarnings("unchecked")
+ public List<GlobalProperty> getProperties() {
+ if (parameters.get(KEY_PROPERTIES) instanceof List<?>) {
+ List<?> list = (List<?>)parameters.get(KEY_PROPERTIES);
+ if (list != null && list.size() > 0) {
+ Object obj = list.get(0);
+ if (obj instanceof GlobalProperty) {
+ return (List<GlobalProperty>) list;
+ } else if (obj instanceof String) {
+ List<GlobalProperty> newList = new ArrayList<GlobalProperty>();
+ for (Object hashObj : list) {
+ String strFormat = (String)hashObj;
+ GlobalProperty toAdd = GlobalProperty.valueForString(strFormat);
+ if (toAdd != null) {
+ newList.add(toAdd);
+ }
+ }
+ return newList;
+ }
+ }
+ }
+ return null;
+ }
+ /**
+ * Sets an array of one or more GlobalProperty enumeration elements
+ * indicating which global properties to reset to their default value
+ *
+ * @param properties
+ * a List<GlobalProperty> An array of one or more
+ * GlobalProperty enumeration elements indicating which global
+ * properties to reset to their default value
+ * <p></p>
+ * <b>Notes: </b>Array must have at least one element
+ */
+ public void setProperties( List<GlobalProperty> properties ) {
+ if (properties != null) {
+ parameters.put(KEY_PROPERTIES, properties );
+ } else {
+ parameters.remove(KEY_PROPERTIES);
+ }
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/ResetGlobalPropertiesResponse.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/ResetGlobalPropertiesResponse.java
new file mode 100644
index 000000000..dec7cde94
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/ResetGlobalPropertiesResponse.java
@@ -0,0 +1,33 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCResponse;
+
+/**
+ * Reset Global Properties Response is sent, when ResetGlobalProperties has been called
+ *
+ * @since SmartDeviceLink 1.0
+ */
+public class ResetGlobalPropertiesResponse extends RPCResponse {
+
+ /**
+ * Constructs a new ResetGlobalPropertiesResponse object
+ */
+ public ResetGlobalPropertiesResponse() {
+ super(FunctionID.RESET_GLOBAL_PROPERTIES.toString());
+ }
+
+ /**
+ * Constructs a new ResetGlobalPropertiesResponse object indicated by the Hashtable
+ * parameter
+ *
+ *
+ * @param hash
+ * The Hashtable to use
+ */
+ public ResetGlobalPropertiesResponse(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+} \ No newline at end of file
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/ScreenParams.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/ScreenParams.java
new file mode 100644
index 000000000..fe2c626a0
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/ScreenParams.java
@@ -0,0 +1,109 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+
+import com.smartdevicelink.proxy.RPCStruct;
+import com.smartdevicelink.proxy.rpc.ImageResolution;
+import com.smartdevicelink.proxy.rpc.TouchEventCapabilities;
+import com.smartdevicelink.util.DebugTool;
+/** The resolution of the prescribed screen area.
+ *
+ * <p><b>Parameter List</b></p>
+ * <table border="1" rules="all">
+ * <tr>
+ * <th>Param Name</th>
+ * <th>Type</th>
+ * <th>Description</th>
+ * <th> Req.</th>
+ * <th>Notes</th>
+ * <th>Version Available</th>
+ * </tr>
+ * <tr>
+ * <td>resolution</td>
+ * <td>ImageResolution</td>
+ * <td>The resolution of the prescribed screen area.</td>
+ * <td>Y</td>
+ * <td></td>
+ * <td>SmartDeviceLink 2.3.2</td>
+ * </tr>
+ * <tr>
+ * <td>touchEventAvailable</td>
+ * <td>TouchEventCapabilities</td>
+ * <td>Types of screen touch events available in screen area.</td>
+ * <td>N</td>
+ * <td></td>
+ * <td>SmartDeviceLink 2.3.2</td>
+ * </tr>
+ *
+ * </table>
+ * @since SmartDeviceLink 2.3.2
+ *
+ */
+
+public class ScreenParams extends RPCStruct {
+ public static final String KEY_RESOLUTION = "resolution";
+ public static final String KEY_TOUCH_EVENT_AVAILABLE = "touchEventAvailable";
+ /**
+ * Constructs a new ScreenParams object
+ */
+
+ public ScreenParams() { }
+ /**
+ * <p>
+ * Constructs a new ScreenParamst object indicated by the Hashtable
+ * parameter
+ * </p>
+ *
+ * @param hash
+ * The Hashtable to use
+ */
+
+ public ScreenParams(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+
+ @SuppressWarnings("unchecked")
+ public ImageResolution getImageResolution() {
+ Object obj = store.get(KEY_RESOLUTION);
+ if (obj instanceof ImageResolution) {
+ return (ImageResolution) obj;
+ } else if (obj instanceof Hashtable) {
+ try {
+ return new ImageResolution((Hashtable<String, Object>) obj);
+ } catch (Exception e) {
+ DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_RESOLUTION, e);
+ }
+ }
+ return null;
+ }
+ public void setImageResolution( ImageResolution resolution ) {
+ if (resolution != null) {
+ store.put(KEY_RESOLUTION, resolution );
+ }
+ else {
+ store.remove(KEY_RESOLUTION);
+ }
+ }
+ @SuppressWarnings("unchecked")
+ public TouchEventCapabilities getTouchEventAvailable() {
+ Object obj = store.get(KEY_TOUCH_EVENT_AVAILABLE);
+ if (obj instanceof TouchEventCapabilities) {
+ return (TouchEventCapabilities) obj;
+ } else if (obj instanceof Hashtable) {
+ try {
+ return new TouchEventCapabilities((Hashtable<String, Object>) obj);
+ } catch (Exception e) {
+ DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_TOUCH_EVENT_AVAILABLE, e);
+ }
+ }
+ return null;
+ }
+ public void setTouchEventAvailable( TouchEventCapabilities touchEventAvailable ) {
+ if (touchEventAvailable != null) {
+ store.put(KEY_TOUCH_EVENT_AVAILABLE, touchEventAvailable );
+ }
+ else {
+ store.remove(KEY_TOUCH_EVENT_AVAILABLE);
+ }
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/ScrollableMessage.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/ScrollableMessage.java
new file mode 100644
index 000000000..2fae92ec5
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/ScrollableMessage.java
@@ -0,0 +1,187 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.ArrayList;
+import java.util.Hashtable;
+import java.util.List;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCRequest;
+
+/**
+ * Creates a full screen overlay containing a large block of formatted text that
+ * can be scrolled with up to 8 SoftButtons defined
+ *
+ * <p>Function Group: ScrollableMessage</p>
+ *
+ * <p><b>HMILevel needs to be FULL</b></p>
+ *
+ * <p><b>Parameter List</b></p>
+ * <table border="1" rules="all">
+ * <tr>
+ * <th>Name</th>
+ * <th>Type</th>
+ * <th>Description</th>
+ * <th>Reg.</th>
+ * <th>Notes</th>
+ * <th>Version</th>
+ * </tr>
+ * <tr>
+ * <td>scrollableMessageBody</td>
+ * <td>String</td>
+ * <td>Body of text that can include newlines and tabs.</td>
+ * <td>Y</td>
+ * <td></td>
+ * <td>SmartDevice Link 1.0 </td>
+ * </tr>
+ * <tr>
+ * <td>timeout</td>
+ * <td>Integer</td>
+ * <td>App defined timeout. Indicates how long of a timeout from the last action (i.e. scrolling message resets timeout).</td>
+ * <td>N</td>
+ * <td>minvalue=1000; maxvalue=65535; defvalue=30000</td>
+ * <td>SmartDevice Link 1.0 </td>
+ * </tr>
+ * <tr>
+ * <td>softButtons</td>
+ * <td>SoftButton</td>
+ * <td>App defined SoftButtons. If omitted on supported displays, only the system defined "Close" SoftButton will be displayed.</td>
+ * <td>N</td>
+ * <td>minsize=0; maxsize=8</td>
+ * <td>SmartDevice Link 1.0 </td>
+ * </tr>
+ * </table>
+ * <p> <b>Response</b></p>
+ *<b>Non-default Result Codes:</b>
+ * <p>SUCCESS</p>
+ * <p>INVALID_DATA </p>
+ * <p>OUT_OF_MEMORY</p>
+ * <p>CHAR_LIMIT_EXCEEDED</p>
+ * <p>TOO_MANY_PENDING_REQUESTS</p>
+ * <p>APPLICATION_NOT_REGISTERED</p>
+ * <p>GENERIC_ERROR </p>
+ * <p>DISALLOWED</p>
+ * <p>UNSUPPORTED_RESOURCE</p>
+ * <p>REJECTED </p>
+ * <p>ABORTED</p>
+ *
+ * @see scrollableMessageBody
+ * @see TextFieldName
+ */
+public class ScrollableMessage extends RPCRequest {
+ public static final String KEY_SCROLLABLE_MESSAGE_BODY = "scrollableMessageBody";
+ public static final String KEY_TIMEOUT = "timeout";
+ public static final String KEY_SOFT_BUTTONS = "softButtons";
+
+ /**
+ * Constructs a new ScrollableMessage object
+ */
+ public ScrollableMessage() {
+ super(FunctionID.SCROLLABLE_MESSAGE.toString());
+ }
+
+ /**
+ * Constructs a new ScrollableMessage object indicated by the Hashtable
+ * parameter
+ * <p></p>
+ *
+ * @param hash
+ * The Hashtable to use
+ */
+ public ScrollableMessage(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+
+ /**
+ * Sets a Body of text that can include newlines and tabs
+ *
+ * @param scrollableMessageBody
+ * a String value representing the Body of text that can include
+ * newlines and tabs
+ * <p></p>
+ * <b>Notes: </b>Maxlength=500
+ */
+ public void setScrollableMessageBody(String scrollableMessageBody) {
+ if (scrollableMessageBody != null) {
+ parameters.put(KEY_SCROLLABLE_MESSAGE_BODY, scrollableMessageBody);
+ } else {
+ parameters.remove(KEY_SCROLLABLE_MESSAGE_BODY);
+ }
+ }
+
+ /**
+ * Gets a Body of text that can include newlines and tabs
+ *
+ * @return String -a String value
+ */
+ public String getScrollableMessageBody() {
+ return (String) parameters.get(KEY_SCROLLABLE_MESSAGE_BODY);
+ }
+
+ /**
+ * Sets an App defined timeout. Indicates how long of a timeout from the
+ * last action
+ *
+ * @param timeout
+ * an Integer value representing an App defined timeout
+ * <p></p>
+ * <b>Notes</b>:Minval=0; Maxval=65535;Default=30000
+ */
+ public void setTimeout(Integer timeout) {
+ if (timeout != null) {
+ parameters.put(KEY_TIMEOUT, timeout);
+ } else {
+ parameters.remove(KEY_TIMEOUT);
+ }
+ }
+
+ /**
+ * Gets an App defined timeout
+ *
+ * @return Integer -an Integer value representing an App defined timeout
+ */
+ public Integer getTimeout() {
+ return (Integer) parameters.get(KEY_TIMEOUT);
+ }
+
+ /**
+ * Sets App defined SoftButtons.If omitted on supported displays, only the
+ * system defined "Close" SoftButton will be displayed
+ *
+ * @param softButtons
+ * a List<SoftButton> value representing App defined
+ * SoftButtons
+ * <p></p>
+ * <b>Notes: </b>Minsize=0, Maxsize=8
+ */
+ public void setSoftButtons(List<SoftButton> softButtons) {
+ if (softButtons != null) {
+ parameters.put(KEY_SOFT_BUTTONS, softButtons);
+ } else {
+ parameters.remove(KEY_SOFT_BUTTONS);
+ }
+ }
+
+ /**
+ * Gets App defined soft button
+ * @return List -List<SoftButton> value
+ */
+ @SuppressWarnings("unchecked")
+ public List<SoftButton> getSoftButtons() {
+ if (parameters.get(KEY_SOFT_BUTTONS) instanceof List<?>) {
+ List<?> list = (List<?>)parameters.get(KEY_SOFT_BUTTONS);
+ if (list != null && list.size() > 0) {
+ Object obj = list.get(0);
+ if (obj instanceof SoftButton) {
+ return (List<SoftButton>) list;
+ } else if (obj instanceof Hashtable) {
+ List<SoftButton> newList = new ArrayList<SoftButton>();
+ for (Object hashObj : list) {
+ newList.add(new SoftButton((Hashtable<String, Object>) hashObj));
+ }
+ return newList;
+ }
+ }
+ }
+ return null;
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/ScrollableMessageResponse.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/ScrollableMessageResponse.java
new file mode 100644
index 000000000..880c27f95
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/ScrollableMessageResponse.java
@@ -0,0 +1,33 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCResponse;
+
+/**
+ * Scrollable Message Response is sent, when ScrollableMessage has been called
+ *
+ * @since SmartDeviceLink 2.0
+ */
+public class ScrollableMessageResponse extends RPCResponse {
+
+ /**
+ * Constructs a new ScrollableMessageResponse object
+ */
+ public ScrollableMessageResponse() {
+ super(FunctionID.SCROLLABLE_MESSAGE.toString());
+ }
+
+ /**
+ * Constructs a new ScrollableMessageResponse object indicated by the Hashtable
+ * parameter
+ * <p></p>
+ *
+ * @param hash
+ * The Hashtable to use
+ */
+ public ScrollableMessageResponse(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+} \ No newline at end of file
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SdlMsgVersion.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SdlMsgVersion.java
new file mode 100644
index 000000000..cb5df057d
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SdlMsgVersion.java
@@ -0,0 +1,109 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+
+import com.smartdevicelink.proxy.RPCStruct;
+
+/**
+ * Specifies the version number of the SDL V4 interface. This is used by both the application and SDL to declare what interface version each is using.
+ * <p><b> Parameter List</b></p>
+ * <table border="1" rules="all">
+ * <tr>
+ * <th>Name</th>
+ * <th>Type</th>
+ * <th>Description</th>
+ * <th>SmartDeviceLink Ver. Available</th>
+ * </tr>
+ * <tr>
+ * <td>majorVersion</td>
+ * <td>Integer</td>
+ * <td>
+ * <ul>
+ * <li>minvalue="1"</li>
+ * <li>maxvalue="10"</li>
+ * </ul>
+ * </td>
+ * <td>SmartDeviceLink 1.0</td>
+ * </tr>
+ * <tr>
+ * <td>minorVersion</td>
+ * <td>Integer</td>
+ * <td>
+ * <ul>
+ * <li>minvalue="0"</li>
+ * <li>maxvalue="1000"</li>
+ * </ul>
+ * </td>
+ * <td>SmartDeviceLink 1.0</td>
+ * </tr>
+ * </table>
+ * @since SmartDeviceLink 1.0
+ */
+public class SdlMsgVersion extends RPCStruct {
+ public static final String KEY_MAJOR_VERSION = "majorVersion";
+ public static final String KEY_MINOR_VERSION = "minorVersion";
+
+ /**
+ * Constructs a newly allocated SdlMsgVersion object
+ */
+ public SdlMsgVersion() { }
+ /**
+ * Constructs a newly allocated SdlMsgVersion object indicated by the Hashtable parameter
+ * @param hash The Hashtable to use
+ */
+ public SdlMsgVersion(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+ /**
+ * Get major version
+ * <ul>
+ * <li>minvalue="1"</li>
+ * <li>maxvalue="10"</li>
+ * </ul>
+ * @return the major version
+ */
+ public Integer getMajorVersion() {
+ return (Integer) store.get( KEY_MAJOR_VERSION );
+ }
+ /**
+ * Set major version
+ * <ul>
+ * <li>minvalue="1"</li>
+ * <li>maxvalue="10"</li>
+ * </ul>
+ * @param majorVersion minvalue="1" and maxvalue="10"
+ */
+ public void setMajorVersion( Integer majorVersion ) {
+ if (majorVersion != null) {
+ store.put(KEY_MAJOR_VERSION, majorVersion );
+ } else {
+ store.remove(KEY_MAJOR_VERSION);
+ }
+ }
+ /**
+ * Get minor version
+ * <ul>
+ * <li>minvalue="0"</li>
+ * <li>maxvalue="1000"</li>
+ * </ul>
+ * @return the minor version
+ */
+ public Integer getMinorVersion() {
+ return (Integer) store.get( KEY_MINOR_VERSION );
+ }
+ /**
+ * Set minor version
+ * <ul>
+ * <li>minvalue="0"</li>
+ * <li>maxvalue="1000"</li>
+ * </ul>
+ * @param minorVersion min: 0; max: 1000
+ */
+ public void setMinorVersion( Integer minorVersion ) {
+ if (minorVersion != null) {
+ store.put(KEY_MINOR_VERSION, minorVersion );
+ } else {
+ store.remove(KEY_MINOR_VERSION);
+ }
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SendLocation.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SendLocation.java
new file mode 100644
index 000000000..2a9108e47
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SendLocation.java
@@ -0,0 +1,292 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+import java.util.List;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCRequest;
+import com.smartdevicelink.proxy.rpc.enums.DeliveryMode;
+import com.smartdevicelink.util.DebugTool;
+import com.smartdevicelink.util.SdlDataTypeConverter;
+
+
+/**
+ * Sends a location to the head-unit to display on a map or list.
+ *
+ * @since SmartDeviceLink 3.0
+ *
+ */
+public class SendLocation extends RPCRequest{
+
+ public static final String KEY_LAT_DEGREES = "latitudeDegrees";
+ public static final String KEY_LON_DEGREES = "longitudeDegrees";
+ public static final String KEY_LOCATION_NAME = "locationName";
+ public static final String KEY_LOCATION_DESCRIPTION = "locationDescription";
+ public static final String KEY_PHONE_NUMBER = "phoneNumber";
+ public static final String KEY_ADDRESS_LINES = "addressLines";
+ public static final String KEY_LOCATION_IMAGE = "locationImage";
+ public static final String KEY_DELIVERY_MODE = "deliveryMode";
+ public static final String KEY_TIME_STAMP = "timeStamp";
+ public static final String KEY_ADDRESS = "address";
+
+ /**
+ * Constructs a new SendLocation object
+ */
+ public SendLocation(){
+ super(FunctionID.SEND_LOCATION.toString());
+ }
+
+ /**
+ * <p>
+ * Constructs a new SendLocation object indicated by the Hashtable parameter
+ * </p>
+ *
+ * @param hash
+ * The Hashtable to use
+ */
+ public SendLocation(Hashtable<String, Object> hash){
+ super(hash);
+ }
+
+ /**
+ * Getter for longitude of the location to send.
+ *
+ * <p><b>IMPORTANT NOTE:</b> </p><p>A previous version of this method call returned a Float
+ * value, however, it has been changed to return a Double.</p> This will compile,
+ * but cause a ClassCastException if your value is not also a Double type.
+ * @since SmartDeviceLink v4.0
+ *
+ * @return The longitude of the location
+ */
+ public Double getLongitudeDegrees(){
+ Object value = parameters.get(KEY_LON_DEGREES);
+ return SdlDataTypeConverter.objectToDouble(value);
+ }
+
+ /**
+ * Setter for longitude of the location to send.
+ * @param longitudeDegrees
+ */
+ public void setLongitudeDegrees(Double longitudeDegrees){
+ if(longitudeDegrees != null){
+ parameters.put(KEY_LON_DEGREES, longitudeDegrees);
+ }
+ else{
+ parameters.remove(KEY_LON_DEGREES);
+ }
+ }
+
+ /**
+ * Getter for latitude of the location to send.
+ *
+ * <p><b>IMPORTANT NOTE:</b> </p><p>A previous version of this method call returned a Float
+ * value, however, it has been changed to return a Double.</p> This will compile,
+ * but cause a ClassCastException if your value is not also a Double type.
+ * @since SmartDeviceLink v4.0
+ *
+ * @return The latitude of the location
+ */
+ public Double getLatitudeDegrees(){
+ Object value = parameters.get(KEY_LAT_DEGREES);
+ return SdlDataTypeConverter.objectToDouble(value);
+ }
+
+ /**
+ * Setter for latitude of the location to send.
+ * @param latitudeDegrees
+ */
+ public void setLatitudeDegrees(Double latitudeDegrees){
+ if(latitudeDegrees != null){
+ parameters.put(KEY_LAT_DEGREES, latitudeDegrees);
+ }
+ else{
+ parameters.remove(KEY_LAT_DEGREES);
+ }
+ }
+
+ /**
+ * Getter for name of the location to send.
+ * @return The name of the location
+ */
+ public String getLocationName(){
+ return (String) parameters.get(KEY_LOCATION_NAME);
+ }
+
+ /**
+ * Setter for name of the location to send.
+ * @param locationName The name of the location
+ */
+ public void setLocationName(String locationName){
+ if(locationName != null){
+ parameters.put(KEY_LOCATION_NAME, locationName);
+ }
+ else{
+ parameters.remove(KEY_LOCATION_NAME);
+ }
+ }
+
+ /**
+ * Getter for description of the location to send.
+ * @return The description of the location to send
+ */
+ public String getLocationDescription(){
+ return (String) parameters.get(KEY_LOCATION_DESCRIPTION);
+ }
+
+ /**
+ * Setter for description of the location to send.
+ * @param locationDescription The description of the location
+ */
+ public void setLocationDescription(String locationDescription){
+ if(locationDescription != null){
+ parameters.put(KEY_LOCATION_DESCRIPTION, locationDescription);
+ }
+ else{
+ parameters.remove(KEY_LOCATION_DESCRIPTION);
+ }
+ }
+
+ /**
+ * Getter for phone number of the location to send.
+ * @return
+ */
+ public String getPhoneNumber(){
+ return (String) parameters.get(KEY_PHONE_NUMBER);
+ }
+
+ /**
+ * Setter for phone number of the location to send.
+ * @param phoneNumber The phone number of the location
+ */
+ public void setPhoneNumber(String phoneNumber){
+ if(phoneNumber != null){
+ parameters.put(KEY_PHONE_NUMBER, phoneNumber);
+ }
+ else{
+ parameters.remove(KEY_PHONE_NUMBER);
+ }
+ }
+
+ /**
+ * Getter for address lines of the location to send.
+ * @return The address lines of the location
+ */
+ @SuppressWarnings("unchecked")
+ public List<String> getAddressLines(){
+ if(parameters.get(KEY_ADDRESS_LINES) instanceof List<?>){
+ List<?> list = (List<?>) parameters.get(KEY_ADDRESS_LINES);
+ if(list != null && list.size() > 0){
+ Object obj = list.get(0);
+ if(obj instanceof String){
+ return (List<String>) list;
+ }
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Setter for address lines of the location to send.
+ * @param addressLines The address lines of the location
+ */
+ public void setAddressLines(List<String> addressLines){
+ if(addressLines != null){
+ parameters.put(KEY_ADDRESS_LINES, addressLines);
+ }
+ else{
+ parameters.remove(KEY_ADDRESS_LINES);
+ }
+ }
+
+ /**
+ * Getter for image of the location to send.
+ * @return The image of the location to send
+ */
+ @SuppressWarnings("unchecked")
+ public Image getLocationImage(){
+ Object obj = parameters.get(KEY_LOCATION_IMAGE);
+ if (obj instanceof Image) {
+ return (Image) obj;
+ } else if (obj instanceof Hashtable) {
+ return new Image((Hashtable<String, Object>) obj);
+ }
+ return null;
+ }
+
+ /**
+ * Setter for image of the location to send.
+ * @param locationImage The image of the location to send
+ */
+ public void setLocationImage(Image locationImage){
+ if(locationImage != null){
+ parameters.put(KEY_LOCATION_IMAGE, locationImage);
+ }
+ else{
+ parameters.remove(KEY_LOCATION_IMAGE);
+ }
+ }
+
+ public DeliveryMode getDeliveryMode() {
+ Object obj = parameters.get(KEY_DELIVERY_MODE);
+ if (obj instanceof DeliveryMode) {
+ return (DeliveryMode) obj;
+ } else if (obj instanceof String) {
+ return DeliveryMode.valueForString((String) obj);
+ }
+ return null;
+ }
+
+ public void setDeliveryMode(DeliveryMode deliveryMode) {
+ if (deliveryMode != null) {
+ parameters.put(KEY_DELIVERY_MODE, deliveryMode);
+ } else {
+ parameters.remove(KEY_DELIVERY_MODE);
+ }
+ }
+
+ @SuppressWarnings("unchecked")
+ public DateTime getTimeStamp() {
+ Object obj = parameters.get(KEY_TIME_STAMP);
+ if (obj instanceof DateTime) {
+ return (DateTime) obj;
+ } else if (obj instanceof Hashtable) {
+ try {
+ return new DateTime((Hashtable<String, Object>) obj);
+ } catch (Exception e) {
+ DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_TIME_STAMP, e);
+ }
+ }
+ return null;
+ }
+
+ public void setTimeStamp(DateTime timeStamp) {
+ if (timeStamp != null) {
+ parameters.put(KEY_TIME_STAMP, timeStamp);
+ } else {
+ parameters.remove(KEY_TIME_STAMP);
+ }
+ }
+
+ @SuppressWarnings("unchecked")
+ public OasisAddress getAddress() {
+ Object obj = parameters.get(KEY_ADDRESS);
+ if (obj instanceof OasisAddress) {
+ return (OasisAddress) obj;
+ } else if (obj instanceof Hashtable) {
+ try {
+ return new OasisAddress((Hashtable<String, Object>) obj);
+ } catch (Exception e) {
+ DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_ADDRESS, e);
+ }
+ }
+ return null;
+ }
+
+ public void setAddress(OasisAddress address) {
+ if (address != null) {
+ parameters.put(KEY_ADDRESS, address);
+ } else {
+ parameters.remove(KEY_ADDRESS);
+ }
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SendLocationResponse.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SendLocationResponse.java
new file mode 100644
index 000000000..dcee04e9a
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SendLocationResponse.java
@@ -0,0 +1,22 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCResponse;
+
+/**
+ * Add SendLocation Response is sent, when SendLocation has been called
+ *
+ * @since SmartDeviceLink 1.0
+ */
+public class SendLocationResponse extends RPCResponse{
+
+ public SendLocationResponse(){
+ super(FunctionID.SEND_LOCATION.toString());
+ }
+
+ public SendLocationResponse(Hashtable<String, Object> hash){
+ super(hash);
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SetAppIcon.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SetAppIcon.java
new file mode 100644
index 000000000..2cb5aef31
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SetAppIcon.java
@@ -0,0 +1,91 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCRequest;
+
+/**
+ * Used to set existing local file on SDL as the app's icon. Not supported on
+ * first generation SDL vehicles
+ *
+ * <p><b>Parameter List</b></p>
+ *
+ * <table border="1" rules="all">
+ * <tr>
+ * <th>Param Name</th>
+ * <th>Type</th>
+ * <th>Description</th>
+ * <th> Req.</th>
+ * <th>Notes</th>
+ * <th>Version Available</th>
+ * </tr>
+ * <tr>
+ * <td>SDLFileName</td>
+ * <td>String</td>
+ * <td>File reference name.</td>
+ * <td>Y</td>
+ * <td>Maxlength=500</td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ *
+ * </table>
+ *
+ *<p><b>Response </b></p>
+ *<p><b> Non-default Result Codes: </b></p>
+ *<p>SUCCESS</p>
+ * <p> INVALID_DATA</p>
+ * <p> OUT_OF_MEMORY</p>
+ * <p> TOO_MANY_PENDING_REQUESTS</p>
+ * <p> APPLICATION_NOT_REGISTERED</p>
+ * <p> GENERIC_ERROR</p>
+ * <p> REJECTED</p>
+ *
+ * @since SmartDeviceLink 2.0
+ * @see Image
+ */
+public class SetAppIcon extends RPCRequest {
+ public static final String KEY_SDL_FILE_NAME = "syncFileName";
+
+ /**
+ * Constructs a new SetAppIcon object
+ */
+ public SetAppIcon() {
+ super(FunctionID.SET_APP_ICON.toString());
+ }
+
+ /**
+ * Constructs a new SetAppIcon object indicated by the Hashtable parameter
+ * <p></p>
+ *
+ * @param hash
+ * The Hashtable to use
+ */
+ public SetAppIcon(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+
+ /**
+ * Sets a file reference name
+ *
+ * @param sdlFileName
+ * a String value representing a file reference name
+ * <p></p>
+ * <b>Notes: </b>Maxlength=500
+ */
+ public void setSdlFileName(String sdlFileName) {
+ if (sdlFileName != null) {
+ parameters.put(KEY_SDL_FILE_NAME, sdlFileName);
+ } else {
+ parameters.remove(KEY_SDL_FILE_NAME);
+ }
+ }
+
+ /**
+ * Gets a file reference name
+ * @return String -a String value
+ */
+ public String getSdlFileName() {
+ return (String) parameters.get(KEY_SDL_FILE_NAME);
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SetAppIconResponse.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SetAppIconResponse.java
new file mode 100644
index 000000000..c6d0f7ddf
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SetAppIconResponse.java
@@ -0,0 +1,32 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCResponse;
+/**
+ * Set App Icon Response is sent, when SetAppIcon has been called.
+ *
+ * @since SmartDeviceLink 2.0
+ */
+public class SetAppIconResponse extends RPCResponse {
+ /**
+ * Constructs a new SetAppIconResponse object
+ */
+
+ public SetAppIconResponse() {
+ super(FunctionID.SET_APP_ICON.toString());
+ }
+ /**
+ * Constructs a new SetAppIconResponse object indicated by the Hashtable
+ * parameter
+ * <p></p>
+ *
+ * @param hash
+ * The Hashtable to use
+ */
+
+ public SetAppIconResponse(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+} \ No newline at end of file
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SetDisplayLayout.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SetDisplayLayout.java
new file mode 100644
index 000000000..2a3fd9d4b
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SetDisplayLayout.java
@@ -0,0 +1,89 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCRequest;
+
+/**
+ * Used to set an alternate display layout. If not sent, default screen for
+ * given platform will be shown
+ *
+ *
+ * <p><b>Parameter List</b></p>
+ * <table border="1" rules="all">
+ * <tr>
+ * <th>Param Name</th>
+ * <th>Type</th>
+ * <th>Description</th>
+ * <th> Req.</th>
+ * <th>Notes</th>
+ * <th>Version Available</th>
+ * </tr>
+ * <tr>
+ * <td>displayLayout</td>
+ * <td>string</td>
+ * <td>Predefined or dynamically created screen layout.<p>Currently only predefined screen layouts are defined.</p> Predefined layouts include: "ONSCREEN_PRESETS" Custom screen containing app-defined onscreen presets. </td>
+ * <td>Y</td>
+ * <td>maxlength: 500</td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ *
+ * </table>
+ *<p><b>Response </b></p>
+ *
+ *<p><b> Non-default Result Codes: </b></p>
+ *<p> SUCCESS </p>
+ *<p> INVALID_DATA</p>
+ *<p> OUT_OF_MEMORY</p>
+ *<p> TOO_MANY_PENDING_REQUESTS</p>
+ * <p> APPLICATION_NOT_REGISTERED</p>
+ * <p> GENERIC_ERROR</p>
+ * <p> REJECTED</p>
+ * @since SmartDeviceLink 2.0
+ */
+public class SetDisplayLayout extends RPCRequest {
+ public static final String KEY_DISPLAY_LAYOUT = "displayLayout";
+ /**
+ * Constructs a new SetDisplayLayout object
+ */
+ public SetDisplayLayout() {
+ super(FunctionID.SET_DISPLAY_LAYOUT.toString());
+ }
+
+ /**
+ * Constructs a new SetDisplayLayout object indicated by the Hashtable
+ * parameter
+ * <p></p>
+ *
+ * @param hash
+ * The Hashtable to use
+ */
+ public SetDisplayLayout(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+
+ /**
+ * Sets a display layout. Predefined or dynamically created screen layout.
+ * Currently only predefined screen layouts are defined. Predefined layouts
+ * include: "ONSCREEN_PRESETS" Custom screen containing app-defined onscreen
+ * presets. Currently defined for GEN2
+ *
+ * @param displayLayout
+ * a String value representing a diaply layout
+ */
+ public void setDisplayLayout(String displayLayout) {
+ if (displayLayout != null) {
+ parameters.put(KEY_DISPLAY_LAYOUT, displayLayout);
+ } else {
+ parameters.remove(KEY_DISPLAY_LAYOUT);
+ }
+ }
+
+ /**
+ * Gets a display layout.
+ */
+ public String getDisplayLayout() {
+ return (String) parameters.get(KEY_DISPLAY_LAYOUT);
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SetDisplayLayoutResponse.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SetDisplayLayoutResponse.java
new file mode 100644
index 000000000..b9947a4ac
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SetDisplayLayoutResponse.java
@@ -0,0 +1,134 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.ArrayList;
+import java.util.Hashtable;
+import java.util.List;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCResponse;
+
+/**
+ * Set Display Layout Response is sent, when SetDisplayLayout has been called
+ *
+ * @since SmartDeviceLink 2.0
+ */
+public class SetDisplayLayoutResponse extends RPCResponse {
+ public static final String KEY_BUTTON_CAPABILITIES = "buttonCapabilities";
+ public static final String KEY_DISPLAY_CAPABILITIES = "displayCapabilities";
+ public static final String KEY_SOFT_BUTTON_CAPABILITIES = "softButtonCapabilities";
+ public static final String KEY_PRESET_BANK_CAPABILITIES = "presetBankCapabilities";
+
+ /**
+ * Constructs a new SetDisplayLayoutResponse object
+ */
+ public SetDisplayLayoutResponse() {
+ super(FunctionID.SET_DISPLAY_LAYOUT.toString());
+ }
+
+ /**
+ * Constructs a new SetDisplayLayoutResponse object indicated by the Hashtable
+ * parameter
+ * <p></p>
+ *
+ * @param hash
+ * The Hashtable to use
+ */
+ public SetDisplayLayoutResponse(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+
+ @SuppressWarnings("unchecked")
+ public DisplayCapabilities getDisplayCapabilities() {
+ Object obj = parameters.get(KEY_DISPLAY_CAPABILITIES);
+ if (obj instanceof DisplayCapabilities) {
+ return (DisplayCapabilities)obj;
+ } else if (obj instanceof Hashtable) {
+ return new DisplayCapabilities((Hashtable<String, Object>)obj);
+ }
+ return null;
+ }
+
+ public void setDisplayCapabilities(DisplayCapabilities displayCapabilities) {
+ if (displayCapabilities != null) {
+ parameters.put(KEY_DISPLAY_CAPABILITIES, displayCapabilities);
+ } else {
+ parameters.remove(KEY_DISPLAY_CAPABILITIES);
+ }
+ }
+
+ @SuppressWarnings("unchecked")
+ public List<ButtonCapabilities> getButtonCapabilities() {
+ if (parameters.get(KEY_BUTTON_CAPABILITIES) instanceof List<?>) {
+ List<?> list = (List<?>)parameters.get(KEY_BUTTON_CAPABILITIES);
+ if (list != null && list.size() > 0) {
+ Object obj = list.get(0);
+ if (obj instanceof ButtonCapabilities) {
+ return (List<ButtonCapabilities>) list;
+ } else if (obj instanceof Hashtable) {
+ List<ButtonCapabilities> newList = new ArrayList<ButtonCapabilities>();
+ for (Object hashObj : list) {
+ newList.add(new ButtonCapabilities((Hashtable<String, Object>)hashObj));
+ }
+ return newList;
+ }
+ }
+ }
+ return null;
+ }
+
+ public void setButtonCapabilities(List<ButtonCapabilities> buttonCapabilities) {
+ if (buttonCapabilities != null) {
+ parameters.put(KEY_BUTTON_CAPABILITIES, buttonCapabilities);
+ } else {
+ parameters.remove(KEY_BUTTON_CAPABILITIES);
+ }
+ }
+
+ @SuppressWarnings("unchecked")
+ public List<SoftButtonCapabilities> getSoftButtonCapabilities() {
+ if (parameters.get(KEY_SOFT_BUTTON_CAPABILITIES) instanceof List<?>) {
+ List<?> list = (List<?>)parameters.get(KEY_SOFT_BUTTON_CAPABILITIES);
+ if (list != null && list.size() > 0) {
+ Object obj = list.get(0);
+ if (obj instanceof SoftButtonCapabilities) {
+ return (List<SoftButtonCapabilities>) list;
+ } else if (obj instanceof Hashtable) {
+ List<SoftButtonCapabilities> newList = new ArrayList<SoftButtonCapabilities>();
+ for (Object hashObj : list) {
+ newList.add(new SoftButtonCapabilities((Hashtable<String, Object>)hashObj));
+ }
+ return newList;
+ }
+ }
+ }
+ return null;
+ }
+
+ public void setSoftButtonCapabilities(List<SoftButtonCapabilities> softButtonCapabilities) {
+ if (softButtonCapabilities != null) {
+ parameters.put(KEY_SOFT_BUTTON_CAPABILITIES, softButtonCapabilities);
+ } else {
+ parameters.remove(KEY_SOFT_BUTTON_CAPABILITIES);
+ }
+ }
+
+ @SuppressWarnings("unchecked")
+ public PresetBankCapabilities getPresetBankCapabilities() {
+ Object obj = parameters.get(KEY_PRESET_BANK_CAPABILITIES);
+ if (obj instanceof PresetBankCapabilities) {
+ return (PresetBankCapabilities)obj;
+ } else if (obj instanceof Hashtable) {
+ return new PresetBankCapabilities((Hashtable<String, Object>)obj);
+ }
+ return null;
+ }
+
+ public void setPresetBankCapabilities(PresetBankCapabilities presetBankCapabilities) {
+ if (presetBankCapabilities != null) {
+ parameters.put(KEY_PRESET_BANK_CAPABILITIES, presetBankCapabilities);
+ } else {
+ parameters.remove(KEY_PRESET_BANK_CAPABILITIES);
+ }
+ }
+
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SetGlobalProperties.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SetGlobalProperties.java
new file mode 100644
index 000000000..7f597cafe
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SetGlobalProperties.java
@@ -0,0 +1,373 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.ArrayList;
+import java.util.Hashtable;
+import java.util.List;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCRequest;
+import com.smartdevicelink.util.DebugTool;
+/**
+ * Sets value(s) for the specified global property(ies)
+ *
+ * <p>Function Group: Base </p>
+ * <p><b>HMILevel needs to be FULL, LIMITED or BACKGROUND</b></p>
+ *
+ * <p><b>AudioStreamingState:</b></p>
+ * Any
+ *
+ * <p><b>SystemContext:</b></p>
+ * Any
+ *
+ *
+ * <p><b>Parameter List</b></p>
+ *
+ * <table border="1" rules="all">
+ * <tr>
+ * <th>Param Name</th>
+ * <th>Type</th>
+ * <th>Description</th>
+ * <th> Req.</th>
+ * <th>Notes</th>
+ * <th>Version Available</th>
+ * </tr>
+ * <tr>
+ * <td>helpPrompt</td>
+ * <td>TTSChunk</td>
+ * <td>The help prompt. An array of text chunks of type TTSChunk. See {@linkplain TTSChunk}.The array must have at least one item.</td>
+ * <td>N</td>
+ * <td>Array must have at least one element.<p>Only optional it timeoutPrompt has been specified.</p>minsize:1; maxsize: 100</td>
+ * <td>SmartDeviceLink 1.0</td>
+ * </tr>
+ * <tr>
+ * <td>timeoutPrompt</td>
+ * <td>TTSChunk</td>
+ * <td>Array of one or more TTSChunk elements specifying the help prompt used in an interaction started by PTT.</td>
+ * <td>N</td>
+ * <td>Array must have at least one element. Only optional it helpPrompt has been specified <p>minsize: 1; maxsize: 100</p></td>
+ * <td>SmartDeviceLink 1.0</td>
+ * </tr>
+ * <tr>
+ * <td>vrHelpTitle</td>
+ * <td>string</td>
+ * <td>Text, which is shown as title of the VR help screen used in an interaction started by PTT.</td>
+ * <td>N</td>
+ * <td>If omitted on supported displays, the default SDL help title will be used. <p>If omitted and one or more vrHelp items are provided, the request will be rejected.</p>maxlength: 500</td>
+ * <td>SmartDeviceLink 1.0</td>
+ * </tr>
+ * <tr>
+ * <td>vrHelp</td>
+ * <td>VrHelep</td>
+ * <td>Items listed in the VR help screen used in an interaction started by PTT.</td>
+ * <td>N</td>
+ * <td>If omitted on supported displays, the default SDL VR help / What Can I Say? screen will be used<p>If the list of VR Help Items contains nonsequential positions (e.g. [1,2,4]), the RPC will be rejected.</p><p>If omitted and a vrHelpTitle is provided, the request will be rejected.</p>minsize:1; maxsize: 100 </td>
+ * <td>SmartDeviceLink 1.0</td>
+ * </tr>
+ * <tr>
+ * <td>menuTitle</td>
+ * <td></td>
+ * <td>Optional text to label an app menu button (for certain touchscreen platforms).</td>
+ * <td>N</td>
+ * <td>maxlength: 500</td>
+ * <td>SmartDeviceLink 1.0</td>
+ * </tr>
+ * <tr>
+ * <td>menuIcon</td>
+ * <td> Image</td>
+ * <td>Optional icon to draw on an app menu button (for certain touchscreen platforms).</td>
+ * <td>N</td>
+ * <td></td>
+ * <td>SmartDeviceLink 1.0</td>
+ * </tr>
+ * <tr>
+ * <td>keyboardProperties</td>
+ * <td>KeyboardProperties</td>
+ * <td>On-screen keybaord configuration (if available).</td>
+ * <td>N</td>
+ * <td></td>
+ * <td>SmartDeviceLink 1.0</td>
+ * </tr>
+ *
+ * </table>
+ *
+ * <p><b>Note: </b>Your application shall send a SetGlobalProperties to establish an advanced help prompt before sending any voice commands.</p>
+ *
+ * <p><b>Response</b></p>
+ * Indicates whether the requested Global Properties were successfully set.
+ * <p><b>Non-default Result Codes:</b></p>
+ * <p>SUCCESS</p>
+ * <p>INVALID_DATA</p>
+ * </p>OUT_OF_MEMORY</p>
+ * <p>TOO_MANY_PENDING_REQUESTS</p>
+ * <p>APPLICATION_NOT_REGISTERED</p>
+ * <p>GENERIC_ERROR</p>
+ * <p>REJECTED</p>
+ * <p>DISALLOWED</p>
+ * @since SmartDeviceLink 1.0
+ * @see ResetGlobalProperties
+ */
+public class SetGlobalProperties extends RPCRequest {
+ public static final String KEY_VR_HELP_TITLE = "vrHelpTitle";
+ public static final String KEY_MENU_TITLE = "menuTitle";
+ public static final String KEY_MENU_ICON = "menuIcon";
+ public static final String KEY_KEYBOARD_PROPERTIES = "keyboardProperties";
+ public static final String KEY_HELP_PROMPT = "helpPrompt";
+ public static final String KEY_TIMEOUT_PROMPT = "timeoutPrompt";
+ public static final String KEY_VR_HELP = "vrHelp";
+ /**
+ * Constructs a new SetGlobalProperties object
+ */
+ public SetGlobalProperties() {
+ super(FunctionID.SET_GLOBAL_PROPERTIES.toString());
+ }
+ /**
+ * Constructs a new SetGlobalProperties object indicated by the Hashtable
+ * parameter
+ * <p></p>
+ *
+ * @param hash
+ * The Hashtable to use
+ */
+ public SetGlobalProperties(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+ /**
+ * Gets a List<TTSChunk> for Help Prompt representing Array of one or more
+ * TTSChunk elements specifying the help prompt used in an interaction
+ * started by PTT
+ *
+ * @return List<TTSChunk> -an Array of one or more TTSChunk elements
+ * specifying the help prompt used in an interaction started by PTT
+ */
+ @SuppressWarnings("unchecked")
+ public List<TTSChunk> getHelpPrompt() {
+ if (parameters.get(KEY_HELP_PROMPT) instanceof List<?>) {
+ List<?> list = (List<?>)parameters.get(KEY_HELP_PROMPT);
+ if (list != null && list.size() > 0) {
+ Object obj = list.get(0);
+ if (obj instanceof TTSChunk) {
+ return (List<TTSChunk>) list;
+ } else if (obj instanceof Hashtable) {
+ List<TTSChunk> newList = new ArrayList<TTSChunk>();
+ for (Object hashObj : list) {
+ newList.add(new TTSChunk((Hashtable<String, Object>)hashObj));
+ }
+ return newList;
+ }
+ }
+ }
+ return null;
+ }
+ /**
+ * Sets a List<TTSChunk> for Help Prompt that Array of one or more
+ * TTSChunk elements specifying the help prompt used in an interaction
+ * started by PTT
+ *
+ * @param helpPrompt
+ * a List<TTSChunk> of one or more TTSChunk elements
+ * <p></p>
+ * <b>Notes: </b>
+ * <ul>
+ * <li>Array must have at least one element</li>
+ * <li>Only optional it timeoutPrompt has been specified</li>
+ * </ul>
+ */
+ public void setHelpPrompt(List<TTSChunk> helpPrompt) {
+ if (helpPrompt != null) {
+ parameters.put(KEY_HELP_PROMPT, helpPrompt);
+ } else {
+ parameters.remove(KEY_HELP_PROMPT);
+ }
+ }
+ /**
+ * Gets a List<TTSChunk> for Timeout Prompt representing Array of one or
+ * more TTSChunk elements specifying the help prompt used in an interaction
+ * started by PTT
+ *
+ * @return List<TTSChunk> -an Array of one or more TTSChunk elements
+ * specifying the help prompt used in an interaction started by PTT
+ */
+ @SuppressWarnings("unchecked")
+ public List<TTSChunk> getTimeoutPrompt() {
+ if (parameters.get(KEY_TIMEOUT_PROMPT) instanceof List<?>) {
+ List<?> list = (List<?>)parameters.get(KEY_TIMEOUT_PROMPT);
+ if (list != null && list.size() > 0) {
+ Object obj = list.get(0);
+ if (obj instanceof TTSChunk) {
+ return (List<TTSChunk>) list;
+ } else if (obj instanceof Hashtable) {
+ List<TTSChunk> newList = new ArrayList<TTSChunk>();
+ for (Object hashObj : list) {
+ newList.add(new TTSChunk((Hashtable<String, Object>)hashObj));
+ }
+ return newList;
+ }
+ }
+ }
+ return null;
+ }
+ /**
+ * Sets a List<TTSChunk> for Timeout Prompt representing Array of one or
+ * more TTSChunk elements specifying the help prompt used in an interaction
+ * started by PTT
+ *
+ */
+ public void setTimeoutPrompt(List<TTSChunk> timeoutPrompt) {
+ if (timeoutPrompt != null) {
+ parameters.put(KEY_TIMEOUT_PROMPT, timeoutPrompt);
+ } else {
+ parameters.remove(KEY_TIMEOUT_PROMPT);
+ }
+ }
+
+ /**
+ * Gets a voice recognition Help Title
+ *
+ * @return String - a String value representing the text, which is shown as
+ * title of the VR help screen used in an interaction started by PTT
+ * @since SmartDeviceLink 2.0
+ */
+ public String getVrHelpTitle() {
+ return (String) parameters.get(KEY_VR_HELP_TITLE);
+ }
+
+ /**
+ * Sets a voice recognition Help Title
+ *
+ * @param vrHelpTitle
+ * a String value representing a voice recognition Help Title
+ * <p></p>
+ * <b>Notes: </b>
+ * <ul>
+ * <li>If omitted on supported displays, the default SDL help
+ * title will be used</li>
+ * <li>If omitted and one or more vrHelp items are provided, the
+ * request will be rejected.</li>
+ * <li>String Maxlength = 500</li>
+ * </ul>
+ * @since SmartDeviceLink 2.0
+ */
+ public void setVrHelpTitle(String vrHelpTitle) {
+ if (vrHelpTitle != null) {
+ parameters.put(KEY_VR_HELP_TITLE, vrHelpTitle);
+ } else {
+ parameters.remove(KEY_VR_HELP_TITLE);
+ }
+ }
+
+ /**
+ * Gets items listed in the VR help screen used in an interaction started by
+ * PTT
+ *
+ * @return List<VrHelpItem> - a List value representing items listed in
+ * the VR help screen used in an interaction started by PTT
+ * @since SmartDeviceLink 2.0
+ */
+ @SuppressWarnings("unchecked")
+ public List<VrHelpItem> getVrHelp() {
+ if (parameters.get(KEY_VR_HELP) instanceof List<?>) {
+ List<?> list = (List<?>)parameters.get(KEY_VR_HELP);
+ if (list != null && list.size() > 0) {
+ Object obj = list.get(0);
+ if (obj instanceof VrHelpItem) {
+ return (List<VrHelpItem>) list;
+ } else if (obj instanceof Hashtable) {
+ List<VrHelpItem> newList = new ArrayList<VrHelpItem>();
+ for (Object hashObj : list) {
+ newList.add(new VrHelpItem((Hashtable<String, Object>)hashObj));
+ }
+ return newList;
+ }
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Sets the items listed in the VR help screen used in an interaction
+ * started by PTT
+ *
+ * @param vrHelp
+ * a List value representing items listed in the VR help screen
+ * used in an interaction started by PTT
+ * <p></p>
+ * <b>Notes: </b>
+ * <ul>
+ * <li>If omitted on supported displays, the default SmartDeviceLink VR
+ * help / What Can I Say? screen will be used</li>
+ * <li>If the list of VR Help Items contains nonsequential
+ * positions (e.g. [1,2,4]), the RPC will be rejected</li>
+ * <li>If omitted and a vrHelpTitle is provided, the request
+ * will be rejected</li>
+ * <li>Array Minsize: = 1</li>
+ * <li>Array Maxsize = 100</li>
+ * </ul>
+ * @since SmartDeviceLink 2.0
+ */
+ public void setVrHelp(List<VrHelpItem> vrHelp) {
+ if (vrHelp != null) {
+ parameters.put(KEY_VR_HELP, vrHelp);
+ } else {
+ parameters.remove(KEY_VR_HELP);
+ }
+ }
+
+ public String getMenuTitle() {
+ return (String) parameters.get(KEY_MENU_TITLE);
+ }
+
+ public void setMenuTitle(String menuTitle) {
+ if (menuTitle != null) {
+ parameters.put(KEY_MENU_TITLE, menuTitle);
+ } else {
+ parameters.remove(KEY_MENU_TITLE);
+ }
+ }
+
+ public void setMenuIcon(Image menuIcon) {
+ if (menuIcon != null) {
+ parameters.put(KEY_MENU_ICON, menuIcon);
+ } else {
+ parameters.remove(KEY_MENU_ICON);
+ }
+ }
+
+ @SuppressWarnings("unchecked")
+ public Image getMenuIcon() {
+ Object obj = parameters.get(KEY_MENU_ICON);
+ if (obj instanceof Image) {
+ return (Image) obj;
+ } else if (obj instanceof Hashtable) {
+ try {
+ return new Image((Hashtable<String, Object>) obj);
+ } catch (Exception e) {
+ DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_MENU_ICON, e);
+ }
+ }
+ return null;
+ }
+
+ public void setKeyboardProperties(KeyboardProperties keyboardProperties) {
+ if (keyboardProperties != null) {
+ parameters.put(KEY_KEYBOARD_PROPERTIES, keyboardProperties);
+ } else {
+ parameters.remove(KEY_KEYBOARD_PROPERTIES);
+ }
+ }
+
+ @SuppressWarnings("unchecked")
+ public KeyboardProperties getKeyboardProperties() {
+ Object obj = parameters.get(KEY_KEYBOARD_PROPERTIES);
+ if (obj instanceof KeyboardProperties) {
+ return (KeyboardProperties) obj;
+ } else if (obj instanceof Hashtable) {
+ try {
+ return new KeyboardProperties((Hashtable<String, Object>) obj);
+ } catch (Exception e) {
+ DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_KEYBOARD_PROPERTIES, e);
+ }
+ }
+ return null;
+ }
+
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SetGlobalPropertiesResponse.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SetGlobalPropertiesResponse.java
new file mode 100644
index 000000000..f33bc0b7c
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SetGlobalPropertiesResponse.java
@@ -0,0 +1,33 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCResponse;
+
+/**
+ * Set Global Properties Response is sent, when SetGlobalProperties has been called
+ *
+ * @since SmartDeviceLink 1.0
+ */
+public class SetGlobalPropertiesResponse extends RPCResponse {
+
+ /**
+ * Constructs a new SetGlobalPropertiesResponse object
+ */
+ public SetGlobalPropertiesResponse() {
+ super(FunctionID.SET_GLOBAL_PROPERTIES.toString());
+ }
+
+ /**
+ * Constructs a new SetGlobalPropertiesResponse object indicated by the Hashtable
+ * parameter
+ * <p></p>
+ *
+ * @param hash
+ * The Hashtable to use
+ */
+ public SetGlobalPropertiesResponse(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+} \ No newline at end of file
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SetMediaClockTimer.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SetMediaClockTimer.java
new file mode 100644
index 000000000..bd6bac324
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SetMediaClockTimer.java
@@ -0,0 +1,184 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCRequest;
+import com.smartdevicelink.proxy.rpc.enums.UpdateMode;
+/**
+ * Sets the media clock/timer value and the update method (e.g.count-up,
+ * count-down, etc.)
+ *
+ * <p>Function Group: Base </p>
+ * <p><b>HMILevel needs to be FULL, LIMITIED or BACKGROUND</b></p>
+ *
+ * <p><b>Parameter List</b></p>
+ *
+ * <table border="1" rules="all">
+ * <tr>
+ * <th>Param Name</th>
+ * <th>Type</th>
+ * <th>Description</th>
+ * <th> Req.</th>
+ * <th>Notes</th>
+ * <th>Version Available</th>
+ * </tr>
+ * <tr>
+ * <td>startTime</td>
+ * <td>StartTime</td>
+ * <td>StartTime struct specifying hour, minute, second values to which media clock timer is set.</td>
+ * <td>N</td>
+ * <td> </td>
+ * <td>SmartDeviceLink 1.0</td>
+ * </tr>
+ * <tr>
+ * <td>endTime</td>
+ * <td>StartTime</td>
+ * <td> EndTime can be provided for "COUNTUP" and "COUNTDOWN"; to be used to calculate any visual progress bar (if not provided, this feature is ignored)
+ * If endTime is greater then startTime for COUNTDOWN or less than startTime for COUNTUP, then the request will return an INVALID_DATA.
+ * endTime will be ignored for "RESUME", and "CLEAR"
+ * endTime can be sent for "PAUSE", in which case it will update the paused endTime</td>
+ * <td>N</td>
+ * <td>Array must have at least one element.<p>Only optional it helpPrompt has been specified</p> minsize: 1; maxsize: 100</td>
+ * <td>SmartDeviceLink 1.0</td>
+ * </tr>
+ * <tr>
+ * <td>updateMode</td>
+ * <td>UpdateMode</td>
+ * <td>Specifies how the media clock/timer is to be updated (COUNTUP/COUNTDOWN/PAUSE/RESUME), based at the startTime.</td>
+ * <td>Y</td>
+ * <td>If "updateMode" is COUNTUP or COUNTDOWN, this parameter must be provided. Will be ignored for PAUSE,RESUME and CLEAR</td>
+ * <td>SmartDeviceLink 1.0</td>
+ * </tr>
+ * <tr>
+ *
+ * </table>
+ *
+ *<p><b>Response </b></p>
+ *
+ *<p><b> Non-default Result Codes: </b></p>
+ *
+ * <p> SUCCESS </p>
+ * <p> INVALID_DATA</p>
+ * <p> OUT_OF_MEMORY</p>
+ * <p> TOO_MANY_PENDING_REQUESTS</p>
+ * <p> APPLICATION_NOT_REGISTERED</p>
+ * <p> GENERIC_ERROR</p>
+ * <p> REJECTED </p>
+ * <p> IGNORED </p>
+ *
+ * @since SmartDeviceLink 1.0
+ */
+public class SetMediaClockTimer extends RPCRequest {
+ public static final String KEY_START_TIME = "startTime";
+ public static final String KEY_END_TIME = "endTime";
+ public static final String KEY_UPDATE_MODE = "updateMode";
+ /**
+ * Constructs a new SetMediaClockTimer object
+ */
+ public SetMediaClockTimer() {
+ super(FunctionID.SET_MEDIA_CLOCK_TIMER.toString());
+ }
+ /**
+ * Constructs a new SetMediaClockTimer object indicated by the Hashtable
+ * parameter
+ * <p></p>
+ *
+ * @param hash
+ * The Hashtable to use
+ */
+ public SetMediaClockTimer(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+ /**
+ * Gets the Start Time which media clock timer is set
+ *
+ * @return StartTime -a StartTime object specifying hour, minute, second
+ * values
+ */
+ @SuppressWarnings("unchecked")
+ public StartTime getStartTime() {
+ Object obj = parameters.get(KEY_START_TIME);
+ if (obj instanceof StartTime) {
+ return (StartTime)obj;
+ } else if (obj instanceof Hashtable) {
+ return new StartTime((Hashtable<String, Object>)obj);
+ }
+ return null;
+ }
+ /**
+ * Sets a Start Time with specifying hour, minute, second values
+ *
+ * @param startTime
+ * a startTime object with specifying hour, minute, second values
+ * <p></p>
+ * <b>Notes: </b>
+ * <ul>
+ * <li>If "updateMode" is COUNTUP or COUNTDOWN, this parameter
+ * must be provided</li>
+ * <li>Will be ignored for PAUSE/RESUME and CLEAR</li>
+ * </ul>
+ */
+ public void setStartTime( StartTime startTime ) {
+ if (startTime != null) {
+ parameters.put(KEY_START_TIME, startTime );
+ } else {
+ parameters.remove(KEY_START_TIME);
+ }
+ }
+
+ @SuppressWarnings("unchecked")
+ public StartTime getEndTime() {
+ Object obj = parameters.get(KEY_END_TIME);
+ if (obj instanceof StartTime) {
+ return (StartTime)obj;
+ } else if (obj instanceof Hashtable) {
+ return new StartTime((Hashtable<String, Object>)obj);
+ }
+ return null;
+ }
+
+ public void setEndTime( StartTime endTime ) {
+ if (endTime != null) {
+ parameters.put(KEY_END_TIME, endTime );
+ } else {
+ parameters.remove(KEY_END_TIME);
+ }
+ }
+
+ /**
+ * Gets the media clock/timer update mode (COUNTUP/COUNTDOWN/PAUSE/RESUME)
+ *
+ * @return UpdateMode -a Enumeration value (COUNTUP/COUNTDOWN/PAUSE/RESUME)
+ */
+ public UpdateMode getUpdateMode() {
+ Object obj = parameters.get(KEY_UPDATE_MODE);
+ if (obj instanceof UpdateMode) {
+ return (UpdateMode) obj;
+ } else if (obj instanceof String) {
+ return UpdateMode.valueForString((String) obj);
+ }
+ return null;
+ }
+ /**
+ * Sets the media clock/timer update mode (COUNTUP/COUNTDOWN/PAUSE/RESUME)
+ *
+ * @param updateMode
+ * a Enumeration value (COUNTUP/COUNTDOWN/PAUSE/RESUME)
+ * <p></p>
+ * <b>Notes: </b>
+ * <ul>
+ * <li>When updateMode is PAUSE, RESUME or CLEAR, the start time value
+ * is ignored</li>
+ * <li>When updateMode is RESUME, the timer resumes counting from
+ * the timer's value when it was paused</li>
+ * </ul>
+ */
+ public void setUpdateMode( UpdateMode updateMode ) {
+ if (updateMode != null) {
+ parameters.put(KEY_UPDATE_MODE, updateMode );
+ } else {
+ parameters.remove(KEY_UPDATE_MODE);
+ }
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SetMediaClockTimerResponse.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SetMediaClockTimerResponse.java
new file mode 100644
index 000000000..e74ecc1b9
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SetMediaClockTimerResponse.java
@@ -0,0 +1,33 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCResponse;
+
+/**
+ * Set Media Clock Timer Response is sent, when SetMediaClockTimer has been called
+ *
+ * @since SmartDeviceLink 1.0
+ */
+public class SetMediaClockTimerResponse extends RPCResponse {
+
+ /**
+ * Constructs a new SetMediaClockTimerResponse object
+ */
+ public SetMediaClockTimerResponse() {
+ super(FunctionID.SET_MEDIA_CLOCK_TIMER.toString());
+ }
+
+ /**
+ * Constructs a new SetMediaClockTimerResponse object indicated by the Hashtable
+ * parameter
+ * <p></p>
+ *
+ * @param hash
+ * The Hashtable to use
+ */
+ public SetMediaClockTimerResponse(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+} \ No newline at end of file
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/Show.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/Show.java
new file mode 100644
index 000000000..24307c9de
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/Show.java
@@ -0,0 +1,623 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.ArrayList;
+import java.util.Hashtable;
+import java.util.List;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCRequest;
+import com.smartdevicelink.proxy.rpc.enums.TextAlignment;
+import com.smartdevicelink.util.DebugTool;
+
+/**
+ * Updates the application's display text area, regardless of whether or not
+ * this text area is visible to the user at the time of the request. The
+ * application's display text area remains unchanged until updated by subsequent
+ * calls to Show
+ * <p></p>
+ * The content of the application's display text area is visible to the user
+ * when the application's {@linkplain com.smartdevicelink.proxy.rpc.enums.HMILevel}
+ * is FULL or LIMITED, and the
+ * {@linkplain com.smartdevicelink.proxy.rpc.enums.SystemContext}=MAIN and no
+ * {@linkplain Alert} is in progress
+ * <p></p>
+ * The Show operation cannot be used to create an animated scrolling screen. To
+ * avoid distracting the driver, Show commands cannot be issued more than once
+ * every 4 seconds. Requests made more frequently than this will be rejected
+ *
+ * <p><b>HMILevel needs to be FULL, LIMITED or BACKGROUND</b></p>
+ *
+ * <p><b>Parameter List</b></p>
+ * <table border="1" rules="all">
+ * <tr>
+ * <th>Param Name</th>
+ * <th>Type</th>
+ * <th>Description</th>
+ * <th> Req.</th>
+ * <th>Notes</th>
+ * <th>Version Available</th>
+ * </tr>
+ * <tr>
+ * <td>mainField1</td>
+ * <td>String</td>
+ * <td>Text to be displayed in a single-line display, or in the upper display line in a two-line display.</td>
+ * <td>N</td>
+ * <td>If this parameter is omitted, the text of mainField1 does not change. If this parameter is an empty string, the field will be cleared. <p>Maxlength = 500</p></td>
+ * <td>SmartDeviceLink 1.0</td>
+ * </tr>
+ * <tr>
+ * <td>mainField2</td>
+ * <td>String</td>
+ * <td>Text to be displayed on the second display line of a two-line display.</td>
+ * <td>N</td>
+ * <td><p>If this parameter is omitted, the text of mainField2 does not change. </p> <p>If this parameter is an empty string, the field will be cleared.</p><p>If provided and the display is a single-line display, the parameter is ignored.</p>Maxlength = 500</td>
+ * <td>SmartDeviceLink 1.0</td>
+ * </tr>
+ * <tr>
+ * <td>mainField3</td>
+ * <td>String</td>
+ * <td>Text to be displayed on the first display line of the second page.</td>
+ * <td>N</td>
+ * <td><p>If this parameter is omitted, the text of mainField3 does not change. </p><p>If this parameter is an empty string, the field will be cleared.</p><p>If provided and the display is a single-line display, the parameter is ignored.</p> Maxlength = 500</td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>mainField4</td>
+ * <td>String</td>
+ * <td>Text to be displayed on the second display line of the second page.</td>
+ * <td>N</td>
+ * <td><p>If this parameter is omitted, the text of mainField4 does not change. </p><p>If this parameter is an empty string, the field will be cleared.</p><p>If provided and the display is a single-line display, the parameter is ignored.</p>Maxlength = 500</td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>alignment</td>
+ * <td>TextAlignment</td>
+ * <td>Specifies how mainField1 and mainField2 text should be aligned on display.</td>
+ * <td>N</td>
+ * <td><p>Applies only to mainField1 and mainField2 provided on this call, not to what is already showing in display.</p><p>If this parameter is omitted, text in both mainField1 and mainField2 will be centered. </p>Has no effect with navigation display</td>
+ * <td>SmartDeviceLink 1.0</td>
+ * </tr>
+ * <tr>
+ * <td>statusBar</td>
+ * <td>String</td>
+ * <td>The text is placed in the status bar area.</td>
+ * <td>N</td>
+ * <td><p>Note: The status bar only exists on navigation displays</p><p>If this parameter is omitted, the status bar text will remain unchanged.</p><p>If this parameter is an empty string, the field will be cleared.</p><p>If provided and the display has no status bar, this parameter is ignored.</p>Maxlength = 500</td>
+ * <td>SmartDeviceLink 1.0</td>
+ * </tr>
+ * <tr>
+ * <td>mediaClock</td>
+ * <td>String</td>
+ * <td><p>Text value for MediaClock field.</p> <p>Has to be properly formatted by Mobile App according to SDL capabilities.</p>If this text is set, any automatic media clock updates previously set with SetMediaClockTimer will be stopped.</td>
+ * <td>N</td>
+ * <td><p>Must be properly formatted as described in the MediaClockFormat enumeration. </p><p>If a value of five spaces is provided, this will clear that field on the display (i.e. the media clock timer field will not display anything) </p>Maxlength = 500</td>
+ * <td>SmartDeviceLink 1.0</td>
+ * </tr>
+ * <tr>
+ * <td>mediaTrack</td>
+ * <td>String</td>
+ * <td>Array of one or more TTSChunk elements specifying the help prompt used in an interaction started by PTT.</td>
+ * <td>N</td>
+ * <td><p>If parameter is omitted, the track field remains unchanged.</p><p>If an empty string is provided, the field will be cleared.</p><p>This field is only valid for media applications on navigation displays.</p>Maxlength = 500</td>
+ * <td>SmartDeviceLink 1.0</td>
+ * </tr>
+ * <tr>
+ * <td>graphic</td>
+ * <td>Image</td>
+ * <td>Image to be shown on supported displays.</td>
+ * <td>N</td>
+ * <td>If omitted on supported displays, the displayed graphic shall not change.</td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>secondaryGraphic</td>
+ * <td>Image</td>
+ * <td> <p>Image struct determining whether static or dynamic secondary image to display in app.</p>If omitted on supported displays, the displayed secondary graphic shall not change.</td>
+ * <td>N</td>
+ * <td> </td>
+ * <td>SmartDeviceLink 2.3.2</td>
+ * </tr>
+ * <tr>
+ * <td>softButtons</td>
+ * <td>SoftButton</td>
+ * <td>Soft buttons as defined by the App</td>
+ * <td>N</td>
+ * <td><p>If omitted on supported displays, the currently displayed SoftButton values will not change.</p>Array Minsize: 0; Array Maxsize: 8</td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>customPresets</td>
+ * <td>String</td>
+ * <td>Custom presets as defined by the App.</td>
+ * <td>N</td>
+ * <td><p>If omitted on supported displays, the presets will be shown as not defined.</p>Minsize: 0; Maxsize: 6</td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ *
+ * </table>
+ *<p><b>Response </b></p>
+ *
+ *<p><b> Non-default Result Codes: </b></p>
+ * <p>SUCCESS </p>
+ * <p>INVALID_DATA</p>
+ * <p>OUT_OF_MEMORY</p>
+ * <p> TOO_MANY_PENDING_REQUESTS</p>
+ * <p>APPLICATION_NOT_REGISTERED</p>
+ * <p> GENERIC_ERROR</p>
+ * <p> REJECTED</p>
+ * <p> DISALLOWED</p>
+ * <p> UNSUPPORTED_RESOURCE </p>
+ * <p>ABORTED</p>
+ *
+ * @since SmartDeviceLink 1.0
+ * @see Alert
+ * @see SetMediaClockTimer
+ */
+public class Show extends RPCRequest {
+ public static final String KEY_GRAPHIC = "graphic";
+ public static final String KEY_CUSTOM_PRESETS = "customPresets";
+ public static final String KEY_MAIN_FIELD_1 = "mainField1";
+ public static final String KEY_MAIN_FIELD_2 = "mainField2";
+ public static final String KEY_MAIN_FIELD_3 = "mainField3";
+ public static final String KEY_MAIN_FIELD_4 = "mainField4";
+ public static final String KEY_STATUS_BAR = "statusBar";
+ public static final String KEY_MEDIA_CLOCK = "mediaClock";
+ public static final String KEY_ALIGNMENT = "alignment";
+ public static final String KEY_MEDIA_TRACK = "mediaTrack";
+ public static final String KEY_SECONDARY_GRAPHIC = "secondaryGraphic";
+ public static final String KEY_SOFT_BUTTONS = "softButtons";
+ /**
+ * Constructs a new Show object
+ */
+ public Show() {
+ super(FunctionID.SHOW.toString());
+ }
+ /**
+ * Constructs a new Show object indicated by the Hashtable parameter
+ * <p></p>
+ *
+ * @param hash
+ * The Hashtable to use
+ */
+ public Show(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+ /**
+ * Gets the text displayed in a single-line display, or in the upper display
+ * line in a two-line display
+ *
+ * @return String -a String value representing the text displayed in a
+ * single-line display, or in the upper display line in a two-line
+ * display
+ */
+ public String getMainField1() {
+ return (String) parameters.get(KEY_MAIN_FIELD_1);
+ }
+ /**
+ * Sets the text displayed in a single-line display, or in the upper display
+ * line in a two-line display
+ *
+ * @param mainField1
+ * the String value representing the text displayed in a
+ * single-line display, or in the upper display line in a
+ * two-line display
+ * <p></p>
+ * <b>Notes: </b>
+ * <ul>
+ * <li>If this parameter is omitted, the text of mainField1 does
+ * not change</li>
+ * <li>If this parameter is an empty string, the field will be
+ * cleared</li>
+ * </ul>
+ */
+ public void setMainField1(String mainField1) {
+ if (mainField1 != null) {
+ parameters.put(KEY_MAIN_FIELD_1, mainField1);
+ } else {
+ parameters.remove(KEY_MAIN_FIELD_1);
+ }
+ }
+ /**
+ * Gets the text displayed on the second display line of a two-line display
+ *
+ * @return String -a String value representing the text displayed on the
+ * second display line of a two-line display
+ */
+ public String getMainField2() {
+ return (String) parameters.get(KEY_MAIN_FIELD_2);
+ }
+ /**
+ * Sets the text displayed on the second display line of a two-line display
+ *
+ * @param mainField2
+ * the String value representing the text displayed on the second
+ * display line of a two-line display
+ * <p></p>
+ * <b>Notes: </b>
+ * <ul>
+ * <li>If this parameter is omitted, the text of mainField2 does
+ * not change</li>
+ * <li>If this parameter is an empty string, the field will be
+ * cleared</li>
+ * <li>If provided and the display is a single-line display, the
+ * parameter is ignored</li>
+ * <li>Maxlength = 500</li>
+ * </ul>
+ */
+ public void setMainField2(String mainField2) {
+ if (mainField2 != null) {
+ parameters.put(KEY_MAIN_FIELD_2, mainField2);
+ } else {
+ parameters.remove(KEY_MAIN_FIELD_2);
+ }
+ }
+
+ /**
+ * Gets the text displayed on the first display line of the second page
+ *
+ * @return String -a String value representing the text displayed on the
+ * first display line of the second page
+ * @since SmartDeviceLink 2.0
+ */
+ public String getMainField3() {
+ return (String) parameters.get(KEY_MAIN_FIELD_3);
+ }
+
+ /**
+ * Sets the text displayed on the first display line of the second page
+ *
+ * @param mainField3
+ * the String value representing the text displayed on the first
+ * display line of the second page
+ * <p></p>
+ * <b>Notes: </b>
+ * <ul>
+ * <li>If this parameter is omitted, the text of mainField3 does
+ * not change</li>
+ * <li>If this parameter is an empty string, the field will be
+ * cleared</li>
+ * <li>If provided and the display is a single-line display, the
+ * parameter is ignored</li>
+ * <li>Maxlength = 500</li>
+ * </ul>
+ * @since SmartDeviceLink 2.0
+ */
+ public void setMainField3(String mainField3) {
+ if (mainField3 != null) {
+ parameters.put(KEY_MAIN_FIELD_3, mainField3);
+ } else {
+ parameters.remove(KEY_MAIN_FIELD_3);
+ }
+ }
+
+ /**
+ * Gets the text displayed on the second display line of the second page
+ *
+ * @return String -a String value representing the text displayed on the
+ * first display line of the second page
+ * @since SmartDeviceLink 2.0
+ */
+ public String getMainField4() {
+ return (String) parameters.get(KEY_MAIN_FIELD_4);
+ }
+
+ /**
+ * Sets the text displayed on the second display line of the second page
+ *
+ * @param mainField4
+ * the String value representing the text displayed on the second
+ * display line of the second page
+ * <p></p>
+ * <b>Notes: </b>
+ * <ul>
+ * <li>If this parameter is omitted, the text of mainField4 does
+ * not change</li>
+ * <li>If this parameter is an empty string, the field will be
+ * cleared</li>
+ * <li>If provided and the display is a single-line display, the
+ * parameter is ignored</li>
+ * <li>Maxlength = 500</li>
+ * </ul>
+ * @since SmartDeviceLink 2.0
+ */
+ public void setMainField4(String mainField4) {
+ if (mainField4 != null) {
+ parameters.put(KEY_MAIN_FIELD_4, mainField4);
+ } else {
+ parameters.remove(KEY_MAIN_FIELD_4);
+ }
+ }
+ /**
+ * Gets the alignment that Specifies how mainField1 and mainField2 text
+ * should be aligned on display
+ *
+ * @return TextAlignment -an Enumeration value
+ */
+ public TextAlignment getAlignment() {
+ Object obj = parameters.get(KEY_ALIGNMENT);
+ if (obj instanceof TextAlignment) {
+ return (TextAlignment) obj;
+ } else if (obj instanceof String) {
+ return TextAlignment.valueForString((String) obj);
+ }
+ return null;
+ }
+ /**
+ * Sets the alignment that Specifies how mainField1 and mainField2 text
+ * should be aligned on display
+ *
+ * @param alignment
+ * an Enumeration value
+ * <p></p>
+ * <b>Notes: </b>
+ * <ul>
+ * <li>Applies only to mainField1 and mainField2 provided on this
+ * call, not to what is already showing in display</li>
+ * <li>If this parameter is omitted, text in both mainField1 and
+ * mainField2 will be centered</li>
+ * <li>Has no effect with navigation display</li>
+ * </ul>
+ */
+ public void setAlignment(TextAlignment alignment) {
+ if (alignment != null) {
+ parameters.put(KEY_ALIGNMENT, alignment);
+ } else {
+ parameters.remove(KEY_ALIGNMENT);
+ }
+ }
+ /**
+ * Gets text in the Status Bar
+ *
+ * @return String -the value in the Status Bar
+ */
+ public String getStatusBar() {
+ return (String) parameters.get(KEY_STATUS_BAR);
+ }
+ /**
+ * Sets text in the Status Bar
+ *
+ * @param statusBar
+ * a String representing the text you want to add in the Status
+ * Bar
+ * <p></p>
+ * <b>Notes: </b><i>The status bar only exists on navigation
+ * displays</i>
+ * <ul>
+ * <li>If this parameter is omitted, the status bar text will
+ * remain unchanged</li>
+ * <li>If this parameter is an empty string, the field will be
+ * cleared</li>
+ * <li>If provided and the display has no status bar, this
+ * parameter is ignored</li>
+ * </ul>
+ */
+ public void setStatusBar(String statusBar) {
+ if (statusBar != null) {
+ parameters.put(KEY_STATUS_BAR, statusBar);
+ } else {
+ parameters.remove(KEY_STATUS_BAR);
+ }
+ }
+ /**
+ * Gets the String value of the MediaClock
+ *
+ * @return String -a String value of the MediaClock
+ */
+ @Deprecated
+ public String getMediaClock() {
+ return (String) parameters.get(KEY_MEDIA_CLOCK);
+ }
+ /**
+ * Sets the value for the MediaClock field using a format described in the
+ * MediaClockFormat enumeration
+ *
+ * @param mediaClock
+ * a String value for the MdaiaClock
+ * <p></p>
+ * <b>Notes: </b>
+ * <ul>
+ * <li>Must be properly formatted as described in the
+ * MediaClockFormat enumeration</li>
+ * <li>If a value of five spaces is provided, this will clear
+ * that field on the display (i.e. the media clock timer field
+ * will not display anything)</li>
+ * </ul>
+ */
+ @Deprecated
+ public void setMediaClock(String mediaClock) {
+ if (mediaClock != null) {
+ parameters.put(KEY_MEDIA_CLOCK, mediaClock);
+ } else {
+ parameters.remove(KEY_MEDIA_CLOCK);
+ }
+ }
+ /**
+ * Gets the text in the track field
+ *
+ * @return String -a String displayed in the track field
+ */
+ public String getMediaTrack() {
+ return (String) parameters.get(KEY_MEDIA_TRACK);
+ }
+ /**
+ * Sets the text in the track field
+ *
+ * @param mediaTrack
+ * a String value disaplayed in the track field
+ * <p></p>
+ * <b>Notes: </b>
+ * <ul>
+ * <li>If parameter is omitted, the track field remains unchanged</li>
+ * <li>If an empty string is provided, the field will be cleared</li>
+ * <li>This field is only valid for media applications on navigation displays</li>
+ * </ul>
+ */
+ public void setMediaTrack(String mediaTrack) {
+ if (mediaTrack != null) {
+ parameters.put(KEY_MEDIA_TRACK, mediaTrack);
+ } else {
+ parameters.remove(KEY_MEDIA_TRACK);
+ }
+ }
+
+ /**
+ * Sets an image to be shown on supported displays
+ *
+ * @param graphic
+ * the value representing the image shown on supported displays
+ * <p></p>
+ * <b>Notes: </b>If omitted on supported displays, the displayed
+ * graphic shall not change
+ * @since SmartDeviceLink 2.0
+ */
+ public void setGraphic(Image graphic) {
+ if (graphic != null) {
+ parameters.put(KEY_GRAPHIC, graphic);
+ } else {
+ parameters.remove(KEY_GRAPHIC);
+ }
+ }
+
+ /**
+ * Gets an image to be shown on supported displays
+ *
+ * @return Image -the value representing the image shown on supported
+ * displays
+ * @since SmartDeviceLink 2.0
+ */
+ @SuppressWarnings("unchecked")
+ public Image getGraphic() {
+ Object obj = parameters.get(KEY_GRAPHIC);
+ if (obj instanceof Image) {
+ return (Image) obj;
+ } else if (obj instanceof Hashtable) {
+ try {
+ return new Image((Hashtable<String, Object>) obj);
+ } catch (Exception e) {
+ DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_GRAPHIC, e);
+ }
+ }
+ return null;
+ }
+
+
+ public void setSecondaryGraphic(Image secondaryGraphic) {
+ if (secondaryGraphic != null) {
+ parameters.put(KEY_SECONDARY_GRAPHIC, secondaryGraphic);
+ } else {
+ parameters.remove(KEY_SECONDARY_GRAPHIC);
+ }
+ }
+
+
+ @SuppressWarnings("unchecked")
+ public Image getSecondaryGraphic() {
+ Object obj = parameters.get(KEY_SECONDARY_GRAPHIC);
+ if (obj instanceof Image) {
+ return (Image) obj;
+ } else if (obj instanceof Hashtable) {
+ try {
+ return new Image((Hashtable<String, Object>) obj);
+ } catch (Exception e) {
+ DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_SECONDARY_GRAPHIC, e);
+ }
+ }
+ return null;
+ }
+
+
+ /**
+ * Gets the Soft buttons defined by the App
+ *
+ * @return List<SoftButton> -a List value representing the Soft buttons
+ * defined by the App
+ * @since SmartDeviceLink 2.0
+ */
+ @SuppressWarnings("unchecked")
+ public List<SoftButton> getSoftButtons() {
+ if (parameters.get(KEY_SOFT_BUTTONS) instanceof List<?>) {
+ List<?> list = (List<?>)parameters.get(KEY_SOFT_BUTTONS);
+ if (list != null && list.size() > 0) {
+ Object obj = list.get(0);
+ if (obj instanceof SoftButton) {
+ return (List<SoftButton>) list;
+ } else if (obj instanceof Hashtable) {
+ List<SoftButton> newList = new ArrayList<SoftButton>();
+ for (Object hashObj : list) {
+ newList.add(new SoftButton((Hashtable<String, Object>)hashObj));
+ }
+ return newList;
+ }
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Sets the the Soft buttons defined by the App
+ *
+ * @param softButtons
+ * a List value represemting the Soft buttons defined by the
+ * App
+ * <p></p>
+ * <b>Notes: </b>
+ * <ul>
+ * <li>If omitted on supported displays, the currently displayed
+ * SoftButton values will not change</li>
+ * <li>Array Minsize: 0</li>
+ * <li>Array Maxsize: 8</li>
+ * </ul>
+ *
+ * @since SmartDeviceLink 2.0
+ */
+ public void setSoftButtons(List<SoftButton> softButtons) {
+ if (softButtons != null) {
+ parameters.put(KEY_SOFT_BUTTONS, softButtons);
+ } else {
+ parameters.remove(KEY_SOFT_BUTTONS);
+ }
+ }
+
+ /**
+ * Gets the Custom Presets defined by the App
+ *
+ * @return List<String> - a List value representing the Custom presets
+ * defined by the App
+ * @since SmartDeviceLink 2.0
+ */
+ @SuppressWarnings("unchecked")
+ public List<String> getCustomPresets() {
+ if (parameters.get(KEY_CUSTOM_PRESETS) instanceof List<?>) {
+ List<?> list = (List<?>)parameters.get(KEY_CUSTOM_PRESETS);
+ if (list != null && list.size()>0) {
+ Object obj = list.get(0);
+ if (obj instanceof String) {
+ return (List<String>) list;
+ }
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Sets the Custom Presets defined by the App
+ *
+ * @param customPresets
+ * a List value representing the Custom Presets defined by the
+ * App
+ * <p></p>
+ * <ul>
+ * <li>If omitted on supported displays, the presets will be shown as not defined</li>
+ * <li>Array Minsize: 0</li>
+ * <li>Array Maxsize: 6</li>
+ * </ul>
+ * @since SmartDeviceLink 2.0
+ */
+ public void setCustomPresets(List<String> customPresets) {
+ if (customPresets != null) {
+ parameters.put(KEY_CUSTOM_PRESETS, customPresets);
+ } else {
+ parameters.remove(KEY_CUSTOM_PRESETS);
+ }
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/ShowConstantTbt.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/ShowConstantTbt.java
new file mode 100644
index 000000000..f65e1a100
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/ShowConstantTbt.java
@@ -0,0 +1,356 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.ArrayList;
+import java.util.Hashtable;
+import java.util.List;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCRequest;
+
+/**
+ * <p>This RPC is used to update the user with navigation information for the constantly shown screen (base screen), but
+ * also for the alert type screen</p>
+ *
+ * <p>Function Group: Navigation</p>
+ *
+ * <p><b>HMILevel needs to be FULL, LIMITED or BACKGROUND</b></p>
+ *
+ *
+ * @since SmartDeviceLink 2.0
+ * @see AlertManeuver
+ * @see UpdateTurnList
+ */
+public class ShowConstantTbt extends RPCRequest{
+
+ public static final String KEY_TEXT1 = "navigationText1";
+ public static final String KEY_TEXT2 = "navigationText2";
+ public static final String KEY_ETA = "eta";
+ public static final String KEY_TOTAL_DISTANCE = "totalDistance";
+ public static final String KEY_MANEUVER_DISTANCE = "distanceToManeuver";
+ public static final String KEY_MANEUVER_DISTANCE_SCALE = "distanceToManeuverScale";
+ public static final String KEY_MANEUVER_IMAGE = "turnIcon";
+ public static final String KEY_NEXT_MANEUVER_IMAGE = "nextTurnIcon";
+ public static final String KEY_MANEUVER_COMPLETE = "maneuverComplete";
+ public static final String KEY_SOFT_BUTTONS = "softButtons";
+ public static final String KEY_TIME_TO_DESTINATION = "timeToDestination";
+
+ /**
+ * Constructs a new ShowConstantTbt object
+ */
+ public ShowConstantTbt(){
+ super(FunctionID.SHOW_CONSTANT_TBT.toString());
+ }
+
+ /**
+ * Constructs a new ShowConstantTbt object indicated by the Hashtable parameter
+ * <p>
+ *
+ * @param hash
+ * The Hashtable to use
+ */
+ public ShowConstantTbt(Hashtable<String, Object> hash){
+ super(hash);
+ }
+
+ /**
+ * Sets a text for navigation text field 1
+ *
+ * @param navigationText1
+ * a String value representing a text for navigation text field 1
+ * <p></p>
+ * <b>Notes: </b>Maxlength=500
+ */
+ public void setNavigationText1(String navigationText1){
+ if(navigationText1 != null){
+ parameters.put(KEY_TEXT1, navigationText1);
+ }
+ else{
+ parameters.remove(KEY_TEXT1);
+ }
+ }
+
+ /**
+ * Gets a text for navigation text field 1
+ *
+ * @return String -a String value representing a text for navigation text field 1
+ */
+ public String getNavigationText1(){
+ return (String) parameters.get(KEY_TEXT1);
+ }
+
+ /**
+ * Sets a text for navigation text field 2
+ *
+ * @param navigationText2
+ * a String value representing a text for navigation text field 2
+ * <p></p>
+ * <b>Notes: </b>Maxlength=500
+ */
+ public void setNavigationText2(String navigationText2){
+ if(navigationText2 != null){
+ parameters.put(KEY_TEXT2, navigationText2);
+ }
+ else{
+ parameters.remove(KEY_TEXT2);
+ }
+ }
+
+ /**
+ * Gets a text for navigation text field 2
+ *
+ * @return String -a String value representing a text for navigation text field 2
+ */
+ public String getNavigationText2(){
+ return (String) parameters.get(KEY_TEXT2);
+ }
+
+ /**
+ * Sets a text field for estimated time of arrival
+ *
+ * @param eta
+ * a String value representing a text field for estimated time of arrival
+ * <p></p>
+ * <b>Notes: </b>Maxlength=500
+ */
+ public void setEta(String eta){
+ if(eta != null){
+ parameters.put(KEY_ETA, eta);
+ }
+ else{
+ parameters.remove(KEY_ETA);
+ }
+ }
+
+ /**
+ * Gets a text field for estimated time of arrival
+ *
+ * @return String -a String value representing a text field for estimated time of arrival
+ */
+ public String getEta(){
+ return (String) parameters.get(KEY_ETA);
+ }
+
+ /**
+ * Sets a text field for total distance
+ *
+ * @param totalDistance
+ * a String value representing a text field for total distance
+ * <p></p>
+ * <b>Notes: </b>Maxlength=500
+ */
+ public void setTotalDistance(String totalDistance){
+ if(totalDistance != null){
+ parameters.put(KEY_TOTAL_DISTANCE, totalDistance);
+ }
+ else{
+ parameters.remove(KEY_TOTAL_DISTANCE);
+ }
+ }
+
+ /**
+ * Gets a text field for total distance
+ *
+ * @return String -a String value representing a text field for total distance
+ */
+ public String getTotalDistance(){
+ return (String) parameters.get(KEY_TOTAL_DISTANCE);
+ }
+
+ /**
+ * Sets an Image for turnicon
+ *
+ * @param turnIcon
+ * an Image value
+ */
+ public void setTurnIcon(Image turnIcon){
+ if(turnIcon != null){
+ parameters.put(KEY_MANEUVER_IMAGE, turnIcon);
+ }
+ else{
+ parameters.remove(KEY_MANEUVER_IMAGE);
+ }
+ }
+
+ /**
+ * Gets an Image for turnicon
+ *
+ * @return Image -an Image value representing an Image for turnicon
+ */
+ @SuppressWarnings("unchecked")
+ public Image getTurnIcon(){
+ Object obj = parameters.get(KEY_MANEUVER_IMAGE);
+ if (obj instanceof Image) {
+ return (Image) obj;
+ } else if (obj instanceof Hashtable) {
+ return new Image((Hashtable<String, Object>) obj);
+ }
+ return null;
+ }
+
+ /**
+ * Sets an Image for nextTurnIcon
+ *
+ * @param nextTurnIcon
+ * an Image value
+ */
+ public void setNextTurnIcon(Image nextTurnIcon){
+ if(nextTurnIcon != null){
+ parameters.put(KEY_NEXT_MANEUVER_IMAGE, nextTurnIcon);
+ }
+ else{
+ parameters.remove(KEY_NEXT_MANEUVER_IMAGE);
+ }
+ }
+
+ /**
+ * Gets an Image for nextTurnIcon
+ *
+ * @return Image -an Image value representing an Image for nextTurnIcon
+ */
+ @SuppressWarnings("unchecked")
+ public Image getNextTurnIcon(){
+ Object obj = parameters.get(KEY_NEXT_MANEUVER_IMAGE);
+ if (obj instanceof Image) {
+ return (Image) obj;
+ } else if (obj instanceof Hashtable) {
+ return new Image((Hashtable<String, Object>) obj);
+ }
+ return null;
+ }
+
+ /**
+ * Sets a Fraction of distance till next maneuver
+ *
+ * @param distanceToManeuver
+ * a Double value representing a Fraction of distance till next maneuver
+ * <p></p>
+ * <b>Notes: </b>Minvalue=0; Maxvalue=1000000000
+ */
+ public void setDistanceToManeuver(Double distanceToManeuver){
+ if(distanceToManeuver != null){
+ parameters.put(KEY_MANEUVER_DISTANCE, distanceToManeuver);
+ }
+ else{
+ parameters.remove(KEY_MANEUVER_DISTANCE);
+ }
+ }
+
+ /**
+ * Gets a Fraction of distance till next maneuver
+ *
+ * @return Double -a Double value representing a Fraction of distance till next maneuver
+ */
+ public Double getDistanceToManeuver(){
+ return (Double) parameters.get(KEY_MANEUVER_DISTANCE);
+ }
+
+ /**
+ * Sets a Distance till next maneuver (starting from) from previous maneuver
+ *
+ * @param distanceToManeuverScale
+ * a Double value representing a Distance till next maneuver (starting from) from previous maneuver
+ * <p></p>
+ * <b>Notes: </b>Minvalue=0; Maxvalue=1000000000
+ */
+ public void setDistanceToManeuverScale(Double distanceToManeuverScale){
+ if(distanceToManeuverScale != null){
+ parameters.put(KEY_MANEUVER_DISTANCE_SCALE, distanceToManeuverScale);
+ }
+ else{
+ parameters.remove(KEY_MANEUVER_DISTANCE_SCALE);
+ }
+ }
+
+ /**
+ * Gets a Distance till next maneuver (starting from) from previous maneuver
+ *
+ * @return Double -a Double value representing a Distance till next maneuver (starting from) from previous maneuver
+ */
+ public Double getDistanceToManeuverScale(){
+ return (Double) parameters.get(KEY_MANEUVER_DISTANCE_SCALE);
+ }
+
+ /**
+ * <p>Sets a maneuver complete flag. If and when a maneuver has completed while an AlertManeuver is active, the app
+ * must send this value set to TRUE in order to clear the AlertManeuver overlay
+ * If omitted the value will be assumed as FALSE</p>
+ *
+ *
+ * @param maneuverComplete
+ * a Boolean value
+ */
+ public void setManeuverComplete(Boolean maneuverComplete){
+ if(maneuverComplete != null){
+ parameters.put(KEY_MANEUVER_COMPLETE, maneuverComplete);
+ }
+ else{
+ parameters.remove(KEY_MANEUVER_COMPLETE);
+ }
+ }
+
+ /**
+ * Gets a maneuver complete flag
+ *
+ * @return Boolean -a Boolean value
+ */
+ public Boolean getManeuverComplete(){
+ return (Boolean) parameters.get(KEY_MANEUVER_COMPLETE);
+ }
+
+ /**
+ * <p>Sets Three dynamic SoftButtons available (first SoftButton is fixed to "Turns"). If omitted on supported
+ * displays, the currently displayed SoftButton values will not change</p>
+ *
+ * <p><b>Notes: </b>Minsize=0; Maxsize=3</p>
+ *
+ * @param softButtons
+ * a List<SoftButton> value
+ */
+ public void setSoftButtons(List<SoftButton> softButtons){
+ if(softButtons != null){
+ parameters.put(KEY_SOFT_BUTTONS, softButtons);
+ }
+ else{
+ parameters.remove(KEY_SOFT_BUTTONS);
+ }
+ }
+
+ /**
+ * Gets Three dynamic SoftButtons available (first SoftButton is fixed to "Turns"). If omitted on supported
+ * displays, the currently displayed SoftButton values will not change
+ *
+ * @return Vector<SoftButton> -a Vector<SoftButton> value
+ */
+ @SuppressWarnings("unchecked")
+ public List<SoftButton> getSoftButtons(){
+ if (parameters.get(KEY_SOFT_BUTTONS) instanceof List<?>) {
+ List<?> list = (List<?>)parameters.get(KEY_SOFT_BUTTONS);
+ if (list != null && list.size() > 0) {
+ Object obj = list.get(0);
+ if (obj instanceof SoftButton) {
+ return (List<SoftButton>) list;
+ } else if (obj instanceof Hashtable) {
+ List<SoftButton> newList = new ArrayList<SoftButton>();
+ for (Object hashObj : list) {
+ newList.add(new SoftButton((Hashtable<String, Object>)hashObj));
+ }
+ return newList;
+ }
+ }
+ }
+ return null;
+ }
+
+ public void setTimeToDestination(String timeToDestination){
+ if(timeToDestination != null){
+ parameters.put(KEY_TIME_TO_DESTINATION, timeToDestination);
+ }
+ else{
+ parameters.remove(KEY_TIME_TO_DESTINATION);
+ }
+ }
+
+ public String getTimeToDestination(){
+ return (String) parameters.get(KEY_TIME_TO_DESTINATION);
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/ShowConstantTbtResponse.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/ShowConstantTbtResponse.java
new file mode 100644
index 000000000..a3e2dbaf1
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/ShowConstantTbtResponse.java
@@ -0,0 +1,23 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCResponse;
+
+/**
+ * Show Constant TBT Response is sent, when ShowConstantTBT has been called
+ *
+ * @since SmartDeviceLink 2.0
+ */
+public class ShowConstantTbtResponse extends RPCResponse{
+
+ public ShowConstantTbtResponse() {
+ super(FunctionID.SHOW_CONSTANT_TBT.toString());
+ }
+
+ public ShowConstantTbtResponse(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/ShowResponse.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/ShowResponse.java
new file mode 100644
index 000000000..54ff95033
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/ShowResponse.java
@@ -0,0 +1,33 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCResponse;
+
+/**
+ * Show Response is sent, when Show has been called
+ *
+ * @since SmartDeviceLink 1.0
+ */
+public class ShowResponse extends RPCResponse {
+
+ /**
+ * Constructs a new ShowResponse object
+ */
+ public ShowResponse() {
+ super(FunctionID.SHOW.toString());
+ }
+
+ /**
+ * Constructs a new ShowResponse object indicated by the Hashtable
+ * parameter
+ * <p></p>
+ *
+ * @param hash
+ * The Hashtable to use
+ */
+ public ShowResponse(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+} \ No newline at end of file
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SingleTireStatus.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SingleTireStatus.java
new file mode 100644
index 000000000..ab30ff365
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SingleTireStatus.java
@@ -0,0 +1,70 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+
+import com.smartdevicelink.proxy.RPCStruct;
+import com.smartdevicelink.proxy.rpc.enums.ComponentVolumeStatus;
+
+/**
+ * Tire pressure status of a single tire.
+ * <p><b>Parameter List</b></p>
+ * <table border="1" rules="all">
+ * <tr>
+ * <th>Name</th>
+ * <th>Type</th>
+ * <th>Description</th>
+ * <th>SmartDeviceLink Ver. Available</th>
+ * </tr>
+ * <tr>
+ * <td>status</td>
+ * <td>ComponentVolumeStatus</td>
+ * <td>Describes the volume status of a single tire
+ * See {@linkplain ComponentVolumeStatus}
+ * </td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * </table>
+ * @since SmartDeviceLink 2.0
+ */
+public class SingleTireStatus extends RPCStruct {
+ public static final String KEY_STATUS = "status";
+
+ /**
+ * Constructs a newly allocated SingleTireStatus object
+ */
+ public SingleTireStatus() { }
+
+ /**
+ * Constructs a newly allocated SingleTireStatus object indicated by the Hashtable parameter
+ * @param hash The Hashtable to use
+ */
+ public SingleTireStatus(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+
+ /**
+ * set the volume status of a single tire
+ * @param status the volume status of a single tire
+ */
+ public void setStatus(ComponentVolumeStatus status) {
+ if (status != null) {
+ store.put(KEY_STATUS, status);
+ } else {
+ store.remove(KEY_STATUS);
+ }
+ }
+
+ /**
+ * get the volume status of a single tire
+ * @return the volume status of a single tire
+ */
+ public ComponentVolumeStatus getStatus() {
+ Object obj = store.get(KEY_STATUS);
+ if (obj instanceof ComponentVolumeStatus) {
+ return (ComponentVolumeStatus) obj;
+ } else if (obj instanceof String) {
+ return ComponentVolumeStatus.valueForString((String) obj);
+ }
+ return null;
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/Slider.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/Slider.java
new file mode 100644
index 000000000..16da80dcb
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/Slider.java
@@ -0,0 +1,249 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+import java.util.List;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCRequest;
+
+/**
+ * <p>Creates a full screen or pop-up overlay (depending on platform) with a single
+ * user controlled slider.</p>
+ *
+ * <p>Function Group: Base</p>
+ *
+ * <p><b>HMILevel needs to be FULL</b></p>
+ *
+ * <p><b>Parameter List</b></p>
+ * <table border="1" rules="all">
+ * <tr>
+ * <th>Param Name</th>
+ * <th>Type</th>
+ * <th>Description</th>
+ * <th> Req.</th>
+ * <th>Notes</th>
+ * <th>Version Available</th>
+ * </tr>
+ * <tr>
+ * <td>numTicks</td>
+ * <td>Integer</td>
+ * <td>Number of selectable items on a horizontal axis.</td>
+ * <td>Y</td>
+ * <td>Minvalue=2; Maxvalue=26</td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ *
+ * <tr>
+ * <td>position</td>
+ * <td>Integer</td>
+ * <td>Initial position of slider control (cannot exceed numTicks),</td>
+ * <td>Y</td>
+ * <td>Minvalue=1; Maxvalue=26</td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>sliderHeader</td>
+ * <td>String</td>
+ * <td>Text header to display</td>
+ * <td>N</td>
+ * <td>Maxlength=500</td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>sliderFooter</td>
+ * <td>Integer</td>
+ * <td><p>Text footer to display (meant to display min/max threshold descriptors).</p>For a static text footer, only one footer string shall be provided in the array. For a dynamic text footer, the number of footer text string in the array must match the numTicks value.For a dynamic text footer, text array string should correlate with potential slider position index.If omitted on supported displays, no footer text shall be displayed.</td>
+ * <td>N</td>
+ * <td>Maxlength=500; Minvalue=1; Maxvalue=26</td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ *
+ * <tr>
+ * <td>timeout</td>
+ * <td>String</td>
+ * <td>App defined timeout. Indicates how long of a timeout from the last action (i.e. sliding control resets timeout). If omitted, the value is set to 10000.</td>
+ * <td>N</td>
+ * <td>Minvalue=0; Maxvalue=65535; Defvalue= 10000</td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * </table>
+*<p><b>Response </b></p>
+*
+*<p><b>Non-default Result Codes:</b></p>
+* <p> SAVED </p>
+* <p> INVALID_DATA</p>
+* <p>OUT_OF_MEMORY</p>
+* <p>TOO_MANY_PENDING_REQUESTS</p>
+* <p>APPLICATION_NOT_REGISTERED</p>
+* <p>GENERIC_ERROR</p>
+*<p> DISALLOWED</p>
+*<p> UNSUPPORTED_RESOURCE </p>
+*<p> REJECTED </p>
+* <p>ABORTED </p>
+*
+ * @since SmartDeviceLink 2.0
+ *
+ */
+public class Slider extends RPCRequest {
+
+ public static final String KEY_NUM_TICKS = "numTicks";
+ public static final String KEY_SLIDER_HEADER = "sliderHeader";
+ public static final String KEY_SLIDER_FOOTER = "sliderFooter";
+ public static final String KEY_POSITION = "position";
+ public static final String KEY_TIMEOUT = "timeout";
+ /**
+ * Constructs a new Slider object
+ */
+ public Slider() {
+ super(FunctionID.SLIDER.toString());
+ }
+
+ /**
+ * Constructs a new Slider object indicated by the Hashtable parameter
+ * <p></p>
+ *
+ * @param hash
+ * The Hashtable to use
+ */
+ public Slider(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+
+ /**
+ * Sets a number of selectable items on a horizontal axis
+ *
+ * @param numTicks
+ * an Integer value representing a number of selectable items on
+ * a horizontal axis
+ * <p></p>
+ * <b>Notes: </b>Minvalue=2; Maxvalue=26
+ */
+ public void setNumTicks(Integer numTicks) {
+ if (numTicks != null) {
+ parameters.put(KEY_NUM_TICKS, numTicks);
+ } else {
+ parameters.remove(KEY_NUM_TICKS);
+ }
+ }
+
+ /**
+ * Gets a number of selectable items on a horizontal axis
+ *
+ * @return Integer -an Integer value representing a number of selectable
+ * items on a horizontal axis
+ */
+ public Integer getNumTicks() {
+ return (Integer) parameters.get(KEY_NUM_TICKS);
+ }
+
+ /**
+ * Sets an Initial position of slider control
+ *
+ * @param position
+ * an Integer value representing an Initial position of slider
+ * control
+ * <p></p>
+ * <b>Notes: </b>Minvalue=1; Maxvalue=26
+ */
+ public void setPosition(Integer position) {
+ if (position != null) {
+ parameters.put(KEY_POSITION, position);
+ } else {
+ parameters.remove(KEY_POSITION);
+ }
+ }
+
+ /**
+ * Gets an Initial position of slider control
+ *
+ * @return Integer -an Integer value representing an Initial position of
+ * slider control
+ */
+ public Integer getPosition() {
+ return (Integer) parameters.get(KEY_POSITION);
+ }
+
+ /**
+ * Sets a text header to display
+ *
+ * @param sliderHeader
+ * a String value
+ * <p></p>
+ * <b>Notes: </b>Maxlength=500
+ */
+ public void setSliderHeader(String sliderHeader) {
+ if (sliderHeader != null) {
+ parameters.put(KEY_SLIDER_HEADER, sliderHeader);
+ } else {
+ parameters.remove(KEY_SLIDER_HEADER);
+ }
+ }
+
+ /**
+ * Gets a text header to display
+ *
+ * @return String -a String value representing a text header to display
+ */
+ public String getSliderHeader() {
+ return (String) parameters.get(KEY_SLIDER_HEADER);
+ }
+
+ /**
+ * Sets a text footer to display
+ *
+ * @param sliderFooter
+ * a List<String> value representing a text footer to display
+ * <p></p>
+ * <b>Notes: </b>Maxlength=500; Minvalue=1; Maxvalue=26
+ */
+ public void setSliderFooter(List<String> sliderFooter) {
+ if (sliderFooter != null) {
+ parameters.put(KEY_SLIDER_FOOTER, sliderFooter);
+ } else {
+ parameters.remove(KEY_SLIDER_FOOTER);
+ }
+ }
+
+ /**
+ * Gets a text footer to display
+ *
+ * @return String -a String value representing a text footer to display
+ */
+ @SuppressWarnings("unchecked")
+ public List<String> getSliderFooter() {
+ if (parameters.get(KEY_SLIDER_FOOTER) instanceof List<?>) {
+ List<?> list = (List<?>)parameters.get(KEY_SLIDER_FOOTER);
+ if (list != null && list.size()>0) {
+ Object obj = list.get(0);
+ if (obj instanceof String) {
+ return (List<String>) list;
+ }
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Sets an App defined timeout
+ *
+ * @param timeout
+ * an Integer value representing an App defined timeout
+ * <p></p>
+ * <b>Notes: </b>Minvalue=0; Maxvalue=65535; Defvalue=10000
+ */
+ public void setTimeout(Integer timeout) {
+ if (timeout != null) {
+ parameters.put(KEY_TIMEOUT, timeout);
+ } else {
+ parameters.remove(KEY_TIMEOUT);
+ }
+ }
+
+ /**
+ * Gets an App defined timeout
+ * @return Integer -an Integer value representing an App defined timeout
+ */
+ public Integer getTimeout() {
+ return (Integer) parameters.get(KEY_TIMEOUT);
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SliderResponse.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SliderResponse.java
new file mode 100644
index 000000000..0d8487d12
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SliderResponse.java
@@ -0,0 +1,52 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCResponse;
+
+/**
+ * Slider Response is sent, when Slider has been called
+ *
+ * @since SmartDeviceLink 2.0
+ */
+public class SliderResponse extends RPCResponse {
+ public static final String KEY_SLIDER_POSITION = "sliderPosition";
+
+ /**
+ * Constructs a new SliderResponse object
+ */
+ public SliderResponse() {
+ super(FunctionID.SLIDER.toString());
+ }
+
+ /**
+ * Constructs a new SliderResponse object indicated by the Hashtable
+ * parameter
+ * <p></p>
+ *
+ * @param hash
+ * The Hashtable to use
+ */
+ public SliderResponse(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+ /**
+ * Sets an Initial position of slider control
+ * @param sliderPosition
+ */
+ public void setSliderPosition(Integer sliderPosition) {
+ if (sliderPosition != null) {
+ parameters.put(KEY_SLIDER_POSITION, sliderPosition);
+ } else {
+ parameters.remove(KEY_SLIDER_POSITION);
+ }
+ }
+ /**
+ * Gets an Initial position of slider control
+ * @return Integer
+ */
+ public Integer getSliderPosition() {
+ return (Integer) parameters.get(KEY_SLIDER_POSITION);
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SoftButton.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SoftButton.java
new file mode 100644
index 000000000..e010a08da
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SoftButton.java
@@ -0,0 +1,180 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+
+import com.smartdevicelink.proxy.RPCStruct;
+import com.smartdevicelink.proxy.rpc.enums.SoftButtonType;
+import com.smartdevicelink.proxy.rpc.enums.SystemAction;
+import com.smartdevicelink.util.DebugTool;
+/**
+ * <p> A simulated button or keyboard key that is displayed on a touch screen.</p>
+ *
+ * <p><b>Parameter List</b></p>
+ * <table border="1" rules="all">
+ * <tr>
+ * <th>Name</th>
+ * <th>Type</th>
+ * <th>Description</th>
+ * <th>Reg.</th>
+ * <th>Notes</th>
+ * <th>Version</th>
+ * </tr>
+ * <tr>
+ * <td>type</td>
+ * <td>SoftButtonType</td>
+ * <td>Describes, whether it is text, highlighted text, icon, or dynamic image. </td>
+ * <td></td>
+ * <td></td>
+ * <td>SmartDeviceLink 2.0 </td>
+ * </tr>
+ * <tr>
+ * <td>text</td>
+ * <td>String</td>
+ * <td>Optional text to display (if defined as TEXT or BOTH)</td>
+ * <td>N</td>
+ * <td>Min: 0; Maxlength: 500</td>
+ * <td>SmartDeviceLink 2.0 </td>
+ * </tr>
+ * <tr>
+ * <td>image</td>
+ * <td>Image</td>
+ * <td>Optional image struct for SoftButton (if defined as IMAGE or BOTH).</td>
+ * <td></td>
+ * <td></td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>isHighlighted</td>
+ * <td>Boolean</td>
+ * <td>True, if highlighted False, if not highlighted</td>
+ * <td>N</td>
+ * <td></td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>softButtonID</td>
+ * <td>Integer</td>
+ * <td>Value which is returned via OnButtonPress / OnButtonEvent</td>
+ * <td></td>
+ * <td>Min: 0; Max: 65535</td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>systemAction</td>
+ * <td>SystemAction</td>
+ * <td>Parameter indicating whether selecting a SoftButton shall call a specific system action. This is intended to allow Notifications to bring the callee into full / focus; or in the case of persistent overlays, the overlay can persist when a SoftButton is pressed.</td>
+ * <td>N</td>
+ * <td>defvalue: DEFAULT_ACTION</td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ *
+ * </table>
+ *
+ */
+public class SoftButton extends RPCStruct {
+
+ public static final String KEY_IS_HIGHLIGHTED = "isHighlighted";
+ public static final String KEY_SOFT_BUTTON_ID = "softButtonID";
+ public static final String KEY_SYSTEM_ACTION = "systemAction";
+ public static final String KEY_TEXT = "text";
+ public static final String KEY_TYPE = "type";
+ public static final String KEY_IMAGE = "image";
+ /**
+ *
+ * <p>Constructs a new SoftButton object indicated by the Hashtable
+ * parameter</p>
+ *
+ *
+ * @param hash
+ *
+ * The Hashtable to use
+ */
+
+ public SoftButton() { }
+ public SoftButton(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+ public void setType(SoftButtonType type) {
+ if (type != null) {
+ store.put(KEY_TYPE, type);
+ } else {
+ store.remove(KEY_TYPE);
+ }
+ }
+ public SoftButtonType getType() {
+ Object obj = store.get(KEY_TYPE);
+ if (obj instanceof SoftButtonType) {
+ return (SoftButtonType) obj;
+ } else if (obj instanceof String) {
+ return SoftButtonType.valueForString((String) obj);
+ }
+ return null;
+ }
+ public void setText(String text) {
+ if (text != null) {
+ store.put(KEY_TEXT, text);
+ } else {
+ store.remove(KEY_TEXT);
+ }
+ }
+ public String getText() {
+ return (String) store.get(KEY_TEXT);
+ }
+ public void setImage(Image image) {
+ if (image != null) {
+ store.put(KEY_IMAGE, image);
+ } else {
+ store.remove(KEY_IMAGE);
+ }
+ }
+ @SuppressWarnings("unchecked")
+ public Image getImage() {
+ Object obj = store.get(KEY_IMAGE);
+ if (obj instanceof Image) {
+ return (Image) obj;
+ } else if (obj instanceof Hashtable) {
+ try {
+ return new Image((Hashtable<String, Object>) obj);
+ } catch (Exception e) {
+ DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_IMAGE, e);
+ }
+ }
+ return null;
+ }
+ public void setIsHighlighted(Boolean isHighlighted) {
+ if (isHighlighted != null) {
+ store.put(KEY_IS_HIGHLIGHTED, isHighlighted);
+ } else {
+ store.remove(KEY_IS_HIGHLIGHTED);
+ }
+ }
+ public Boolean getIsHighlighted() {
+ return (Boolean) store.get(KEY_IS_HIGHLIGHTED);
+ }
+ public void setSoftButtonID(Integer softButtonID) {
+ if (softButtonID != null) {
+ store.put(KEY_SOFT_BUTTON_ID, softButtonID);
+ } else {
+ store.remove(KEY_SOFT_BUTTON_ID);
+ }
+ }
+ public Integer getSoftButtonID() {
+ return (Integer) store.get(KEY_SOFT_BUTTON_ID);
+ }
+ public void setSystemAction(SystemAction systemAction) {
+ if (systemAction != null) {
+ store.put(KEY_SYSTEM_ACTION, systemAction);
+ } else {
+ store.remove(KEY_SYSTEM_ACTION);
+ }
+ }
+ public SystemAction getSystemAction() {
+ Object obj = store.get(KEY_SYSTEM_ACTION);
+ if (obj instanceof SystemAction) {
+ return (SystemAction) obj;
+ } else if (obj instanceof String) {
+ return SystemAction.valueForString((String) obj);
+ }
+ return null;
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SoftButtonCapabilities.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SoftButtonCapabilities.java
new file mode 100644
index 000000000..e2849086c
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SoftButtonCapabilities.java
@@ -0,0 +1,149 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+
+import com.smartdevicelink.proxy.RPCStruct;
+
+/**
+ * <p>Contains information about a SoftButton's capabilities.</p>
+ * <p><b>Parameter List</b></p>
+ * <table border="1" rules="all">
+ * <tr>
+ * <th>Name</th>
+ * <th>Type</th>
+ * <th>Description</th>
+ * <th>SmartDeviceLink Ver. Available</th>
+ * </tr>
+ * <tr>
+ * <td>shortPressAvailable</td>
+ * <td>Boolean</td>
+ * <td>The button supports a short press.
+ * Whenever the button is pressed short, onButtonPressed( SHORT) will be invoked.
+ * </td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>longPressAvailable</td>
+ * <td>Boolean</td>
+ * <td>The button supports a LONG press.
+ * Whenever the button is pressed long, onButtonPressed( LONG) will be invoked.
+ * </td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>upDownAvailable</td>
+ * <td>Boolean</td>
+ * <td>The button supports "button down" and "button up". Whenever the button is pressed, onButtonEvent( DOWN) will be invoked.
+ * Whenever the button is released, onButtonEvent( UP) will be invoked. *
+ * </td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>imageSupported</td>
+ * <td>Boolean</td>
+ * <td>The button supports referencing a static or dynamic image.
+ * </td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * </table>
+ * @since SmartDeviceLink 2.0
+ */
+public class SoftButtonCapabilities extends RPCStruct {
+ public static final String KEY_IMAGE_SUPPORTED = "imageSupported";
+ public static final String KEY_SHORT_PRESS_AVAILABLE = "shortPressAvailable";
+ public static final String KEY_LONG_PRESS_AVAILABLE = "longPressAvailable";
+ public static final String KEY_UP_DOWN_AVAILABLE = "upDownAvailable";
+
+ /**
+ * Constructs a newly allocated SoftButtonCapabilities object
+ */
+ public SoftButtonCapabilities() { }
+
+ /**
+ * Constructs a newly allocated SoftButtonCapabilities object indicated by the Hashtable parameter
+ * @param hash The Hashtable to use
+ */
+ public SoftButtonCapabilities(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+
+ /**
+ * set the button supports a short press.
+ * @param shortPressAvailable whether the button supports a short press.
+ */
+ public void setShortPressAvailable(Boolean shortPressAvailable) {
+ if (shortPressAvailable != null) {
+ store.put(KEY_SHORT_PRESS_AVAILABLE, shortPressAvailable);
+ } else {
+ store.remove(KEY_SHORT_PRESS_AVAILABLE);
+ }
+ }
+
+ /**
+ * get whether the button supports a short press.
+ * @return whether the button supports a short press
+ */
+ public Boolean getShortPressAvailable() {
+ return (Boolean) store.get( KEY_SHORT_PRESS_AVAILABLE);
+ }
+
+ /**
+ * set the button supports a LONG press.
+ * @param longPressAvailable whether the button supports a long press
+ */
+ public void setLongPressAvailable(Boolean longPressAvailable) {
+ if (longPressAvailable != null) {
+ store.put(KEY_LONG_PRESS_AVAILABLE, longPressAvailable);
+ } else {
+ store.remove(KEY_LONG_PRESS_AVAILABLE);
+ }
+ }
+
+ /**
+ * get whether the button supports a LONG press.
+ * @return whether the button supports a LONG press
+ */
+ public Boolean getLongPressAvailable() {
+ return (Boolean) store.get( KEY_LONG_PRESS_AVAILABLE);
+ }
+
+ /**
+ * set the button supports "button down" and "button up".
+ * @param upDownAvailable the button supports "button down" and "button up".
+ */
+ public void setUpDownAvailable(Boolean upDownAvailable) {
+ if (upDownAvailable != null) {
+ store.put(KEY_UP_DOWN_AVAILABLE, upDownAvailable);
+ } else {
+ store.remove(KEY_UP_DOWN_AVAILABLE);
+ }
+ }
+
+ /**
+ * get the button supports "button down" and "button up".
+ * @return the button supports "button down" and "button up".
+ */
+ public Boolean getUpDownAvailable() {
+ return (Boolean) store.get( KEY_UP_DOWN_AVAILABLE);
+ }
+
+ /**
+ * set the button supports referencing a static or dynamic image.
+ * @param imageSupported whether the button supports referencing a static or dynamic image.
+ */
+ public void setImageSupported(Boolean imageSupported) {
+ if (imageSupported != null) {
+ store.put(KEY_IMAGE_SUPPORTED, imageSupported);
+ } else {
+ store.remove(KEY_IMAGE_SUPPORTED);
+ }
+ }
+
+ /**
+ * get the button supports referencing a static or dynamic image.
+ * @return the button supports referencing a static or dynamic image.
+ */
+ public Boolean getImageSupported() {
+ return (Boolean) store.get( KEY_IMAGE_SUPPORTED);
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/Speak.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/Speak.java
new file mode 100644
index 000000000..b5e775f06
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/Speak.java
@@ -0,0 +1,178 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.ArrayList;
+import java.util.Hashtable;
+import java.util.List;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCRequest;
+
+/**
+ * Speaks a phrase over the vehicle audio system using SDL's TTS
+ * (text-to-speech) engine. The provided text to be spoken can be simply a text
+ * phrase, or it can consist of phoneme specifications to direct SDL's TTS
+ * engine to speak a "speech-sculpted" phrase
+ * <p></p>
+ * Receipt of the Response indicates the completion of the Speak operation,
+ * regardless of how the Speak operation may have completed (i.e. successfully,
+ * interrupted, terminated, etc.)
+ * <p></p>
+ * Requesting a new Speak operation while the application has another Speak
+ * operation already in progress (i.e. no corresponding Response for that
+ * in-progress Speak operation has been received yet) will terminate the
+ * in-progress Speak operation (causing its corresponding Response to be sent by
+ * SDL) and begin the requested Speak operation
+ * <p></p>
+ * Requesting a new Speak operation while the application has an <i>
+ * {@linkplain Alert}</i> operation already in progress (i.e. no corresponding
+ * Response for that in-progress <i>{@linkplain Alert}</i> operation has been
+ * received yet) will result in the Speak operation request being rejected
+ * (indicated in the Response to the Request)
+ * <p></p>
+ * Requesting a new <i>{@linkplain Alert}</i> operation while the application
+ * has a Speak operation already in progress (i.e. no corresponding Response for
+ * that in-progress Speak operation has been received yet) will terminate the
+ * in-progress Speak operation (causing its corresponding Response to be sent by
+ * SDL) and begin the requested <i>{@linkplain Alert}</i> operation
+ * <p></p>
+ * Requesting a new Speak operation while the application has a <i>
+ * {@linkplain PerformInteraction}</i> operation already in progress (i.e. no
+ * corresponding Response for that in-progress <i>
+ * {@linkplain PerformInteraction}</i> operation has been received yet) will
+ * result in the Speak operation request being rejected (indicated in the
+ * Response to the Request)
+ * <p></p>
+ * Requesting a <i> {@linkplain PerformInteraction}</i> operation while the
+ * application has a Speak operation already in progress (i.e. no corresponding
+ * Response for that in-progress Speak operation has been received yet) will
+ * terminate the in-progress Speak operation (causing its corresponding Response
+ * to be sent by SDL) and begin the requested <i>
+ * {@linkplain PerformInteraction}</i> operation
+ * <p></p>
+ *
+ * <p><b>HMI Status Requirements:</b></p>
+ * <p>HMILevel: FULL, Limited</p>
+ *<p> AudioStreamingState: Any</p>
+ * <p>SystemContext: MAIN, MENU, VR</p>
+ *
+ * <p><b>Notes: </b></p>
+ * <ul>
+ * <li>When <i>{@linkplain Alert}</i> is issued with MENU in effect, <i>
+ * {@linkplain Alert}</i> is queued and "played" when MENU interaction is
+ * completed (i.e. SystemContext reverts to MAIN). When <i>{@linkplain Alert}
+ * </i> is issued with VR in effect, <i>{@linkplain Alert}</i> is queued and
+ * "played" when VR interaction is completed (i.e. SystemContext reverts to
+ * MAIN)</li>
+ * <li>When both <i>{@linkplain Alert}</i> and Speak are queued during MENU or
+ * VR, they are "played" back in the order in which they were queued, with all
+ * existing rules for "collisions" still in effect</li>
+ * </ul>
+ *
+ *
+ * <p><b>Parameter List</b></p>
+ * <table border="1" rules="all">
+ * <tr>
+ * <th>Name</th>
+ * <th>Type</th>
+ * <th>Description</th>
+ * <th>Reg.</th>
+ * <th>Notes</th>
+ * <th> Ver. Available</th>
+ * </tr>
+ * <tr>
+ * <td>ttsChunks</td>
+ * <td>String</td>
+ * <td>An array of 1-100 TTSChunk structs which, taken together, specify the phrase to be spoken.</td>
+ * <td>Y</td>
+ * <td><p>The array must have 1-100 elements. </p><p>The total length of the phrase composed from the ttsChunks provided must be less than 500 characters or the request will be rejected. </p>Each chunk can be no more than 500 characters.</td>
+ * <td>SmartDeviceLink 1.0</td>
+ * </tr>
+ * </table>
+ * <p><b>Response</b> </p>
+ * <p>This Response notifies the application of the completion, interruption, or failure of a Speak Request.</p>
+ *
+ * <p><b>Non-default Result Codes:</b> </p>
+ *
+ * <p> SUCCESS </p>
+ *<p> INVALID_DATA</p>
+ * <p> OUT_OF_MEMORY </p>
+ * <p>APPLICATION_NOT_REGISTERED </p>
+ * <p>TOO_MANY_PENDING_REQUESTS </p>
+ *<p> GENERIC_ERROR </p>
+ * <p>REJECTED </p>
+ * <p>DISALLOWED </p>
+ * <p>ABORTED </p>
+ *
+ * <p><b>Additional Notes:</b></p><ul>Total character limit depends on platform. Chunks are limited to 500 characters; however you can have multiple TTS chunks. On Gen 1.1 there is a total character limit of 500 characters across all chunks. This could vary according to the VCA.
+ *
+ * @since SmartDeviceLink 1.0
+ * @see Alert
+ */
+public class Speak extends RPCRequest {
+ public static final String KEY_TTS_CHUNKS = "ttsChunks";
+
+ /**
+ * Constructs a new Speak object
+ */
+ public Speak() {
+ super(FunctionID.SPEAK.toString());
+ }
+ /**
+ * Constructs a new Speak object indicated by the Hashtable parameter
+ * <p></p>
+ *
+ * @param hash
+ * The Hashtable to use
+ */
+ public Speak(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+ /**
+ * Gets a List<TTSChunk> representing an array of 1-100 TTSChunk structs
+ * which, taken together, specify the phrase to be spoken
+ *
+ * @return List<TTSChunk> -an Array of 1-100 TTSChunk specify the phrase to be spoken
+ */
+ @SuppressWarnings("unchecked")
+ public List<TTSChunk> getTtsChunks() {
+ if (parameters.get(KEY_TTS_CHUNKS) instanceof List<?>) {
+ List<?> list = (List<?>)parameters.get(KEY_TTS_CHUNKS);
+ if (list != null && list.size() > 0) {
+ Object obj = list.get(0);
+ if (obj instanceof TTSChunk) {
+ return (List<TTSChunk>) list;
+ } else if (obj instanceof Hashtable) {
+ List<TTSChunk> newList = new ArrayList<TTSChunk>();
+ for (Object hashObj : list) {
+ newList.add(new TTSChunk((Hashtable<String, Object>)hashObj));
+ }
+ return newList;
+ }
+ }
+ }
+ return null;
+ }
+ /**
+ * Sets a List<TTSChunk> representing an array of 1-100 TTSChunk structs
+ * which, taken together, specify the phrase to be spoken
+ *
+ * @param ttsChunks
+ * a List<TTSChunk> value representing an array of 1-100 TTSChunk structs
+ * which specify the phrase to be spoken
+ * <p></p>
+ * <ul>
+ * <li>The array must have 1-100 elements</li>
+ * <li>The total length of the phrase composed from the ttsChunks
+ * provided must be less than 500 characters or the request will
+ * be rejected</li>
+ * <li>Each chunk can be no more than 500 characters</li>
+ * </ul>
+ */
+ public void setTtsChunks( List<TTSChunk> ttsChunks ) {
+ if (ttsChunks != null) {
+ parameters.put(KEY_TTS_CHUNKS, ttsChunks );
+ } else {
+ parameters.remove(KEY_TTS_CHUNKS);
+ }
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SpeakResponse.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SpeakResponse.java
new file mode 100644
index 000000000..740d24776
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SpeakResponse.java
@@ -0,0 +1,33 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCResponse;
+
+/**
+ * Speak Response is sent, when Speak has been called
+ *
+ * @since SmartDeviceLink 1.0
+ */
+public class SpeakResponse extends RPCResponse {
+
+ /**
+ * Constructs a new SpeakResponse object
+ */
+ public SpeakResponse() {
+ super(FunctionID.SPEAK.toString());
+ }
+
+ /**
+ * Constructs a new SpeakResponse object indicated by the Hashtable
+ * parameter
+ * <p></p>
+ *
+ * @param hash
+ * The Hashtable to use
+ */
+ public SpeakResponse(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+} \ No newline at end of file
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/StartTime.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/StartTime.java
new file mode 100644
index 000000000..bce0b9fc1
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/StartTime.java
@@ -0,0 +1,112 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+
+import com.smartdevicelink.proxy.RPCStruct;
+
+/**
+ * Describes the hour, minute and second values used to set the media clock.
+ * <p><b> Parameter List</b></p>
+ * <table border="1" rules="all">
+ * <tr>
+ * <th>Name</th>
+ * <th>Type</th>
+ * <th>Description</th>
+ * <th>SmartDeviceLink Ver. Available</th>
+ * </tr>
+ * <tr>
+ * <td>hours</td>
+ * <td>Integer</td>
+ * <td>The hour. Minvalue="0", maxvalue="59"
+ * <p><b>Note:</b></p>Some display types only support a max value of 19. If out of range, it will be rejected.
+ * </td>
+ * <td>SmartDeviceLink 1.0</td>
+ * </tr>
+ * <tr>
+ * <td>minutes</td>
+ * <td>Integer</td>
+ * <td>The minute. Minvalue="0", maxvalue="59".</td>
+ * <td>SmartDeviceLink 1.0</td>
+ * </tr>
+ * <tr>
+ * <td>seconds</td>
+ * <td>Integer</td>
+ * <td>The second. Minvalue="0", maxvalue="59".</td>
+ * <td>SmartDeviceLink 1.0</td>
+ * </tr>
+ * </table>
+ * @since SmartDeviceLink 1.0
+ */
+public class StartTime extends RPCStruct {
+ public static final String KEY_MINUTES = "minutes";
+ public static final String KEY_SECONDS = "seconds";
+ public static final String KEY_HOURS = "hours";
+
+ /**
+ * Constructs a newly allocated StartTime object
+ */
+ public StartTime() { }
+ /**
+ * Constructs a newly allocated StartTime object indicated by the Hashtable parameter
+ * @param hash The Hashtable to use
+ */
+ public StartTime(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+ /**
+ * Get the hour. Minvalue="0", maxvalue="59"
+ * <p><b>Note:</b></p>Some display types only support a max value of 19. If out of range, it will be rejected.
+ * @return hours Minvalue="0", maxvalue="59"
+ */
+ public Integer getHours() {
+ return (Integer) store.get( KEY_HOURS );
+ }
+ /**
+ * Set the hour. Minvalue="0", maxvalue="59"
+ * <p><b>Note:</b></p>Some display types only support a max value of 19. If out of range, it will be rejected.
+ * @param hours min: 0; max: 59
+ */
+ public void setHours( Integer hours ) {
+ if (hours != null) {
+ store.put(KEY_HOURS, hours );
+ } else {
+ store.remove(KEY_HOURS);
+ }
+ }
+ /**
+ * Get the minute. Minvalue="0", maxvalue="59".
+ * @return minutes Minvalue="0", maxvalue="59"
+ */
+ public Integer getMinutes() {
+ return (Integer) store.get( KEY_MINUTES );
+ }
+ /**
+ * Set the minute. Minvalue="0", maxvalue="59".
+ * @param minutes min: 0; max: 59
+ */
+ public void setMinutes( Integer minutes ) {
+ if (minutes != null) {
+ store.put(KEY_MINUTES, minutes );
+ } else {
+ store.remove(KEY_MINUTES);
+ }
+ }
+ /**
+ * Get the second. Minvalue="0", maxvalue="59".
+ * @return seconds. Minvalue="0", maxvalue="59".
+ */
+ public Integer getSeconds() {
+ return (Integer) store.get( KEY_SECONDS );
+ }
+ /**
+ * Set the second. Minvalue="0", maxvalue="59".
+ * @param seconds min: 0 max: 59
+ */
+ public void setSeconds( Integer seconds ) {
+ if (seconds != null) {
+ store.put(KEY_SECONDS, seconds );
+ } else {
+ store.remove(KEY_SECONDS);
+ }
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/StreamRPCResponse.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/StreamRPCResponse.java
new file mode 100644
index 000000000..bd75bef6d
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/StreamRPCResponse.java
@@ -0,0 +1,41 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCResponse;
+
+public class StreamRPCResponse extends RPCResponse {
+ public static final String KEY_FILENAME = "fileName";
+ public static final String KEY_FILESIZE = "fileSize";
+
+ public StreamRPCResponse() {
+ super(FunctionID.STREAM_RPC.toString());
+ }
+ public StreamRPCResponse(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+
+ public void setFileName(String fileName) {
+ if (fileName != null) {
+ parameters.put(KEY_FILENAME, fileName);
+ } else {
+ parameters.remove(KEY_FILENAME);
+ }
+ }
+ public String getFileName() {
+ return (String) parameters.get(KEY_FILENAME);
+ }
+
+ public void setFileSize(Long fileSize) {
+ if (fileSize != null) {
+ parameters.put(KEY_FILESIZE, fileSize);
+ } else {
+ parameters.remove(KEY_FILESIZE);
+ }
+ }
+ public Long getFileSize() {
+ return (Long) parameters.get(KEY_FILESIZE);
+ }
+
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SubscribeButton.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SubscribeButton.java
new file mode 100644
index 000000000..7f1f92bae
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SubscribeButton.java
@@ -0,0 +1,120 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCRequest;
+import com.smartdevicelink.proxy.rpc.enums.ButtonName;
+/**
+ *<p> Establishes a subscription to button notifications for HMI buttons. Buttons
+ * are not necessarily physical buttons, but can also be "soft" buttons on a
+ * touch screen, depending on the display in the vehicle. Once subscribed to a
+ * particular button, an application will receive both
+ * {@linkplain OnButtonEvent} and {@linkplain OnButtonPress} notifications
+ * whenever that button is pressed. The application may also unsubscribe from
+ * notifications for a button by invoking the {@linkplain UnsubscribeButton}
+ * operation</p>
+ *
+ * <p>When a button is depressed, an {@linkplain OnButtonEvent} notification is
+ * sent to the application with a ButtonEventMode of BUTTONDOWN. When that same
+ * button is released, an {@linkplain OnButtonEvent} notification is sent to the
+ * application with a ButtonEventMode of BUTTONUP</p>
+ *
+ * <p>When the duration of a button depression (that is, time between depression
+ * and release) is less than two seconds, an {@linkplain OnButtonPress}
+ * notification is sent to the application (at the moment the button is
+ * released) with a ButtonPressMode of SHORT. When the duration is two or more
+ * seconds, an {@linkplain OnButtonPress} notification is sent to the
+ * application (at the moment the two seconds have elapsed) with a
+ * ButtonPressMode of LONG</p>
+ *
+ * The purpose of {@linkplain OnButtonPress} notifications is to allow for
+ * programmatic detection of long button presses similar to those used to store
+ * presets while listening to the radio, for example
+ *
+ * <p>When a button is depressed and released, the sequence in which notifications
+ * will be sent to the application is as follows:</p>
+ *
+ * <p>For short presses:</p>
+ * <ul>
+ * <li>OnButtonEvent (ButtonEventMode = BUTTONDOWN)</li>
+ * <li>OnButtonEvent (ButtonEventMode = BUTTONUP)</li>
+ * <li>OnButtonPress (ButtonPressMode = SHORT)</li>
+ * </ul>
+ *
+ * <p>For long presses:</p>
+ * <ul>
+ * <li>OnButtonEvent (ButtonEventMode = BUTTONDOWN)</li>
+ * <li>OnButtonEvent (ButtonEventMode = BUTTONUP)</li>
+ * <li>OnButtonPress (ButtonPressMode = LONG)</li>
+ * </ul>
+ *
+ *<p> <b>HMILevel needs to be FULL, LIMITED or BACKGROUND</b></p>
+ *
+ * <p><b>Parameter List</b></p>
+ * <table border="1" rules="all">
+ * <tr>
+ * <th>Name</th>
+ * <th>Type</th>
+ * <th>Description</th>
+ * <th>Reg.</th>
+ * <th>Notes</th>
+ * <th>Version</th>
+ * </tr>
+ * <tr>
+ * <td>buttonName</td>
+ * <td>ButtonName</td>
+ * <td>Name of the button to subscribe.</td>
+ * <td>Y</td>
+ * <td></td>
+ * <td>SmartDeviceLink 1.0 </td>
+ * </tr>
+ * </table>
+ * @since SmartDeviceLink 1.0
+ * @see UnsubscribeButton
+ */
+public class SubscribeButton extends RPCRequest {
+ public static final String KEY_BUTTON_NAME = "buttonName";
+
+ /**
+ * Constructs a new SubscribeButton object
+ */
+ public SubscribeButton() {
+ super(FunctionID.SUBSCRIBE_BUTTON.toString());
+ }
+ /**
+ * <p>Constructs a new SubscribeButton object indicated by the Hashtable
+ * parameter</p>
+ *
+ *
+ * @param hash
+ * The Hashtable to use
+ */
+ public SubscribeButton(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+ /**
+ * Gets the name of the button to subscribe to
+ * @return ButtonName -an enum value, see <i>{@linkplain com.smartdevicelink.proxy.rpc.enums.ButtonName}</i>
+ */
+ public ButtonName getButtonName() {
+ Object obj = parameters.get(KEY_BUTTON_NAME);
+ if (obj instanceof ButtonName) {
+ return (ButtonName) obj;
+ } else if (obj instanceof String) {
+ return ButtonName.valueForString((String) obj);
+ }
+ return null;
+ }
+ /**
+ * Sets a name of the button to subscribe to
+ * @param buttonName a <i>{@linkplain com.smartdevicelink.proxy.rpc.enums.ButtonName}</i> value
+ */
+ public void setButtonName( ButtonName buttonName ) {
+ if (buttonName != null) {
+ parameters.put(KEY_BUTTON_NAME, buttonName );
+ } else {
+ parameters.remove(KEY_BUTTON_NAME);
+ }
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SubscribeButtonResponse.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SubscribeButtonResponse.java
new file mode 100644
index 000000000..81fca78c2
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SubscribeButtonResponse.java
@@ -0,0 +1,33 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCResponse;
+
+/**
+ * Sub scribeButton Response is sent, when SubscribeButton has been called
+ *
+ * @since SmartDeviceLink 1.0
+ */
+public class SubscribeButtonResponse extends RPCResponse {
+
+ /**
+ * Constructs a new SubscribeButtonResponse object
+ */
+ public SubscribeButtonResponse() {
+ super(FunctionID.SUBSCRIBE_BUTTON.toString());
+ }
+
+ /**
+ * <p>Constructs a new SubscribeButtonResponse object indicated by the Hashtable
+ * parameter</p>
+ *
+ *
+ * @param hash
+ * The Hashtable to use
+ */
+ public SubscribeButtonResponse(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+} \ No newline at end of file
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SubscribeVehicleData.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SubscribeVehicleData.java
new file mode 100644
index 000000000..6b934ef21
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SubscribeVehicleData.java
@@ -0,0 +1,817 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCRequest;
+
+/**
+ * Subscribes for specific published vehicle data items. The data will be only
+ * sent, if it has changed. The application will be notified by the
+ * onVehicleData notification whenever new data is available. The update rate is
+ * very much dependent on sensors, vehicle architecture and vehicle type. Be
+ * also prepared for the situation that a signal is not available on a vehicle
+ *
+ * <p>Function Group: Location, VehicleInfo and DrivingChara</p>
+ *
+ * <p><b>HMILevel needs to be FULL, LIMITED or BACKGROUND</b></p>
+ *
+ * <p><b>Parameter List</b></p>
+ * <table border="1" rules="all">
+ * <tr>
+ * <th>Name</th>
+ * <th>Type</th>
+ * <th>Description</th>
+ * <th>Reg.</th>
+ * <th>Notes</th>
+ * <th>SmartDeviceLink Version</th>
+ * </tr>
+ * <tr>
+ * <td>gps</td>
+ * <td>Boolean</td>
+ * <td>GPS data. See {@linkplain GPSData}for details</td>
+ * <td>N</td>
+ * <td>Subscribable</td>
+ * <td>SmartDeviceLink 2.0 </td>
+ * </tr>
+ * <tr>
+ * <td>speed</td>
+ * <td>Boolean</td>
+ * <td>The vehicle speed in kilometers per hour</td>
+ * <td>N</td>
+ * <td>Subscribable</td>
+ * <td>SmartDeviceLink 2.0 </td>
+ * </tr>
+ * <tr>
+ * <td>rpm</td>
+ * <td>Boolean</td>
+ * <td>The number of revolutions per minute of the engine</td>
+ * <td>N</td>
+ * <td>Subscribable</td>
+ * <td>SmartDeviceLink 2.0 </td>
+ * </tr>
+ * <tr>
+ * <td>fuelLevel</td>
+ * <td>Boolean</td>
+ * <td>The fuel level in the tank (percentage)</td>
+ * <td>N</td>
+ * <td>Subscribable</td>
+ * <td>SmartDeviceLink 2.0 </td>
+ * </tr>
+ * <tr>
+ * <td>fuelLevel_State</td>
+ * <td>Boolean</td>
+ * <td>The fuel level state</td>
+ * <td>N</td>
+ * <td>Subscribable</td>
+ * <td>SmartDeviceLink 2.0 </td>
+ * </tr>
+ * <tr>
+ * <td>instantFuelConsumption</td>
+ * <td>Boolean</td>
+ * <td>The instantaneous fuel consumption in microlitres</td>
+ * <td>N</td>
+ * <td>Subscribable</td>
+ * <td>SmartDeviceLink 2.0 </td>
+ * </tr>
+ * <tr>
+ * <td>externalTemperature</td>
+ * <td>Boolean</td>
+ * <td>The external temperature in degrees celsius</td>
+ * <td>N</td>
+ * <td>Subscribable</td>
+ * <td>SmartDeviceLink 2.0 </td>
+ * </tr>
+ * <tr>
+ * <td>prndl</td>
+ * <td>Boolean</td>
+ * <td>Currently selected gear.</td>
+ * <td>N</td>
+ * <td>Subscribable</td>
+ * <td>SmartDeviceLink 2.0 </td>
+ * </tr>
+ * <tr>
+ * <td>tirePressure</td>
+ * <td>Boolean</td>
+ * <td>Tire pressure status</td>
+ * <td>N</td>
+ * <td>Subscribable</td>
+ * <td>SmartDeviceLink 2.0 </td>
+ * </tr>
+ * <tr>
+ * <td>odometer</td>
+ * <td>Boolean</td>
+ * <td>Odometer in km</td>
+ * <td>N</td>
+ * <td>Max Length: 500</td>
+ * <td>SmartDeviceLink 2.0 </td>
+ * </tr>
+ * <tr>
+ * <td>beltStatus</td>
+ * <td>Boolean</td>
+ * <td>The status of the seat belts</td>
+ * <td>N</td>
+ * <td>Subscribable</td>
+ * <td>SmartDeviceLink 2.0 </td>
+ * </tr>
+ * <tr>
+ * <td>bodyInformation</td>
+ * <td>Boolean</td>
+ * <td>The body information including ignition status and internal temp</td>
+ * <td>N</td>
+ * <td>Subscribable</td>
+ * <td>SmartDeviceLink 2.0 </td>
+ * </tr>
+ * <tr>
+ * <td>deviceStatus</td>
+ * <td>Boolean</td>
+ * <td>The device status including signal and battery strength</td>
+ * <td>N</td>
+ * <td>Subscribable</td>
+ * <td>SmartDeviceLink 2.0 </td>
+ * </tr>
+ * <tr>
+ * <td>driverBraking</td>
+ * <td>Boolean</td>
+ * <td>The status of the brake pedal</td>
+ * <td>N</td>
+ * <td>Subscribable</td>
+ * <td>SmartDeviceLink 2.0 </td>
+ * </tr>
+ * <tr>
+ * <td>wiperStatus</td>
+ * <td>Boolean</td>
+ * <td>The status of the wipers</td>
+ * <td>N</td>
+ * <td>Subscribable</td>
+ * <td>SmartDeviceLink 2.0 </td>
+ * </tr>
+ * <tr>
+ * <td>headLampStatus</td>
+ * <td>Boolean</td>
+ * <td>Status of the head lamps</td>
+ * <td>N</td>
+ * <td>Subscribable</td>
+ * <td>SmartDeviceLink 2.0 </td>
+ * </tr>
+ * <tr>
+ * <td>engineTorque</td>
+ * <td>Boolean</td>
+ * <td>Torque value for engine (in Nm) on non-diesel variants</td>
+ * <td>N</td>
+ * <td>Subscribable</td>
+ * <td>SmartDeviceLink 2.0 </td>
+ * </tr>
+ * <tr>
+ * <td>accPedalPosition</td>
+ * <td>Boolean</td>
+ * <td>Accelerator pedal position (percentage depressed)</td>
+ * <td>N</td>
+ * <td>Subscribable</td>
+ * <td>SmartDeviceLink 2.0 </td>
+ * </tr>
+ * <tr>
+ * <td>steeringWheelAngle</td>
+ * <td>Boolean</td>
+ * <td>Current angle of the steering wheel (in deg)</td>
+ * <td>N</td>
+ * <td>Subscribable</td>
+ * <td>SmartDeviceLink 2.0 </td>
+ * </tr>
+ * <tr>
+ * <td>eCallInfo</td>
+ * <td>Boolean</td>
+ * <td>Emergency Call notification and confirmation data.</td>
+ * <td>N</td>
+ * <td>Subscribable</td>
+ * <td>SmartDeviceLink 2.0 </td>
+ * </tr>
+ * <tr>
+ * <td>airbagStatus</td>
+ * <td>Boolean</td>
+ * <td>The status of the air bags.</td>
+ * <td>N</td>
+ * <td>Subscribable</td>
+ * <td>SmartDeviceLink 2.0 </td>
+ * </tr>
+ * <tr>
+ * <td>emergencyEvent</td>
+ * <td>Boolean</td>
+ * <td>Information related to an emergency event (and if it occurred).</td>
+ * <td>N</td>
+ * <td>Subscribable</td>
+ * <td>SmartDeviceLink 2.0 </td>
+ * </tr>
+ * <tr>
+ * <td>clusterModeStatus</td>
+ * <td>Boolean</td>
+ * <td>The status modes of the instrument panel cluster.</td>
+ * <td>N</td>
+ * <td>Subscribable</td>
+ * <td>SmartDeviceLink 2.0 </td>
+ * </tr>
+ * <tr>
+ * <td>myKey</td>
+ * <td>Boolean</td>
+ * <td>Information related to the MyKey feature.</td>
+ * <td>N</td>
+ * <td>Subscribable</td>
+ * <td>SmartDeviceLink 2.0 </td>
+ * </tr>
+ * </table>
+ *
+ * <p> <b>Response</b></p>
+ *<p><b>Non-default Result Codes:</b></p>
+ *<p>SUCCESS</p>
+ *<p>WARNINGS </p>
+ *<p>INVALID_DATA</p>
+ * <p>OUT_OF_MEMORY</p>
+ * <p>TOO_MANY_PENDING_REQUESTS</p>
+ * <p>APPLICATION_NOT_REGISTERED</p>
+ * <p>GENERIC_ERROR</p>
+ * <p>IGNORED </p>
+ * <p>DISALLOWED</p>
+ * <p>USER_DISALLOWED </p>
+ *
+ * @since SmartDeviceLink 2.0
+ * @see UnsubscribeVehicleData
+ * @see GetVehicleData
+ */
+public class SubscribeVehicleData extends RPCRequest {
+ public static final String KEY_RPM = "rpm";
+ public static final String KEY_EXTERNAL_TEMPERATURE = "externalTemperature";
+ public static final String KEY_FUEL_LEVEL = "fuelLevel";
+ public static final String KEY_PRNDL = "prndl";
+ public static final String KEY_TIRE_PRESSURE = "tirePressure";
+ public static final String KEY_ENGINE_TORQUE = "engineTorque";
+ public static final String KEY_ODOMETER = "odometer";
+ public static final String KEY_GPS = "gps";
+ public static final String KEY_FUEL_LEVEL_STATE = "fuelLevel_State";
+ public static final String KEY_INSTANT_FUEL_CONSUMPTION = "instantFuelConsumption";
+ public static final String KEY_BELT_STATUS = "beltStatus";
+ public static final String KEY_BODY_INFORMATION = "bodyInformation";
+ public static final String KEY_DEVICE_STATUS = "deviceStatus";
+ public static final String KEY_DRIVER_BRAKING = "driverBraking";
+ public static final String KEY_WIPER_STATUS = "wiperStatus";
+ public static final String KEY_HEAD_LAMP_STATUS = "headLampStatus";
+ public static final String KEY_ACC_PEDAL_POSITION = "accPedalPosition";
+ public static final String KEY_STEERING_WHEEL_ANGLE = "steeringWheelAngle";
+ public static final String KEY_E_CALL_INFO = "eCallInfo";
+ public static final String KEY_AIRBAG_STATUS = "airbagStatus";
+ public static final String KEY_EMERGENCY_EVENT = "emergencyEvent";
+ public static final String KEY_CLUSTER_MODE_STATUS = "clusterModeStatus";
+ public static final String KEY_MY_KEY = "myKey";
+ public static final String KEY_SPEED = "speed";
+
+ /**
+ * Constructs a new SubscribeVehicleData object
+ */
+ public SubscribeVehicleData() {
+ super(FunctionID.SUBSCRIBE_VEHICLE_DATA.toString());
+ }
+
+ /**
+ * <p>Constructs a new SubscribeVehicleData object indicated by the Hashtable
+ * parameter</p>
+ *
+ *
+ * @param hash
+ * The Hashtable to use
+ */
+ public SubscribeVehicleData(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+
+ /**
+ * Sets a boolean value. If true, subscribes Gps data
+ *
+ * @param gps
+ * a boolean value
+ */
+ public void setGps(Boolean gps) {
+ if (gps != null) {
+ parameters.put(KEY_GPS, gps);
+ } else {
+ parameters.remove(KEY_GPS);
+ }
+ }
+
+ /**
+ * Gets a boolean value. If true, means the Gps data has been subscribed.
+ *
+ * @return Boolean -a Boolean value. If true, means the Gps data has been
+ * subscribed.
+ */
+ public Boolean getGps() {
+ return (Boolean) parameters.get(KEY_GPS);
+ }
+
+ /**
+ * Sets a boolean value. If true, subscribes speed data
+ *
+ * @param speed
+ * a boolean value
+ */
+ public void setSpeed(Boolean speed) {
+ if (speed != null) {
+ parameters.put(KEY_SPEED, speed);
+ } else {
+ parameters.remove(KEY_SPEED);
+ }
+ }
+
+ /**
+ * Gets a boolean value. If true, means the Speed data has been subscribed.
+ *
+ * @return Boolean -a Boolean value. If true, means the Speed data has been
+ * subscribed.
+ */
+ public Boolean getSpeed() {
+ return (Boolean) parameters.get(KEY_SPEED);
+ }
+
+ /**
+ * Sets a boolean value. If true, subscribes rpm data
+ *
+ * @param rpm
+ * a boolean value
+ */
+ public void setRpm(Boolean rpm) {
+ if (rpm != null) {
+ parameters.put(KEY_RPM, rpm);
+ } else {
+ parameters.remove(KEY_RPM);
+ }
+ }
+
+ /**
+ * Gets a boolean value. If true, means the rpm data has been subscribed.
+ *
+ * @return Boolean -a Boolean value. If true, means the rpm data has been
+ * subscribed.
+ */
+ public Boolean getRpm() {
+ return (Boolean) parameters.get(KEY_RPM);
+ }
+
+ /**
+ * Sets a boolean value. If true, subscribes FuelLevel data
+ *
+ * @param fuelLevel
+ * a boolean value
+ */
+ public void setFuelLevel(Boolean fuelLevel) {
+ if (fuelLevel != null) {
+ parameters.put(KEY_FUEL_LEVEL, fuelLevel);
+ } else {
+ parameters.remove(KEY_FUEL_LEVEL);
+ }
+ }
+
+ /**
+ * Gets a boolean value. If true, means the FuelLevel data has been
+ * subscribed.
+ *
+ * @return Boolean -a Boolean value. If true, means the FuelLevel data has
+ * been subscribed.
+ */
+ public Boolean getFuelLevel() {
+ return (Boolean) parameters.get(KEY_FUEL_LEVEL);
+ }
+
+ /**
+ * Sets a boolean value. If true, subscribes fuelLevel_State data
+ *
+ * @param fuelLevel_State
+ * a boolean value
+ */
+ @Deprecated
+ public void setFuelLevel_State(Boolean fuelLevel_State) {
+ setFuelLevelState(fuelLevel_State);
+ }
+
+ /**
+ * Gets a boolean value. If true, means the fuelLevel_State data has been
+ * subscribed.
+ *
+ * @return Boolean -a Boolean value. If true, means the fuelLevel_State data
+ * has been subscribed.
+ */
+ @Deprecated
+ public Boolean getFuelLevel_State() {
+ return getFuelLevelState();
+ }
+
+ /**
+ * Sets a boolean value. If true, subscribes fuelLevelState data
+ *
+ * @param fuelLevelState
+ * a boolean value
+ */
+ public void setFuelLevelState(Boolean fuelLevelState) {
+ if (fuelLevelState != null) {
+ parameters.put(KEY_FUEL_LEVEL_STATE, fuelLevelState);
+ } else {
+ parameters.remove(KEY_FUEL_LEVEL_STATE);
+ }
+ }
+
+ /**
+ * Gets a boolean value. If true, means the fuelLevelState data has been
+ * subscribed.
+ *
+ * @return Boolean -a Boolean value. If true, means the fuelLevelState data
+ * has been subscribed.
+ */
+ public Boolean getFuelLevelState() {
+ return (Boolean) parameters.get(KEY_FUEL_LEVEL_STATE);
+ }
+
+ /**
+ * Sets a boolean value. If true, subscribes instantFuelConsumption data
+ *
+ * @param instantFuelConsumption
+ * a boolean value
+ */
+ public void setInstantFuelConsumption(Boolean instantFuelConsumption) {
+ if (instantFuelConsumption != null) {
+ parameters.put(KEY_INSTANT_FUEL_CONSUMPTION, instantFuelConsumption);
+ } else {
+ parameters.remove(KEY_INSTANT_FUEL_CONSUMPTION);
+ }
+ }
+
+ /**
+ * Gets a boolean value. If true, means the getInstantFuelConsumption data has been
+ * subscribed.
+ *
+ * @return Boolean -a Boolean value. If true, means the getInstantFuelConsumption data
+ * has been subscribed.
+ */
+ public Boolean getInstantFuelConsumption() {
+ return (Boolean) parameters.get(KEY_INSTANT_FUEL_CONSUMPTION);
+ }
+
+ /**
+ * Sets a boolean value. If true, subscribes externalTemperature data
+ *
+ * @param externalTemperature
+ * a boolean value
+ */
+ public void setExternalTemperature(Boolean externalTemperature) {
+ if (externalTemperature != null) {
+ parameters.put(KEY_EXTERNAL_TEMPERATURE, externalTemperature);
+ } else {
+ parameters.remove(KEY_EXTERNAL_TEMPERATURE);
+ }
+ }
+
+ /**
+ * Gets a boolean value. If true, means the externalTemperature data has been
+ * subscribed.
+ *
+ * @return Boolean -a Boolean value. If true, means the externalTemperature data
+ * has been subscribed.
+ */
+ public Boolean getExternalTemperature() {
+ return (Boolean) parameters.get(KEY_EXTERNAL_TEMPERATURE);
+ }
+
+ /**
+ * Sets a boolean value. If true, subscribes Currently selected gear data
+ *
+ * @param prndl
+ * a boolean value
+ */
+ public void setPrndl(Boolean prndl) {
+ if (prndl != null) {
+ parameters.put(KEY_PRNDL, prndl);
+ } else {
+ parameters.remove(KEY_PRNDL);
+ }
+ }
+
+ /**
+ * Gets a boolean value. If true, means the Currently selected gear data has been
+ * subscribed.
+ *
+ * @return Boolean -a Boolean value. If true, means the Currently selected gear data
+ * has been subscribed.
+ */
+ public Boolean getPrndl() {
+ return (Boolean) parameters.get(KEY_PRNDL);
+ }
+
+ /**
+ * Sets a boolean value. If true, subscribes tire pressure status data
+ *
+ * @param tirePressure
+ * a boolean value
+ */
+ public void setTirePressure(Boolean tirePressure) {
+ if (tirePressure != null) {
+ parameters.put(KEY_TIRE_PRESSURE, tirePressure);
+ } else {
+ parameters.remove(KEY_TIRE_PRESSURE);
+ }
+ }
+
+ /**
+ * Gets a boolean value. If true, means the tire pressure status data has been
+ * subscribed.
+ *
+ * @return Boolean -a Boolean value. If true, means the tire pressure status data
+ * has been subscribed.
+ */
+ public Boolean getTirePressure() {
+ return (Boolean) parameters.get(KEY_TIRE_PRESSURE);
+ }
+
+ /**
+ * Sets a boolean value. If true, subscribes odometer data
+ *
+ * @param odometer
+ * a boolean value
+ */
+ public void setOdometer(Boolean odometer) {
+ if (odometer != null) {
+ parameters.put(KEY_ODOMETER, odometer);
+ } else {
+ parameters.remove(KEY_ODOMETER);
+ }
+ }
+
+ /**
+ * Gets a boolean value. If true, means the odometer data has been
+ * subscribed.
+ *
+ * @return Boolean -a Boolean value. If true, means the odometer data
+ * has been subscribed.
+ */
+ public Boolean getOdometer() {
+ return (Boolean) parameters.get(KEY_ODOMETER);
+ }
+
+ /**
+ * Sets a boolean value. If true, subscribes belt Status data
+ *
+ * @param beltStatus
+ * a boolean value
+ */
+ public void setBeltStatus(Boolean beltStatus) {
+ if (beltStatus != null) {
+ parameters.put(KEY_BELT_STATUS, beltStatus);
+ } else {
+ parameters.remove(KEY_BELT_STATUS);
+ }
+ }
+
+ /**
+ * Gets a boolean value. If true, means the belt Status data has been
+ * subscribed.
+ *
+ * @return Boolean -a Boolean value. If true, means the belt Status data
+ * has been subscribed.
+ */
+ public Boolean getBeltStatus() {
+ return (Boolean) parameters.get(KEY_BELT_STATUS);
+ }
+
+ /**
+ * Sets a boolean value. If true, subscribes body Information data
+ *
+ * @param bodyInformation
+ * a boolean value
+ */
+ public void setBodyInformation(Boolean bodyInformation) {
+ if (bodyInformation != null) {
+ parameters.put(KEY_BODY_INFORMATION, bodyInformation);
+ } else {
+ parameters.remove(KEY_BODY_INFORMATION);
+ }
+ }
+
+ /**
+ * Gets a boolean value. If true, means the body Information data has been
+ * subscribed.
+ *
+ * @return Boolean -a Boolean value. If true, means the body Information data
+ * has been subscribed.
+ */
+ public Boolean getBodyInformation() {
+ return (Boolean) parameters.get(KEY_BODY_INFORMATION);
+ }
+
+ /**
+ * Sets a boolean value. If true, subscribes device Status data
+ *
+ * @param deviceStatus
+ * a boolean value
+ */
+ public void setDeviceStatus(Boolean deviceStatus) {
+ if (deviceStatus != null) {
+ parameters.put(KEY_DEVICE_STATUS, deviceStatus);
+ } else {
+ parameters.remove(KEY_DEVICE_STATUS);
+ }
+ }
+
+ /**
+ * Gets a boolean value. If true, means the device Status data has been
+ * subscribed.
+ *
+ * @return Boolean -a Boolean value. If true, means the device Status data
+ * has been subscribed.
+ */
+ public Boolean getDeviceStatus() {
+ return (Boolean) parameters.get(KEY_DEVICE_STATUS);
+ }
+
+ /**
+ * Sets a boolean value. If true, subscribes driver Braking data
+ *
+ * @param driverBraking
+ * a boolean value
+ */
+ public void setDriverBraking(Boolean driverBraking) {
+ if (driverBraking != null) {
+ parameters.put(KEY_DRIVER_BRAKING, driverBraking);
+ } else {
+ parameters.remove(KEY_DRIVER_BRAKING);
+ }
+ }
+
+ /**
+ * Gets a boolean value. If true, means the driver Braking data has been
+ * subscribed.
+ *
+ * @return Boolean -a Boolean value. If true, means the driver Braking data
+ * has been subscribed.
+ */
+ public Boolean getDriverBraking() {
+ return (Boolean) parameters.get(KEY_DRIVER_BRAKING);
+ }
+
+ /**
+ * Sets a boolean value. If true, subscribes wiper Status data
+ *
+ * @param wiperStatus
+ * a boolean value
+ */
+ public void setWiperStatus(Boolean wiperStatus) {
+ if (wiperStatus != null) {
+ parameters.put(KEY_WIPER_STATUS, wiperStatus);
+ } else {
+ parameters.remove(KEY_WIPER_STATUS);
+ }
+ }
+
+ /**
+ * Gets a boolean value. If true, means the wiper Status data has been
+ * subscribed.
+ *
+ * @return Boolean -a Boolean value. If true, means the wiper Status data
+ * has been subscribed.
+ */
+ public Boolean getWiperStatus() {
+ return (Boolean) parameters.get(KEY_WIPER_STATUS);
+ }
+
+ /**
+ * Sets a boolean value. If true, subscribes Head Lamp Status data
+ *
+ * @param headLampStatus
+ * a boolean value
+ */
+ public void setHeadLampStatus(Boolean headLampStatus) {
+ if (headLampStatus != null) {
+ parameters.put(KEY_HEAD_LAMP_STATUS, headLampStatus);
+ } else {
+ parameters.remove(KEY_HEAD_LAMP_STATUS);
+ }
+ }
+
+ /**
+ * Gets a boolean value. If true, means the Head Lamp Status data has been
+ * subscribed.
+ *
+ * @return Boolean -a Boolean value. If true, means the Head Lamp Status data
+ * has been subscribed.
+ */
+ public Boolean getHeadLampStatus() {
+ return (Boolean) parameters.get(KEY_HEAD_LAMP_STATUS);
+ }
+
+ /**
+ * Sets a boolean value. If true, subscribes Engine Torque data
+ *
+ * @param engineTorque
+ * a boolean value
+ */
+ public void setEngineTorque(Boolean engineTorque) {
+ if (engineTorque != null) {
+ parameters.put(KEY_ENGINE_TORQUE, engineTorque);
+ } else {
+ parameters.remove(KEY_ENGINE_TORQUE);
+ }
+ }
+
+ /**
+ * Gets a boolean value. If true, means the Engine Torque data has been
+ * subscribed.
+ *
+ * @return Boolean -a Boolean value. If true, means the Engine Torque data
+ * has been subscribed.
+ */
+ public Boolean getEngineTorque() {
+ return (Boolean) parameters.get(KEY_ENGINE_TORQUE);
+ }
+
+ /**
+ * Sets a boolean value. If true, subscribes accPedalPosition data
+ *
+ * @param accPedalPosition
+ * a boolean value
+ */
+ public void setAccPedalPosition(Boolean accPedalPosition) {
+ if (accPedalPosition != null) {
+ parameters.put(KEY_ACC_PEDAL_POSITION, accPedalPosition);
+ } else {
+ parameters.remove(KEY_ACC_PEDAL_POSITION);
+ }
+ }
+
+ /**
+ * Gets a boolean value. If true, means the accPedalPosition data has been
+ * subscribed.
+ *
+ * @return Boolean -a Boolean value. If true, means the accPedalPosition data
+ * has been subscribed.
+ */
+ public Boolean getAccPedalPosition() {
+ return (Boolean) parameters.get(KEY_ACC_PEDAL_POSITION);
+ }
+
+ public void setSteeringWheelAngle(Boolean steeringWheelAngle) {
+ if (steeringWheelAngle != null) {
+ parameters.put(KEY_STEERING_WHEEL_ANGLE, steeringWheelAngle);
+ } else {
+ parameters.remove(KEY_STEERING_WHEEL_ANGLE);
+ }
+ }
+
+ public Boolean getSteeringWheelAngle() {
+ return (Boolean) parameters.get(KEY_STEERING_WHEEL_ANGLE);
+ }
+ public void setECallInfo(Boolean eCallInfo) {
+ if (eCallInfo != null) {
+ parameters.put(KEY_E_CALL_INFO, eCallInfo);
+ } else {
+ parameters.remove(KEY_E_CALL_INFO);
+ }
+ }
+ public Boolean getECallInfo() {
+ return (Boolean) parameters.get(KEY_E_CALL_INFO);
+ }
+ public void setAirbagStatus(Boolean airbagStatus) {
+ if (airbagStatus != null) {
+ parameters.put(KEY_AIRBAG_STATUS, airbagStatus);
+ } else {
+ parameters.remove(KEY_AIRBAG_STATUS);
+ }
+ }
+ public Boolean getAirbagStatus() {
+ return (Boolean) parameters.get(KEY_AIRBAG_STATUS);
+ }
+ public void setEmergencyEvent(Boolean emergencyEvent) {
+ if (emergencyEvent != null) {
+ parameters.put(KEY_EMERGENCY_EVENT, emergencyEvent);
+ } else {
+ parameters.remove(KEY_EMERGENCY_EVENT);
+ }
+ }
+ public Boolean getEmergencyEvent() {
+ return (Boolean) parameters.get(KEY_EMERGENCY_EVENT);
+ }
+ public void setClusterModeStatus(Boolean clusterModeStatus) {
+ if (clusterModeStatus != null) {
+ parameters.put(KEY_CLUSTER_MODE_STATUS, clusterModeStatus);
+ } else {
+ parameters.remove(KEY_CLUSTER_MODE_STATUS);
+ }
+ }
+ public Boolean getClusterModeStatus() {
+ return (Boolean) parameters.get(KEY_CLUSTER_MODE_STATUS);
+ }
+ public void setMyKey(Boolean myKey) {
+ if (myKey != null) {
+ parameters.put(KEY_MY_KEY, myKey);
+ } else {
+ parameters.remove(KEY_MY_KEY);
+ }
+ }
+ public Boolean getMyKey() {
+ return (Boolean) parameters.get(KEY_MY_KEY);
+ }
+
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SubscribeVehicleDataResponse.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SubscribeVehicleDataResponse.java
new file mode 100644
index 000000000..f8092cae8
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SubscribeVehicleDataResponse.java
@@ -0,0 +1,721 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCResponse;
+import com.smartdevicelink.util.DebugTool;
+
+/**
+ * Subscribe Vehicle Data Response is sent, when SubscribeVehicleData has been called
+ *
+ * @since SmartDeviceLink 2.0
+ */
+public class SubscribeVehicleDataResponse extends RPCResponse {
+ public static final String KEY_SPEED = "speed";
+ public static final String KEY_RPM = "rpm";
+ public static final String KEY_FUEL_LEVEL = "fuelLevel";
+ public static final String KEY_EXTERNAL_TEMPERATURE = "externalTemperature";
+ public static final String KEY_PRNDL = "prndl";
+ public static final String KEY_TIRE_PRESSURE = "tirePressure";
+ public static final String KEY_ENGINE_TORQUE = "engineTorque";
+ public static final String KEY_ODOMETER = "odometer";
+ public static final String KEY_GPS = "gps";
+ public static final String KEY_FUEL_LEVEL_STATE = "fuelLevel_State";
+ public static final String KEY_INSTANT_FUEL_CONSUMPTION = "instantFuelConsumption";
+ public static final String KEY_BELT_STATUS = "beltStatus";
+ public static final String KEY_BODY_INFORMATION = "bodyInformation";
+ public static final String KEY_DEVICE_STATUS = "deviceStatus";
+ public static final String KEY_DRIVER_BRAKING = "driverBraking";
+ public static final String KEY_WIPER_STATUS = "wiperStatus";
+ public static final String KEY_HEAD_LAMP_STATUS = "headLampStatus";
+ public static final String KEY_ACC_PEDAL_POSITION = "accPedalPosition";
+ public static final String KEY_STEERING_WHEEL_ANGLE = "steeringWheelAngle";
+ public static final String KEY_E_CALL_INFO = "eCallInfo";
+ public static final String KEY_AIRBAG_STATUS = "airbagStatus";
+ public static final String KEY_EMERGENCY_EVENT = "emergencyEvent";
+ public static final String KEY_CLUSTER_MODE_STATUS = "clusterModeStatus";
+ public static final String KEY_MY_KEY = "myKey";
+
+ /**
+ * Constructs a new SubscribeVehicleDataResponse object
+ */
+ public SubscribeVehicleDataResponse() {
+ super(FunctionID.SUBSCRIBE_VEHICLE_DATA.toString());
+ }
+
+ /**
+ * <p>Constructs a new SubscribeVehicleDataResponse object indicated by the Hashtable
+ * parameter</p>
+ *
+ *
+ * @param hash
+ * The Hashtable to use
+ */
+ public SubscribeVehicleDataResponse(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+ /**
+ * Sets gps
+ * @param gps
+ */
+ public void setGps(VehicleDataResult gps) {
+ if (gps != null) {
+ parameters.put(KEY_GPS, gps);
+ } else {
+ parameters.remove(KEY_GPS);
+ }
+ }
+ /**
+ * Gets gps
+ * @return VehicleDataResult
+ */
+ @SuppressWarnings("unchecked")
+ public VehicleDataResult getGps() {
+ Object obj = parameters.get(KEY_GPS);
+ if (obj instanceof VehicleDataResult) {
+ return (VehicleDataResult) obj;
+ } else if (obj instanceof Hashtable) {
+ try {
+ return new VehicleDataResult((Hashtable<String, Object>) obj);
+ } catch (Exception e) {
+ DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_GPS, e);
+ }
+ }
+ return null;
+ }
+ /**
+ * Sets speed
+ * @param speed
+ */
+ public void setSpeed(VehicleDataResult speed) {
+ if (speed != null) {
+ parameters.put(KEY_SPEED, speed);
+ } else {
+ parameters.remove(KEY_SPEED);
+ }
+ }
+ /**
+ * Gets speed
+ * @return VehicleDataResult
+ */
+ @SuppressWarnings("unchecked")
+ public VehicleDataResult getSpeed() {
+ Object obj = parameters.get(KEY_SPEED);
+ if (obj instanceof VehicleDataResult) {
+ return (VehicleDataResult) obj;
+ } else if (obj instanceof Hashtable) {
+ try {
+ return new VehicleDataResult((Hashtable<String, Object>) obj);
+ } catch (Exception e) {
+ DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_SPEED, e);
+ }
+ }
+ return null;
+ }
+ /**
+ * Sets rpm
+ * @param rpm
+ */
+ public void setRpm(VehicleDataResult rpm) {
+ if (rpm != null) {
+ parameters.put(KEY_RPM, rpm);
+ } else {
+ parameters.remove(KEY_RPM);
+ }
+ }
+ /**
+ * Gets rpm
+ * @return VehicleDataResult
+ */
+ @SuppressWarnings("unchecked")
+ public VehicleDataResult getRpm() {
+ Object obj = parameters.get(KEY_RPM);
+ if (obj instanceof VehicleDataResult) {
+ return (VehicleDataResult) obj;
+ } else if (obj instanceof Hashtable) {
+ try {
+ return new VehicleDataResult((Hashtable<String, Object>) obj);
+ } catch (Exception e) {
+ DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_RPM, e);
+ }
+ }
+ return null;
+ }
+ /**
+ * Sets Fuel Level
+ * @param fuelLevel
+ */
+ public void setFuelLevel(VehicleDataResult fuelLevel) {
+ if (fuelLevel != null) {
+ parameters.put(KEY_FUEL_LEVEL, fuelLevel);
+ } else {
+ parameters.remove(KEY_FUEL_LEVEL);
+ }
+ }
+ /**
+ * Gets Fuel Level
+ * @return VehicleDataResult
+ */
+ @SuppressWarnings("unchecked")
+ public VehicleDataResult getFuelLevel() {
+ Object obj = parameters.get(KEY_FUEL_LEVEL);
+ if (obj instanceof VehicleDataResult) {
+ return (VehicleDataResult) obj;
+ } else if (obj instanceof Hashtable) {
+ try {
+ return new VehicleDataResult((Hashtable<String, Object>) obj);
+ } catch (Exception e) {
+ DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_FUEL_LEVEL, e);
+ }
+ }
+ return null;
+ }
+ /**
+ * Sets Fuel Level State
+ * @param fuelLevel_State
+ */
+ @Deprecated
+ public void setFuelLevel_State(VehicleDataResult fuelLevel_State) {
+ setFuelLevelState(fuelLevel_State);
+ }
+ /**
+ * Gets Fuel Level State
+ * @return VehicleDataResult
+ */
+ @Deprecated
+ public VehicleDataResult getFuelLevel_State() {
+ return getFuelLevelState();
+ }
+ /**
+ * Sets Fuel Level State
+ * @param fuelLevelState
+ */
+ public void setFuelLevelState(VehicleDataResult fuelLevelState) {
+ if (fuelLevelState != null) {
+ parameters.put(KEY_FUEL_LEVEL_STATE, fuelLevelState);
+ } else {
+ parameters.remove(KEY_FUEL_LEVEL_STATE);
+ }
+ }
+ /**
+ * Gets Fuel Level State
+ * @return VehicleDataResult
+ */
+ @SuppressWarnings("unchecked")
+ public VehicleDataResult getFuelLevelState() {
+ Object obj = parameters.get(KEY_FUEL_LEVEL_STATE);
+ if (obj instanceof VehicleDataResult) {
+ return (VehicleDataResult) obj;
+ } else if (obj instanceof Hashtable) {
+ return new VehicleDataResult((Hashtable<String, Object>) obj);
+ }
+ return null;
+ }
+ /**
+ * Sets Instant Fuel Comsumption
+ * @param instantFuelConsumption
+ */
+ public void setInstantFuelConsumption(VehicleDataResult instantFuelConsumption) {
+ if (instantFuelConsumption != null) {
+ parameters.put(KEY_INSTANT_FUEL_CONSUMPTION, instantFuelConsumption);
+ } else {
+ parameters.remove(KEY_INSTANT_FUEL_CONSUMPTION);
+ }
+ }
+ /**
+ * Gets Instant Fuel Consumption
+ * @return VehicleDataResult
+ */
+ @SuppressWarnings("unchecked")
+ public VehicleDataResult getInstantFuelConsumption() {
+ Object obj = parameters.get(KEY_INSTANT_FUEL_CONSUMPTION);
+ if (obj instanceof VehicleDataResult) {
+ return (VehicleDataResult) obj;
+ } else if (obj instanceof Hashtable) {
+ try {
+ return new VehicleDataResult((Hashtable<String, Object>) obj);
+ } catch (Exception e) {
+ DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_INSTANT_FUEL_CONSUMPTION, e);
+ }
+ }
+ return null;
+ }
+ /**
+ * Sets External Temperature
+ * @param externalTemperature
+ */
+ public void setExternalTemperature(VehicleDataResult externalTemperature) {
+ if (externalTemperature != null) {
+ parameters.put(KEY_EXTERNAL_TEMPERATURE, externalTemperature);
+ } else {
+ parameters.remove(KEY_EXTERNAL_TEMPERATURE);
+ }
+ }
+ /**
+ * Gets External Temperature
+ * @return VehicleDataResult
+ */
+ @SuppressWarnings("unchecked")
+ public VehicleDataResult getExternalTemperature() {
+ Object obj = parameters.get(KEY_EXTERNAL_TEMPERATURE);
+ if (obj instanceof VehicleDataResult) {
+ return (VehicleDataResult) obj;
+ } else if (obj instanceof Hashtable) {
+ try {
+ return new VehicleDataResult((Hashtable<String, Object>) obj);
+ } catch (Exception e) {
+ DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_EXTERNAL_TEMPERATURE, e);
+ }
+ }
+ return null;
+ }
+ /**
+ * Sets currently selected gear data
+ * @param prndl
+ */
+ public void setPrndl(VehicleDataResult prndl) {
+ if (prndl != null) {
+ parameters.put(KEY_PRNDL, prndl);
+ } else {
+ parameters.remove(KEY_PRNDL);
+ }
+ }
+ /**
+ * Gets currently selected gear data
+ * @return VehicleDataResult
+ */
+ @SuppressWarnings("unchecked")
+ public VehicleDataResult getPrndl() {
+ Object obj = parameters.get(KEY_PRNDL);
+ if (obj instanceof VehicleDataResult) {
+ return (VehicleDataResult) obj;
+ } else if (obj instanceof Hashtable) {
+ try {
+ return new VehicleDataResult((Hashtable<String, Object>) obj);
+ } catch (Exception e) {
+ DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_PRNDL, e);
+ }
+ }
+ return null;
+ }
+ /**
+ * Sets Tire Pressure
+ * @param tirePressure
+ */
+ public void setTirePressure(VehicleDataResult tirePressure) {
+ if (tirePressure != null) {
+ parameters.put(KEY_TIRE_PRESSURE, tirePressure);
+ } else {
+ parameters.remove(KEY_TIRE_PRESSURE);
+ }
+ }
+ /**
+ * Gets Tire Pressure
+ * @return VehicleDataResult
+ */
+ @SuppressWarnings("unchecked")
+ public VehicleDataResult getTirePressure() {
+ Object obj = parameters.get(KEY_TIRE_PRESSURE);
+ if (obj instanceof VehicleDataResult) {
+ return (VehicleDataResult) obj;
+ } else if (obj instanceof Hashtable) {
+ try {
+ return new VehicleDataResult((Hashtable<String, Object>) obj);
+ } catch (Exception e) {
+ DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_TIRE_PRESSURE, e);
+ }
+ }
+ return null;
+ }
+ /**
+ * Sets Odometer
+ * @param odometer
+ */
+ public void setOdometer(VehicleDataResult odometer) {
+ if (odometer != null) {
+ parameters.put(KEY_ODOMETER, odometer);
+ } else {
+ parameters.remove(KEY_ODOMETER);
+ }
+ }
+ /**
+ * Gets Odometer
+ * @return VehicleDataResult
+ */
+ @SuppressWarnings("unchecked")
+ public VehicleDataResult getOdometer() {
+ Object obj = parameters.get(KEY_ODOMETER);
+ if (obj instanceof VehicleDataResult) {
+ return (VehicleDataResult) obj;
+ } else if (obj instanceof Hashtable) {
+ try {
+ return new VehicleDataResult((Hashtable<String, Object>) obj);
+ } catch (Exception e) {
+ DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_ODOMETER, e);
+ }
+ }
+ return null;
+ }
+ /**
+ * Sets Belt Status
+ * @param beltStatus
+ */
+ public void setBeltStatus(VehicleDataResult beltStatus) {
+ if (beltStatus != null) {
+ parameters.put(KEY_BELT_STATUS, beltStatus);
+ } else {
+ parameters.remove(KEY_BELT_STATUS);
+ }
+ }
+ /**
+ * Gets Belt Status
+ * @return VehicleDataResult
+ */
+ @SuppressWarnings("unchecked")
+ public VehicleDataResult getBeltStatus() {
+ Object obj = parameters.get(KEY_BELT_STATUS);
+ if (obj instanceof VehicleDataResult) {
+ return (VehicleDataResult) obj;
+ } else if (obj instanceof Hashtable) {
+ try {
+ return new VehicleDataResult((Hashtable<String, Object>) obj);
+ } catch (Exception e) {
+ DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_BELT_STATUS, e);
+ }
+ }
+ return null;
+ }
+ /**
+ * Sets Body Information
+ * @param bodyInformation
+ */
+ public void setBodyInformation(VehicleDataResult bodyInformation) {
+ if (bodyInformation != null) {
+ parameters.put(KEY_BODY_INFORMATION, bodyInformation);
+ } else {
+ parameters.remove(KEY_BODY_INFORMATION);
+ }
+ }
+ /**
+ * Gets Body Information
+ * @return VehicleDataResult
+ */
+ @SuppressWarnings("unchecked")
+ public VehicleDataResult getBodyInformation() {
+ Object obj = parameters.get(KEY_BODY_INFORMATION);
+ if (obj instanceof VehicleDataResult) {
+ return (VehicleDataResult) obj;
+ } else if (obj instanceof Hashtable) {
+ try {
+ return new VehicleDataResult((Hashtable<String, Object>) obj);
+ } catch (Exception e) {
+ DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_BODY_INFORMATION, e);
+ }
+ }
+ return null;
+ }
+ /**
+ * Sets Device Status
+ * @param deviceStatus
+ */
+ public void setDeviceStatus(VehicleDataResult deviceStatus) {
+ if (deviceStatus != null) {
+ parameters.put(KEY_DEVICE_STATUS, deviceStatus);
+ } else {
+ parameters.remove(KEY_DEVICE_STATUS);
+ }
+ }
+ /**
+ * Gets Device Status
+ * @return VehicleDataResult
+ */
+ @SuppressWarnings("unchecked")
+ public VehicleDataResult getDeviceStatus() {
+ Object obj = parameters.get(KEY_DEVICE_STATUS);
+ if (obj instanceof VehicleDataResult) {
+ return (VehicleDataResult) obj;
+ } else if (obj instanceof Hashtable) {
+ try {
+ return new VehicleDataResult((Hashtable<String, Object>) obj);
+ } catch (Exception e) {
+ DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_DEVICE_STATUS, e);
+ }
+ }
+ return null;
+ }
+ /**
+ * Sets Driver Barking
+ * @param driverBraking
+ */
+ public void setDriverBraking(VehicleDataResult driverBraking) {
+ if (driverBraking != null) {
+ parameters.put(KEY_DRIVER_BRAKING, driverBraking);
+ } else {
+ parameters.remove(KEY_DRIVER_BRAKING);
+ }
+ }
+ /**
+ * Gets Driver Barking
+ * @return VehicleDataResult
+ */
+ @SuppressWarnings("unchecked")
+ public VehicleDataResult getDriverBraking() {
+ Object obj = parameters.get(KEY_DRIVER_BRAKING);
+ if (obj instanceof VehicleDataResult) {
+ return (VehicleDataResult) obj;
+ } else if (obj instanceof Hashtable) {
+ try {
+ return new VehicleDataResult((Hashtable<String, Object>) obj);
+ } catch (Exception e) {
+ DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_DRIVER_BRAKING, e);
+ }
+ }
+ return null;
+ }
+ /**
+ * Sets wiper Status
+ * @param wiperStatus
+ */
+ public void setWiperStatus(VehicleDataResult wiperStatus) {
+ if (wiperStatus != null) {
+ parameters.put(KEY_WIPER_STATUS, wiperStatus);
+ } else {
+ parameters.remove(KEY_WIPER_STATUS);
+ }
+ }
+ /**
+ * Gets Wiper Status
+ * @return VehicleDataResult
+ */
+ @SuppressWarnings("unchecked")
+ public VehicleDataResult getWiperStatus() {
+ Object obj = parameters.get(KEY_WIPER_STATUS);
+ if (obj instanceof VehicleDataResult) {
+ return (VehicleDataResult) obj;
+ } else if (obj instanceof Hashtable) {
+ try {
+ return new VehicleDataResult((Hashtable<String, Object>) obj);
+ } catch (Exception e) {
+ DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_WIPER_STATUS, e);
+ }
+ }
+ return null;
+ }
+ /**
+ * Sets Head Lamp Status
+ * @param headLampStatus
+ */
+ public void setHeadLampStatus(VehicleDataResult headLampStatus) {
+ if (headLampStatus != null) {
+ parameters.put(KEY_HEAD_LAMP_STATUS, headLampStatus);
+ } else {
+ parameters.remove(KEY_HEAD_LAMP_STATUS);
+ }
+ }
+ /**
+ * Gets Head Lamp Status
+ * @return VehicleDataResult
+ */
+ @SuppressWarnings("unchecked")
+ public VehicleDataResult getHeadLampStatus() {
+ Object obj = parameters.get(KEY_HEAD_LAMP_STATUS);
+ if (obj instanceof VehicleDataResult) {
+ return (VehicleDataResult) obj;
+ } else if (obj instanceof Hashtable) {
+ try {
+ return new VehicleDataResult((Hashtable<String, Object>) obj);
+ } catch (Exception e) {
+ DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_HEAD_LAMP_STATUS, e);
+ }
+ }
+ return null;
+ }
+ /**
+ * Sets Engine Torque
+ * @param engineTorque
+ */
+ public void setEngineTorque(VehicleDataResult engineTorque) {
+ if (engineTorque != null) {
+ parameters.put(KEY_ENGINE_TORQUE, engineTorque);
+ } else {
+ parameters.remove(KEY_ENGINE_TORQUE);
+ }
+ }
+ /**
+ * Gets Engine Torque
+ * @return VehicleDataResult
+ */
+ @SuppressWarnings("unchecked")
+ public VehicleDataResult getEngineTorque() {
+ Object obj = parameters.get(KEY_ENGINE_TORQUE);
+ if (obj instanceof VehicleDataResult) {
+ return (VehicleDataResult) obj;
+ } else if (obj instanceof Hashtable) {
+ try {
+ return new VehicleDataResult((Hashtable<String, Object>) obj);
+ } catch (Exception e) {
+ DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_ENGINE_TORQUE, e);
+ }
+ }
+ return null;
+ }
+ /**
+ * Sets AccPedal Position
+ * @param accPedalPosition
+ */
+ public void setAccPedalPosition(VehicleDataResult accPedalPosition) {
+ if (accPedalPosition != null) {
+ parameters.put(KEY_ACC_PEDAL_POSITION, accPedalPosition);
+ } else {
+ parameters.remove(KEY_ACC_PEDAL_POSITION);
+ }
+ }
+ /**
+ * Gets AccPedal Position
+ * @return VehicleDataResult
+ */
+ @SuppressWarnings("unchecked")
+ public VehicleDataResult getAccPedalPosition() {
+ Object obj = parameters.get(KEY_ACC_PEDAL_POSITION);
+ if (obj instanceof VehicleDataResult) {
+ return (VehicleDataResult) obj;
+ } else if (obj instanceof Hashtable) {
+ try {
+ return new VehicleDataResult((Hashtable<String, Object>) obj);
+ } catch (Exception e) {
+ DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_ACC_PEDAL_POSITION, e);
+ }
+ }
+ return null;
+ }
+
+ public void setSteeringWheelAngle(VehicleDataResult steeringWheelAngle) {
+ if (steeringWheelAngle != null) {
+ parameters.put(KEY_STEERING_WHEEL_ANGLE, steeringWheelAngle);
+ } else {
+ parameters.remove(KEY_STEERING_WHEEL_ANGLE);
+ }
+ }
+
+ @SuppressWarnings("unchecked")
+ public VehicleDataResult getSteeringWheelAngle() {
+ Object obj = parameters.get(KEY_STEERING_WHEEL_ANGLE);
+ if (obj instanceof VehicleDataResult) {
+ return (VehicleDataResult) obj;
+ } else if (obj instanceof Hashtable) {
+ try {
+ return new VehicleDataResult((Hashtable<String, Object>) obj);
+ } catch (Exception e) {
+ DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_STEERING_WHEEL_ANGLE, e);
+ }
+ }
+ return null;
+ }
+
+ public void setECallInfo(VehicleDataResult eCallInfo) {
+ if (eCallInfo != null) {
+ parameters.put(KEY_E_CALL_INFO, eCallInfo);
+ } else {
+ parameters.remove(KEY_E_CALL_INFO);
+ }
+ }
+ @SuppressWarnings("unchecked")
+ public VehicleDataResult getECallInfo() {
+ Object obj = parameters.get(KEY_E_CALL_INFO);
+ if (obj instanceof VehicleDataResult) {
+ return (VehicleDataResult) obj;
+ } else if (obj instanceof Hashtable) {
+ try {
+ return new VehicleDataResult((Hashtable<String, Object>) obj);
+ } catch (Exception e) {
+ DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_E_CALL_INFO, e);
+ }
+ }
+ return null;
+ }
+ public void setAirbagStatus(VehicleDataResult airbagStatus) {
+ if (airbagStatus != null) {
+ parameters.put(KEY_AIRBAG_STATUS, airbagStatus);
+ } else {
+ parameters.remove(KEY_AIRBAG_STATUS);
+ }
+ }
+ @SuppressWarnings("unchecked")
+ public VehicleDataResult getAirbagStatus() {
+ Object obj = parameters.get(KEY_AIRBAG_STATUS);
+ if (obj instanceof VehicleDataResult) {
+ return (VehicleDataResult) obj;
+ } else if (obj instanceof Hashtable) {
+ try {
+ return new VehicleDataResult((Hashtable<String, Object>) obj);
+ } catch (Exception e) {
+ DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_AIRBAG_STATUS, e);
+ }
+ }
+ return null;
+ }
+ public void setEmergencyEvent(VehicleDataResult emergencyEvent) {
+ if (emergencyEvent != null) {
+ parameters.put(KEY_EMERGENCY_EVENT, emergencyEvent);
+ } else {
+ parameters.remove(KEY_EMERGENCY_EVENT);
+ }
+ }
+ @SuppressWarnings("unchecked")
+ public VehicleDataResult getEmergencyEvent() {
+ Object obj = parameters.get(KEY_EMERGENCY_EVENT);
+ if (obj instanceof VehicleDataResult) {
+ return (VehicleDataResult) obj;
+ } else if (obj instanceof Hashtable) {
+ try {
+ return new VehicleDataResult((Hashtable<String, Object>) obj);
+ } catch (Exception e) {
+ DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_EMERGENCY_EVENT, e);
+ }
+ }
+ return null;
+ }
+ public void setClusterModeStatus(VehicleDataResult clusterModeStatus) {
+ if (clusterModeStatus != null) {
+ parameters.put(KEY_CLUSTER_MODE_STATUS, clusterModeStatus);
+ } else {
+ parameters.remove(KEY_CLUSTER_MODE_STATUS);
+ }
+ }
+ @SuppressWarnings("unchecked")
+ public VehicleDataResult getClusterModeStatus() {
+ Object obj = parameters.get(KEY_CLUSTER_MODE_STATUS);
+ if (obj instanceof VehicleDataResult) {
+ return (VehicleDataResult) obj;
+ } else if (obj instanceof Hashtable) {
+ try {
+ return new VehicleDataResult((Hashtable<String, Object>) obj);
+ } catch (Exception e) {
+ DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_CLUSTER_MODE_STATUS, e);
+ }
+ }
+ return null;
+ }
+ public void setMyKey(VehicleDataResult myKey) {
+ if (myKey != null) {
+ parameters.put(KEY_MY_KEY, myKey);
+ } else {
+ parameters.remove(KEY_MY_KEY);
+ }
+ }
+ @SuppressWarnings("unchecked")
+ public VehicleDataResult getMyKey() {
+ Object obj = parameters.get(KEY_MY_KEY);
+ if (obj instanceof VehicleDataResult) {
+ return (VehicleDataResult) obj;
+ } else if (obj instanceof Hashtable) {
+ try {
+ return new VehicleDataResult((Hashtable<String, Object>) obj);
+ } catch (Exception e) {
+ DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_MY_KEY, e);
+ }
+ }
+ return null;
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SubscribeWayPoints.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SubscribeWayPoints.java
new file mode 100644
index 000000000..e0d3627e2
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SubscribeWayPoints.java
@@ -0,0 +1,15 @@
+package com.smartdevicelink.proxy.rpc;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCRequest;
+
+import java.util.Hashtable;
+
+public class SubscribeWayPoints extends RPCRequest {
+ public SubscribeWayPoints() {
+ super(FunctionID.SUBSCRIBE_WAY_POINTS.toString());
+ }
+ public SubscribeWayPoints(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SubscribeWayPointsResponse.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SubscribeWayPointsResponse.java
new file mode 100644
index 000000000..880a97229
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SubscribeWayPointsResponse.java
@@ -0,0 +1,16 @@
+package com.smartdevicelink.proxy.rpc;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCResponse;
+
+import java.util.Hashtable;
+
+public class SubscribeWayPointsResponse extends RPCResponse {
+
+ public SubscribeWayPointsResponse() {
+ super(FunctionID.SUBSCRIBE_WAY_POINTS.toString());
+ }
+ public SubscribeWayPointsResponse(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+} \ No newline at end of file
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SystemRequest.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SystemRequest.java
new file mode 100644
index 000000000..14164b964
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SystemRequest.java
@@ -0,0 +1,116 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+import java.util.List;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCRequest;
+import com.smartdevicelink.proxy.rpc.enums.RequestType;
+/** An asynchronous request from the device; binary data can be included in hybrid part of message for some requests (such as HTTP, Proprietary, or Authentication requests)
+ *
+ * <p><b>Parameter List</b></p>
+ * <table border="1" rules="all">
+ * <tr>
+ * <th>Name</th>
+ * <th>Type</th>
+ * <th>Description</th>
+ * <th>Reg.</th>
+ * <th>Notes</th>
+ * <th>Version</th>
+ * </tr>
+ * <tr>
+ * <td>requestType</td>
+ * <td>RequestType</td>
+ * <td>The type of system request. Note that Proprietary requests should forward the binary data to the known proprietary module on the system.</td>
+ * <td>Y</td>
+ * <td></td>
+ * <td>SmartDeviceLink 3.0 </td>
+ * </tr>
+ *
+ * <tr>
+ * <td>fileName</td>
+ * <td>String</td>
+ * <td>Filename of HTTP data to store in predefined system staging area. Mandatory if requestType is HTTP. PROPRIETARY requestType should ignore this parameter. </td>
+ * <td>N</td>
+ * <td>Max Length: 255</td>
+ * <td>SmartDeviceLink 3.0 </td>
+ * </tr>
+ * </table>
+ * @since SmartDeviceLink 3.0
+ *
+ *
+ *
+ */
+
+public class SystemRequest extends RPCRequest {
+ public static final String KEY_FILE_NAME = "fileName";
+ public static final String KEY_REQUEST_TYPE = "requestType";
+ public static final String KEY_DATA = "data";
+ /**
+ * Constructs a new SystemRequest object
+ */
+
+ public SystemRequest() {
+ super(FunctionID.SYSTEM_REQUEST.toString());
+ }
+
+ public SystemRequest(boolean bLegacy) {
+ super(FunctionID.ENCODED_SYNC_P_DATA.toString());
+ }
+
+ public SystemRequest(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+
+ @SuppressWarnings("unchecked")
+ public List<String> getLegacyData() {
+ if (parameters.get(KEY_DATA) instanceof List<?>) {
+ List<?> list = (List<?>)parameters.get(KEY_DATA);
+ if (list != null && list.size()>0) {
+ Object obj = list.get(0);
+ if (obj instanceof String) {
+ return (List<String>) list;
+ }
+ }
+ }
+ return null;
+ }
+
+ public void setLegacyData( List<String> data ) {
+ if ( data!= null) {
+ parameters.put(KEY_DATA, data );
+ } else {
+ parameters.remove(KEY_DATA);
+ }
+ }
+
+ public String getFileName() {
+ return (String) parameters.get(KEY_FILE_NAME);
+ }
+
+ public void setFileName(String fileName) {
+ if (fileName != null) {
+ parameters.put(KEY_FILE_NAME, fileName);
+ } else {
+ parameters.remove(KEY_FILE_NAME);
+ }
+ }
+
+ public RequestType getRequestType() {
+ Object obj = parameters.get(KEY_REQUEST_TYPE);
+ if (obj instanceof RequestType) {
+ return (RequestType) obj;
+ } else if (obj instanceof String) {
+ return RequestType.valueForString((String) obj);
+ }
+ return null;
+ }
+
+ public void setRequestType(RequestType requestType) {
+ if (requestType != null) {
+ parameters.put(KEY_REQUEST_TYPE, requestType);
+ } else {
+ parameters.remove(KEY_REQUEST_TYPE);
+ }
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SystemRequestResponse.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SystemRequestResponse.java
new file mode 100644
index 000000000..6fc920f1e
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SystemRequestResponse.java
@@ -0,0 +1,21 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCResponse;
+
+/**
+ * System Request Response is sent, when SystemRequest has been called
+ *
+ * @since SmartDeviceLink 3.0
+ */
+public class SystemRequestResponse extends RPCResponse {
+ public SystemRequestResponse() {
+ super(FunctionID.SYSTEM_REQUEST.toString());
+ }
+
+ public SystemRequestResponse(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+} \ No newline at end of file
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/TTSChunk.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/TTSChunk.java
new file mode 100644
index 000000000..97f865903
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/TTSChunk.java
@@ -0,0 +1,96 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+
+import com.smartdevicelink.proxy.RPCStruct;
+import com.smartdevicelink.proxy.rpc.enums.SpeechCapabilities;
+
+/**
+ * <p>Specifies what is to be spoken. This can be simply a text phrase, which SDL will speak according to its own rules.
+ * It can also be phonemes from either the Microsoft SAPI phoneme set, or from the LHPLUS phoneme set.
+ * It can also be a pre-recorded sound in WAV format (either developer-defined, or provided by the SDL platform).</p>
+ *
+ * <p>In SDL, words, and therefore sentences, can be built up from phonemes and are used to explicitly provide the proper pronounciation to the TTS engine.
+ * For example, to have SDL pronounce the word "read" as "red", rather than as when it is pronounced like "reed",
+ * the developer would use phonemes to express this desired pronounciation.</p>
+ * <p>For more information about phonemes, see <a href="http://en.wikipedia.org/wiki/Phoneme">http://en.wikipedia.org/wiki/Phoneme</a></p>.
+ * <p><b> Parameter List</b></p>
+ * <table border="1" rules="all">
+ * <tr>
+ * <th>Name</th>
+ * <th>Type</th>
+ * <th>Description</th>
+ * <th>SmartDeviceLink Ver. Available</th>
+ * </tr>
+ * <tr>
+ * <td>text</td>
+ * <td>String</td>
+ * <td>Text to be spoken, or a phoneme specification, or the name of a pre-recorded sound. The contents of this field are indicated by the "type" field.</td>
+ * <td>SmartDeviceLink 1.0</td>
+ * </tr>
+ * <tr>
+ * <td>type</td>
+ * <td>SpeechCapabilities</td>
+ * <td>Indicates the type of information in the "text" field (e.g. phrase to be spoken, phoneme specification, name of pre-recorded sound). </td>
+ * <td>SmartDeviceLink 1.0</td>
+ * </tr>
+ * </table>
+ * @since SmartDeviceLink 1.0
+ */
+public class TTSChunk extends RPCStruct {
+ public static final String KEY_TEXT = "text";
+ public static final String KEY_TYPE = "type";
+ /**
+ * Constructs a newly allocated TTSChunk object
+ */
+ public TTSChunk() { }
+ /**
+ * Constructs a newly allocated TTSChunk object indicated by the Hashtable parameter
+ * @param hash The Hashtable to use
+ */
+ public TTSChunk(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+ /**
+ * Get text to be spoken, or a phoneme specification, or the name of a pre-recorded sound. The contents of this field are indicated by the "type" field.
+ * @return text to be spoken, or a phoneme specification, or the name of a pre-recorded sound
+ */
+ public String getText() {
+ return (String) store.get( KEY_TEXT );
+ }
+ /**
+ * Set the text to be spoken, or a phoneme specification, or the name of a pre-recorded sound. The contents of this field are indicated by the "type" field.
+ * @param text to be spoken, or a phoneme specification, or the name of a pre-recorded sound.
+ */
+ public void setText( String text ) {
+ if (text != null) {
+ store.put(KEY_TEXT, text );
+ } else {
+ store.remove(KEY_TEXT);
+ }
+ }
+ /**
+ * Get the type of information in the "text" field (e.g. phrase to be spoken, phoneme specification, name of pre-recorded sound).
+ * @return the type of information in the "text" field
+ */
+ public SpeechCapabilities getType() {
+ Object obj = store.get(KEY_TYPE);
+ if (obj instanceof SpeechCapabilities) {
+ return (SpeechCapabilities) obj;
+ } else if (obj instanceof String) {
+ return SpeechCapabilities.valueForString((String) obj);
+ }
+ return null;
+ }
+ /**
+ * Set the type of information in the "text" field (e.g. phrase to be spoken, phoneme specification, name of pre-recorded sound).
+ * @param type the type of information in the "text" field
+ */
+ public void setType( SpeechCapabilities type ) {
+ if (type != null) {
+ store.put(KEY_TYPE, type );
+ } else {
+ store.remove(KEY_TYPE);
+ }
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/TextField.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/TextField.java
new file mode 100644
index 000000000..918f0eb2f
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/TextField.java
@@ -0,0 +1,173 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+
+import com.smartdevicelink.proxy.RPCStruct;
+import com.smartdevicelink.proxy.rpc.enums.CharacterSet;
+import com.smartdevicelink.proxy.rpc.enums.TextFieldName;
+
+/**
+ * Struct defining the characteristics of a displayed field on the HMI.
+ * <p><b> Parameter List</b></p>
+ * <table border="1" rules="all">
+ * <tr>
+ * <th>Name</th>
+ * <th>Type</th>
+ * <th>Description</th>
+ * <th>SmartDeviceLink Ver. Available</th>
+ * </tr>
+ * <tr>
+ * <td>name</td>
+ * <td>TextFieldName</td>
+ * <td>Enumeration identifying the field. </td>
+ * <td>SmartDeviceLink 1.0</td>
+ * </tr>
+ * <tr>
+ * <td>characterSet</td>
+ * <td>CharacterSet</td>
+ * <td>The character set that is supported in this field. </td>
+ * <td>SmartDeviceLink 1.0</td>
+ * </tr>
+ * <tr>
+ * <td>width</td>
+ * <td>Integer</td>
+ * <td>The number of characters in one row of this field.
+ * <ul>
+ * <li>Minvalue="1"</li>
+ * <li>maxvalue="500"</li>
+ * </ul>
+ * </td>
+ * <td>SmartDeviceLink 1.0</td>
+ * </tr>
+ * <tr>
+ * <td>rows</td>
+ * <td>Integer</td>
+ * <td>The number of rows for this text field.
+ * <ul>
+ * <li>Minvalue="1"</li>
+ * <li>maxvalue="3"</li>
+ * </ul>
+ * </td>
+ * <td>SmartDeviceLink 1.0</td>
+ * </tr>
+ * </table>
+ * @since SmartDeviceLink 1.0
+ *
+ * @see TextFieldName
+ * @see Alert
+ * @see Show
+ * @see PerformInteraction
+ * @see ScrollableMessage
+ * @see PerformAudioPassThru
+ * @see ShowConstantTBT
+ *
+ */
+public class TextField extends RPCStruct {
+ public static final String KEY_WIDTH = "width";
+ public static final String KEY_CHARACTER_SET = "characterSet";
+ public static final String KEY_ROWS = "rows";
+ public static final String KEY_NAME = "name";
+ /**
+ * Constructs a newly allocated TextField object
+ */
+ public TextField() { }
+ /**
+ * Constructs a newly allocated TextField object indicated by the Hashtable parameter
+ * @param hash The Hashtable to use
+ */
+ public TextField(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+ /**
+ * Get the enumeration identifying the field.
+ * @return the name of TextField
+ */
+ public TextFieldName getName() {
+ Object obj = store.get(KEY_NAME);
+ if (obj instanceof TextFieldName) {
+ return (TextFieldName) obj;
+ } else if (obj instanceof String) {
+ return TextFieldName.valueForString((String) obj);
+ }
+ return null;
+ }
+ /**
+ * Set the enumeration identifying the field.
+ * @param name the name of TextField
+ */
+ public void setName( TextFieldName name ) {
+ if (name != null) {
+ store.put(KEY_NAME, name );
+ } else {
+ store.remove(KEY_NAME);
+ }
+ }
+ /**
+ * Get the character set that is supported in this field.
+ * @return the character set
+ */
+ public CharacterSet getCharacterSet() {
+ Object obj = store.get(KEY_CHARACTER_SET);
+ if (obj instanceof CharacterSet) {
+ return (CharacterSet) obj;
+ } else if (obj instanceof String) {
+ return CharacterSet.valueForString((String) obj);
+ }
+ return null;
+ }
+ /**
+ * Set the character set that is supported in this field.
+ * @param characterSet - the character set
+ */
+ public void setCharacterSet( CharacterSet characterSet ) {
+ if (characterSet != null) {
+ store.put(KEY_CHARACTER_SET, characterSet );
+ } else {
+ store.remove(KEY_CHARACTER_SET);
+ }
+ }
+ /**
+ * Get the number of characters in one row of this field.
+ * <ul>
+ * <li>Minvalue="1"</li>
+ * <li>maxvalue="500"</li>
+ * </ul>
+ * @return the number of characters in one row of this field
+ */
+ public Integer getWidth() {
+ return (Integer) store.get( KEY_WIDTH );
+ }
+ /**
+ * Set the number of characters in one row of this field.
+ * <ul>
+ * <li>Minvalue="1"</li>
+ * <li>maxvalue="500"</li>
+ * </ul>
+ * @param width the number of characters in one row of this field
+ */
+ public void setWidth( Integer width ) {
+ if (width != null) {
+ store.put(KEY_WIDTH, width );
+ } else {
+ store.remove(KEY_WIDTH);
+ }
+ }
+ /**
+ *Get the number of rows for this text field.
+ * <ul>
+ * <li>Minvalue="1"</li>
+ * <li>maxvalue="3"</li>
+ * </ul>
+ * @return the number of rows for this text field
+ */
+ public Integer getRows() {
+ return (Integer) store.get( KEY_ROWS );
+ }
+ public void setRows( Integer rows ) {
+ if (rows != null) {
+ store.put(KEY_ROWS, rows );
+ } else {
+ store.remove(KEY_ROWS);
+ }
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/TireStatus.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/TireStatus.java
new file mode 100644
index 000000000..f853d673c
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/TireStatus.java
@@ -0,0 +1,233 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+
+import com.smartdevicelink.proxy.RPCStruct;
+import com.smartdevicelink.proxy.rpc.enums.WarningLightStatus;
+import com.smartdevicelink.util.DebugTool;
+/** <p>The status and pressure of the tires.</p>
+ * <p><b> Parameter List:</b></p>
+ *
+ * <table border="1" rules="all">
+ * <tr>
+ * <th>Param Name</th>
+ * <th>Type</th>
+ * <th>Description</th>
+ * <th>Version</th>
+ * </tr>
+ * <tr>
+ * <td>PressureTellTale</td>
+ * <td>WarningLightStatus</td>
+ * <td>Status of the Tire Pressure TellTale</td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>LeftFront</td>
+ * <td>SingleTireStatus</td>
+ * <td>The status of the left front tire.</td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>RightFront</td>
+ * <td>SingleTireStatus</td>
+ * <td>The status of the right front tire.</td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>LeftRear</td>
+ * <td>SingleTireStatus</td>
+ * <td>The status of the left rear tire.</td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>RightRear</td>
+ * <td>SingleTireStatus</td>
+ * <td>The status of the right rear tire</td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>InnerLeftRear</td>
+ * <td>SingleTireStatus</td>
+ * <td>The status of the inner left rear tire.</td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>InnerRightRear</td>
+ * <td>SingleTireStatus</td>
+ * <td>The status of the inner right rear tire.</td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * </table>
+ *
+ * @since SmartDeviceLink 2.0
+ *
+ * @see WarningLightStatus
+ * @see SingleTireStatus
+ * @see GetVehicleData
+ * @see OnVehicleData
+ */
+
+public class TireStatus extends RPCStruct {
+ public static final String KEY_PRESSURE_TELL_TALE = "pressureTellTale";
+ public static final String KEY_LEFT_FRONT = "leftFront";
+ public static final String KEY_RIGHT_FRONT = "rightFront";
+ public static final String KEY_LEFT_REAR = "leftRear";
+ public static final String KEY_INNER_LEFT_REAR = "innerLeftRear";
+ public static final String KEY_INNER_RIGHT_REAR = "innerRightRear";
+ public static final String KEY_RIGHT_REAR = "rightRear";
+ /**
+ * <p>Constructs a new TireStatus object indicated by the Hashtable parameter</p>
+ *
+ *
+ * @param hash
+ * <p>
+ * The Hashtable to use</p>
+ */
+
+ public TireStatus() { }
+ public TireStatus(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+ public void setPressureTellTale(WarningLightStatus pressureTellTale) {
+ if (pressureTellTale != null) {
+ store.put(KEY_PRESSURE_TELL_TALE, pressureTellTale);
+ } else {
+ store.remove(KEY_PRESSURE_TELL_TALE);
+ }
+ }
+ public WarningLightStatus getPressureTellTale() {
+ Object obj = store.get(KEY_PRESSURE_TELL_TALE);
+ if (obj instanceof WarningLightStatus) {
+ return (WarningLightStatus) obj;
+ } else if (obj instanceof String) {
+ return WarningLightStatus.valueForString((String) obj);
+ }
+ return null;
+ }
+ public void setLeftFront(SingleTireStatus leftFront) {
+ if (leftFront != null) {
+ store.put(KEY_LEFT_FRONT, leftFront);
+ } else {
+ store.remove(KEY_LEFT_FRONT);
+ }
+ }
+ @SuppressWarnings("unchecked")
+ public SingleTireStatus getLeftFront() {
+ Object obj = store.get(KEY_LEFT_FRONT);
+ if (obj instanceof SingleTireStatus) {
+ return (SingleTireStatus) obj;
+ } else if (obj instanceof Hashtable) {
+ try {
+ return new SingleTireStatus((Hashtable<String, Object>) obj);
+ } catch (Exception e) {
+ DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_LEFT_FRONT, e);
+ }
+ }
+ return null;
+ }
+ public void setRightFront(SingleTireStatus rightFront) {
+ if (rightFront != null) {
+ store.put(KEY_RIGHT_FRONT, rightFront);
+ } else {
+ store.remove(KEY_RIGHT_FRONT);
+ }
+ }
+ @SuppressWarnings("unchecked")
+ public SingleTireStatus getRightFront() {
+ Object obj = store.get(KEY_RIGHT_FRONT);
+ if (obj instanceof SingleTireStatus) {
+ return (SingleTireStatus) obj;
+ } else if (obj instanceof Hashtable) {
+ try {
+ return new SingleTireStatus((Hashtable<String, Object>) obj);
+ } catch (Exception e) {
+ DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_RIGHT_FRONT, e);
+ }
+ }
+ return null;
+ }
+ public void setLeftRear(SingleTireStatus leftRear) {
+ if (leftRear != null) {
+ store.put(KEY_LEFT_REAR, leftRear);
+ } else {
+ store.remove(KEY_LEFT_REAR);
+ }
+ }
+ @SuppressWarnings("unchecked")
+ public SingleTireStatus getLeftRear() {
+ Object obj = store.get(KEY_LEFT_REAR);
+ if (obj instanceof SingleTireStatus) {
+ return (SingleTireStatus) obj;
+ } else if (obj instanceof Hashtable) {
+ try {
+ return new SingleTireStatus((Hashtable<String, Object>) obj);
+ } catch (Exception e) {
+ DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_LEFT_REAR, e);
+ }
+ }
+ return null;
+ }
+ public void setRightRear(SingleTireStatus rightRear) {
+ if (rightRear != null) {
+ store.put(KEY_RIGHT_REAR, rightRear);
+ } else {
+ store.remove(KEY_RIGHT_REAR);
+ }
+ }
+ @SuppressWarnings("unchecked")
+ public SingleTireStatus getRightRear() {
+ Object obj = store.get(KEY_RIGHT_REAR);
+ if (obj instanceof SingleTireStatus) {
+ return (SingleTireStatus) obj;
+ } else if (obj instanceof Hashtable) {
+ try {
+ return new SingleTireStatus((Hashtable<String, Object>) obj);
+ } catch (Exception e) {
+ DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_RIGHT_REAR, e);
+ }
+ }
+ return null;
+ }
+ public void setInnerLeftRear(SingleTireStatus innerLeftRear) {
+ if (innerLeftRear != null) {
+ store.put(KEY_INNER_LEFT_REAR, innerLeftRear);
+ } else {
+ store.remove(KEY_INNER_LEFT_REAR);
+ }
+ }
+ @SuppressWarnings("unchecked")
+ public SingleTireStatus getInnerLeftRear() {
+ Object obj = store.get(KEY_INNER_LEFT_REAR);
+ if (obj instanceof SingleTireStatus) {
+ return (SingleTireStatus) obj;
+ } else if (obj instanceof Hashtable) {
+ try {
+ return new SingleTireStatus((Hashtable<String, Object>) obj);
+ } catch (Exception e) {
+ DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_INNER_LEFT_REAR, e);
+ }
+ }
+ return null;
+ }
+ public void setInnerRightRear(SingleTireStatus innerRightRear) {
+ if (innerRightRear != null) {
+ store.put(KEY_INNER_RIGHT_REAR, innerRightRear);
+ } else {
+ store.remove(KEY_INNER_RIGHT_REAR);
+ }
+ }
+ @SuppressWarnings("unchecked")
+ public SingleTireStatus getInnerRightRear() {
+ Object obj = store.get(KEY_INNER_RIGHT_REAR);
+ if (obj instanceof SingleTireStatus) {
+ return (SingleTireStatus) obj;
+ } else if (obj instanceof Hashtable) {
+ try {
+ return new SingleTireStatus((Hashtable<String, Object>) obj);
+ } catch (Exception e) {
+ DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_INNER_RIGHT_REAR, e);
+ }
+ }
+ return null;
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/TouchCoord.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/TouchCoord.java
new file mode 100644
index 000000000..95f793fe6
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/TouchCoord.java
@@ -0,0 +1,86 @@
+package com.smartdevicelink.proxy.rpc;
+
+import com.smartdevicelink.proxy.RPCStruct;
+
+import java.util.Hashtable;
+/**
+ * <p>The x or y coordinate of the touch.</p>
+ *
+ *
+ *
+ * <p><b>Parameter List</b></p>
+ * <table border="1" rules="all">
+ * <tr>
+ * <th>Name</th>
+ * <th>Type</th>
+ * <th>Description</th>
+ * <th>Reg.</th>
+ * <th>Notes</th>
+ * <th> Version</th>
+ * </tr>
+ * <tr>
+ * <td>x</td>
+ * <td>Integer</td>
+ * <td>The x coordinate of the touch.</td>
+ * <td>Y</td>
+ * <td>minvalue = 0; maxvalue = 10000</td>
+ * <td>SmartDeviceLink 3.0 </td>
+ * </tr>
+ * <tr>
+ * <td>y</td>
+ * <td>Integer</td>
+ * <td>The y coordinate of the touch.</td>
+ * <td>Y</td>
+ * <td>minvalue = 0; maxvalue = 10000</td>
+ * <td>SmartDeviceLink 3.0 </td>
+ * </tr>
+ * </table>
+ *@see SoftButtonCapabilities
+ *@see ButtonCapabilities
+ *@see OnButtonPress
+ *
+ *@since SmartDeviceLink 3.0
+ */
+
+public class TouchCoord extends RPCStruct {
+ public static final String KEY_X = "x";
+ public static final String KEY_Y = "y";
+ public TouchCoord() {}
+ /**
+ * <p>Constructs a new TouchCoord object indicated by the Hashtable parameter</p>
+ *
+ *
+ * @param hash
+ * <p>
+ * The Hashtable to use</p>
+ */
+
+ public TouchCoord(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+
+ public void setX(Integer x) {
+ if (x != null) {
+ store.put(KEY_X, x);
+ } else {
+ store.remove(KEY_X);
+ }
+ }
+
+ public Integer getX() {
+ return (Integer) store.get(KEY_X);
+ }
+
+ public void setY(Integer y) {
+ if (y != null) {
+ store.put(KEY_Y, y);
+ } else {
+ store.remove(KEY_Y);
+ }
+ }
+
+ public Integer getY() {
+ return (Integer) store.get(KEY_Y);
+ }
+
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/TouchEvent.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/TouchEvent.java
new file mode 100644
index 000000000..76e3c4207
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/TouchEvent.java
@@ -0,0 +1,183 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.ArrayList;
+import java.util.Hashtable;
+import java.util.List;
+
+import com.smartdevicelink.proxy.RPCStruct;
+/**
+ * <p>For touchscreen interactions, the mode of how the choices are presented.</p>
+ *
+ * <p><b>Parameter List</b></p>
+ *
+ * <table border="1" rules="all">
+ * <tr>
+ * <th>Name</th>
+ * <th>Type</th>
+ * <th>Description</th>
+ * <th>Reg.</th>
+ * <th>Notes</th>
+ * <th>Version</th>
+ * </tr>
+ * <tr>
+ * <td>id</td>
+ * <td>Integer</td>
+ * <td> A touch's unique identifier. The application can track the current touch events by id. If a touch event has type begin, the id should be added to the set of touches. If a touch event has type end, the id should be removed from the set of touches.</td>
+ * <td>N</td>
+ * <td>Min Value: 0; Max Value: 9</td>
+ * <td>SmartDeviceLink 3.0 </td>
+ * </tr>
+ * <tr>
+ * <td>ts</td>
+ * <td>Float</td>
+ * <td>The time that the touch was recorded. <p> This number can the time since the beginning of the session or something else as long as the units are in milliseconds.</p>
+ * <p>The timestamp is used to determined the rate of change of position of a touch.</p><p>The application also uses the time to verify whether two touches,with different ids, are part of a single action by the user.</p>
+ * <p>If there is only a single timestamp in this array,</p> it is the same for every coordinate in the coordinates array.</td>
+ * <td>Y</td>
+ * <td>minvalue="0" maxvalue="5000000000" minsize="1" maxsize="1000"</td>
+ * <td>SmartDeviceLink 3.0 </td>
+ * </tr>
+ * <tr>
+ * <td>c</td>
+ * <td>Integer</td>
+ * <td>The coordinates of the screen area where the touch event occurred.</td>
+ * <td>Y</td>
+ * <td></td>
+ * <td>SmartDeviceLink 3.0</td>
+ * </tr>
+ * </table>
+ *
+ * @since SmartDeviceLink 3.0
+ *
+ * @see SoftButtonCapabilities
+ * @see ButtonCapabilities
+ * @see OnButtonPress
+ */
+
+public class TouchEvent extends RPCStruct {
+ public static final String KEY_ID = "id";
+ public static final String KEY_TS = "ts";
+ public static final String KEY_C = "c";
+
+ public TouchEvent() { }
+ /**
+ * <p>Constructs a new TouchEvent object indicated by the Hashtable parameter</p>
+ *
+ *
+ * @param hash
+ * <p>
+ * The Hashtable to use</p>
+ */
+ public TouchEvent(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+
+ public void setId(Integer id) {
+ if (id != null) {
+ store.put(KEY_ID, id);
+ } else {
+ store.remove(KEY_ID);
+ }
+ }
+
+ public Integer getId() {
+ return (Integer) store.get(KEY_ID);
+ }
+
+ /**
+ * Use getTimestamps
+ * @deprecated 4.0.2
+ * @return
+ */
+ @Deprecated
+ public List<Long> getTs() {
+ return getTimestamps();
+ }
+
+ @SuppressWarnings("unchecked")
+ public List<Long> getTimestamps() {
+ if(store.get(KEY_TS) instanceof List<?>){
+ List<?> list = (List<?>)store.get(KEY_TS);
+ if(list != null && list.size()>0){
+ Object obj = list.get(0);
+ if(obj instanceof Integer){ //Backwards case
+ int size = list.size();
+ List<Integer> listOfInt = (List<Integer>) list;
+ List<Long> listofLongs = new ArrayList<Long>(size);
+ for(int i = 0; i<size;i++){
+ listofLongs.add(listOfInt.get(i).longValue());
+ }
+ return listofLongs;
+ }else if(obj instanceof Long){
+ return (List<Long>) list;
+ }
+ }
+ }
+ return null;
+ }
+
+ public void setTimestamps(List<Long> ts){
+ if (ts != null) {
+ store.put(KEY_TS, ts);
+ } else {
+ store.remove(KEY_TS);
+ }
+ }
+
+ /**
+ * Use setTimestamps.
+ * @deprecated 4.0.2
+ * @param ts
+ */
+ @Deprecated
+ public void setTs(List<Long> ts) {
+ setTimestamps(ts);
+ }
+
+ /**
+ * Use getTouchCoordinates
+ * @deprecated 4.0.2
+ * @return
+ */
+ @Deprecated
+ public List<TouchCoord> getC() {
+ return getTouchCoordinates();
+ }
+ @SuppressWarnings("unchecked")
+ public List<TouchCoord> getTouchCoordinates() {
+ if (store.get(KEY_C) instanceof List<?>) {
+ List<?> list = (List<?>)store.get(KEY_C);
+ if (list != null && list.size() > 0) {
+ Object obj = list.get(0);
+ if (obj instanceof TouchCoord) {
+ return (List<TouchCoord>) list;
+ } else if (obj instanceof Hashtable) {
+ List<TouchCoord> newList = new ArrayList<TouchCoord>();
+ for (Object hashObj : list) {
+ newList.add(new TouchCoord((Hashtable<String, Object>) hashObj));
+ }
+ return newList;
+ }
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Use setTouchCoordinates
+ * @deprecated 4.0.2
+ * @return
+ */
+ @Deprecated
+ public void setC( List<TouchCoord> c ) {
+ setTouchCoordinates(c);
+ }
+
+ public void setTouchCoordinates( List<TouchCoord> c ) {
+ if (c != null) {
+ store.put(KEY_C, c );
+ } else {
+ store.remove(KEY_C);
+ }
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/TouchEventCapabilities.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/TouchEventCapabilities.java
new file mode 100644
index 000000000..b67e5b61a
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/TouchEventCapabilities.java
@@ -0,0 +1,91 @@
+package com.smartdevicelink.proxy.rpc;
+
+import com.smartdevicelink.proxy.RPCStruct;
+
+import java.util.Hashtable;
+/**
+ * Types of screen touch events available in screen area.
+ *
+ * <p><b>Parameter List</b></p>
+ * <table border="1" rules="all">
+ * <tr>
+ * <th>Name</th>
+ * <th>Type</th>
+ * <th>Description</th>
+ * <th>Reg.</th>
+ * <th>Notes</th>
+ * <th>SmartDeviceLink Version</th>
+ * </tr>
+ * <tr>
+ * <td>pressAvailable</td>
+ * <td>Boolean</td>
+ * <td></td>
+ * <td>Y</td>
+ * <td></td>
+ * <td>SmartDeviceLink 3.0 </td>
+ * </tr>
+ * <tr>
+ * <td>multiTouchAvailable</td>
+ * <td>Boolean</td>
+ * <td></td>
+ * <td>Y</td>
+ * <td></td>
+ * <td>SmartDeviceLink 3.0 </td>
+ * </tr>
+ * <tr>
+ * <td>doublePressAvailable</td>
+ * <td>Boolean</td>
+ * <td></td>
+ * <td>Y</td>
+ * <td></td>
+ * <td>SmartDeviceLink 3.0 </td>
+ * </tr>
+ * </table>
+ *
+ */
+public class TouchEventCapabilities extends RPCStruct {
+ public static final String KEY_PRESS_AVAILABLE = "pressAvailable";
+ public static final String KEY_MULTI_TOUCH_AVAILABLE = "multiTouchAvailable";
+ public static final String KEY_DOUBLE_PRESS_AVAILABLE = "doublePressAvailable";
+ public TouchEventCapabilities() {}
+
+ public TouchEventCapabilities(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+
+ public void setPressAvailable(Boolean pressAvailable) {
+ if (pressAvailable != null) {
+ store.put(KEY_PRESS_AVAILABLE, pressAvailable);
+ } else {
+ store.remove(KEY_PRESS_AVAILABLE);
+ }
+ }
+
+ public Boolean getPressAvailable() {
+ return (Boolean) store.get(KEY_PRESS_AVAILABLE);
+ }
+
+ public void setMultiTouchAvailable(Boolean multiTouchAvailable) {
+ if (multiTouchAvailable != null) {
+ store.put(KEY_MULTI_TOUCH_AVAILABLE, multiTouchAvailable);
+ } else {
+ store.remove(KEY_MULTI_TOUCH_AVAILABLE);
+ }
+ }
+
+ public Boolean getMultiTouchAvailable() {
+ return (Boolean) store.get(KEY_MULTI_TOUCH_AVAILABLE);
+ }
+
+ public void setDoublePressAvailable(Boolean doublePressAvailable) {
+ if (doublePressAvailable != null) {
+ store.put(KEY_DOUBLE_PRESS_AVAILABLE, doublePressAvailable);
+ } else {
+ store.remove(KEY_DOUBLE_PRESS_AVAILABLE);
+ }
+ }
+
+ public Boolean getDoublePressAvailable() {
+ return (Boolean) store.get(KEY_DOUBLE_PRESS_AVAILABLE);
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/Turn.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/Turn.java
new file mode 100644
index 000000000..437e176a5
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/Turn.java
@@ -0,0 +1,101 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+
+import com.smartdevicelink.proxy.RPCStruct;
+
+/**
+ * Describes a navigation turn including an optional icon
+ *
+ * <p><b>Parameter List</p>
+ * <table border="1" rules="all">
+ * <tr>
+ * <th>Name</th>
+ * <th>Type</th>
+ * <th>Description</th>
+ * <th>SmartDeviceLink Ver. Available</th>
+ * </tr>
+ * <tr>
+ * <td>navigationText</td>
+ * <td>String</td>
+ * <td>Text to describe the turn (e.g. streetname)
+ * <ul>
+ * <li>Maxlength = 500</li>
+ * </ul>
+ * </td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>turnIcon</td>
+ * <td>Image</td>
+ * <td>Image to be shown for a turn</td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * </table>
+ *
+ * @since SmartDeviceLink 2.0
+ */
+public class Turn extends RPCStruct{
+ public static final String KEY_NAVIGATION_TEXT = "navigationText";
+ public static final String KEY_TURN_IMAGE = "turnIcon";
+
+ public Turn() { }
+ public Turn(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+
+ /**
+ * set the text to describe the turn (e.g. streetname)
+ *
+ * @param navigationText
+ * the text to describe the turn (e.g. streetname)
+ */
+ public void setNavigationText(String navigationText){
+ if(navigationText != null){
+ store.put(KEY_NAVIGATION_TEXT, navigationText);
+ }
+ else{
+ store.remove(KEY_NAVIGATION_TEXT);
+ }
+ }
+
+ /**
+ * get the text to describe the turn (e.g. streetname)
+ *
+ * @return the text to describe the turn (e.g. streetname)
+ */
+ public String getNavigationText(){
+ return (String) store.get(KEY_NAVIGATION_TEXT);
+ }
+
+ /**
+ * set Image to be shown for a turn
+ *
+ * @param turnIcon
+ * the image to be shown for a turn
+ */
+ public void setTurnIcon(Image turnIcon){
+ if (turnIcon != null) {
+ store.put(KEY_TURN_IMAGE, turnIcon);
+ } else {
+ store.remove(KEY_TURN_IMAGE);
+ }
+ }
+
+ /**
+ * get the image to be shown for a turn
+ *
+ * @return the image to be shown for a turn
+ */
+ @SuppressWarnings("unchecked")
+ public Image getTurnIcon(){
+ Object obj = store.get(KEY_TURN_IMAGE);
+ if (obj instanceof Image) {
+ return (Image) obj;
+ } else if (obj instanceof Hashtable) {
+ return new Image((Hashtable<String, Object>) obj);
+ }
+ return null;
+ }
+
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/UnregisterAppInterface.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/UnregisterAppInterface.java
new file mode 100644
index 000000000..8db9e032f
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/UnregisterAppInterface.java
@@ -0,0 +1,244 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCRequest;
+
+/**
+ * Terminates an application's interface registration. This causes SDL&reg; to
+ * dispose of all resources associated with the application's interface
+ * registration (e.g. Command Menu items, Choice Sets, button subscriptions,
+ * etc.)
+ *
+ * <p>After the UnregisterAppInterface operation is performed, no other operations
+ * can be performed until a new app interface registration is established by
+ * calling <i>{@linkplain RegisterAppInterface}</i></p>
+ *
+ * <p><b>HMILevel can be FULL, LIMITED, BACKGROUND or NONE</b></p>
+ *
+ * <p><b>Parameter List</b></p>
+ * <table border="1" rules="all">
+ * <tr>
+ * <th>Name</th>
+ * <th>Type</th>
+ * <th>Description</th>
+ * <th>Reg.</th>
+ * <th>Notes</th>
+ * <th>SmartDeviceLink Version</th>
+ * </tr>
+ * <tr>
+ * <td>gps</td>
+ * <td>Boolean</td>
+ * <td>GPS data. See {@linkplain GPSData} for details</td>
+ * <td>N</td>
+ * <td>Subscribable</td>
+ * <td>SmartDeviceLink 2.0 </td>
+ * </tr>
+ * <tr>
+ * <td>speed</td>
+ * <td>Boolean</td>
+ * <td>The vehicle speed in kilometers per hour</td>
+ * <td>N</td>
+ * <td>Subscribable</td>
+ * <td>SmartDeviceLink 2.0 </td>
+ * </tr>
+ * <tr>
+ * <td>rpm</td>
+ * <td>Boolean</td>
+ * <td>The number of revolutions per minute of the engine</td>
+ * <td>N</td>
+ * <td>Subscribable</td>
+ * <td>SmartDeviceLink 2.0 </td>
+ * </tr>
+ * <tr>
+ * <td>fuelLevel</td>
+ * <td>Boolean</td>
+ * <td>The fuel level in the tank (percentage)</td>
+ * <td>N</td>
+ * <td>Subscribable</td>
+ * <td>SmartDeviceLink 2.0 </td>
+ * </tr>
+ * <tr>
+ * <td>fuelLevel_State</td>
+ * <td>Boolean</td>
+ * <td>The fuel level state</td>
+ * <td>N</td>
+ * <td>Subscribable</td>
+ * <td>SmartDeviceLink 2.0 </td>
+ * </tr>
+ * <tr>
+ * <td>instantFuelConsumption</td>
+ * <td>Boolean</td>
+ * <td>The instantaneous fuel consumption in microlitres</td>
+ * <td>N</td>
+ * <td>Subscribable</td>
+ * <td>SmartDeviceLink 2.0 </td>
+ * </tr>
+ * <tr>
+ * <td>externalTemperature</td>
+ * <td>Boolean</td>
+ * <td>The external temperature in degrees celsius</td>
+ * <td>N</td>
+ * <td>Subscribable</td>
+ * <td>SmartDeviceLink 2.0 </td>
+ * </tr>
+ * <tr>
+ * <td>prndl</td>
+ * <td>Boolean</td>
+ * <td>Currently selected gear.</td>
+ * <td>N</td>
+ * <td>Subscribable</td>
+ * <td>SmartDeviceLink 2.0 </td>
+ * </tr>
+ * <tr>
+ * <td>tirePressure</td>
+ * <td>Boolean</td>
+ * <td>Tire pressure status</td>
+ * <td>N</td>
+ * <td>Subscribable</td>
+ * <td>SmartDeviceLink 2.0 </td>
+ * </tr>
+ * <tr>
+ * <td>odometer</td>
+ * <td>Boolean</td>
+ * <td>Odometer in km</td>
+ * <td>N</td>
+ * <td>Max Length: 500</td>
+ * <td>SmartDeviceLink 2.0 </td>
+ * </tr>
+ * <tr>
+ * <td>beltStatus</td>
+ * <td>Boolean</td>
+ * <td>The status of the seat belts</td>
+ * <td>N</td>
+ * <td>Subscribable</td>
+ * <td>SmartDeviceLink 2.0 </td>
+ * </tr>
+ * <tr>
+ * <td>bodyInformation</td>
+ * <td>Boolean</td>
+ * <td>The body information including ignition status and internal temp</td>
+ * <td>N</td>
+ * <td>Subscribable</td>
+ * <td>SmartDeviceLink 2.0 </td>
+ * </tr>
+ * <tr>
+ * <td>deviceStatus</td>
+ * <td>Boolean</td>
+ * <td>The device status including signal and battery strength</td>
+ * <td>N</td>
+ * <td>Subscribable</td>
+ * <td>SmartDeviceLink 2.0 </td>
+ * </tr>
+ * <tr>
+ * <td>driverBraking</td>
+ * <td>Boolean</td>
+ * <td>The status of the brake pedal</td>
+ * <td>N</td>
+ * <td>Subscribable</td>
+ * <td>SmartDeviceLink 2.0 </td>
+ * </tr>
+ * <tr>
+ * <td>wiperStatus</td>
+ * <td>Boolean</td>
+ * <td>The status of the wipers</td>
+ * <td>N</td>
+ * <td>Subscribable</td>
+ * <td>SmartDeviceLink 2.0 </td>
+ * </tr>
+ * <tr>
+ * <td>headLampStatus</td>
+ * <td>Boolean</td>
+ * <td>Status of the head lamps</td>
+ * <td>N</td>
+ * <td>Subscribable</td>
+ * <td>SmartDeviceLink 2.0 </td>
+ * </tr>
+ * <tr>
+ * <td>engineTorque</td>
+ * <td>Boolean</td>
+ * <td>Torque value for engine (in Nm) on non-diesel variants</td>
+ * <td>N</td>
+ * <td>Subscribable</td>
+ * <td>SmartDeviceLink 2.0 </td>
+ * </tr>
+ * <tr>
+ * <td>accPedalPosition</td>
+ * <td>Boolean</td>
+ * <td>Accelerator pedal position (percentage depressed)</td>
+ * <td>N</td>
+ * <td>Subscribable</td>
+ * <td>SmartDeviceLink 2.0 </td>
+ * </tr>
+ * <tr>
+ * <td>steeringWheelAngle</td>
+ * <td>Boolean</td>
+ * <td>Current angle of the steering wheel (in deg)</td>
+ * <td>N</td>
+ * <td>Subscribable</td>
+ * <td>SmartDeviceLink 2.0 </td>
+ * </tr>
+ * <tr>
+ * <td>eCallInfo</td>
+ * <td>Boolean</td>
+ * <td>Emergency Call notification and confirmation data.</td>
+ * <td>N</td>
+ * <td>Subscribable</td>
+ * <td>SmartDeviceLink 2.0 </td>
+ * </tr>
+ * <tr>
+ * <td>airbagStatus</td>
+ * <td>Boolean</td>
+ * <td>The status of the air bags.</td>
+ * <td>N</td>
+ * <td>Subscribable</td>
+ * <td>SmartDeviceLink 2.0 </td>
+ * </tr>
+ * <tr>
+ * <td>emergencyEvent</td>
+ * <td>Boolean</td>
+ * <td>Information related to an emergency event (and if it occurred).</td>
+ * <td>N</td>
+ * <td>Subscribable</td>
+ * <td>SmartDeviceLink 2.0 </td>
+ * </tr>
+ * <tr>
+ * <td>clusterModeStatus</td>
+ * <td>Boolean</td>
+ * <td>The status modes of the instrument panel cluster.</td>
+ * <td>N</td>
+ * <td>Subscribable</td>
+ * <td>SmartDeviceLink 2.0 </td>
+ * </tr>
+ * <tr>
+ * <td>myKey</td>
+ * <td>Boolean</td>
+ * <td>Information related to the MyKey feature.</td>
+ * <td>N</td>
+ * <td>Subscribable</td>
+ * <td>SmartDeviceLink 2.0 </td>
+ * </tr>
+ * </table>
+ * @see RegisterAppInterface
+ * @see OnAppInterfaceUnregistered
+ */
+public class UnregisterAppInterface extends RPCRequest {
+ /**
+ * Constructs a new UnregisterAppInterface object
+ */
+ public UnregisterAppInterface() {
+ super(FunctionID.UNREGISTER_APP_INTERFACE.toString());
+ }
+ /**
+ * <p>Constructs a new UnregisterAppInterface object indicated by the Hashtable
+ * parameter</p>
+ *
+ *
+ * @param hash
+ * The Hashtable to use
+ */
+ public UnregisterAppInterface(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+} \ No newline at end of file
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/UnregisterAppInterfaceResponse.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/UnregisterAppInterfaceResponse.java
new file mode 100644
index 000000000..d77bf3b39
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/UnregisterAppInterfaceResponse.java
@@ -0,0 +1,33 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCResponse;
+
+/**
+ * Unregister AppInterface Response is sent, when UnregisterAppInterface has been called
+ *
+ * @since SmartDeviceLink 1.0
+ */
+public class UnregisterAppInterfaceResponse extends RPCResponse {
+
+ /**
+ * Constructs a new UnregisterAppInterfaceResponse object
+ */
+ public UnregisterAppInterfaceResponse() {
+ super(FunctionID.UNREGISTER_APP_INTERFACE.toString());
+ }
+
+ /**
+ * Constructs a new UnregisterAppInterfaceResponse object indicated by the Hashtable
+ * parameter
+ * <p></p>
+ *
+ * @param hash
+ * The Hashtable to use
+ */
+ public UnregisterAppInterfaceResponse(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+} \ No newline at end of file
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/UnsubscribeButton.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/UnsubscribeButton.java
new file mode 100644
index 000000000..33567a8af
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/UnsubscribeButton.java
@@ -0,0 +1,101 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCRequest;
+import com.smartdevicelink.proxy.rpc.enums.ButtonName;
+
+/**
+ * Deletes a subscription to button notifications for the specified button. For
+ * more information about button subscriptions, see {@linkplain SubscribeButton}
+ *
+ * <p>Application can unsubscribe from a button that is currently being pressed
+ * (i.e. has not yet been released), but app will not get button event</p>
+ *
+ * <p><b>HMILevel needs to be FULL, LIMITED or BACKGROUND</b></p>
+ *
+ * <p><b>Parameter List</b></p>
+ * <table border="1" rules="all">
+ * <tr>
+ * <th>Param Name</th>
+ * <th>Type</th>
+ * <th>Description</th>
+ * <th> Req.</th>
+ * <th>Notes</th>
+ * <th>Version Available</th>
+ * </tr>
+ * <tr>
+ * <td>buttonName</td>
+ * <td>ButtonName</td>
+ * <td>Name of the button to unsubscribe.</td>
+ * <td>Y</td>
+ * <td></td>
+ * <td>SmartDeviceLink 1.0</td>
+ * </tr>
+ * </table>
+ *
+ * <p> <b>Response</b></p>
+ * <p><b>Non-default Result Codes:</b></p>
+ * <p>SUCCESS</p>
+ * <p>INVALID_DATA</p>
+ * <p>OUT_OF_MEMORY</p>
+ * <p>TOO_MANY_PENDING_REQUESTS</p>
+ * <p>APPLICATION_NOT_REGISTERED</p>
+ * <p>GENERIC_ERROR </p>
+ * <p>UNSUPPORTED_RESOURCE</p>
+ * <p>IGNORED</p>
+ * <p>REJECTED</p>
+ * @since SmartDeviceLink 1.0
+ * @see SubscribeButton
+ */
+public class UnsubscribeButton extends RPCRequest {
+ public static final String KEY_BUTTON_NAME = "buttonName";
+
+ /**
+ * Constructs a new UnsubscribeButton object
+ */
+ public UnsubscribeButton() {
+ super(FunctionID.UNSUBSCRIBE_BUTTON.toString());
+ }
+ /**
+ * Constructs a new UnsubscribeButton object indicated by the Hashtable
+ * parameter
+ * <p></p>
+ *
+ * @param hash
+ * The Hashtable to use
+ */
+ public UnsubscribeButton(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+ /**
+ * Gets a name of the button to unsubscribe from
+ *
+ * @return ButtonName -an Enumeration value, see <i>
+ * {@linkplain com.smartdevicelink.proxy.rpc.enums.ButtonName}</i>
+ */
+ public ButtonName getButtonName() {
+ Object obj = parameters.get(KEY_BUTTON_NAME);
+ if (obj instanceof ButtonName) {
+ return (ButtonName) obj;
+ } else if (obj instanceof String) {
+ return ButtonName.valueForString((String) obj);
+ }
+ return null;
+ }
+ /**
+ * Sets the name of the button to unsubscribe from
+ *
+ * @param buttonName
+ * an enum value, see <i>
+ * {@linkplain com.smartdevicelink.proxy.rpc.enums.ButtonName}</i>
+ */
+ public void setButtonName( ButtonName buttonName ) {
+ if (buttonName != null) {
+ parameters.put(KEY_BUTTON_NAME, buttonName );
+ } else {
+ parameters.remove(KEY_BUTTON_NAME);
+ }
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/UnsubscribeButtonResponse.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/UnsubscribeButtonResponse.java
new file mode 100644
index 000000000..7efc00955
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/UnsubscribeButtonResponse.java
@@ -0,0 +1,33 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCResponse;
+
+/**
+ * Unsubscribe Button Response is sent, when UnsubscribeButton has been called
+ *
+ * @since SmartDeviceLink 1.0
+ */
+public class UnsubscribeButtonResponse extends RPCResponse {
+
+ /**
+ * Constructs a new UnsubscribeButtonResponse object
+ */
+ public UnsubscribeButtonResponse() {
+ super(FunctionID.UNSUBSCRIBE_BUTTON.toString());
+ }
+
+ /**
+ * Constructs a new UnsubscribeButtonResponse object indicated by the Hashtable
+ * parameter
+ * <p></p>
+ *
+ * @param hash
+ * The Hashtable to use
+ */
+ public UnsubscribeButtonResponse(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+} \ No newline at end of file
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/UnsubscribeVehicleData.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/UnsubscribeVehicleData.java
new file mode 100644
index 000000000..668b31fd9
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/UnsubscribeVehicleData.java
@@ -0,0 +1,811 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCRequest;
+
+/**
+ * This function is used to unsubscribe the notifications from the
+ * subscribeVehicleData function
+ * <p>Function Group: Location, VehicleInfo and DrivingChara</p>
+ * <p><b>HMILevel needs to be FULL, LIMITED or BACKGROUND</b></p>
+ *
+ * <p><b>Parameter List</b></p>
+ * <table border="1" rules="all">
+ * <tr>
+ * <th>Name</th>
+ * <th>Type</th>
+ * <th>Description</th>
+ * <th>Reg.</th>
+ * <th>Notes</th>
+ * <th>Version</th>
+ * </tr>
+ * <tr>
+ * <td>gps</td>
+ * <td>Boolean</td>
+ * <td>GPS data. See {@linkplain GPSdata} for details</td>
+ * <td>N</td>
+ * <td>Subscribable</td>
+ * <td>SmartDeviceLink 2.0 </td>
+ * </tr>
+ * <tr>
+ * <td>speed</td>
+ * <td>Boolean</td>
+ * <td>The vehicle speed in kilometers per hour</td>
+ * <td>N</td>
+ * <td>Subscribable</td>
+ * <td>SmartDeviceLink 2.0 </td>
+ * </tr>
+ * <tr>
+ * <td>rpm</td>
+ * <td>Boolean</td>
+ * <td>The number of revolutions per minute of the engine</td>
+ * <td>N</td>
+ * <td>Subscribable</td>
+ * <td>SmartDeviceLink 2.0 </td>
+ * </tr>
+ * <tr>
+ * <td>fuelLevel</td>
+ * <td>Boolean</td>
+ * <td>The fuel level in the tank (percentage)</td>
+ * <td>N</td>
+ * <td>Subscribable</td>
+ * <td>SmartDeviceLink 2.0 </td>
+ * </tr>
+ * <tr>
+ * <td>fuelLevel_State</td>
+ * <td>Boolean</td>
+ * <td>The fuel level state</td>
+ * <td>N</td>
+ * <td>Subscribable</td>
+ * <td>SmartDeviceLink 2.0 </td>
+ * </tr>
+ * <tr>
+ * <td>instantFuelConsumption</td>
+ * <td>Boolean</td>
+ * <td>The instantaneous fuel consumption in microlitres</td>
+ * <td>N</td>
+ * <td>Subscribable</td>
+ * <td>SmartDeviceLink 2.0 </td>
+ * </tr>
+ * <tr>
+ * <td>externalTemperature</td>
+ * <td>Boolean</td>
+ * <td>The external temperature in degrees celsius</td>
+ * <td>N</td>
+ * <td>Subscribable</td>
+ * <td>SmartDeviceLink 2.0 </td>
+ * </tr>
+ * <tr>
+ * <td>prndl</td>
+ * <td>Boolean</td>
+ * <td>Currently selected gear.</td>
+ * <td>N</td>
+ * <td>Subscribable</td>
+ * <td>SmartDeviceLink 2.0 </td>
+ * </tr>
+ * <tr>
+ * <td>tirePressure</td>
+ * <td>Boolean</td>
+ * <td>Tire pressure status</td>
+ * <td>N</td>
+ * <td>Subscribable</td>
+ * <td>SmartDeviceLink 2.0 </td>
+ * </tr>
+ * <tr>
+ * <td>odometer</td>
+ * <td>Boolean</td>
+ * <td>Odometer in km</td>
+ * <td>N</td>
+ * <td>Max Length: 500</td>
+ * <td>SmartDeviceLink 2.0 </td>
+ * </tr>
+ * <tr>
+ * <td>beltStatus</td>
+ * <td>Boolean</td>
+ * <td>The status of the seat belts</td>
+ * <td>N</td>
+ * <td>Subscribable</td>
+ * <td>SmartDeviceLink 2.0 </td>
+ * </tr>
+ * <tr>
+ * <td>bodyInformation</td>
+ * <td>Boolean</td>
+ * <td>The body information including ignition status and internal temp</td>
+ * <td>N</td>
+ * <td>Subscribable</td>
+ * <td>SmartDeviceLink 2.0 </td>
+ * </tr>
+ * <tr>
+ * <td>deviceStatus</td>
+ * <td>Boolean</td>
+ * <td>The device status including signal and battery strength</td>
+ * <td>N</td>
+ * <td>Subscribable</td>
+ * <td>SmartDeviceLink 2.0 </td>
+ * </tr>
+ * <tr>
+ * <td>driverBraking</td>
+ * <td>Boolean</td>
+ * <td>The status of the brake pedal</td>
+ * <td>N</td>
+ * <td>Subscribable</td>
+ * <td>SmartDeviceLink 2.0 </td>
+ * </tr>
+ * <tr>
+ * <td>wiperStatus</td>
+ * <td>Boolean</td>
+ * <td>The status of the wipers</td>
+ * <td>N</td>
+ * <td>Subscribable</td>
+ * <td>SmartDeviceLink 2.0 </td>
+ * </tr>
+ * <tr>
+ * <td>headLampStatus</td>
+ * <td>Boolean</td>
+ * <td>Status of the head lamps</td>
+ * <td>N</td>
+ * <td>Subscribable</td>
+ * <td>SmartDeviceLink 2.0 </td>
+ * </tr>
+ * <tr>
+ * <td>engineTorque</td>
+ * <td>Boolean</td>
+ * <td>Torque value for engine (in Nm) on non-diesel variants</td>
+ * <td>N</td>
+ * <td>Subscribable</td>
+ * <td>SmartDeviceLink 2.0 </td>
+ * </tr>
+ * <tr>
+ * <td>accPedalPosition</td>
+ * <td>Boolean</td>
+ * <td>Accelerator pedal position (percentage depressed)</td>
+ * <td>N</td>
+ * <td>Subscribable</td>
+ * <td>SmartDeviceLink 2.0 </td>
+ * </tr>
+ * <tr>
+ * <td>steeringWheelAngle</td>
+ * <td>Boolean</td>
+ * <td>Current angle of the steering wheel (in deg)</td>
+ * <td>N</td>
+ * <td>Subscribable</td>
+ * <td>SmartDeviceLink 2.0 </td>
+ * </tr>
+ * <tr>
+ * <td>eCallInfo</td>
+ * <td>Boolean</td>
+ * <td>Emergency Call notification and confirmation data.</td>
+ * <td>N</td>
+ * <td>Subscribable</td>
+ * <td>SmartDeviceLink 2.0 </td>
+ * </tr>
+ * <tr>
+ * <td>airbagStatus</td>
+ * <td>Boolean</td>
+ * <td>The status of the air bags.</td>
+ * <td>N</td>
+ * <td>Subscribable</td>
+ * <td>SmartDeviceLink 2.0 </td>
+ * </tr>
+ * <tr>
+ * <td>emergencyEvent</td>
+ * <td>Boolean</td>
+ * <td>Information related to an emergency event (and if it occurred).</td>
+ * <td>N</td>
+ * <td>Subscribable</td>
+ * <td>SmartDeviceLink 2.0 </td>
+ * </tr>
+ * <tr>
+ * <td>clusterModeStatus</td>
+ * <td>Boolean</td>
+ * <td>The status modes of the instrument panel cluster.</td>
+ * <td>N</td>
+ * <td>Subscribable</td>
+ * <td>SmartDeviceLink 2.0 </td>
+ * </tr>
+ * <tr>
+ * <td>myKey</td>
+ * <td>Boolean</td>
+ * <td>Information related to the MyKey feature.</td>
+ * <td>N</td>
+ * <td>Subscribable</td>
+ * <td>SmartDeviceLink 2.0 </td>
+ * </tr>
+ * </table>
+ * <p><b> Response</b></p>
+ * <p><b>Non-default Result Codes:</b></p>
+ * <p>SUCCESS</p>
+ * <p>WARNINGS</p>
+ * <p>INVALID_DATA</p>
+ * <p>OUT_OF_MEMORY</p>
+ * <p>TOO_MANY_PENDING_REQUESTS</p>
+ * <p>APPLICATION_NOT_REGISTERED</p>
+ * <p>GENERIC_ERROR</p>
+ * <p>IGNORED</p>
+ * <p>DISALLOWED</p>
+ *
+ * @since SmartDeviceLink 2.0
+ * @see SubscribeVehicleData
+ * @see GetVehicleData
+ */
+public class UnsubscribeVehicleData extends RPCRequest {
+ public static final String KEY_SPEED = "speed";
+ public static final String KEY_RPM = "rpm";
+ public static final String KEY_EXTERNAL_TEMPERATURE = "externalTemperature";
+ public static final String KEY_FUEL_LEVEL = "fuelLevel";
+ public static final String KEY_PRNDL = "prndl";
+ public static final String KEY_TIRE_PRESSURE = "tirePressure";
+ public static final String KEY_ENGINE_TORQUE = "engineTorque";
+ public static final String KEY_ODOMETER = "odometer";
+ public static final String KEY_GPS = "gps";
+ public static final String KEY_FUEL_LEVEL_STATE = "fuelLevel_State";
+ public static final String KEY_INSTANT_FUEL_CONSUMPTION = "instantFuelConsumption";
+ public static final String KEY_BELT_STATUS = "beltStatus";
+ public static final String KEY_BODY_INFORMATION = "bodyInformation";
+ public static final String KEY_DEVICE_STATUS = "deviceStatus";
+ public static final String KEY_DRIVER_BRAKING = "driverBraking";
+ public static final String KEY_WIPER_STATUS = "wiperStatus";
+ public static final String KEY_HEAD_LAMP_STATUS = "headLampStatus";
+ public static final String KEY_ACC_PEDAL_POSITION = "accPedalPosition";
+ public static final String KEY_STEERING_WHEEL_ANGLE = "steeringWheelAngle";
+ public static final String KEY_E_CALL_INFO = "eCallInfo";
+ public static final String KEY_AIRBAG_STATUS = "airbagStatus";
+ public static final String KEY_EMERGENCY_EVENT = "emergencyEvent";
+ public static final String KEY_CLUSTER_MODE_STATUS = "clusterModeStatus";
+ public static final String KEY_MY_KEY = "myKey";
+
+
+ /**
+ * Constructs a new UnsubscribeVehicleData object
+ */
+ public UnsubscribeVehicleData() {
+ super(FunctionID.UNSUBSCRIBE_VEHICLE_DATA.toString());
+ }
+
+ /**
+ * Constructs a new UnsubscribeVehicleData object indicated by the Hashtable
+ * parameter
+ * <p></p>
+ *
+ * @param hash
+ * The Hashtable to use
+ */
+ public UnsubscribeVehicleData(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+
+ /**
+ * Sets a boolean value. If true, unsubscribes Gps data
+ *
+ * @param gps
+ * a boolean value
+ */
+ public void setGps(Boolean gps) {
+ if (gps != null) {
+ parameters.put(KEY_GPS, gps);
+ } else {
+ parameters.remove(KEY_GPS);
+ }
+ }
+
+ /**
+ * Gets a boolean value. If true, means the Gps data has been unsubscribed.
+ *
+ * @return Boolean -a Boolean value. If true, means the Gps data has been
+ * unsubscribed.
+ */
+ public Boolean getGps() {
+ return (Boolean) parameters.get(KEY_GPS);
+ }
+
+ /**
+ * Sets a boolean value. If true, unsubscribes speed data
+ *
+ * @param speed
+ * a boolean value
+ */
+ public void setSpeed(Boolean speed) {
+ if (speed != null) {
+ parameters.put(KEY_SPEED, speed);
+ } else {
+ parameters.remove(KEY_SPEED);
+ }
+ }
+
+ /**
+ * Gets a boolean value. If true, means the Speed data has been unsubscribed.
+ *
+ * @return Boolean -a Boolean value. If true, means the Speed data has been
+ * unsubscribed.
+ */
+ public Boolean getSpeed() {
+ return (Boolean) parameters.get(KEY_SPEED);
+ }
+
+ /**
+ * Sets a boolean value. If true, unsubscribe data
+ *
+ * @param rpm
+ * a boolean value
+ */
+ public void setRpm(Boolean rpm) {
+ if (rpm != null) {
+ parameters.put(KEY_RPM, rpm);
+ } else {
+ parameters.remove(KEY_RPM);
+ }
+ }
+
+ /**
+ * Gets a boolean value. If true, means the rpm data has been unsubscribed.
+ *
+ * @return Boolean -a Boolean value. If true, means the rpm data has been
+ * unsubscribed.
+ */
+ public Boolean getRpm() {
+ return (Boolean) parameters.get(KEY_RPM);
+ }
+
+ /**
+ * Sets a boolean value. If true, unsubscribes FuelLevel data
+ *
+ * @param fuelLevel
+ * a boolean value
+ */
+ public void setFuelLevel(Boolean fuelLevel) {
+ if (fuelLevel != null) {
+ parameters.put(KEY_FUEL_LEVEL, fuelLevel);
+ } else {
+ parameters.remove(KEY_FUEL_LEVEL);
+ }
+ }
+
+ /**
+ * Gets a boolean value. If true, means the FuelLevel data has been
+ * unsubscribed.
+ *
+ * @return Boolean -a Boolean value. If true, means the FuelLevel data has
+ * been unsubscribed.
+ */
+ public Boolean getFuelLevel() {
+ return (Boolean) parameters.get(KEY_FUEL_LEVEL);
+ }
+
+ /**
+ * Sets a boolean value. If true, unsubscribes fuelLevel_State data
+ *
+ * @param fuelLevel_State
+ * a boolean value
+ */
+ @Deprecated
+ public void setFuelLevel_State(Boolean fuelLevel_State) {
+ setFuelLevelState(fuelLevel_State);
+ }
+
+ /**
+ * Gets a boolean value. If true, means the fuelLevel_State data has been
+ * unsubscribed.
+ *
+ * @return Boolean -a Boolean value. If true, means the fuelLevel_State data
+ * has been unsubscribed.
+ */
+ @Deprecated
+ public Boolean getFuelLevel_State() {
+ return getFuelLevelState();
+ }
+
+ /**
+ * Sets a boolean value. If true, unsubscribes fuelLevelState data
+ *
+ * @param fuelLevelState
+ * a boolean value
+ */
+ public void setFuelLevelState(Boolean fuelLevelState) {
+ if (fuelLevelState != null) {
+ parameters.put(KEY_FUEL_LEVEL_STATE, fuelLevelState);
+ } else {
+ parameters.remove(KEY_FUEL_LEVEL_STATE);
+ }
+ }
+
+ /**
+ * Gets a boolean value. If true, means the fuelLevel_State data has been
+ * unsubscribed.
+ *
+ * @return Boolean -a Boolean value. If true, means the fuelLevelState data
+ * has been unsubscribed.
+ */
+ public Boolean getFuelLevelState() {
+ return (Boolean) parameters.get(KEY_FUEL_LEVEL_STATE);
+ }
+
+ /**
+ * Sets a boolean value. If true, unsubscribes instantFuelConsumption data
+ *
+ * @param instantFuelConsumption
+ * a boolean value
+ */
+ public void setInstantFuelConsumption(Boolean instantFuelConsumption) {
+ if (instantFuelConsumption != null) {
+ parameters.put(KEY_INSTANT_FUEL_CONSUMPTION, instantFuelConsumption);
+ } else {
+ parameters.remove(KEY_INSTANT_FUEL_CONSUMPTION);
+ }
+ }
+
+ /**
+ * Gets a boolean value. If true, means the getInstantFuelConsumption data has been
+ * unsubscribed.
+ *
+ * @return Boolean -a Boolean value. If true, means the getInstantFuelConsumption data
+ * has been unsubscribed.
+ */
+ public Boolean getInstantFuelConsumption() {
+ return (Boolean) parameters.get(KEY_INSTANT_FUEL_CONSUMPTION);
+ }
+
+ /**
+ * Sets a boolean value. If true, unsubscribes externalTemperature data
+ *
+ * @param externalTemperature
+ * a boolean value
+ */
+ public void setExternalTemperature(Boolean externalTemperature) {
+ if (externalTemperature != null) {
+ parameters.put(KEY_EXTERNAL_TEMPERATURE, externalTemperature);
+ } else {
+ parameters.remove(KEY_EXTERNAL_TEMPERATURE);
+ }
+ }
+
+ /**
+ * Gets a boolean value. If true, means the externalTemperature data has been
+ * unsubscribed.
+ *
+ * @return Boolean -a Boolean value. If true, means the externalTemperature data
+ * has been unsubscribed.
+ */
+ public Boolean getExternalTemperature() {
+ return (Boolean) parameters.get(KEY_EXTERNAL_TEMPERATURE);
+ }
+
+ /**
+ * Sets a boolean value. If true, unsubscribes Currently selected gear data
+ *
+ * @param prndl
+ * a boolean value
+ */
+ public void setPrndl(Boolean prndl) {
+ if (prndl != null) {
+ parameters.put(KEY_PRNDL, prndl);
+ } else {
+ parameters.remove(KEY_PRNDL);
+ }
+ }
+
+ /**
+ * Gets a boolean value. If true, means the Currently selected gear data has been
+ * unsubscribed.
+ *
+ * @return Boolean -a Boolean value. If true, means the Currently selected gear data
+ * has been unsubscribed.
+ */
+ public Boolean getPrndl() {
+ return (Boolean) parameters.get(KEY_PRNDL);
+ }
+
+ /**
+ * Sets a boolean value. If true, unsubscribes tire pressure status data
+ *
+ * @param tirePressure
+ * a boolean value
+ */
+ public void setTirePressure(Boolean tirePressure) {
+ if (tirePressure != null) {
+ parameters.put(KEY_TIRE_PRESSURE, tirePressure);
+ } else {
+ parameters.remove(KEY_TIRE_PRESSURE);
+ }
+ }
+
+ /**
+ * Gets a boolean value. If true, means the tire pressure status data has been
+ * unsubscribed.
+ *
+ * @return Boolean -a Boolean value. If true, means the tire pressure status data
+ * has been unsubscribed.
+ */
+ public Boolean getTirePressure() {
+ return (Boolean) parameters.get(KEY_TIRE_PRESSURE);
+ }
+
+ /**
+ * Sets a boolean value. If true, unsubscribes odometer data
+ *
+ * @param odometer
+ * a boolean value
+ */
+ public void setOdometer(Boolean odometer) {
+ if (odometer != null) {
+ parameters.put(KEY_ODOMETER, odometer);
+ } else {
+ parameters.remove(KEY_ODOMETER);
+ }
+ }
+
+ /**
+ * Gets a boolean value. If true, means the odometer data has been
+ * unsubscribed.
+ *
+ * @return Boolean -a Boolean value. If true, means the odometer data
+ * has been unsubscribed.
+ */
+ public Boolean getOdometer() {
+ return (Boolean) parameters.get(KEY_ODOMETER);
+ }
+
+ /**
+ * Sets a boolean value. If true, unsubscribes belt Status data
+ *
+ * @param beltStatus
+ * a boolean value
+ */
+ public void setBeltStatus(Boolean beltStatus) {
+ if (beltStatus != null) {
+ parameters.put(KEY_BELT_STATUS, beltStatus);
+ } else {
+ parameters.remove(KEY_BELT_STATUS);
+ }
+ }
+
+ /**
+ * Gets a boolean value. If true, means the belt Status data has been
+ * unsubscribed.
+ *
+ * @return Boolean -a Boolean value. If true, means the belt Status data
+ * has been unsubscribed.
+ */
+ public Boolean getBeltStatus() {
+ return (Boolean) parameters.get(KEY_BELT_STATUS);
+ }
+
+ /**
+ * Sets a boolean value. If true, unsubscribes body Information data
+ *
+ * @param bodyInformation
+ * a boolean value
+ */
+ public void setBodyInformation(Boolean bodyInformation) {
+ if (bodyInformation != null) {
+ parameters.put(KEY_BODY_INFORMATION, bodyInformation);
+ } else {
+ parameters.remove(KEY_BODY_INFORMATION);
+ }
+ }
+
+ /**
+ * Gets a boolean value. If true, means the body Information data has been
+ * unsubscribed.
+ *
+ * @return Boolean -a Boolean value. If true, means the body Information data
+ * has been unsubscribed.
+ */
+ public Boolean getBodyInformation() {
+ return (Boolean) parameters.get(KEY_BODY_INFORMATION);
+ }
+
+ /**
+ * Sets a boolean value. If true, unsubscribes device Status data
+ *
+ * @param deviceStatus
+ * a boolean value
+ */
+ public void setDeviceStatus(Boolean deviceStatus) {
+ if (deviceStatus != null) {
+ parameters.put(KEY_DEVICE_STATUS, deviceStatus);
+ } else {
+ parameters.remove(KEY_DEVICE_STATUS);
+ }
+ }
+
+ /**
+ * Gets a boolean value. If true, means the device Status data has been
+ * unsubscribed.
+ *
+ * @return Boolean -a Boolean value. If true, means the device Status data
+ * has been unsubscribed.
+ */
+ public Boolean getDeviceStatus() {
+ return (Boolean) parameters.get(KEY_DEVICE_STATUS);
+ }
+
+ /**
+ * Sets a boolean value. If true, unsubscribes driver Braking data
+ *
+ * @param driverBraking
+ * a boolean value
+ */
+ public void setDriverBraking(Boolean driverBraking) {
+ if (driverBraking != null) {
+ parameters.put(KEY_DRIVER_BRAKING, driverBraking);
+ } else {
+ parameters.remove(KEY_DRIVER_BRAKING);
+ }
+ }
+
+ /**
+ * Gets a boolean value. If true, means the driver Braking data has been
+ * unsubscribed.
+ *
+ * @return Boolean -a Boolean value. If true, means the driver Braking data
+ * has been unsubscribed.
+ */
+ public Boolean getDriverBraking() {
+ return (Boolean) parameters.get(KEY_DRIVER_BRAKING);
+ }
+
+ /**
+ * Sets a boolean value. If true, unsubscribes wiper Status data
+ *
+ * @param wiperStatus
+ * a boolean value
+ */
+ public void setWiperStatus(Boolean wiperStatus) {
+ if (wiperStatus != null) {
+ parameters.put(KEY_WIPER_STATUS, wiperStatus);
+ } else {
+ parameters.remove(KEY_WIPER_STATUS);
+ }
+ }
+
+ /**
+ * Gets a boolean value. If true, means the wiper Status data has been
+ * unsubscribed.
+ *
+ * @return Boolean -a Boolean value. If true, means the wiper Status data
+ * has been unsubscribed.
+ */
+ public Boolean getWiperStatus() {
+ return (Boolean) parameters.get(KEY_WIPER_STATUS);
+ }
+
+ /**
+ * Sets a boolean value. If true, unsubscribes Head Lamp Status data
+ *
+ * @param headLampStatus
+ * a boolean value
+ */
+ public void setHeadLampStatus(Boolean headLampStatus) {
+ if (headLampStatus != null) {
+ parameters.put(KEY_HEAD_LAMP_STATUS, headLampStatus);
+ } else {
+ parameters.remove(KEY_HEAD_LAMP_STATUS);
+ }
+ }
+
+ /**
+ * Gets a boolean value. If true, means the Head Lamp Status data has been
+ * unsubscribed.
+ *
+ * @return Boolean -a Boolean value. If true, means the Head Lamp Status data
+ * has been unsubscribed.
+ */
+ public Boolean getHeadLampStatus() {
+ return (Boolean) parameters.get(KEY_HEAD_LAMP_STATUS);
+ }
+
+ /**
+ * Sets a boolean value. If true, unsubscribes Engine Torque data
+ *
+ * @param engineTorque
+ * a boolean value
+ */
+ public void setEngineTorque(Boolean engineTorque) {
+ if (engineTorque != null) {
+ parameters.put(KEY_ENGINE_TORQUE, engineTorque);
+ } else {
+ parameters.remove(KEY_ENGINE_TORQUE);
+ }
+ }
+
+ /**
+ * Gets a boolean value. If true, means the Engine Torque data has been
+ * unsubscribed.
+ *
+ * @return Boolean -a Boolean value. If true, means the Engine Torque data
+ * has been unsubscribed.
+ */
+ public Boolean getEngineTorque() {
+ return (Boolean) parameters.get(KEY_ENGINE_TORQUE);
+ }
+
+ /**
+ * Sets a boolean value. If true, unsubscribes accPedalPosition data
+ *
+ * @param accPedalPosition
+ * a boolean value
+ */
+ public void setAccPedalPosition(Boolean accPedalPosition) {
+ if (accPedalPosition != null) {
+ parameters.put(KEY_ACC_PEDAL_POSITION, accPedalPosition);
+ } else {
+ parameters.remove(KEY_ACC_PEDAL_POSITION);
+ }
+ }
+
+ /**
+ * Gets a boolean value. If true, means the accPedalPosition data has been
+ * unsubscribed.
+ *
+ * @return Boolean -a Boolean value. If true, means the accPedalPosition data
+ * has been unsubscribed.
+ */
+ public Boolean getAccPedalPosition() {
+ return (Boolean) parameters.get(KEY_ACC_PEDAL_POSITION);
+ }
+
+ public void setSteeringWheelAngle(Boolean steeringWheelAngle) {
+ if (steeringWheelAngle != null) {
+ parameters.put(KEY_STEERING_WHEEL_ANGLE, steeringWheelAngle);
+ } else {
+ parameters.remove(KEY_STEERING_WHEEL_ANGLE);
+ }
+ }
+
+ public Boolean getSteeringWheelAngle() {
+ return (Boolean) parameters.get(KEY_STEERING_WHEEL_ANGLE);
+ }
+
+ public void setECallInfo(Boolean eCallInfo) {
+ if (eCallInfo != null) {
+ parameters.put(KEY_E_CALL_INFO, eCallInfo);
+ } else {
+ parameters.remove(KEY_E_CALL_INFO);
+ }
+ }
+ public Boolean getECallInfo() {
+ return (Boolean) parameters.get(KEY_E_CALL_INFO);
+ }
+ public void setAirbagStatus(Boolean airbagStatus) {
+ if (airbagStatus != null) {
+ parameters.put(KEY_AIRBAG_STATUS, airbagStatus);
+ } else {
+ parameters.remove(KEY_AIRBAG_STATUS);
+ }
+ }
+ public Boolean getAirbagStatus() {
+ return (Boolean) parameters.get(KEY_AIRBAG_STATUS);
+ }
+ public void setEmergencyEvent(Boolean emergencyEvent) {
+ if (emergencyEvent != null) {
+ parameters.put(KEY_EMERGENCY_EVENT, emergencyEvent);
+ } else {
+ parameters.remove(KEY_EMERGENCY_EVENT);
+ }
+ }
+ public Boolean getEmergencyEvent() {
+ return (Boolean) parameters.get(KEY_EMERGENCY_EVENT);
+ }
+ public void setClusterModeStatus(Boolean clusterModeStatus) {
+ if (clusterModeStatus != null) {
+ parameters.put(KEY_CLUSTER_MODE_STATUS, clusterModeStatus);
+ } else {
+ parameters.remove(KEY_CLUSTER_MODE_STATUS);
+ }
+ }
+ public Boolean getClusterModeStatus() {
+ return (Boolean) parameters.get(KEY_CLUSTER_MODE_STATUS);
+ }
+ public void setMyKey(Boolean myKey) {
+ if (myKey != null) {
+ parameters.put(KEY_MY_KEY, myKey);
+ } else {
+ parameters.remove(KEY_MY_KEY);
+ }
+ }
+ public Boolean getMyKey() {
+ return (Boolean) parameters.get(KEY_MY_KEY);
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/UnsubscribeVehicleDataResponse.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/UnsubscribeVehicleDataResponse.java
new file mode 100644
index 000000000..92d9a46df
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/UnsubscribeVehicleDataResponse.java
@@ -0,0 +1,721 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCResponse;
+import com.smartdevicelink.util.DebugTool;
+
+/**
+ * Unsubscribe Vehicle Data Response is sent, when UnsubscribeVehicleData has been called.
+ *
+ * @since SmartDeviceLink 2.0
+ */
+public class UnsubscribeVehicleDataResponse extends RPCResponse {
+ public static final String KEY_SPEED = "speed";
+ public static final String KEY_RPM = "rpm";
+ public static final String KEY_FUEL_LEVEL = "fuelLevel";
+ public static final String KEY_EXTERNAL_TEMPERATURE = "externalTemperature";
+ public static final String KEY_PRNDL = "prndl";
+ public static final String KEY_TIRE_PRESSURE = "tirePressure";
+ public static final String KEY_ENGINE_TORQUE = "engineTorque";
+ public static final String KEY_ODOMETER = "odometer";
+ public static final String KEY_GPS = "gps";
+ public static final String KEY_FUEL_LEVEL_STATE = "fuelLevel_State";
+ public static final String KEY_INSTANT_FUEL_CONSUMPTION = "instantFuelConsumption";
+ public static final String KEY_BELT_STATUS = "beltStatus";
+ public static final String KEY_BODY_INFORMATION = "bodyInformation";
+ public static final String KEY_DEVICE_STATUS = "deviceStatus";
+ public static final String KEY_DRIVER_BRAKING = "driverBraking";
+ public static final String KEY_WIPER_STATUS = "wiperStatus";
+ public static final String KEY_HEAD_LAMP_STATUS = "headLampStatus";
+ public static final String KEY_ACC_PEDAL_POSITION = "accPedalPosition";
+ public static final String KEY_STEERING_WHEEL_ANGLE = "steeringWheelAngle";
+ public static final String KEY_E_CALL_INFO = "eCallInfo";
+ public static final String KEY_AIRBAG_STATUS = "airbagStatus";
+ public static final String KEY_EMERGENCY_EVENT = "emergencyEvent";
+ public static final String KEY_CLUSTER_MODE_STATUS = "clusterModeStatus";
+ public static final String KEY_MY_KEY = "myKey";
+
+ /**
+ * Constructs a new UnsubscribeVehicleDataResponse object
+ */
+ public UnsubscribeVehicleDataResponse() {
+ super(FunctionID.UNSUBSCRIBE_VEHICLE_DATA.toString());
+ }
+
+ /**
+ * Constructs a new UnsubscribeVehicleDataResponse object indicated by the Hashtable
+ * parameter
+ * <p></p>
+ *
+ * @param hash
+ * The Hashtable to use
+ */
+ public UnsubscribeVehicleDataResponse(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+ /**
+ * Sets Gps
+ * @param gps
+ */
+ public void setGps(VehicleDataResult gps) {
+ if (gps != null) {
+ parameters.put(KEY_GPS, gps);
+ } else {
+ parameters.remove(KEY_GPS);
+ }
+ }
+ /**
+ * Gets Gps
+ * @return VehicleDataResult
+ */
+ @SuppressWarnings("unchecked")
+ public VehicleDataResult getGps() {
+ Object obj = parameters.get(KEY_GPS);
+ if (obj instanceof VehicleDataResult) {
+ return (VehicleDataResult) obj;
+ } else if (obj instanceof Hashtable) {
+ try {
+ return new VehicleDataResult((Hashtable<String, Object>) obj);
+ } catch (Exception e) {
+ DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_GPS, e);
+ }
+ }
+ return null;
+ }
+ /**
+ * Sets Speed
+ * @param speed
+ */
+ public void setSpeed(VehicleDataResult speed) {
+ if (speed != null) {
+ parameters.put(KEY_SPEED, speed);
+ } else {
+ parameters.remove(KEY_SPEED);
+ }
+ }
+ /**
+ * Gets Speed
+ * @return VehicleDataResult
+ */
+ @SuppressWarnings("unchecked")
+ public VehicleDataResult getSpeed() {
+ Object obj = parameters.get(KEY_SPEED);
+ if (obj instanceof VehicleDataResult) {
+ return (VehicleDataResult) obj;
+ } else if (obj instanceof Hashtable) {
+ try {
+ return new VehicleDataResult((Hashtable<String, Object>) obj);
+ } catch (Exception e) {
+ DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_SPEED, e);
+ }
+ }
+ return null;
+ }
+ /**
+ * Sets rpm
+ * @param rpm
+ */
+ public void setRpm(VehicleDataResult rpm) {
+ if (rpm != null) {
+ parameters.put(KEY_RPM, rpm);
+ } else {
+ parameters.remove(KEY_RPM);
+ }
+ }
+ /**
+ * Gets rpm
+ * @return VehicleDataResult
+ */
+ @SuppressWarnings("unchecked")
+ public VehicleDataResult getRpm() {
+ Object obj = parameters.get(KEY_RPM);
+ if (obj instanceof VehicleDataResult) {
+ return (VehicleDataResult) obj;
+ } else if (obj instanceof Hashtable) {
+ try {
+ return new VehicleDataResult((Hashtable<String, Object>) obj);
+ } catch (Exception e) {
+ DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_RPM, e);
+ }
+ }
+ return null;
+ }
+ /**
+ * Sets Fuel Level
+ * @param fuelLevel
+ */
+ public void setFuelLevel(VehicleDataResult fuelLevel) {
+ if (fuelLevel != null) {
+ parameters.put(KEY_FUEL_LEVEL, fuelLevel);
+ } else {
+ parameters.remove(KEY_FUEL_LEVEL);
+ }
+ }
+ /**
+ * Gets Fuel Level
+ * @return VehicleDataResult
+ */
+ @SuppressWarnings("unchecked")
+ public VehicleDataResult getFuelLevel() {
+ Object obj = parameters.get(KEY_FUEL_LEVEL);
+ if (obj instanceof VehicleDataResult) {
+ return (VehicleDataResult) obj;
+ } else if (obj instanceof Hashtable) {
+ try {
+ return new VehicleDataResult((Hashtable<String, Object>) obj);
+ } catch (Exception e) {
+ DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_FUEL_LEVEL, e);
+ }
+ }
+ return null;
+ }
+ /**
+ * Sets Fuel Level State
+ * @param fuelLevel_State
+ */
+ @Deprecated
+ public void setFuelLevel_State(VehicleDataResult fuelLevel_State) {
+ setFuelLevel(fuelLevel_State);
+ }
+ /**
+ * Gets Fuel Level State
+ * @return VehicleDataResult
+ */
+ @Deprecated
+ public VehicleDataResult getFuelLevel_State() {
+ return getFuelLevelState();
+ }
+ /**
+ * Sets Fuel Level State
+ * @param fuelLevel_State
+ */
+ public void setFuelLevelState(VehicleDataResult fuelLevelState) {
+ if (fuelLevelState != null) {
+ parameters.put(KEY_FUEL_LEVEL_STATE, fuelLevelState);
+ } else {
+ parameters.remove(KEY_FUEL_LEVEL_STATE);
+ }
+ }
+ /**
+ * Gets Fuel Level State
+ * @return VehicleDataResult
+ */
+ @SuppressWarnings("unchecked")
+ public VehicleDataResult getFuelLevelState() {
+ Object obj = parameters.get(KEY_FUEL_LEVEL_STATE);
+ if (obj instanceof VehicleDataResult) {
+ return (VehicleDataResult) obj;
+ } else if (obj instanceof Hashtable) {
+ return new VehicleDataResult((Hashtable<String, Object>) obj);
+ }
+ return null;
+ }
+ /**
+ * Sets Instant Fuel Comsumption
+ * @param instantFuelConsumption
+ */
+ public void setInstantFuelConsumption(VehicleDataResult instantFuelConsumption) {
+ if (instantFuelConsumption != null) {
+ parameters.put(KEY_INSTANT_FUEL_CONSUMPTION, instantFuelConsumption);
+ } else {
+ parameters.remove(KEY_INSTANT_FUEL_CONSUMPTION);
+ }
+ }
+ /**
+ * Gets Instant Fuel Comsumption
+ * @return VehicleDataResult
+ */
+ @SuppressWarnings("unchecked")
+ public VehicleDataResult getInstantFuelConsumption() {
+ Object obj = parameters.get(KEY_INSTANT_FUEL_CONSUMPTION);
+ if (obj instanceof VehicleDataResult) {
+ return (VehicleDataResult) obj;
+ } else if (obj instanceof Hashtable) {
+ try {
+ return new VehicleDataResult((Hashtable<String, Object>) obj);
+ } catch (Exception e) {
+ DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_INSTANT_FUEL_CONSUMPTION, e);
+ }
+ }
+ return null;
+ }
+ /**
+ * Sets External Temperature
+ * @param externalTemperature
+ */
+ public void setExternalTemperature(VehicleDataResult externalTemperature) {
+ if (externalTemperature != null) {
+ parameters.put(KEY_EXTERNAL_TEMPERATURE, externalTemperature);
+ } else {
+ parameters.remove(KEY_EXTERNAL_TEMPERATURE);
+ }
+ }
+ /**
+ * Gets External Temperature
+ * @return VehicleDataResult
+ */
+ @SuppressWarnings("unchecked")
+ public VehicleDataResult getExternalTemperature() {
+ Object obj = parameters.get(KEY_EXTERNAL_TEMPERATURE);
+ if (obj instanceof VehicleDataResult) {
+ return (VehicleDataResult) obj;
+ } else if (obj instanceof Hashtable) {
+ try {
+ return new VehicleDataResult((Hashtable<String, Object>) obj);
+ } catch (Exception e) {
+ DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_EXTERNAL_TEMPERATURE, e);
+ }
+ }
+ return null;
+ }
+ /**
+ * Gets currently selected gear data
+ * @param prndl
+ */
+ public void setPrndl(VehicleDataResult prndl) {
+ if (prndl != null) {
+ parameters.put(KEY_PRNDL, prndl);
+ } else {
+ parameters.remove(KEY_PRNDL);
+ }
+ }
+ /**
+ * Gets currently selected gear data
+ * @return VehicleDataResult
+ */
+ @SuppressWarnings("unchecked")
+ public VehicleDataResult getPrndl() {
+ Object obj = parameters.get(KEY_PRNDL);
+ if (obj instanceof VehicleDataResult) {
+ return (VehicleDataResult) obj;
+ } else if (obj instanceof Hashtable) {
+ try {
+ return new VehicleDataResult((Hashtable<String, Object>) obj);
+ } catch (Exception e) {
+ DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_PRNDL, e);
+ }
+ }
+ return null;
+ }
+ /**
+ * Sets Tire Pressure
+ * @param tirePressure
+ */
+ public void setTirePressure(VehicleDataResult tirePressure) {
+ if (tirePressure != null) {
+ parameters.put(KEY_TIRE_PRESSURE, tirePressure);
+ } else {
+ parameters.remove(KEY_TIRE_PRESSURE);
+ }
+ }
+ /**
+ * Gets Tire Pressure
+ * @return VehicleDataResult
+ */
+ @SuppressWarnings("unchecked")
+ public VehicleDataResult getTirePressure() {
+ Object obj = parameters.get(KEY_TIRE_PRESSURE);
+ if (obj instanceof VehicleDataResult) {
+ return (VehicleDataResult) obj;
+ } else if (obj instanceof Hashtable) {
+ try {
+ return new VehicleDataResult((Hashtable<String, Object>) obj);
+ } catch (Exception e) {
+ DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_TIRE_PRESSURE, e);
+ }
+ }
+ return null;
+ }
+ /**
+ * Sets Odometer
+ * @param odometer
+ */
+ public void setOdometer(VehicleDataResult odometer) {
+ if (odometer != null) {
+ parameters.put(KEY_ODOMETER, odometer);
+ } else {
+ parameters.remove(KEY_ODOMETER);
+ }
+ }
+ /**
+ * Gets Odometer
+ * @return VehicleDataResult
+ */
+ @SuppressWarnings("unchecked")
+ public VehicleDataResult getOdometer() {
+ Object obj = parameters.get(KEY_ODOMETER);
+ if (obj instanceof VehicleDataResult) {
+ return (VehicleDataResult) obj;
+ } else if (obj instanceof Hashtable) {
+ try {
+ return new VehicleDataResult((Hashtable<String, Object>) obj);
+ } catch (Exception e) {
+ DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_ODOMETER, e);
+ }
+ }
+ return null;
+ }
+ /**
+ * Sets Belt Status
+ * @param beltStatus
+ */
+ public void setBeltStatus(VehicleDataResult beltStatus) {
+ if (beltStatus != null) {
+ parameters.put(KEY_BELT_STATUS, beltStatus);
+ } else {
+ parameters.remove(KEY_BELT_STATUS);
+ }
+ }
+ /**
+ * Gets Belt Status
+ * @return VehicleDataResult
+ */
+ @SuppressWarnings("unchecked")
+ public VehicleDataResult getBeltStatus() {
+ Object obj = parameters.get(KEY_BELT_STATUS);
+ if (obj instanceof VehicleDataResult) {
+ return (VehicleDataResult) obj;
+ } else if (obj instanceof Hashtable) {
+ try {
+ return new VehicleDataResult((Hashtable<String, Object>) obj);
+ } catch (Exception e) {
+ DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_BELT_STATUS, e);
+ }
+ }
+ return null;
+ }
+ /**
+ * Sets Body Information
+ * @param bodyInformation
+ */
+ public void setBodyInformation(VehicleDataResult bodyInformation) {
+ if (bodyInformation != null) {
+ parameters.put(KEY_BODY_INFORMATION, bodyInformation);
+ } else {
+ parameters.remove(KEY_BODY_INFORMATION);
+ }
+ }
+ /**
+ * Gets Body Information
+ * @return VehicleDataResult
+ */
+ @SuppressWarnings("unchecked")
+ public VehicleDataResult getBodyInformation() {
+ Object obj = parameters.get(KEY_BODY_INFORMATION);
+ if (obj instanceof VehicleDataResult) {
+ return (VehicleDataResult) obj;
+ } else if (obj instanceof Hashtable) {
+ try {
+ return new VehicleDataResult((Hashtable<String, Object>) obj);
+ } catch (Exception e) {
+ DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_BODY_INFORMATION, e);
+ }
+ }
+ return null;
+ }
+ /**
+ * Sets Device Status
+ * @param deviceStatus
+ */
+ public void setDeviceStatus(VehicleDataResult deviceStatus) {
+ if (deviceStatus != null) {
+ parameters.put(KEY_DEVICE_STATUS, deviceStatus);
+ } else {
+ parameters.remove(KEY_DEVICE_STATUS);
+ }
+ }
+ /**
+ * Gets Device Status
+ * @return VehicleDataResult
+ */
+ @SuppressWarnings("unchecked")
+ public VehicleDataResult getDeviceStatus() {
+ Object obj = parameters.get(KEY_DEVICE_STATUS);
+ if (obj instanceof VehicleDataResult) {
+ return (VehicleDataResult) obj;
+ } else if (obj instanceof Hashtable) {
+ try {
+ return new VehicleDataResult((Hashtable<String, Object>) obj);
+ } catch (Exception e) {
+ DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_DEVICE_STATUS, e);
+ }
+ }
+ return null;
+ }
+ /**
+ * Sets Driver Braking
+ * @param driverBraking
+ */
+ public void setDriverBraking(VehicleDataResult driverBraking) {
+ if (driverBraking != null) {
+ parameters.put(KEY_DRIVER_BRAKING, driverBraking);
+ } else {
+ parameters.remove(KEY_DRIVER_BRAKING);
+ }
+ }
+ /**
+ * Gets Driver Braking
+ * @return VehicleDataResult
+ */
+ @SuppressWarnings("unchecked")
+ public VehicleDataResult getDriverBraking() {
+ Object obj = parameters.get(KEY_DRIVER_BRAKING);
+ if (obj instanceof VehicleDataResult) {
+ return (VehicleDataResult) obj;
+ } else if (obj instanceof Hashtable) {
+ try {
+ return new VehicleDataResult((Hashtable<String, Object>) obj);
+ } catch (Exception e) {
+ DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_DRIVER_BRAKING, e);
+ }
+ }
+ return null;
+ }
+ /**
+ * Sets Wiper Status
+ * @param wiperStatus
+ */
+ public void setWiperStatus(VehicleDataResult wiperStatus) {
+ if (wiperStatus != null) {
+ parameters.put(KEY_WIPER_STATUS, wiperStatus);
+ } else {
+ parameters.remove(KEY_WIPER_STATUS);
+ }
+ }
+ /**
+ * Gets Wiper Status
+ * @return VehicleDataResult
+ */
+ @SuppressWarnings("unchecked")
+ public VehicleDataResult getWiperStatus() {
+ Object obj = parameters.get(KEY_WIPER_STATUS);
+ if (obj instanceof VehicleDataResult) {
+ return (VehicleDataResult) obj;
+ } else if (obj instanceof Hashtable) {
+ try {
+ return new VehicleDataResult((Hashtable<String, Object>) obj);
+ } catch (Exception e) {
+ DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_WIPER_STATUS, e);
+ }
+ }
+ return null;
+ }
+ /**
+ * Sets Head Lamp Status
+ * @param headLampStatus
+ */
+ public void setHeadLampStatus(VehicleDataResult headLampStatus) {
+ if (headLampStatus != null) {
+ parameters.put(KEY_HEAD_LAMP_STATUS, headLampStatus);
+ } else {
+ parameters.remove(KEY_HEAD_LAMP_STATUS);
+ }
+ }
+ /**
+ * Gets Head Lamp Status
+ * @return VehicleDataResult
+ */
+ @SuppressWarnings("unchecked")
+ public VehicleDataResult getHeadLampStatus() {
+ Object obj = parameters.get(KEY_HEAD_LAMP_STATUS);
+ if (obj instanceof VehicleDataResult) {
+ return (VehicleDataResult) obj;
+ } else if (obj instanceof Hashtable) {
+ try {
+ return new VehicleDataResult((Hashtable<String, Object>) obj);
+ } catch (Exception e) {
+ DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_HEAD_LAMP_STATUS, e);
+ }
+ }
+ return null;
+ }
+ /**
+ * Sets Engine Torque
+ * @param engineTorque
+ */
+ public void setEngineTorque(VehicleDataResult engineTorque) {
+ if (engineTorque != null) {
+ parameters.put(KEY_ENGINE_TORQUE, engineTorque);
+ } else {
+ parameters.remove(KEY_ENGINE_TORQUE);
+ }
+ }
+ /**
+ * Gets Engine Torque
+ * @return VehicleDataResult
+ */
+ @SuppressWarnings("unchecked")
+ public VehicleDataResult getEngineTorque() {
+ Object obj = parameters.get(KEY_ENGINE_TORQUE);
+ if (obj instanceof VehicleDataResult) {
+ return (VehicleDataResult) obj;
+ } else if (obj instanceof Hashtable) {
+ try {
+ return new VehicleDataResult((Hashtable<String, Object>) obj);
+ } catch (Exception e) {
+ DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_ENGINE_TORQUE, e);
+ }
+ }
+ return null;
+ }
+ /**
+ * Sets AccPedal Position
+ * @param accPedalPosition
+ */
+ public void setAccPedalPosition(VehicleDataResult accPedalPosition) {
+ if (accPedalPosition != null) {
+ parameters.put(KEY_ACC_PEDAL_POSITION, accPedalPosition);
+ } else {
+ parameters.remove(KEY_ACC_PEDAL_POSITION);
+ }
+ }
+ /**
+ * Gets AccPedal Position
+ * @return VehicleDataResult
+ */
+ @SuppressWarnings("unchecked")
+ public VehicleDataResult getAccPedalPosition() {
+ Object obj = parameters.get(KEY_ACC_PEDAL_POSITION);
+ if (obj instanceof VehicleDataResult) {
+ return (VehicleDataResult) obj;
+ } else if (obj instanceof Hashtable) {
+ try {
+ return new VehicleDataResult((Hashtable<String, Object>) obj);
+ } catch (Exception e) {
+ DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_ACC_PEDAL_POSITION, e);
+ }
+ }
+ return null;
+ }
+
+ public void setSteeringWheelAngle(VehicleDataResult steeringWheelAngle) {
+ if (steeringWheelAngle != null) {
+ parameters.put(KEY_STEERING_WHEEL_ANGLE, steeringWheelAngle);
+ } else {
+ parameters.remove(KEY_STEERING_WHEEL_ANGLE);
+ }
+ }
+
+ @SuppressWarnings("unchecked")
+ public VehicleDataResult getSteeringWheelAngle() {
+ Object obj = parameters.get(KEY_STEERING_WHEEL_ANGLE);
+ if (obj instanceof VehicleDataResult) {
+ return (VehicleDataResult) obj;
+ } else if (obj instanceof Hashtable) {
+ try {
+ return new VehicleDataResult((Hashtable<String, Object>) obj);
+ } catch (Exception e) {
+ DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_STEERING_WHEEL_ANGLE, e);
+ }
+ }
+ return null;
+ }
+
+ public void setECallInfo(VehicleDataResult eCallInfo) {
+ if (eCallInfo != null) {
+ parameters.put(KEY_E_CALL_INFO, eCallInfo);
+ } else {
+ parameters.remove(KEY_E_CALL_INFO);
+ }
+ }
+ @SuppressWarnings("unchecked")
+ public VehicleDataResult getECallInfo() {
+ Object obj = parameters.get(KEY_E_CALL_INFO);
+ if (obj instanceof VehicleDataResult) {
+ return (VehicleDataResult) obj;
+ } else if (obj instanceof Hashtable) {
+ try {
+ return new VehicleDataResult((Hashtable<String, Object>) obj);
+ } catch (Exception e) {
+ DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_E_CALL_INFO, e);
+ }
+ }
+ return null;
+ }
+ public void setAirbagStatus(VehicleDataResult airbagStatus) {
+ if (airbagStatus != null) {
+ parameters.put(KEY_AIRBAG_STATUS, airbagStatus);
+ } else {
+ parameters.remove(KEY_AIRBAG_STATUS);
+ }
+ }
+ @SuppressWarnings("unchecked")
+ public VehicleDataResult getAirbagStatus() {
+ Object obj = parameters.get(KEY_AIRBAG_STATUS);
+ if (obj instanceof VehicleDataResult) {
+ return (VehicleDataResult) obj;
+ } else if (obj instanceof Hashtable) {
+ try {
+ return new VehicleDataResult((Hashtable<String, Object>) obj);
+ } catch (Exception e) {
+ DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_AIRBAG_STATUS, e);
+ }
+ }
+ return null;
+ }
+ public void setEmergencyEvent(VehicleDataResult emergencyEvent) {
+ if (emergencyEvent != null) {
+ parameters.put(KEY_EMERGENCY_EVENT, emergencyEvent);
+ } else {
+ parameters.remove(KEY_EMERGENCY_EVENT);
+ }
+ }
+ @SuppressWarnings("unchecked")
+ public VehicleDataResult getEmergencyEvent() {
+ Object obj = parameters.get(KEY_EMERGENCY_EVENT);
+ if (obj instanceof VehicleDataResult) {
+ return (VehicleDataResult) obj;
+ } else if (obj instanceof Hashtable) {
+ try {
+ return new VehicleDataResult((Hashtable<String, Object>) obj);
+ } catch (Exception e) {
+ DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_EMERGENCY_EVENT, e);
+ }
+ }
+ return null;
+ }
+ public void setClusterModeStatus(VehicleDataResult clusterModeStatus) {
+ if (clusterModeStatus != null) {
+ parameters.put(KEY_CLUSTER_MODE_STATUS, clusterModeStatus);
+ } else {
+ parameters.remove(KEY_CLUSTER_MODE_STATUS);
+ }
+ }
+ @SuppressWarnings("unchecked")
+ public VehicleDataResult getClusterModeStatus() {
+ Object obj = parameters.get(KEY_CLUSTER_MODE_STATUS);
+ if (obj instanceof VehicleDataResult) {
+ return (VehicleDataResult) obj;
+ } else if (obj instanceof Hashtable) {
+ try {
+ return new VehicleDataResult((Hashtable<String, Object>) obj);
+ } catch (Exception e) {
+ DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_CLUSTER_MODE_STATUS, e);
+ }
+ }
+ return null;
+ }
+ public void setMyKey(VehicleDataResult myKey) {
+ if (myKey != null) {
+ parameters.put(KEY_MY_KEY, myKey);
+ } else {
+ parameters.remove(KEY_MY_KEY);
+ }
+ }
+ @SuppressWarnings("unchecked")
+ public VehicleDataResult getMyKey() {
+ Object obj = parameters.get(KEY_MY_KEY);
+ if (obj instanceof VehicleDataResult) {
+ return (VehicleDataResult) obj;
+ } else if (obj instanceof Hashtable) {
+ try {
+ return new VehicleDataResult((Hashtable<String, Object>) obj);
+ } catch (Exception e) {
+ DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_MY_KEY, e);
+ }
+ }
+ return null;
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/UnsubscribeWayPoints.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/UnsubscribeWayPoints.java
new file mode 100644
index 000000000..b748ef673
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/UnsubscribeWayPoints.java
@@ -0,0 +1,15 @@
+package com.smartdevicelink.proxy.rpc;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCRequest;
+
+import java.util.Hashtable;
+
+public class UnsubscribeWayPoints extends RPCRequest {
+ public UnsubscribeWayPoints() {
+ super(FunctionID.UNSUBSCRIBE_WAY_POINTS.toString());
+ }
+ public UnsubscribeWayPoints(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/UnsubscribeWayPointsResponse.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/UnsubscribeWayPointsResponse.java
new file mode 100644
index 000000000..8804892aa
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/UnsubscribeWayPointsResponse.java
@@ -0,0 +1,16 @@
+package com.smartdevicelink.proxy.rpc;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCResponse;
+
+import java.util.Hashtable;
+
+public class UnsubscribeWayPointsResponse extends RPCResponse {
+
+ public UnsubscribeWayPointsResponse() {
+ super(FunctionID.UNSUBSCRIBE_WAY_POINTS.toString());
+ }
+ public UnsubscribeWayPointsResponse(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+} \ No newline at end of file
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/UpdateTurnList.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/UpdateTurnList.java
new file mode 100644
index 000000000..ad2b41163
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/UpdateTurnList.java
@@ -0,0 +1,140 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.ArrayList;
+import java.util.Hashtable;
+import java.util.List;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCRequest;
+
+/**
+ * Updates the list of next maneuvers, which can be requested by the user pressing the softbutton "Turns" on the
+ * Navigation base screen. Three softbuttons are predefined by the system: Up, Down, Close
+ *
+ * <p>Function Group: Navigation</p>
+ *
+ * <p><b>HMILevel needs to be FULL, LIMITED or BACKGROUND</b></p>
+ *
+ *
+ * @since SmartDeviceLink 2.0
+ * @see ShowConstantTbt
+ */
+public class UpdateTurnList extends RPCRequest{
+ public static final String KEY_TURN_LIST = "turnList";
+ public static final String KEY_SOFT_BUTTONS = "softButtons";
+
+ /**
+ * Constructs a new UpdateTurnList object
+ */
+ public UpdateTurnList() {
+ super(FunctionID.UPDATE_TURN_LIST.toString());
+ }
+
+ /**
+ * <p>
+ * Constructs a new UpdateTurnList object indicated by the Hashtable
+ * parameter
+ * </p>
+ *
+ * @param hash
+ * The Hashtable to use
+ */
+ public UpdateTurnList(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+
+ /**
+ * Sets a list of turns to be shown to the user
+ *
+ * @param turnList
+ * a List<Turn> value representing a list of turns to be shown to the user
+ * <p>
+ * <b>Notes: </b>Minsize=1; Maxsize=100</p>
+ */
+ public void setTurnList(List<Turn> turnList){
+ if(turnList != null){
+ parameters.put(KEY_TURN_LIST, turnList);
+ }
+ else{
+ parameters.remove(KEY_TURN_LIST);
+ }
+ }
+
+ /**
+ * Gets a list of turns to be shown to the user
+ *
+ * @return List<Turn> -a List value representing a list of turns
+ */
+ @SuppressWarnings("unchecked")
+ public List<Turn> getTurnList(){
+ if(parameters.get(KEY_TURN_LIST) instanceof List<?>){
+ List<?> list = (List<?>) parameters.get(KEY_TURN_LIST);
+ if(list != null && list.size() > 0){
+ Object obj = list.get(0);
+ if(obj instanceof Turn){
+ return (List<Turn>) list;
+ }
+ else if(obj instanceof Hashtable){
+ List<Turn> newList = new ArrayList<Turn>();
+ for(Object hashObj : list){
+ newList.add(new Turn((Hashtable<String, Object>) hashObj));
+ }
+ return newList;
+ }
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Gets the SoftButton List object
+ *
+ * @return List<SoftButton> -a List<SoftButton> representing the List object
+ * @since SmartDeviceLink 2.0
+ */
+ @SuppressWarnings("unchecked")
+ public List<SoftButton> getSoftButtons(){
+ if(parameters.get(KEY_SOFT_BUTTONS) instanceof List<?>){
+ List<?> list = (List<?>) parameters.get(KEY_SOFT_BUTTONS);
+ if(list != null && list.size() > 0){
+ Object obj = list.get(0);
+ if(obj instanceof SoftButton){
+ return (List<SoftButton>) list;
+ }
+ else if(obj instanceof Hashtable){
+ List<SoftButton> newList = new ArrayList<SoftButton>();
+ for(Object hashObj : list){
+ newList.add(new SoftButton((Hashtable<String, Object>) hashObj));
+ }
+ return newList;
+ }
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Sets the SoftButtons
+ *
+ * @param softButtons
+ * a List<SoftButton> value
+ * <p>
+ * <b>Notes: </b></p>
+ * <ul>
+ * <li>If omitted on supported displays, the alert will not have any SoftButton</li>
+ * <li>ArrayMin: 0</li>
+ * <li>ArrayMax: 4</li>
+ * </ul>
+ * @since SmartDeviceLink 2.0
+ */
+
+ public void setSoftButtons(List<SoftButton> softButtons){
+ if(softButtons != null){
+ parameters.put(KEY_SOFT_BUTTONS, softButtons);
+ }
+ else{
+ parameters.remove(KEY_SOFT_BUTTONS);
+ }
+ }
+
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/UpdateTurnListResponse.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/UpdateTurnListResponse.java
new file mode 100644
index 000000000..add51c5a5
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/UpdateTurnListResponse.java
@@ -0,0 +1,26 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCResponse;
+
+/**
+ * Update Turn List Response is sent, when UpdateTurnList has been called
+ *
+ * @since SmartDeviceLink 2.0
+ */
+public class UpdateTurnListResponse extends RPCResponse{
+
+ /**
+ * Constructs a new UpdateTurnListResponse object
+ */
+ public UpdateTurnListResponse() {
+ super(FunctionID.UPDATE_TURN_LIST.toString());
+ }
+
+ public UpdateTurnListResponse(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/VehicleDataResult.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/VehicleDataResult.java
new file mode 100644
index 000000000..ef466d727
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/VehicleDataResult.java
@@ -0,0 +1,91 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+
+import com.smartdevicelink.proxy.RPCStruct;
+import com.smartdevicelink.proxy.rpc.enums.VehicleDataResultCode;
+import com.smartdevicelink.proxy.rpc.enums.VehicleDataType;
+/**
+ *
+ * Individual published data request result.
+ *
+ * <p><b>Parameter List</b></p>
+ * <table border="1" rules="all">
+ * <tr>
+ * <th>Param Name</th>
+ * <th>Type</th>
+ * <th>Description</th>
+ * <th> Req.</th>
+ * <th>Notes</th>
+ * <th>Version Available</th>
+ * </tr>
+ * <tr>
+ * <td>dataType</td>
+ * <td>VehicleDataType</td>
+ * <td>Defined published data element type.</td>
+ * <td></td>
+ * <td></td>
+ * <td>SmartDeviceLink 1.0</td>
+ * </tr>
+ * <tr>
+ * <td>resultCode</td>
+ * <td>VehicleDataResultCode</td>
+ * <td>Published data result code.</td>
+ * <td></td>
+ * <td></td>
+ * <td>SmartDeviceLink 1.0</td>
+ * </tr>
+ * </table>
+ *
+ */
+public class VehicleDataResult extends RPCStruct {
+ public static final String KEY_DATA_TYPE = "dataType";
+ public static final String KEY_RESULT_CODE = "resultCode";
+ /**
+ * <p>
+ * Constructs a new VehicleDataResult object indicated by the Hashtable
+ * parameter
+ * </p>
+ *
+ * @param hash
+ *
+ * <p>The Hashtable to use</p>
+ */
+
+ public VehicleDataResult() { }
+ public VehicleDataResult(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+ public void setDataType(VehicleDataType dataType) {
+ if (dataType != null) {
+ store.put(KEY_DATA_TYPE, dataType);
+ } else {
+ store.remove(KEY_DATA_TYPE);
+ }
+ }
+ public VehicleDataType getDataType() {
+ Object obj = store.get(KEY_DATA_TYPE);
+ if (obj instanceof VehicleDataType) {
+ return (VehicleDataType) obj;
+ } else if (obj instanceof String) {
+ return VehicleDataType.valueForString((String) obj);
+ }
+ return null;
+ }
+ public void setResultCode(VehicleDataResultCode resultCode) {
+ if (resultCode != null) {
+ store.put(KEY_RESULT_CODE, resultCode);
+ } else {
+ store.remove(KEY_RESULT_CODE);
+ }
+ }
+ public VehicleDataResultCode getResultCode() {
+ Object obj = store.get(KEY_RESULT_CODE);
+ if (obj instanceof VehicleDataResultCode) {
+ return (VehicleDataResultCode) obj;
+ } else if (obj instanceof String) {
+ return VehicleDataResultCode.valueForString((String) obj);
+ }
+ return null;
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/VehicleType.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/VehicleType.java
new file mode 100644
index 000000000..3f30774c4
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/VehicleType.java
@@ -0,0 +1,158 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+
+import com.smartdevicelink.proxy.RPCStruct;
+
+/**
+ * Describes the type of vehicle the mobile phone is connected with.
+ * <p><b>Parameter List</b></p>
+ * <table border="1" rules="all">
+ * <tr>
+ * <th>Name</th>
+ * <th>Type</th>
+ * <th>Description</th>
+ * <th>SmartDeviceLink Ver. Available</th>
+ * </tr>
+ * <tr>
+ * <td>make</td>
+ * <td>String</td>
+ * <td>Make of the vehicle
+ * <ul>
+ * <li>Maxlength = 500</li>
+ * </ul>
+ * </td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>Model</td>
+ * <td>String</td>
+ * <td>Model of the vehicle, e.g. Fiesta
+ * <ul>
+ * <li>Maxlength = 500</li>
+ * </ul>
+ * </td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>modelYear</td>
+ * <td>String</td>
+ * <td>Model Year of the vehicle, e.g. 2013
+ * <ul>
+ * <li>Maxlength = 500</li>
+ * </ul>
+ * </td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * <tr>
+ * <td>trim</td>
+ * <td>String</td>
+ * <td>Trim of the vehicle, e.g. SE
+ * <ul>
+ * <li>Maxlength = 500</li>
+ * </ul>
+ * </td>
+ * <td>SmartDeviceLink 2.0</td>
+ * </tr>
+ * </table>
+ * @since SmartDeviceLink 2.0
+ */
+public class VehicleType extends RPCStruct {
+ public static final String KEY_MAKE = "make";
+ public static final String KEY_MODEL = "model";
+ public static final String KEY_MODEL_YEAR = "modelYear";
+ public static final String KEY_TRIM = "trim";
+
+ /**
+ * Constructs a newly allocated VehicleType object
+ */
+ public VehicleType() { }
+
+ /**
+ * Constructs a newly allocated VehicleType object indicated by the Hashtable parameter
+ * @param hash The Hashtable to use
+ */
+ public VehicleType(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+
+ /**
+ * get the make of the vehicle
+ * @return the make of the vehicle
+ */
+ public String getMake() {
+ return (String) store.get(KEY_MAKE);
+ }
+
+ /**
+ * set the make of the vehicle
+ *@param make the make of the vehicle
+ */
+ public void setMake(String make) {
+ if (make != null) {
+ store.put(KEY_MAKE, make);
+ } else {
+ store.remove(KEY_MAKE);
+ }
+ }
+
+ /**
+ * get the model of the vehicle
+ * @return the model of the vehicle
+ */
+ public String getModel() {
+ return (String) store.get(KEY_MODEL);
+ }
+
+ /**
+ * set the model of the vehicle
+ * @param model the model of the vehicle
+ */
+ public void setModel(String model) {
+ if (model != null) {
+ store.put(KEY_MODEL, model);
+ } else {
+ store.remove(KEY_MODEL);
+ }
+ }
+
+ /**
+ * get the model year of the vehicle
+ * @return the model year of the vehicle
+ */
+ public String getModelYear() {
+ return (String) store.get(KEY_MODEL_YEAR);
+ }
+
+ /**
+ * set the model year of the vehicle
+ * @param modelYear the model year of the vehicle
+ */
+ public void setModelYear(String modelYear) {
+ if (modelYear != null) {
+ store.put(KEY_MODEL_YEAR, modelYear);
+ } else {
+ store.remove(KEY_MODEL_YEAR);
+ }
+ }
+
+ /**
+ * get the trim of the vehicle
+ * @return the trim of the vehicle
+ */
+ public String getTrim() {
+ return (String) store.get(KEY_TRIM);
+ }
+
+ /**
+ * set the trim of the vehicle
+ * @param trim the trim of the vehicle
+ */
+ public void setTrim(String trim) {
+ if (trim != null) {
+ store.put(KEY_TRIM, trim);
+ } else {
+ store.remove(KEY_TRIM);
+ }
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/VrHelpItem.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/VrHelpItem.java
new file mode 100644
index 000000000..f195b4cae
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/VrHelpItem.java
@@ -0,0 +1,108 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+
+import com.smartdevicelink.proxy.RPCStruct;
+import com.smartdevicelink.util.DebugTool;
+/**
+ *
+ * VR help items i.e. the text strings to be displayed, and when pronounced by the user the recognition of any of which must trigger the corresponding VR command.
+ *
+ * <p><b>Parameter List</b></p>
+ * <table border="1" rules="all">
+ * <tr>
+ * <th>Param Name</th>
+ * <th>Type</th>
+ * <th>Description</th>
+ * <th> Req.</th>
+ * <th>Notes</th>
+ * <th>Version Available</th>
+ * </tr>
+ * <tr>
+ * <td>text</td>
+ * <td>String</td>
+ * <td>Text to display for VR Help item</td>
+ * <td>Y</td>
+ * <td>maxlength: 500</td>
+ * <td>SmartDeviceLink 2.3.2</td>
+ * </tr>
+ * <tr>
+ * <td>image</td>
+ * <td>Image</td>
+ * <td>Image struct for VR Help item</td>
+ * <td>N</td>
+ * <td></td>
+ * <td>SmartDeviceLink 2.3.2</td>
+ * </tr>
+ * <tr>
+ * <td>position</td>
+ * <td>Integer</td>
+ * <td>Position to display item in VR Help list</td>
+ * <td>N</td>
+ * <td> minvalue=1; maxvalue=100</td>
+ * <td>SmartDeviceLink 2.3.2</td>
+ * </tr>
+ * </table>
+ *
+ */
+public class VrHelpItem extends RPCStruct {
+ public static final String KEY_POSITION = "position";
+ public static final String KEY_TEXT = "text";
+ public static final String KEY_IMAGE = "image";
+ /**
+ * <p>
+ * Constructs a new VrHelpItem object indicated by the Hashtable
+ * parameter
+ * </p>
+ *
+ * @param hash
+ * <p>
+ * The Hashtable to use
+ */
+
+ public VrHelpItem() { }
+ public VrHelpItem(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+ public void setText(String text) {
+ if (text != null) {
+ store.put(KEY_TEXT, text);
+ } else {
+ store.remove(KEY_TEXT);
+ }
+ }
+ public String getText() {
+ return (String) store.get(KEY_TEXT);
+ }
+ public void setImage(Image image) {
+ if (image != null) {
+ store.put(KEY_IMAGE, image);
+ } else {
+ store.remove(KEY_IMAGE);
+ }
+ }
+ @SuppressWarnings("unchecked")
+ public Image getImage() {
+ Object obj = store.get(KEY_IMAGE);
+ if (obj instanceof Image) {
+ return (Image) obj;
+ } else if (obj instanceof Hashtable) {
+ try {
+ return new Image((Hashtable<String, Object>) obj);
+ } catch (Exception e) {
+ DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_IMAGE, e);
+ }
+ }
+ return null;
+ }
+ public void setPosition(Integer position) {
+ if (position != null) {
+ store.put(KEY_POSITION, position);
+ } else {
+ store.remove(KEY_POSITION);
+ }
+ }
+ public Integer getPosition() {
+ return (Integer) store.get(KEY_POSITION);
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/AmbientLightStatus.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/AmbientLightStatus.java
new file mode 100644
index 000000000..3f4076b11
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/AmbientLightStatus.java
@@ -0,0 +1,34 @@
+package com.smartdevicelink.proxy.rpc.enums;
+/** Reflects the status of the ambient light sensor.
+ *
+ * @since SmartDeviceLink 2.3.2
+ *
+ * @see SoftButtonCapabilities
+ * @see ButtonCapabilities
+ * @see OnButtonPress
+ *
+ */
+
+public enum AmbientLightStatus {
+ NIGHT,
+ TWILIGHT_1,
+ TWILIGHT_2,
+ TWILIGHT_3,
+ TWILIGHT_4,
+ DAY,
+ UNKNOWN,
+ INVALID;
+ /**
+ * Convert String to AmbientLightStatus
+ * @param value String
+ * @return AmbientLightStatus
+ */
+
+ public static AmbientLightStatus valueForString(String value) {
+ try{
+ return valueOf(value);
+ }catch(Exception e){
+ return null;
+ }
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/AppHMIType.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/AppHMIType.java
new file mode 100644
index 000000000..a6aed67d9
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/AppHMIType.java
@@ -0,0 +1,58 @@
+package com.smartdevicelink.proxy.rpc.enums;
+
+/**
+ * Enumeration listing possible app hmi types.
+ * @since SmartDeviceLink 2.0
+ */
+public enum AppHMIType {
+ /**
+ * The App will have default rights.
+ */
+ DEFAULT,
+ /**
+ * Communication type of App
+ */
+ COMMUNICATION,
+ /**
+ * App dealing with Media
+ */
+ MEDIA,
+ /**
+ * Messaging App
+ */
+ MESSAGING,
+ /**
+ * Navigation App
+ */
+ NAVIGATION,
+ /**
+ * Information App
+ */
+ INFORMATION,
+ /**
+ * App dealing with social media
+ */
+ SOCIAL,
+ BACKGROUND_PROCESS,
+ /**
+ * App only for Testing purposes
+ */
+ TESTING,
+ /**
+ * System App
+ */
+ SYSTEM;
+
+ /**
+ * Convert String to AppHMIType
+ * @param value String
+ * @return AppHMIType
+ */
+ public static AppHMIType valueForString(String value) {
+ try{
+ return valueOf(value);
+ }catch(Exception e){
+ return null;
+ }
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/AppInterfaceUnregisteredReason.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/AppInterfaceUnregisteredReason.java
new file mode 100644
index 000000000..d4a7ff103
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/AppInterfaceUnregisteredReason.java
@@ -0,0 +1,98 @@
+package com.smartdevicelink.proxy.rpc.enums;
+
+/**
+ * Indicates reason why app interface was unregistered. The application is being
+ * disconnected by SDL.
+ *
+ * @since SmartDeviceLink 1.0
+ */
+public enum AppInterfaceUnregisteredReason {
+ USER_EXIT,
+ /**
+ * Vehicle ignition turned off.
+ *
+ * @since SmartDeviceLink 1.0
+ */
+ IGNITION_OFF,
+ /**
+ * Bluetooth was turned off, causing termination of a necessary Bluetooth
+ * connection.
+ *
+ * @since SmartDeviceLink 1.0
+ */
+ BLUETOOTH_OFF,
+ /**
+ * USB was disconnected, causing termination of a necessary iAP connection.
+ *
+ * @since SmartDeviceLink 1.0
+ */
+ USB_DISCONNECTED,
+ /**
+ * Application attempted SmartDeviceLink RPC request while {@linkplain HMILevel}
+ * =NONE. App must have HMILevel other than NONE to issue RPC requests or
+ * get notifications or RPC responses.
+ *
+ * @since SmartDeviceLink 1.0
+ */
+ REQUEST_WHILE_IN_NONE_HMI_LEVEL,
+ /**
+ * Either too many -- or too many per unit of time -- requests were made by
+ * the application.
+ *
+ * @since SmartDeviceLink 1.0
+ */
+ TOO_MANY_REQUESTS,
+ /**
+ * The application has issued requests which cause driver distraction rules
+ * to be violated.
+ *
+ * @since SmartDeviceLink 1.0
+ */
+ DRIVER_DISTRACTION_VIOLATION,
+ /**
+ * The user has changed the language in effect on the SDL platform to a
+ * language that is incompatible with the language declared by the
+ * application in its RegisterAppInterface request.
+ *
+ * @since SmartDeviceLink 1.0
+ */
+ LANGUAGE_CHANGE,
+ /**
+ * The user performed a MASTER RESET on the SDL platform, causing removal
+ * of a necessary Bluetooth pairing.
+ *
+ * @since SmartDeviceLink 1.0
+ */
+ MASTER_RESET,
+ /**
+ * The user restored settings to FACTORY DEFAULTS on the SDL platform.
+ *
+ * @since SmartDeviceLink 1.0
+ */
+ FACTORY_DEFAULTS,
+ /**
+ * The app is not being authorized to be connected to SDL.
+ *
+ * @since SmartDeviceLink 2.0
+ */
+ APP_UNAUTHORIZED,
+ /**
+ * The app has committed a protocol violation.
+ *
+ * @since SmartDeviceLink 4.0
+ */
+ PROTOCOL_VIOLATION,
+ ;
+ /**
+ * Convert String to AppInterfaceUnregisteredReason
+ * @param value String
+ * @return AppInterfaceUnregisteredReason
+ */
+ public static AppInterfaceUnregisteredReason valueForString(String value) {
+ try{
+ return valueOf(value);
+ }catch(Exception e){
+ return null;
+ }
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/AudioStreamingState.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/AudioStreamingState.java
new file mode 100644
index 000000000..50accb6bf
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/AudioStreamingState.java
@@ -0,0 +1,46 @@
+package com.smartdevicelink.proxy.rpc.enums;
+
+/**
+ * Describes whether or not streaming audio is currently audible to the user.
+ * Though provided in every OnHMIStatus notification, this information is only
+ * relevant for applications that declare themselves as media apps in
+ * RegisterAppInterface
+ *
+ * @since SmartDeviceLink 1.0
+ */
+public enum AudioStreamingState {
+ /**
+ * Currently streaming audio, if any, is audible to user.
+ *
+ * @since SmartDeviceLink 1.0
+ */
+ AUDIBLE,
+
+ /**
+ * Some kind of audio mixing is taking place. Currently streaming audio, if
+ * any, is audible to the user at a lowered volume.
+ *
+ * @since SmartDeviceLink 2.0
+ */
+ ATTENUATED,
+ /**
+ * Currently streaming audio, if any, is not audible to user. made via VR
+ * session.
+ *
+ * @since SmartDeviceLink 1.0
+ */
+ NOT_AUDIBLE;
+ /**
+ * Convert String to AudioStreamingState
+ * @param value String
+ * @return AudioStreamingState
+ */
+
+ public static AudioStreamingState valueForString(String value) {
+ try{
+ return valueOf(value);
+ }catch(Exception e){
+ return null;
+ }
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/AudioType.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/AudioType.java
new file mode 100644
index 000000000..d340e0e4c
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/AudioType.java
@@ -0,0 +1,32 @@
+package com.smartdevicelink.proxy.rpc.enums;
+
+/**
+ * Describes different audio type options for PerformAudioPassThru
+ *
+ * @see SoftButtonCapabilities
+ * @see ButtonCapabilities
+ * @see OnButtonPress
+ * @since SmartDeviceLink 2.0
+
+ */
+public enum AudioType {
+ /**
+ * PCM raw audio
+ *
+ * @since SmartDeviceLink 2.0
+ */
+ PCM;
+ /**
+ * Convert String to AudioType
+ * @param value String
+ * @return AudioType
+ */
+
+ public static AudioType valueForString(String value) {
+ try{
+ return valueOf(value);
+ }catch(Exception e){
+ return null;
+ }
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/BitsPerSample.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/BitsPerSample.java
new file mode 100644
index 000000000..b21e138a9
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/BitsPerSample.java
@@ -0,0 +1,46 @@
+package com.smartdevicelink.proxy.rpc.enums;
+
+import java.util.EnumSet;
+
+/**
+ * Describes different bit depth options for PerformAudioPassThru.
+ * @see PerformAudioPassThru
+ * @since SmartDeviceLink 2.0
+ */
+public enum BitsPerSample {
+ /**
+ * 8 bits per sample
+ *
+ * @since SmartDeviceLink 2.0
+ */
+ _8_BIT("8_BIT"),
+ /**
+ * 16 bits per sample
+ *
+ * @since SmartDeviceLink 2.0
+ */
+ _16_BIT("16_BIT");
+
+ private final String INTERNAL_NAME;
+
+ private BitsPerSample(String internalName) {
+ this.INTERNAL_NAME = internalName;
+ }
+
+ public String toString() {
+ return this.INTERNAL_NAME;
+ }
+
+ public static BitsPerSample valueForString(String value) {
+ if(value == null){
+ return null;
+ }
+
+ for (BitsPerSample anEnum : EnumSet.allOf(BitsPerSample.class)) {
+ if (anEnum.toString().equals(value)) {
+ return anEnum;
+ }
+ }
+ return null;
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/ButtonEventMode.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/ButtonEventMode.java
new file mode 100644
index 000000000..33f1f0f49
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/ButtonEventMode.java
@@ -0,0 +1,36 @@
+package com.smartdevicelink.proxy.rpc.enums;
+
+/**
+ * Indicates whether the button was depressed or released. A BUTTONUP event will
+ * always be preceded by a BUTTONDOWN event
+ *
+ * @see SoftButtonCapabilities
+ * @see OnButtonEvent
+ * @since SmartDeviceLink 1.0
+ */
+public enum ButtonEventMode {
+ /**
+ * The button was released
+ */
+ BUTTONUP,
+ /**
+ * The button was depressed
+ */
+ BUTTONDOWN;
+
+ /**
+ * Returns a ButtonEventMode (BUTTONUP or BUTTONDOWN)
+ *
+ * @param value
+ * a String
+ * @return ButtonEventMode -BUTTONUP or BUTTONDOWN
+ */
+
+ public static ButtonEventMode valueForString(String value) {
+ try{
+ return valueOf(value);
+ }catch(Exception e){
+ return null;
+ }
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/ButtonName.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/ButtonName.java
new file mode 100644
index 000000000..1391a9d44
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/ButtonName.java
@@ -0,0 +1,181 @@
+package com.smartdevicelink.proxy.rpc.enums;
+
+/**
+ * <p>
+ * Defines logical buttons which, on a given SDL unit, would correspond to
+ * either physical or soft (touchscreen) buttons. These logical buttons present
+ * a standard functional abstraction which the developer can rely upon,
+ * independent of the SDL unit. For example, the developer can rely upon the OK
+ * button having the same meaning to the user across SDL platforms.
+ * </p>
+ * <p>
+ * The preset buttons (0-9) can typically be interpreted by the application as
+ * corresponding to some user-configured choices, though the application is free
+ * to interpret these button presses as it sees fit.
+ * </p>
+ * <p>
+ * The application can discover which buttons a given SDL unit implements by
+ * interrogating the ButtonCapabilities parameter of the
+ * RegisterAppInterface response.
+ * </p>
+ *
+ * @since SmartDeviceLink 1.0
+ */
+public enum ButtonName{
+ /**
+ * Represents the button usually labeled "OK". A typical use of this button
+ * is for the user to press it to make a selection.
+ *
+ * @since SmartDeviceLink 1.0
+ */
+ OK,
+ /**
+ * Represents the seek-left button. A typical use of this button is for the
+ * user to scroll to the left through menu choices one menu item per press.
+ *
+ * @since SmartDeviceLink 1.0
+ */
+ SEEKLEFT,
+ /**
+ * Represents the seek-right button. A typical use of this button is for the
+ * user to scroll to the right through menu choices one menu item per press.
+ *
+ * @since SmartDeviceLink 1.0
+ */
+ SEEKRIGHT,
+ /**
+ * Represents a turn of the tuner knob in the clockwise direction one tick.
+ *
+ * @since SmartDeviceLink 1.0
+ */
+ TUNEUP,
+ /**
+ * Represents a turn of the tuner knob in the counter-clockwise direction
+ * one tick.
+ *
+ * @since SmartDeviceLink 1.0
+ */
+ TUNEDOWN,
+ /**
+ * Represents the preset 0 button.
+ *
+ * @since SmartDeviceLink 1.0
+ */
+ PRESET_0,
+ /**
+ * Represents the preset 1 button.
+ *
+ * @since SmartDeviceLink 1.0
+ */
+ PRESET_1,
+ /**
+ * Represents the preset 2 button.
+ *
+ * @since SmartDeviceLink 1.0
+ */
+ PRESET_2,
+ /**
+ * Represents the preset 3 button.
+ *
+ * @since SmartDeviceLink 1.0
+ */
+ PRESET_3,
+ /**
+ * Represents the preset 4 button.
+ *
+ * @since SmartDeviceLink 1.0
+ */
+ PRESET_4,
+ /**
+ * Represents the preset 5 button.
+ *
+ * @since SmartDeviceLink 1.0
+ */
+ PRESET_5,
+ /**
+ * Represents the preset 6 button.
+ *
+ * @since SmartDeviceLink 1.0
+ */
+ PRESET_6,
+ /**
+ * Represents the preset 7 button.
+ *
+ * @since SmartDeviceLink 1.0
+ */
+ PRESET_7,
+ /**
+ * Represents the preset 8 button.
+ *
+ * @since SmartDeviceLink 1.0
+ */
+ PRESET_8,
+ /**
+ * Represents the preset 9 button.
+ *
+ * @since SmartDeviceLink 1.0
+ */
+ PRESET_9, CUSTOM_BUTTON, SEARCH;
+
+ public static ButtonName valueForString(String value) {
+ try{
+ return valueOf(value);
+ }catch(Exception e){
+ return null;
+ }
+ }
+
+ /**
+ * indexForPresetButton returns the integer index for preset buttons
+ * which match the preset order. E.G.: indexForPresetButton(PRESET_1)
+ * returns the value 1. If the buttonName given is not a preset button,
+ * the method will return null.
+ *
+ * @param buttonName
+ * @return Integer
+ */
+ public static Integer indexForPresetButton(ButtonName buttonName) {
+ if(buttonName == null){
+ return null;
+ }
+
+ Integer returnIndex = null;
+
+ switch(buttonName) {
+ case PRESET_0:
+ returnIndex = 0;
+ break;
+ case PRESET_1:
+ returnIndex = 1;
+ break;
+ case PRESET_2:
+ returnIndex = 2;
+ break;
+ case PRESET_3:
+ returnIndex = 3;
+ break;
+ case PRESET_4:
+ returnIndex = 4;
+ break;
+ case PRESET_5:
+ returnIndex = 5;
+ break;
+ case PRESET_6:
+ returnIndex = 6;
+ break;
+ case PRESET_7:
+ returnIndex = 7;
+ break;
+ case PRESET_8:
+ returnIndex = 8;
+ break;
+ case PRESET_9:
+ returnIndex = 9;
+ break;
+ default:
+ break;
+ }
+
+ return returnIndex;
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/ButtonPressMode.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/ButtonPressMode.java
new file mode 100644
index 000000000..cc2852526
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/ButtonPressMode.java
@@ -0,0 +1,35 @@
+package com.smartdevicelink.proxy.rpc.enums;
+
+/**
+ * Indicates whether this is a LONG or SHORT button press.
+ * <p></p>
+ *@see ButtonEventMode
+ *@since SmartDeviceLink 1.0
+ */
+public enum ButtonPressMode {
+ /**
+ * The button has been depressed for 2 seconds. The button may remain
+ * depressed after receiving this event
+ */
+ LONG,
+ /**
+ * The button was released before the 2-second long-press interval had
+ * elapsed
+ */
+ SHORT;
+ /**
+ * Returns a ButtonPressMode (LONG or SHORT)
+ *
+ * @param value
+ * a String
+ * @return ButtonPressMode -LONG or SHORT
+ */
+
+ public static ButtonPressMode valueForString(String value) {
+ try{
+ return valueOf(value);
+ }catch(Exception e){
+ return null;
+ }
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/CarModeStatus.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/CarModeStatus.java
new file mode 100644
index 000000000..c44b457ec
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/CarModeStatus.java
@@ -0,0 +1,39 @@
+package com.smartdevicelink.proxy.rpc.enums;
+/** Describes the carmode the vehicle is in.
+ * @see SoftButtonCapabilities
+ * @see ButtonCapabilities
+ * @see OnButtonPress
+ * @since SmartDeviceLink 2.0
+ */
+
+public enum CarModeStatus {
+ /** Provides carmode NORMAL to each module.
+ */
+
+ NORMAL,
+ /** Provides carmode FACTORY to each module.
+ */
+
+ FACTORY,
+ /** Provides carmode TRANSPORT to each module.
+ */
+
+ TRANSPORT,
+ /** Provides carmode CRASH to each module.
+ */
+
+
+ CRASH;
+ /** Convert String to CarModeStatus
+ * @param value String
+ * @return CarModeStatus
+ */
+
+ public static CarModeStatus valueForString(String value) {
+ try{
+ return valueOf(value);
+ }catch(Exception e){
+ return null;
+ }
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/CharacterSet.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/CharacterSet.java
new file mode 100644
index 000000000..b8c4c9535
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/CharacterSet.java
@@ -0,0 +1,24 @@
+package com.smartdevicelink.proxy.rpc.enums;
+/**
+ * Character sets supported by SDL.
+ * @since SmartDeviceLink 1.0
+ */
+public enum CharacterSet {
+ TYPE2SET,
+ TYPE5SET,
+ CID1SET,
+ CID2SET;
+
+ /**
+ * Convert String to CharacterSet
+ * @param value String
+ * @return CharacterSet
+ */
+ public static CharacterSet valueForString(String value) {
+ try{
+ return valueOf(value);
+ }catch(Exception e){
+ return null;
+ }
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/CompassDirection.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/CompassDirection.java
new file mode 100644
index 000000000..a450bf6ed
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/CompassDirection.java
@@ -0,0 +1,53 @@
+package com.smartdevicelink.proxy.rpc.enums;
+
+/**
+ * The list of potential compass directions
+ * @since SmartDeviceLink 2.0
+ */
+public enum CompassDirection {
+ /**
+ * Direction North
+ */
+ NORTH,
+ /**
+ * Direction Northwest
+ */
+ NORTHWEST,
+ /**
+ * Direction West
+ */
+ WEST,
+ /**
+ * Direction Southwest
+ */
+ SOUTHWEST,
+ /**
+ * Direction South
+ */
+ SOUTH,
+ /**
+ * Direction Southeast
+ */
+ SOUTHEAST,
+ /**
+ * Direction East
+ */
+ EAST,
+ /**
+ * Direction Northeast
+ */
+ NORTHEAST;
+
+ /**
+ * Convert String to CompassDirection
+ * @param value String
+ * @return CompassDirection
+ */
+ public static CompassDirection valueForString(String value) {
+ try{
+ return valueOf(value);
+ }catch(Exception e){
+ return null;
+ }
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/ComponentVolumeStatus.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/ComponentVolumeStatus.java
new file mode 100644
index 000000000..64d5515ad
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/ComponentVolumeStatus.java
@@ -0,0 +1,45 @@
+package com.smartdevicelink.proxy.rpc.enums;
+
+/**
+ * The volume status of a vehicle component
+ * @since SmartDeviceLink 2.0
+ */
+public enum ComponentVolumeStatus {
+ /**
+ * Unknown
+ */
+ UNKNOWN,
+ /**
+ * Normal
+ */
+ NORMAL,
+ /**
+ * Low
+ */
+ LOW,
+ /**
+ * Fault
+ */
+ FAULT,
+ /**
+ * Alert
+ */
+ ALERT,
+ /**
+ * Not supported
+ */
+ NOT_SUPPORTED;
+
+ /**
+ * Convert String to ComponentVolumeStatus
+ * @param value String
+ * @return ComponentVolumeStatus
+ */
+ public static ComponentVolumeStatus valueForString(String value) {
+ try{
+ return valueOf(value);
+ }catch(Exception e){
+ return null;
+ }
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/DeliveryMode.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/DeliveryMode.java
new file mode 100644
index 000000000..52361a97d
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/DeliveryMode.java
@@ -0,0 +1,16 @@
+package com.smartdevicelink.proxy.rpc.enums;
+
+public enum DeliveryMode {
+ PROMPT,
+ DESTINATION,
+ QUEUE,
+ ;
+
+ public static DeliveryMode valueForString(String value) {
+ try{
+ return valueOf(value);
+ }catch(Exception e){
+ return null;
+ }
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/DeviceLevelStatus.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/DeviceLevelStatus.java
new file mode 100644
index 000000000..273dc83d3
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/DeviceLevelStatus.java
@@ -0,0 +1,45 @@
+package com.smartdevicelink.proxy.rpc.enums;
+
+/**
+ * Reflects the reported battery status of the connected device, if reported.
+ * @since SmartDeviceLink 2.0
+ */
+public enum DeviceLevelStatus {
+ /**
+ * Zero level bars
+ */
+ ZERO_LEVEL_BARS,
+ /**
+ * One level bars
+ */
+ ONE_LEVEL_BARS,
+ /**
+ * Two level bars
+ */
+ TWO_LEVEL_BARS,
+ /**
+ * Three level bars
+ */
+ THREE_LEVEL_BARS,
+ /**
+ * Four level bars
+ */
+ FOUR_LEVEL_BARS,
+ /**
+ * Not provided
+ */
+ NOT_PROVIDED;
+
+ /**
+ * Convert String to DeviceLevelStatus
+ * @param value String
+ * @return DeviceLevelStatus
+ */
+ public static DeviceLevelStatus valueForString(String value) {
+ try{
+ return valueOf(value);
+ }catch(Exception e){
+ return null;
+ }
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/Dimension.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/Dimension.java
new file mode 100644
index 000000000..012803510
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/Dimension.java
@@ -0,0 +1,50 @@
+package com.smartdevicelink.proxy.rpc.enums;
+
+import java.util.EnumSet;
+
+/**
+ * The supported dimensions of the GPS.
+ * @since SmartDeviceLink 2.0
+ */
+public enum Dimension {
+ /**
+ * No GPS at all
+ */
+ NO_FIX("NO_FIX"),
+ /**
+ * Longitude and latitude
+ */
+ _2D("2D"),
+ /**
+ * Longitude and latitude and altitude
+ */
+ _3D("3D");
+
+ private final String INTERNAL_NAME;
+
+ private Dimension(String internalName) {
+ this.INTERNAL_NAME = internalName;
+ }
+
+ public String toString() {
+ return this.INTERNAL_NAME;
+ }
+
+ /**
+ * Convert String to Dimension
+ * @param value String
+ * @return Dimension
+ */
+ public static Dimension valueForString(String value) {
+ if(value == null){
+ return null;
+ }
+
+ for (Dimension anEnum : EnumSet.allOf(Dimension.class)) {
+ if (anEnum.toString().equals(value)) {
+ return anEnum;
+ }
+ }
+ return null;
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/DisplayType.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/DisplayType.java
new file mode 100644
index 000000000..2a2996762
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/DisplayType.java
@@ -0,0 +1,95 @@
+package com.smartdevicelink.proxy.rpc.enums;
+/** The type of the display.
+ *
+ *
+ * @since SmartDevcieLink 1.0
+ *
+ */
+
+public enum DisplayType {
+ /**
+ * Center Information Display.
+ *This display type provides a 2-line x 20 character "dot matrix" display.
+ *
+ */
+
+ CID("CID"),
+ /** TYPE II display.
+ 1 line older radio head unit. */
+
+ TYPE2("TYPE2"),
+ /**
+ * TYPE V display
+ Old radio head unit.
+
+ */
+
+ TYPE5("TYPE5"),
+ /**
+ * Next Generation Navigation display.
+ */
+
+ NGN("NGN"),
+ /**
+ * GEN-2, 8 inch display.
+ */
+
+ GEN2_8_DMA("GEN2_8_DMA"),
+ /**
+ * GEN-2, 6 inch display.
+ */
+
+ GEN2_6_DMA("GEN2_6_DMA"),
+ /**
+ * 3 inch GEN1.1 display.
+ */
+
+ MFD3("MFD3"),
+ /**
+ * 4 inch GEN1.1 display
+ */
+
+ MFD4("MFD4"),
+ /**
+ * 5 inch GEN1.1 display.
+ */
+
+ MFD5("MFD5"),
+ /**
+ * GEN-3, 8 inch display.
+ */
+
+ GEN3_8_INCH("GEN3_8-INCH"),
+
+ /**
+ * SDL_GENERIC display type. Used for most SDL integrations.
+ */
+ SDL_GENERIC("SDL_GENERIC"),
+
+ ;
+
+ private final String INTERNAL_NAME;
+
+ private DisplayType(String internalName) {
+ this.INTERNAL_NAME = internalName;
+ }
+
+ public static DisplayType valueForString(String value) {
+ if(value == null){
+ return null;
+ }
+
+ for (DisplayType type : DisplayType.values()) {
+ if (type.toString().equals(value)) {
+ return type;
+ }
+ }
+
+ return null;
+ }
+
+ @Override
+ public String toString() {
+ return INTERNAL_NAME;
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/DriverDistractionState.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/DriverDistractionState.java
new file mode 100644
index 000000000..890488c5e
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/DriverDistractionState.java
@@ -0,0 +1,32 @@
+/**
+ *
+ */
+package com.smartdevicelink.proxy.rpc.enums;
+
+/**
+ * Enumeration that describes possible states of driver distraction.
+ * @since SmartDeviceLink 1.0
+ */
+public enum DriverDistractionState {
+ /**
+ * Driver distraction rules are in effect.
+ */
+ DD_ON,
+ /**
+ * Driver distraction rules are NOT in effect.
+ */
+ DD_OFF;
+
+ /**
+ * Convert String to DriverDistractionState
+ * @param value String
+ * @return DriverDistractionState
+ */
+ public static DriverDistractionState valueForString(String value) {
+ try{
+ return valueOf(value);
+ }catch(Exception e){
+ return null;
+ }
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/ECallConfirmationStatus.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/ECallConfirmationStatus.java
new file mode 100644
index 000000000..b7a341d9e
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/ECallConfirmationStatus.java
@@ -0,0 +1,46 @@
+package com.smartdevicelink.proxy.rpc.enums;
+/** Reflects the status of the eCall Notification.
+ * <p>
+ *
+ * @since SmartDeviceLink 2.0
+ *
+ */
+
+public enum ECallConfirmationStatus {
+ /**
+ * No E-Call signal triggered.
+ */
+ NORMAL,
+ /**
+ * An E-Call is being in progress.
+ */
+ CALL_IN_PROGRESS,
+ /**
+ * An E-Call was cancelled by the user.
+ */
+ CALL_CANCELLED,
+ /**
+ * The E-Call sequence is completed.
+ */
+ CALL_COMPLETED,
+ /**
+ * An E-Call could not be connected.
+ */
+ CALL_UNSUCCESSFUL,
+ /**
+ * E-Call is not configured on this vehicle.
+ */
+ ECALL_CONFIGURED_OFF,
+ /**
+ * E-Call is considered to be complete without Emergency Operator contact.
+ */
+ CALL_COMPLETE_DTMF_TIMEOUT;
+
+ public static ECallConfirmationStatus valueForString(String value) {
+ try{
+ return valueOf(value);
+ }catch(Exception e){
+ return null;
+ }
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/EmergencyEventType.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/EmergencyEventType.java
new file mode 100644
index 000000000..374a6c7e2
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/EmergencyEventType.java
@@ -0,0 +1,41 @@
+package com.smartdevicelink.proxy.rpc.enums;
+/**
+ *
+ * Reflects the emergency event status of the vehicle.
+ *
+ */
+public enum EmergencyEventType {
+ /** No emergency event has happened.
+ */
+ NO_EVENT,
+ /** Frontal collision has happened.
+ */
+ FRONTAL,
+ /** Side collision has happened.
+ */
+ SIDE,
+ /**Rear collision has happened.
+ */
+ REAR,
+ /** A rollover event has happened.
+ */
+ ROLLOVER,
+ /** The signal is not supported
+ */
+ NOT_SUPPORTED,
+ /** Emergency status cannot be determined
+ */
+ FAULT;
+ /**
+ * Convert String to EmergencyEventType
+ * @param value String
+ * @return EmergencyEventTpe
+ */
+ public static EmergencyEventType valueForString(String value) {
+ try{
+ return valueOf(value);
+ }catch(Exception e){
+ return null;
+ }
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/FileType.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/FileType.java
new file mode 100644
index 000000000..54e5ce8b8
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/FileType.java
@@ -0,0 +1,44 @@
+package com.smartdevicelink.proxy.rpc.enums;
+
+/**
+ * Enumeration listing possible file types.
+ * @since SmartDeviceLink 2.0
+ */
+public enum FileType {
+ /**
+ * BMP
+ */
+ GRAPHIC_BMP,
+ /**
+ * JPEG
+ */
+ GRAPHIC_JPEG,
+ /**
+ * PNG
+ */
+ GRAPHIC_PNG,
+ /**
+ * WAVE
+ */
+ AUDIO_WAVE,
+ AUDIO_AAC,
+ /**
+ * MP3
+ */
+ AUDIO_MP3,
+ BINARY,
+ JSON;
+
+ /**
+ * Convert String to FileType
+ * @param value String
+ * @return FileType
+ */
+ public static FileType valueForString(String value) {
+ try{
+ return valueOf(value);
+ }catch(Exception e){
+ return null;
+ }
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/FuelCutoffStatus.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/FuelCutoffStatus.java
new file mode 100644
index 000000000..266f13afb
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/FuelCutoffStatus.java
@@ -0,0 +1,32 @@
+package com.smartdevicelink.proxy.rpc.enums;
+/** Reflects the status of the Restraints Control Module fuel pump cutoff.<br> The fuel pump is cut off typically after the vehicle has had a collision.
+ * <p>
+ *
+ * @since SmartDeviceLink 2.0
+ *
+ */
+public enum FuelCutoffStatus {
+ /** Fuel is cut off
+ */
+ TERMINATE_FUEL,
+ /** Fuel is not cut off
+ *
+ */
+ NORMAL_OPERATION,
+ /** Status of the fuel pump cannot be determined
+ *
+ */
+ FAULT;
+ /**
+ * Convert String to FuelCutoffStatus
+ * @param value String
+ * @return FuelCuttoffStatus
+ */
+ public static FuelCutoffStatus valueForString(String value) {
+ try{
+ return valueOf(value);
+ }catch(Exception e){
+ return null;
+ }
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/GlobalProperty.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/GlobalProperty.java
new file mode 100644
index 000000000..a54d53d1d
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/GlobalProperty.java
@@ -0,0 +1,54 @@
+package com.smartdevicelink.proxy.rpc.enums;
+
+/**
+ * Properties of a user-initiated VR interaction (i.e. interactions started by the user pressing the PTT button).
+ * @since SmartDeviceLink 1.0
+ */
+public enum GlobalProperty{
+ /**
+ * The help prompt to be spoken if the user needs assistance during a user-initiated interaction.
+ */
+ HELPPROMPT,
+ /**
+ * The prompt to be spoken if the user-initiated interaction times out waiting for the user's verbal input.
+ */
+ TIMEOUTPROMPT,
+ /**
+ * The property vrHelpTitle of setGlobalProperties
+ */
+
+ VRHELPTITLE,
+ /**
+ * The property array of vrHelp of setGlobalProperties
+ */
+
+ VRHELPITEMS,
+ /**
+ * The property in-app menu name of setGlobalProperties
+ */
+
+ MENUNAME,
+ /**
+ * The property in-app menu icon of setGlobalProperties
+ */
+
+ MENUICON,
+ /**
+ * The on-screen keyboard configuration of setGlobalProperties
+ */
+
+ KEYBOARDPROPERTIES;
+
+ /**
+ * Convert String to GlobalProperty
+ * @param value String
+ * @return GlobalProperty
+ */
+ public static GlobalProperty valueForString(String value) {
+ try{
+ return valueOf(value);
+ }catch(Exception e){
+ return null;
+ }
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/HMILevel.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/HMILevel.java
new file mode 100644
index 000000000..8757a26ec
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/HMILevel.java
@@ -0,0 +1,70 @@
+package com.smartdevicelink.proxy.rpc.enums;
+
+import java.util.EnumSet;
+
+/**
+ * Specifies current level of the HMI. An HMI level indicates the degree of user interaction possible through the HMI (e.g. TTS only, display only, VR, etc.). The HMI level varies for an application based on the type of display (i.e. Nav or non-Nav) and the user directing "focus" to other applications (e.g. phone, other mobile applications, etc.)
+ *
+ * @since SmartDeviceLink 1.0
+ */
+public enum HMILevel {
+ /**
+ * The application has full use of the SDL HMI. The app may output via TTS, display, or streaming audio and may gather input via VR, Menu, and button presses
+ */
+ HMI_FULL("FULL"),
+ /**
+ * This HMI Level is only defined for a media application using an HMI with an 8 inch touchscreen (Nav) system. The application's {@linkplain com.smartdevicelink.proxy.rpc.Show} text is displayed and it receives button presses from media-oriented buttons (SEEKRIGHT, SEEKLEFT, TUNEUP, TUNEDOWN, PRESET_0-9)
+ */
+ HMI_LIMITED("LIMITED"),
+ /**
+ * App cannot interact with user via TTS, VR, Display or Button Presses. App can perform the following operations:
+ * <ul>
+ * <li>Operation {@linkplain com.smartdevicelink.proxy.rpc.AddCommand}</li>
+ * <li>Operation {@linkplain com.smartdevicelink.proxy.rpc.DeleteCommand}</li>
+ * <li>Operation {@linkplain com.smartdevicelink.proxy.rpc.AddSubMenu}</li>
+ * <li>Operation {@linkplain com.smartdevicelink.proxy.rpc.DeleteSubMenu}</li>
+ * <li>Operation {@linkplain com.smartdevicelink.proxy.rpc.CreateInteractionChoiceSet}</li>
+ * <li>Operation {@linkplain com.smartdevicelink.proxy.rpc.DeleteInteractionChoiceSet}</li>
+ * <li>Operation {@linkplain com.smartdevicelink.proxy.rpc.SubscribeButton}</li>
+ * <li>Operation {@linkplain com.smartdevicelink.proxy.rpc.UnsubscribeButton}</li>
+ * <li>Operation {@linkplain com.smartdevicelink.proxy.rpc.Show}</li>
+ * <li>Operation {@linkplain com.smartdevicelink.proxy.rpc.UnregisterAppInterface}</li>
+ * <li>Operation {@linkplain com.smartdevicelink.proxy.rpc.ResetGlobalProperties}</li>
+ * <li>Operation {@linkplain com.smartdevicelink.proxy.rpc.SetGlobalProperties}</li>
+ * </ul>
+ */
+ HMI_BACKGROUND("BACKGROUND"),
+ /**
+ * Application has been discovered by SDL, but application cannot send any requests or receive any notifications
+ * An HMILevel of NONE can also mean that the user has exited the application by saying "exit appname" or selecting "exit" from the application's menu. When this happens, the application still has an active interface registration with SDL and all SDL resources the application has created (e.g. Choice Sets, subscriptions, etc.) still exist. But while the HMILevel is NONE, the application cannot send any messages to SDL, except <i>{@linkplain com.smartdevicelink.proxy.rpc.UnregisterAppInterface}</li>
+ */
+ HMI_NONE("NONE");
+
+ private final String INTERNAL_NAME;
+
+ private HMILevel(String internalName) {
+ this.INTERNAL_NAME = internalName;
+ }
+
+ public String toString() {
+ return this.INTERNAL_NAME;
+ }
+
+ /**
+ * Returns a HMILevel Status (FULL, LIMITED, BACKGROUND or NONE)
+ * @param value a String
+ * @return HMILevel -a String value (FULL, LIMITED, BACKGROUND or NONE)
+ */
+ public static HMILevel valueForString(String value) {
+ if(value == null){
+ return null;
+ }
+
+ for (HMILevel anEnum : EnumSet.allOf(HMILevel.class)) {
+ if (anEnum.toString().equals(value)) {
+ return anEnum;
+ }
+ }
+ return null;
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/HmiZoneCapabilities.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/HmiZoneCapabilities.java
new file mode 100644
index 000000000..4725b4ff4
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/HmiZoneCapabilities.java
@@ -0,0 +1,34 @@
+package com.smartdevicelink.proxy.rpc.enums;
+
+/**
+ * Specifies HMI Zones in the vehicle.
+ *
+ * @since SmartDeviceLink 1.0
+ */
+public enum HmiZoneCapabilities {
+ /**
+ * Indicates HMI available for front seat passengers.
+ *
+ * @since SmartDeviceLink 1.0
+ */
+ FRONT,
+ /**
+ * Indicates HMI available for rear seat passengers.
+ *
+ * @since SmartDeviceLink 1.0
+ */
+ BACK;
+ /**
+ * Convert String to HMIZoneCapabilities
+ * @param value String
+ * @return HMIZoneCapabilities
+ */
+
+ public static HmiZoneCapabilities valueForString(String value) {
+ try{
+ return valueOf(value);
+ }catch(Exception e){
+ return null;
+ }
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/IgnitionStableStatus.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/IgnitionStableStatus.java
new file mode 100644
index 000000000..91d6ecf8e
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/IgnitionStableStatus.java
@@ -0,0 +1,30 @@
+package com.smartdevicelink.proxy.rpc.enums;
+
+/**
+ * Reflects the ignition switch stability.
+ * @since SmartDeviceLink 2.0
+ */
+public enum IgnitionStableStatus {
+ /**
+ * The current ignition switch status is considered not to be stable.
+ */
+ IGNITION_SWITCH_NOT_STABLE,
+ /**
+ * The current ignition switch status is considered to be stable.
+ */
+ IGNITION_SWITCH_STABLE,
+ MISSING_FROM_TRANSMITTER;
+
+ /**
+ * Convert String to IgnitionStableStatus
+ * @param value String
+ * @return IgnitionStableStatus
+ */
+ public static IgnitionStableStatus valueForString(String value) {
+ try{
+ return valueOf(value);
+ }catch(Exception e){
+ return null;
+ }
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/IgnitionStatus.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/IgnitionStatus.java
new file mode 100644
index 000000000..b17ccf1cf
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/IgnitionStatus.java
@@ -0,0 +1,45 @@
+package com.smartdevicelink.proxy.rpc.enums;
+
+/**
+ * Reflects the status of ignition.
+ * @since SmartDeviceLink 2.0
+ */
+public enum IgnitionStatus {
+ /**
+ * Ignition status currently unknown
+ */
+ UNKNOWN,
+ /**
+ * Ignition is off
+ */
+ OFF,
+ /**
+ * Ignition is in mode accessory
+ */
+ ACCESSORY,
+ /**
+ * Ignition is in mode run
+ */
+ RUN,
+ /**
+ * Ignition is in mode run
+ */
+ START,
+ /**
+ * Signal is invalid
+ */
+ INVALID;
+
+ /**
+ * Convert String to IgnitionStatus
+ * @param value String
+ * @return IgnitionStatus
+ */
+ public static IgnitionStatus valueForString(String value) {
+ try{
+ return valueOf(value);
+ }catch(Exception e){
+ return null;
+ }
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/ImageFieldName.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/ImageFieldName.java
new file mode 100644
index 000000000..bf92ef5f4
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/ImageFieldName.java
@@ -0,0 +1,83 @@
+package com.smartdevicelink.proxy.rpc.enums;
+/**
+ * The name that identifies the field.
+ *
+ * @since SmartDeviceLink 2.3.2
+ */
+public enum ImageFieldName {
+ /** The image field for SoftButton
+ *
+ */
+
+ softButtonImage,
+ /** The first image field for Choice.
+ *
+ */
+
+ choiceImage,
+ /** The secondary image field for Choice.
+ *
+ */
+
+ choiceSecondaryImage,
+ /** The image field for vrHelpItem.
+ *
+ */
+
+ vrHelpItem,
+ /** The image field for Turn.
+ *
+ */
+
+ turnIcon,
+ /** The image field for the menu icon in SetGlobalProperties.
+ *
+ */
+
+ menuIcon,
+ /** The image filed for AddCommand.
+ *
+ */
+
+ cmdIcon,
+ /** The image field for the app icon ( set by setAppIcon).
+ *
+ */
+
+ appIcon,
+ /** The image filed for Show.
+ *
+ */
+
+ graphic,
+ /** The primary image field for ShowConstant TBT.
+ *
+ */
+
+ showConstantTBTIcon,
+
+ /** The secondary image field for ShowConstant TBT.
+ *
+ */
+ showConstantTBTNextTurnIcon,
+ /**
+ * The optional image of a destination / location
+ *
+ * @since SmartDeviceLink 4.0
+ */
+ locationImage,
+ ;
+
+ /**
+ * Convert String to ImageFieldName
+ * @param value String
+ * @return ImageFieldName
+ */
+ public static ImageFieldName valueForString(String value) {
+ try{
+ return valueOf(value);
+ }catch(Exception e){
+ return null;
+ }
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/ImageType.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/ImageType.java
new file mode 100644
index 000000000..5b79257e1
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/ImageType.java
@@ -0,0 +1,29 @@
+package com.smartdevicelink.proxy.rpc.enums;
+
+/**
+ * Contains information about the type of image.
+ * @since SmartDeviceLink 2.0
+ */
+public enum ImageType {
+ /**
+ * Just the static hex icon value to be used
+ */
+ STATIC,
+ /**
+ * Binary image file to be used (identifier to be sent by PutFile)
+ */
+ DYNAMIC;
+
+ /**
+ * Convert String to ImageType
+ * @param value String
+ * @return ImageType
+ */
+ public static ImageType valueForString(String value) {
+ try{
+ return valueOf(value);
+ }catch(Exception e){
+ return null;
+ }
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/InteractionMode.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/InteractionMode.java
new file mode 100644
index 000000000..98b61a1f2
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/InteractionMode.java
@@ -0,0 +1,58 @@
+package com.smartdevicelink.proxy.rpc.enums;
+
+/**
+ * For application-initiated interactions (<i>{@linkplain com.smartdevicelink.proxy.rpc.PerformInteraction}</i>), this specifies
+ * the mode by which the user is prompted and by which the user's selection is
+ * indicated
+ *
+ * @since SmartDeviceLink 1.0
+ */
+public enum InteractionMode {
+ /**
+ * This mode causes the interaction to occur only on the display, meaning
+ * the choices are presented and selected only via the display. Selections
+ * are viewed with the SEEKRIGHT, SEEKLEFT, TUNEUP, TUNEDOWN buttons. User's
+ * selection is indicated with the OK button
+ */
+ MANUAL_ONLY,
+ /**
+ * This mode causes the interaction to occur only through TTS and VR. The
+ * user is prompted via TTS to select a choice by saying one of the choice's
+ * synonyms
+ */
+ VR_ONLY,
+ /**
+ * This mode is a combination of MANUAL_ONLY and VR_ONLY, meaning the user
+ * is prompted both visually and audibly. The user can make a selection
+ * either using the mode described in MANUAL_ONLY or using the mode
+ * described in VR_ONLY. If the user views selections as described in
+ * MANUAL_ONLY mode, the interaction becomes strictly, and irreversibly, a
+ * MANUAL_ONLY interaction (i.e. the VR session is cancelled, although the
+ * interaction itself is still in progress). If the user interacts with the
+ * VR session in any way (e.g. speaks a phrase, even if it is not a
+ * recognized choice), the interaction becomes strictly, and irreversibly, a
+ * VR_ONLY interaction (i.e. the MANUAL_ONLY mode forms of interaction will
+ * no longer be honored)
+ *
+ * <p>The TriggerSource parameter of the
+ * {@linkplain com.smartdevicelink.proxy.rpc.PerformInteraction} response will
+ * indicate which interaction mode the user finally chose to attempt the
+ * selection (even if the interaction did not end with a selection being
+ * made)</P>
+ */
+ BOTH;
+
+ /**
+ * Returns InteractionMode (MANUAL_ONLY, VR_ONLY or BOTH)
+ * @param value a String
+ * @return InteractionMode -MANUAL_ONLY, VR_ONLY or BOTH
+ */
+
+ public static InteractionMode valueForString(String value) {
+ try{
+ return valueOf(value);
+ }catch(Exception e){
+ return null;
+ }
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/Jingle.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/Jingle.java
new file mode 100644
index 000000000..85a1e8e67
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/Jingle.java
@@ -0,0 +1,31 @@
+package com.smartdevicelink.proxy.rpc.enums;
+
+import java.util.EnumSet;
+
+
+public enum Jingle{
+ POSITIVE("POSITIVE_JINGLE"),
+ NEGATIVE("NEGATIVE_JINGLE"),
+ INITIAL("INITIAL_JINGLE"),
+ LISTEN("LISTEN_JINGLE"),
+ HELP("HELP_JINGLE");
+
+ private final String INTERNAL_NAME;
+
+ private Jingle(String name){
+ this.INTERNAL_NAME = name;
+ }
+
+ public String toString() {
+ return this.INTERNAL_NAME;
+ }
+
+ public static Jingle valueForString(String value) {
+ for (Jingle anEnum : EnumSet.allOf(Jingle.class)) {
+ if (anEnum.toString().equals(value)) {
+ return anEnum;
+ }
+ }
+ return null;
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/KeyboardEvent.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/KeyboardEvent.java
new file mode 100644
index 000000000..7a730377d
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/KeyboardEvent.java
@@ -0,0 +1,46 @@
+package com.smartdevicelink.proxy.rpc.enums;
+/**
+ * Enumeration listing possible keyboard events.
+ *
+ *
+ */
+public enum KeyboardEvent {
+ /** The use has pressed the keyboard key (applies to both SINGLE_KEYPRESS and RESEND_CURRENT_ENTRY modes).
+ *
+ */
+
+ KEYPRESS,
+ /** The User has finished entering text from the keyboard and submitted the entry.
+ *
+ */
+
+ ENTRY_SUBMITTED,
+ /** The User has pressed the HMI-defined "Cancel" button.
+ *
+ */
+
+ ENTRY_CANCELLED,
+ /** The User has not finished entering text and the keyboard is aborted with the event of higher priority.
+ *
+ */
+ ENTRY_ABORTED,
+ /**
+ * @since SmartDeviceLink 4.0
+ */
+ ENTRY_VOICE,
+ ;
+ /**
+ * Convert String to KeyboardEvent
+ * @param value String
+ * @return KeyboardEvent
+ */
+
+ public static KeyboardEvent valueForString(String value) {
+ try{
+ return valueOf(value);
+ }catch(Exception e){
+ return null;
+ }
+ }
+
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/KeyboardLayout.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/KeyboardLayout.java
new file mode 100644
index 000000000..2cd71b3f3
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/KeyboardLayout.java
@@ -0,0 +1,19 @@
+package com.smartdevicelink.proxy.rpc.enums;
+/**
+ * Enumeration listing possible keyboard layouts.
+ *
+ * @since SmartDeviceLink 2.3.2
+ */
+public enum KeyboardLayout {
+ QWERTY,
+ QWERTZ,
+ AZERTY;
+
+ public static KeyboardLayout valueForString(String value) {
+ try{
+ return valueOf(value);
+ }catch(Exception e){
+ return null;
+ }
+ }
+} \ No newline at end of file
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/KeypressMode.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/KeypressMode.java
new file mode 100644
index 000000000..32e198585
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/KeypressMode.java
@@ -0,0 +1,28 @@
+package com.smartdevicelink.proxy.rpc.enums;
+/**
+ * Enumeration listing possible keyboard events.
+ *
+ *
+ */
+public enum KeypressMode {
+ /**
+ * Each keypress is individually sent as the user presses the keyboard keys.
+ */
+ SINGLE_KEYPRESS,
+ /**
+ * The keypresses are queued and a string is eventually sent once the user chooses to submit their entry.
+ */
+ QUEUE_KEYPRESSES,
+ /**
+ * The keypresses are queue and a string is sent each time the user presses a keyboard key; the string contains the entire current entry.
+ */
+ RESEND_CURRENT_ENTRY;
+
+ public static KeypressMode valueForString(String value) {
+ try{
+ return valueOf(value);
+ }catch(Exception e){
+ return null;
+ }
+ }
+} \ No newline at end of file
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/Language.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/Language.java
new file mode 100644
index 000000000..5f0a0b88f
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/Language.java
@@ -0,0 +1,163 @@
+package com.smartdevicelink.proxy.rpc.enums;
+
+import java.util.EnumSet;
+
+/**
+ * Specifies the language to be used for TTS, VR, displayed messages/menus
+ *
+ *
+ * @since SmartDeviceLink 1.0
+ *
+ */
+public enum Language {
+ /**
+ * English - US
+ */
+
+ EN_US("EN-US"),
+ /**
+ * Spanish - Mexico
+ */
+
+ ES_MX("ES-MX"),
+ /**
+ * French - Canada
+ */
+
+ FR_CA("FR-CA"),
+ /**
+ * German - Germany
+ */
+
+ DE_DE("DE-DE"),
+ /**
+ * Spanish - Spain
+ */
+
+ ES_ES("ES-ES"),
+ /**
+ * English - GB
+ */
+
+ EN_GB("EN-GB"),
+ /**
+ * Russian - Russia
+ */
+
+ RU_RU("RU-RU"),
+ /**
+ * Turkish - Turkey
+ */
+
+ TR_TR("TR-TR"),
+ /**
+ * Polish - Poland
+ */
+
+ PL_PL("PL-PL"),
+ /**
+ * French - France
+ */
+
+ FR_FR("FR-FR"),
+ /**
+ * Italian - Italy
+ */
+
+ IT_IT("IT-IT"),
+ /**
+ * Swedish - Sweden
+ */
+
+ SV_SE("SV-SE"),
+ /**
+ * Portuguese - Portugal
+ */
+
+ PT_PT("PT-PT"),
+ /**
+ * Dutch (Standard) - Netherlands
+ */
+
+ NL_NL("NL-NL"),
+ /**
+ * English - Australia
+ */
+
+ EN_AU("EN-AU"),
+ /**
+ * Mandarin - China
+ */
+
+ ZH_CN("ZH-CN"),
+ /**
+ * Mandarin - Taiwan
+ */
+
+ ZH_TW("ZH-TW"),
+ /**
+ * Japanese - Japan
+ */
+
+ JA_JP("JA-JP"),
+ /**
+ * Arabic - Saudi Arabia
+ */
+
+ AR_SA("AR-SA"),
+ /**
+ * Korean - South Korea
+ */
+
+ KO_KR("KO-KR"),
+ /**
+ * Portuguese - Brazil
+ */
+
+ PT_BR("PT-BR"),
+ /**
+ * Czech - Czech Republic
+ */
+
+ CS_CZ("CS-CZ"),
+ /**
+ * Danish - Denmark
+ */
+
+ DA_DK("DA-DK"),
+ /**
+ * Norwegian - Norway
+ */
+
+ NO_NO("NO-NO");
+
+ private final String INTERNAL_NAME;
+
+ private Language(String internalName) {
+ this.INTERNAL_NAME = internalName;
+ }
+ /**
+ * Returns a String representing a kind of Language
+ */
+ public String toString() {
+ return this.INTERNAL_NAME;
+ }
+
+ /**
+ * Returns a Language's name
+ * @param value a String
+ * @return Language -EN-US, ES-MX or FR-CA
+ */
+ public static Language valueForString(String value) {
+ if(value == null){
+ return null;
+ }
+
+ for (Language anEnum : EnumSet.allOf(Language.class)) {
+ if (anEnum.toString().equals(value)) {
+ return anEnum;
+ }
+ }
+ return null;
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/LayoutMode.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/LayoutMode.java
new file mode 100644
index 000000000..b64cf1bb3
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/LayoutMode.java
@@ -0,0 +1,36 @@
+package com.smartdevicelink.proxy.rpc.enums;
+/**
+ * For touchscreen interactions, the mode of how the choices are presented.
+ *
+ *
+ */
+public enum LayoutMode {
+ /**
+ * This mode causes the interaction to display the previous set of choices as icons.
+ */
+ ICON_ONLY,
+ /**
+ * This mode causes the interaction to display the previous set of choices as icons along with a search field in the HMI.
+ */
+ ICON_WITH_SEARCH,
+ /**
+ * This mode causes the interaction to display the previous set of choices as a list
+ */
+ LIST_ONLY,
+ /**
+ * This mode causes the interaction to display the previous set of choices as a list along with a search field in the HMI.
+ */
+ LIST_WITH_SEARCH,
+ /**
+ * This mode causes the interaction to immediately display a keyboard entry through the HMI.
+ */
+ KEYBOARD;
+
+ public static LayoutMode valueForString(String value) {
+ try{
+ return valueOf(value);
+ }catch(Exception e){
+ return null;
+ }
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/LockScreenStatus.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/LockScreenStatus.java
new file mode 100644
index 000000000..ba25a3024
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/LockScreenStatus.java
@@ -0,0 +1,31 @@
+package com.smartdevicelink.proxy.rpc.enums;
+/**
+ *
+ * Status of the Lock Screen.
+ *
+ */
+public enum LockScreenStatus {
+ /**
+ * LockScreen is Required
+ */
+
+ REQUIRED,
+ /**
+ * LockScreen is Optional
+ */
+
+ OPTIONAL,
+ /**
+ * LockScreen is Not Required
+ */
+
+ OFF;
+
+ public static LockScreenStatus valueForString(String value) {
+ try{
+ return valueOf(value);
+ }catch(Exception e){
+ return null;
+ }
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/MediaClockFormat.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/MediaClockFormat.java
new file mode 100644
index 000000000..2bf84744a
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/MediaClockFormat.java
@@ -0,0 +1,126 @@
+package com.smartdevicelink.proxy.rpc.enums;
+
+/**
+ * Indicates the format of the time displayed on the connected SDL unit.Format
+ * description follows the following nomenclature:<p> Sp = Space</p> <p>| = or </p><p>c =
+ * character</p>
+ *
+ * @since SmartDeviceLink 1.0
+ */
+public enum MediaClockFormat {
+ /**
+ * <p>
+ * </p>
+ * <ul>
+ * <li>maxHours = 19</li>
+ * <li>maxMinutes = 59</li>
+ * <li>maxSeconds = 59</li>
+ * </ul>
+ *
+ * @since SmartDeviceLink 1.0
+ *
+ */
+ CLOCK1,
+ /**
+ * <p>
+ * </p>
+ * <ul>
+ * <li>maxHours = 59</li>
+ * <li>maxMinutes = 59</li>
+ * <li>maxSeconds = 59</li>
+ * </ul>
+ *
+ * @since SmartDeviceLink 1.0
+ *
+ */
+ CLOCK2,
+ /**
+ * <p>
+ * </p>
+ * <ul>
+ * <li>maxHours = 9</li>
+ * <li>maxMinutes = 59</li>
+ * <li>maxSeconds = 59</li>
+ * </ul>
+ *
+ * @since SmartDeviceLink 2.0
+ *
+ */
+ CLOCK3,
+ /**
+ * <p>
+ * </p>
+ * <ul>
+ * <li>5 characters possible</li>
+ * <li>Format: 1|sp c :|sp c c</li>
+ * <li>1|sp : digit "1" or space</li>
+ * <li>c : character out of following character set: sp|0-9|[letters, see
+ * TypeII column in XLS.</li>
+ * <li>:|sp : colon or space</li>
+ * <li>used for Type II headunit</li>
+ * </ul>
+ *
+ * @since SmartDeviceLink 1.0
+ */
+ CLOCKTEXT1,
+ /**
+ * <p>
+ * </p>
+ * <ul>
+ * <li>5 characters possible</li>
+ * <li>Format: 1|sp c :|sp c c</li>
+ * <li>1|sp : digit "1" or space</li>
+ * <li>c : character out of following character set: sp|0-9|[letters, see
+ * CID column in XLS.</li>
+ * <li>:|sp : colon or space</li>
+ * <li>used for CID headunit</li>
+ * </ul>
+ * difference between CLOCKTEXT1 and CLOCKTEXT2 is the supported character
+ * set
+ *
+ * @since SmartDeviceLink 1.0
+ */
+ CLOCKTEXT2,
+ /**
+ * <p>
+ * </p>
+ * <ul>
+ * <li>6 chars possible</li>
+ * <li>Format: 1|sp c c :|sp c c</li>
+ * <li>1|sp : digit "1" or space</li>
+ * <li>c : character out of following character set: sp|0-9|[letters, see
+ * Type 5 column in XLS].</li>
+ * <li>:|sp : colon or space</li>
+ * <li>used for Type V headunit</li>
+ * </ul>
+ * difference between CLOCKTEXT1 and CLOCKTEXT2 is the supported character
+ * set
+ *
+ *
+ * @since SmartDeviceLink 1.0
+ */
+ CLOCKTEXT3,
+ /**
+ * <p>
+ * </p>
+ * <ul>
+ * <li>6 chars possible</li>
+ * <li>Format: c :|sp c c : c c</li>
+ * <li>:|sp : colon or space</li>
+ * <li>c : character out of following character set: sp|0-9|[letters]</li>
+ * <li>used for MFD3/4/5 headunits</li>
+ * </ul>
+ *
+ *
+ * @since SmartDeviceLink 2.0
+ */
+ CLOCKTEXT4;
+
+ public static MediaClockFormat valueForString(String value) {
+ try{
+ return valueOf(value);
+ }catch(Exception e){
+ return null;
+ }
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/PRNDL.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/PRNDL.java
new file mode 100644
index 000000000..965ebb8b4
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/PRNDL.java
@@ -0,0 +1,70 @@
+package com.smartdevicelink.proxy.rpc.enums;
+
+/**
+ * The selected gear.
+ * @since SmartDeviceLink 2.0
+ */
+public enum PRNDL {
+ /**
+ * Parking
+ */
+ PARK,
+ /**
+ * Reverse gear
+ */
+ REVERSE,
+ /**
+ * No gear
+ */
+ NEUTRAL,
+ DRIVE,
+ /**
+ * Drive Sport mode
+ */
+ SPORT,
+ /**
+ * 1st gear hold
+ */
+ LOWGEAR,
+ /**
+ * First gear
+ */
+ FIRST,
+ /**
+ * Second gear
+ */
+ SECOND,
+ /**
+ * Third gear
+ */
+ THIRD,
+ /**
+ * Fourth gear
+ */
+ FOURTH,
+ /**
+ * Fifth gear
+ */
+ FIFTH,
+ /**
+ * Sixth gear
+ */
+ SIXTH,
+ SEVENTH,
+ EIGHTH,
+ UNKNOWN,
+ FAULT;
+
+ /**
+ * Convert String to PRNDL
+ * @param value String
+ * @return PRNDL
+ */
+ public static PRNDL valueForString(String value) {
+ try{
+ return valueOf(value);
+ }catch(Exception e){
+ return null;
+ }
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/PowerModeQualificationStatus.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/PowerModeQualificationStatus.java
new file mode 100644
index 000000000..c268e14aa
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/PowerModeQualificationStatus.java
@@ -0,0 +1,42 @@
+package com.smartdevicelink.proxy.rpc.enums;
+/** Reflects the status of the current power mode qualification.
+ *
+ * @since SmartDeviceLink 2.0
+ *
+ */
+
+public enum PowerModeQualificationStatus {
+ /** The power mode of the vehicle is currently considered undefined
+ *
+ */
+
+ POWER_MODE_UNDEFINED,
+ /** The evaluation of the power mode is in progress
+ *
+ */
+
+ POWER_MODE_EVALUATION_IN_PROGRESS,
+ /** Currently undefined
+ *
+ */
+
+ NOT_DEFINED,
+ /** The power mode of the vehicle
+ *
+ */
+
+ POWER_MODE_OK;
+ /**
+ * Convert String to PowerModeQualificationStatus
+ * @param value String
+ * @return PowerModeQualificationStatus
+ */
+
+ public static PowerModeQualificationStatus valueForString(String value) {
+ try{
+ return valueOf(value);
+ }catch(Exception e){
+ return null;
+ }
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/PowerModeStatus.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/PowerModeStatus.java
new file mode 100644
index 000000000..06ed3ba9a
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/PowerModeStatus.java
@@ -0,0 +1,48 @@
+package com.smartdevicelink.proxy.rpc.enums;
+/** Reflects the status of the current power mode.
+ *
+ * @since SmartDeviceLink 2.0
+ *
+ */
+public enum PowerModeStatus {
+ /** Key not inserted
+ *
+ */
+ KEY_OUT,
+ /** Key is currently out
+ *
+ */
+ KEY_RECENTLY_OUT,
+
+ KEY_APPROVED_0,
+ POST_ACCESORY_0,
+ /** Key is in accessory positon
+ *
+ */
+
+ ACCESORY_1,
+ POST_IGNITION_1,
+
+ /** Key is in position ignition on
+ *
+ */
+ IGNITION_ON_2,
+ /** Key is in position running
+ *
+ */
+
+ RUNNING_2,
+ /** Key is in crank position
+ *
+ */
+
+ CRANK_3;
+
+ public static PowerModeStatus valueForString(String value) {
+ try{
+ return valueOf(value);
+ }catch(Exception e){
+ return null;
+ }
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/PrerecordedSpeech.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/PrerecordedSpeech.java
new file mode 100644
index 000000000..2b27040a6
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/PrerecordedSpeech.java
@@ -0,0 +1,26 @@
+package com.smartdevicelink.proxy.rpc.enums;
+/**
+ * Contains a list of Pre-recorded speech items present on the platform.
+ *
+ *
+ */
+public enum PrerecordedSpeech {
+ HELP_JINGLE,
+ INITIAL_JINGLE,
+ LISTEN_JINGLE,
+ POSITIVE_JINGLE,
+ NEGATIVE_JINGLE;
+ /**
+ * Convert String to PrerecordedSpeech
+ * @param value String
+ * @return PrerecordedSpeech
+ */
+
+ public static PrerecordedSpeech valueForString(String value) {
+ try{
+ return valueOf(value);
+ }catch(Exception e){
+ return null;
+ }
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/PrimaryAudioSource.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/PrimaryAudioSource.java
new file mode 100644
index 000000000..b06045d1a
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/PrimaryAudioSource.java
@@ -0,0 +1,49 @@
+package com.smartdevicelink.proxy.rpc.enums;
+
+/**
+ * Reflects the current primary audio source of SDL (if selected).
+ * @since SmartDeviceLink 2.0
+ */
+public enum PrimaryAudioSource {
+ /**
+ * Currently no source selected
+ */
+ NO_SOURCE_SELECTED,
+ /**
+ * USB is current source
+ */
+ USB,
+ /**
+ * USB2 is current source
+ */
+ USB2,
+ /**
+ * Bluetooth Stereo is current source
+ */
+ BLUETOOTH_STEREO_BTST,
+ /**
+ * Line in is current source
+ */
+ LINE_IN,
+ /**
+ * iPod is current source
+ */
+ IPOD,
+ /**
+ * Mobile app is current source
+ */
+ MOBILE_APP;
+
+ /**
+ * Convert String to PrimaryAudioSource
+ * @param value String
+ * @return PrimaryAudioSource
+ */
+ public static PrimaryAudioSource valueForString(String value) {
+ try{
+ return valueOf(value);
+ }catch(Exception e){
+ return null;
+ }
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/RequestType.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/RequestType.java
new file mode 100644
index 000000000..0ddcfef3a
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/RequestType.java
@@ -0,0 +1,84 @@
+package com.smartdevicelink.proxy.rpc.enums;
+/**
+ * Enumeration listing possible asynchronous requests.
+ *
+ *
+ */
+public enum RequestType {
+
+ HTTP,
+ FILE_RESUME,
+ AUTH_REQUEST,
+ AUTH_CHALLENGE,
+ AUTH_ACK,
+ PROPRIETARY,
+ /**
+ * @since SmartDeviceLink 4.0
+ */
+ QUERY_APPS,
+ /**
+ * @since SmartDeviceLink 4.0
+ */
+ LAUNCH_APP,
+ /**
+ * @since SmartDeviceLink 4.0
+ */
+ LOCK_SCREEN_ICON_URL,
+ /**
+ * @since SmartDeviceLink 4.0
+ */
+ TRAFFIC_MESSAGE_CHANNEL,
+ /**
+ * @since SmartDeviceLink 4.0
+ */
+ DRIVER_PROFILE,
+ /**
+ * @since SmartDeviceLink 4.0
+ */
+ VOICE_SEARCH,
+ /**
+ * @since SmartDeviceLink 4.0
+ */
+ NAVIGATION,
+ /**
+ * @since SmartDeviceLink 4.0
+ */
+ PHONE,
+ /**
+ * @since SmartDeviceLink 4.0
+ */
+ CLIMATE,
+ /**
+ * @since SmartDeviceLink 4.0
+ */
+ SETTINGS,
+ /**
+ * @since SmartDeviceLink 4.0
+ */
+ VEHICLE_DIAGNOSTICS,
+ /**
+ * @since SmartDeviceLink 4.0
+ */
+ EMERGENCY,
+ /**
+ * @since SmartDeviceLink 4.0
+ */
+ MEDIA,
+ /**
+ * @since SmartDeviceLink 4.0
+ */
+ FOTA,
+ ;
+ /**
+ * Convert String to RequestType
+ * @param value String
+ * @return RequestType
+ */
+ public static RequestType valueForString(String value) {
+ try{
+ return valueOf(value);
+ }catch(Exception e){
+ return null;
+ }
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/Result.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/Result.java
new file mode 100644
index 000000000..870e4115e
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/Result.java
@@ -0,0 +1,185 @@
+package com.smartdevicelink.proxy.rpc.enums;
+
+/**
+ * Defines the possible result codes returned by SDL to the application in a
+ * Response to a requested operation
+ *
+ *
+ * @since SmartDeviceLink 1.0
+ */
+public enum Result {
+ /**
+ * The request succeeded
+ */
+ SUCCESS,
+ /**
+ * <p>The data sent is invalid. For example:</p>
+ * <ul>
+ * <li>Invalid Json syntax</li>
+ * <li>Parameters out of bounds (number or enum range)</li>
+ * <li>Mandatory parameters not provided</li>
+ * <li>Parameter provided with wrong type</li>
+ * <li>Invalid characters</li>
+ * <li>Empty string</li>
+ * </ul>
+ */
+ INVALID_DATA,
+ /**
+ * The request is not supported by SDL
+ */
+ UNSUPPORTED_REQUEST,
+ /**
+ * The system could not process the request because the necessary memory
+ * couldn't be allocated
+ */
+ OUT_OF_MEMORY,
+ /**
+ * There are too many requests pending (means that the response has not been
+ * delivered yet). There is a limit of 1000 pending requests at a time
+ */
+ TOO_MANY_PENDING_REQUESTS,
+ /**
+ * <p>One of the provided IDs is not valid. For example:</p>
+ * <ul>
+ * <li>CorrelationID</li>
+ * <li>CommandID</li>
+ * <li>MenuID</li>
+ * </ul>
+ */
+ INVALID_ID,
+ /**
+ * The provided name or synonym is a duplicate of some already-defined name
+ * or synonym
+ */
+ DUPLICATE_NAME,
+ /**
+ * Specified application name is already associated with an active interface
+ * registration. Attempts at doing a second <i>
+ * {@linkplain com.smartdevicelink.proxy.rpc.RegisterAppInterface}</i> on a
+ * given protocol session will also cause this
+ */
+ TOO_MANY_APPLICATIONS,
+ /**
+ * SDL does not support the interface version requested by the mobile
+ * application
+ */
+ APPLICATION_REGISTERED_ALREADY,
+ /**
+ * The requested language is currently not supported. Might be because of a
+ * mismatch of the currently active language
+ */
+ UNSUPPORTED_VERSION,
+ /**
+ * The request cannot be executed because no application interface has been
+ * registered via <i>
+ * {@linkplain com.smartdevicelink.proxy.rpc.RegisterAppInterface}</i>
+ */
+ WRONG_LANGUAGE,
+ /**
+ * The request cannot be executed because no application interface has been
+ * registered via <i>
+ * {@linkplain com.smartdevicelink.proxy.rpc.RegisterAppInterface}</i>
+ */
+ APPLICATION_NOT_REGISTERED,
+ /**
+ * The data may not be changed, because it is currently in use. For example,
+ * when trying to delete a Choice Set that is currently involved in an
+ * interaction
+ */
+ IN_USE,
+ /**
+ *The user has turned off access to vehicle data, and it is globally unavailable to mobile applications.
+ */
+ VEHICLE_DATA_NOT_ALLOWED,
+ /**
+ * The requested vehicle data is not available on this vehicle or is not published.
+ */
+ VEHICLE_DATA_NOT_AVAILABLE,
+ /**
+ * The requested operation was rejected. No attempt was made to perform the
+ * operation
+ */
+ REJECTED,
+ /**
+ * The requested operation was aborted due to some pre-empting event (e.g.
+ * button push, <i>{@linkplain com.smartdevicelink.proxy.rpc.Alert}</i>
+ * pre-empts <i>{@linkplain com.smartdevicelink.proxy.rpc.Speak}</i>, etc.)
+ */
+ ABORTED,
+ /**
+ * The requested operation was ignored because it was determined to be
+ * redundant (e.g. pause media clock when already paused)
+ */
+ IGNORED,
+ /**
+ * A button that was requested for subscription is not supported on the
+ * currently connected SDL platform. See DisplayCapabilities for further
+ * information on supported buttons on the currently connected SDL platform
+ */
+ UNSUPPORTED_RESOURCE,
+ /**
+ * A specified file could not be found on Sync.
+ */
+ FILE_NOT_FOUND,
+ /**
+ * Provided data is valid but something went wrong in the lower layers.
+ */
+ GENERIC_ERROR,
+ /**
+ * RPC is not authorized in local policy table.
+ */
+ DISALLOWED,
+ /**
+ * RPC is included in a functional group explicitly blocked by the user.
+ */
+ USER_DISALLOWED,
+ /**
+ * Overlay reached the maximum timeout and closed.
+ */
+ TIMED_OUT,
+ /**
+ * User selected to Cancel Route.
+ */
+ CANCEL_ROUTE,
+ /**
+ * The RPC (e.g. ReadDID) executed successfully but the data exceeded the platform maximum threshold and thus, only part of the data is available.
+ */
+ TRUNCATED_DATA,
+ /**
+ * The user interrupted the RPC (e.g. PerformAudioPassThru) and indicated to start over. Note, the app must issue the new RPC.
+ */
+ RETRY,
+ /**
+ * The RPC (e.g. SubscribeVehicleData) executed successfully but one or more items have a warning or failure.
+ */
+ WARNINGS,
+ /**
+ * The RPC (e.g. Slider) executed successfully and the user elected to save the current position / value.
+ */
+ SAVED,
+ /**
+ * The certificate provided during authentication is invalid.
+ */
+ INVALID_CERT,
+ /**
+ * The certificate provided during authentication is expired.
+ */
+ EXPIRED_CERT,
+ /**
+ * The provided hash ID does not match the hash of the current set of registered data or the core could not resume the previous data.
+ */
+ RESUME_FAILED;
+ /**
+ * Convert String to Result
+ * @param value String
+ * @return Result
+ */
+
+ public static Result valueForString(String value) {
+ try{
+ return valueOf(value);
+ }catch(Exception e){
+ return null;
+ }
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/SamplingRate.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/SamplingRate.java
new file mode 100644
index 000000000..e659ff165
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/SamplingRate.java
@@ -0,0 +1,58 @@
+package com.smartdevicelink.proxy.rpc.enums;
+
+import java.util.EnumSet;
+
+/**
+ * Describes different sampling rates for PerformAudioPassThru
+ * @since SmartDeviceLink 2.0
+ */
+public enum SamplingRate {
+
+ /**
+ * Sampling rate of 8 kHz
+ *
+ * @since SmartDeviceLink 2.0
+ */
+ _8KHZ("8KHZ"),
+ /**
+ * Sampling rate of 16 kHz
+ *
+ * @since SmartDeviceLink 2.0
+ */
+ _16KHZ("16KHZ"),
+ /**
+ * Sampling rate of 22 kHz
+ *
+ * @since SmartDeviceLink 2.0
+ */
+ _22KHZ("22KHZ"),
+ /**
+ * Sampling rate of 44 kHz
+ *
+ * @since SmartDeviceLink 2.0
+ */
+ _44KHZ("44KHZ");
+
+ private final String INTERNAL_NAME;
+
+ private SamplingRate(String internalName) {
+ this.INTERNAL_NAME = internalName;
+ }
+
+ public String toString() {
+ return this.INTERNAL_NAME;
+ }
+
+ public static SamplingRate valueForString(String value) {
+ if(value == null){
+ return null;
+ }
+
+ for (SamplingRate anEnum : EnumSet.allOf(SamplingRate.class)) {
+ if (anEnum.toString().equals(value)) {
+ return anEnum;
+ }
+ }
+ return null;
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/SdlConnectionState.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/SdlConnectionState.java
new file mode 100644
index 000000000..fa2caecb6
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/SdlConnectionState.java
@@ -0,0 +1,6 @@
+package com.smartdevicelink.proxy.rpc.enums;
+
+public enum SdlConnectionState {
+ SDL_CONNECTED,
+ SDL_DISCONNECTED;
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/SdlDisconnectedReason.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/SdlDisconnectedReason.java
new file mode 100644
index 000000000..0d1902e3a
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/SdlDisconnectedReason.java
@@ -0,0 +1,84 @@
+package com.smartdevicelink.proxy.rpc.enums;
+
+public enum SdlDisconnectedReason {
+ USER_EXIT,
+ IGNITION_OFF,
+ BLUETOOTH_OFF,
+ USB_DISCONNECTED,
+ REQUEST_WHILE_IN_NONE_HMI_LEVEL,
+ TOO_MANY_REQUESTS,
+ DRIVER_DISTRACTION_VIOLATION,
+ LANGUAGE_CHANGE,
+ MASTER_RESET,
+ FACTORY_DEFAULTS,
+ TRANSPORT_ERROR,
+ APPLICATION_REQUESTED_DISCONNECT,
+ DEFAULT,
+ TRANSPORT_DISCONNECT,
+ HB_TIMEOUT,
+ BLUETOOTH_DISABLED,
+ BLUETOOTH_ADAPTER_ERROR,
+ SDL_REGISTRATION_ERROR,
+ APP_INTERFACE_UNREG,
+ GENERIC_ERROR,
+ /**
+ * This only occurs when multiplexing is running and it is found to be on an old gen 1 system.
+ */
+ LEGACY_BLUETOOTH_MODE_ENABLED,
+ RPC_SESSION_ENDED
+ ;
+
+
+ public static SdlDisconnectedReason valueForString(String value) {
+ try{
+ return valueOf(value);
+ }catch(Exception e){
+ return null;
+ }
+ }
+
+ public static SdlDisconnectedReason convertAppInterfaceUnregisteredReason(AppInterfaceUnregisteredReason reason) {
+ if(reason == null){
+ return null;
+ }
+
+ SdlDisconnectedReason returnReason = SdlDisconnectedReason.DEFAULT;
+
+ switch(reason) {
+ case USER_EXIT:
+ returnReason = SdlDisconnectedReason.USER_EXIT;
+ break;
+ case IGNITION_OFF:
+ returnReason = SdlDisconnectedReason.IGNITION_OFF;
+ break;
+ case BLUETOOTH_OFF:
+ returnReason = SdlDisconnectedReason.BLUETOOTH_OFF;
+ break;
+ case USB_DISCONNECTED:
+ returnReason = SdlDisconnectedReason.USB_DISCONNECTED;
+ break;
+ case REQUEST_WHILE_IN_NONE_HMI_LEVEL:
+ returnReason = SdlDisconnectedReason.REQUEST_WHILE_IN_NONE_HMI_LEVEL;
+ break;
+ case TOO_MANY_REQUESTS:
+ returnReason = SdlDisconnectedReason.TOO_MANY_REQUESTS;
+ break;
+ case DRIVER_DISTRACTION_VIOLATION:
+ returnReason = SdlDisconnectedReason.DRIVER_DISTRACTION_VIOLATION;
+ break;
+ case LANGUAGE_CHANGE:
+ returnReason = SdlDisconnectedReason.LANGUAGE_CHANGE;
+ break;
+ case MASTER_RESET:
+ returnReason = SdlDisconnectedReason.MASTER_RESET;
+ break;
+ case FACTORY_DEFAULTS:
+ returnReason = SdlDisconnectedReason.FACTORY_DEFAULTS;
+ break;
+ default:
+ break;
+ }
+
+ return returnReason;
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/SdlInterfaceAvailability.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/SdlInterfaceAvailability.java
new file mode 100644
index 000000000..0f6b2530c
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/SdlInterfaceAvailability.java
@@ -0,0 +1,6 @@
+package com.smartdevicelink.proxy.rpc.enums;
+
+public enum SdlInterfaceAvailability {
+ SDL_INTERFACE_AVAILABLE,
+ SDL_INTERFACE_UNAVAILABLE;
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/SoftButtonType.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/SoftButtonType.java
new file mode 100644
index 000000000..29fa27020
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/SoftButtonType.java
@@ -0,0 +1,46 @@
+package com.smartdevicelink.proxy.rpc.enums;
+
+import java.util.EnumSet;
+/** The enumeration defines the types of the soft buttons to be displayed on UI component:<p>The text is displayed on the soft button</p>
+ *<p>The image is displayed on the soft button</p>
+ *<p>Both image and text are displayed on the soft button.</p>
+ *
+ * @since SmartDeviceLink 2.0
+ */
+public enum SoftButtonType {
+ /** Text displayed
+ *
+ */
+ SBT_TEXT("TEXT"),
+ /** Image displayed
+ *
+ */
+ SBT_IMAGE("IMAGE"),
+ /** Image displayed
+ *
+ */
+ SBT_BOTH("BOTH");
+
+ private final String INTERNAL_NAME;
+
+ private SoftButtonType(String internalName) {
+ this.INTERNAL_NAME = internalName;
+ }
+
+ public String toString() {
+ return this.INTERNAL_NAME;
+ }
+
+ public static SoftButtonType valueForString(String value) {
+ if(value == null){
+ return null;
+ }
+
+ for (SoftButtonType anEnum : EnumSet.allOf(SoftButtonType.class)) {
+ if (anEnum.toString().equals(value)) {
+ return anEnum;
+ }
+ }
+ return null;
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/SpeechCapabilities.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/SpeechCapabilities.java
new file mode 100644
index 000000000..2b5d17740
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/SpeechCapabilities.java
@@ -0,0 +1,47 @@
+package com.smartdevicelink.proxy.rpc.enums;
+/**
+ * Contains information about TTS capabilities on the SDL platform.
+ *
+ * @since SmartDeviceLink 1.0
+ */
+public enum SpeechCapabilities {
+ /**
+ * The SDL platform can speak text phrases.
+ *
+ * @since SmartDeviceLink 1.0
+ */
+ TEXT,
+ /**
+ * The SDL platform can interpret and speak LHPLUS phonemes
+ */
+
+ SAPI_PHONEMES,
+
+ /**
+ * The SDL platform can interpret and speak LHPLUS phonemes
+ */
+
+ LHPLUS_PHONEMES,
+ /**
+ * The SDL platform can play pre-recorded sounds as part of a TTS operation.<p>(e.g. Speak, Alert, PerformInteraction, etc.).</p>
+ */
+ PRE_RECORDED,
+ /**
+ * The SDL platform can play the prerecorded sound of 1 second of silence (i.e. no sound at all).
+ */
+
+ SILENCE;
+ /**
+ * Convert String to SpeechCapabilities
+ * @param value String
+ * @return SpeechCapabilities
+ */
+
+ public static SpeechCapabilities valueForString(String value) {
+ try{
+ return valueOf(value);
+ }catch(Exception e){
+ return null;
+ }
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/SystemAction.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/SystemAction.java
new file mode 100644
index 000000000..835e9b1b9
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/SystemAction.java
@@ -0,0 +1,37 @@
+package com.smartdevicelink.proxy.rpc.enums;
+/** Enumeration that describes system actions that can be triggered.
+ *
+ * @since SmartDeviceLink 2.0
+ *
+ */
+
+public enum SystemAction {
+ /** Default action occurs. Standard behavior (e.g. SoftButton clears overlay).
+ *
+ */
+
+ DEFAULT_ACTION,
+ /** App is brought into HMI_FULL.
+ *
+ */
+
+ STEAL_FOCUS,
+ /** Current system context is maintained. An overlay is persisted even though a SoftButton has been pressed and the notification sent.
+ *
+ */
+
+ KEEP_CONTEXT;
+ /**
+ * Convert String to SystemAction
+ * @param value String
+ * @return SystemAction
+ */
+
+ public static SystemAction valueForString(String value) {
+ try{
+ return valueOf(value);
+ }catch(Exception e){
+ return null;
+ }
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/SystemContext.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/SystemContext.java
new file mode 100644
index 000000000..1ea9d60b1
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/SystemContext.java
@@ -0,0 +1,67 @@
+package com.smartdevicelink.proxy.rpc.enums;
+
+import java.util.EnumSet;
+
+/**
+ * Indicates whether or not a user-initiated interaction is in progress, and if
+ * so, in what mode (i.e. MENU or VR).
+ *
+ * @since SmartDeviceLink 1.0
+ */
+public enum SystemContext {
+ /**
+ * No user interaction (user-initiated or app-initiated) is in progress.
+ *
+ * @since SmartDeviceLink 1.0
+ */
+ SYSCTXT_MAIN("MAIN"),
+ /**
+ * VR-oriented, user-initiated or app-initiated interaction is in-progress.
+ *
+ * @since SmartDeviceLink 1.0
+ */
+ SYSCTXT_VRSESSION("VRSESSION"),
+ /**
+ * Menu-oriented, user-initiated or app-initiated interaction is
+ * in-progress.
+ *
+ * @since SmartDeviceLink 1.0
+ */
+ SYSCTXT_MENU("MENU"),
+ /**
+ * The app's display HMI is currently being obscured by either a system or
+ * other app's overlay.
+ *
+ * @since SmartDeviceLink 2.0
+ */
+ SYSCTXT_HMI_OBSCURED("HMI_OBSCURED"),
+ /**
+ * Broadcast only to whichever app has an alert currently being displayed.
+ *
+ * @since SmartDeviceLink 2.0
+ */
+ SYSCTXT_ALERT("ALERT");
+
+ private final String INTERNAL_NAME;
+
+ private SystemContext(String internalName) {
+ this.INTERNAL_NAME = internalName;
+ }
+
+ public String toString() {
+ return this.INTERNAL_NAME;
+ }
+
+ public static SystemContext valueForString(String value) {
+ if(value == null){
+ return null;
+ }
+
+ for (SystemContext anEnum : EnumSet.allOf(SystemContext.class)) {
+ if (anEnum.toString().equals(value)) {
+ return anEnum;
+ }
+ }
+ return null;
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/TBTState.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/TBTState.java
new file mode 100644
index 000000000..d334ccad7
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/TBTState.java
@@ -0,0 +1,70 @@
+package com.smartdevicelink.proxy.rpc.enums;
+
+/**
+ * Describes possible states of turn-by-turn module.
+ * @since SmartDeviceLink 1.0
+ */
+public enum TBTState {
+ /**
+ * Indicates that driver requested a route update.
+ */
+ ROUTE_UPDATE_REQUEST,
+ /**
+ * Confirmation from HMI about accepting the route.
+ */
+
+ ROUTE_ACCEPTED,
+ /**
+ * Information from HMI about the route refusal.
+ */
+
+ ROUTE_REFUSED,
+ /**
+ * Information from HMI about canceling the route.
+ */
+
+ ROUTE_CANCELLED,
+ /**
+ * Request from HMI for Estimated time of arrival.
+ */
+
+ ETA_REQUEST,
+ /**
+ * Request from HMI for the information of the next turn.
+ */
+
+ NEXT_TURN_REQUEST,
+ /**
+ * Request from HMI for the route status.
+ */
+
+ ROUTE_STATUS_REQUEST,
+ /**
+ * Request from HMI for the route summary.
+ */
+
+ ROUTE_SUMMARY_REQUEST,
+ /**
+ * Request from HMI for the information about trip status.
+ */
+
+ TRIP_STATUS_REQUEST,
+ /**
+ * Request from HMI for the timeout for waiting for the route updating.
+ */
+
+ ROUTE_UPDATE_REQUEST_TIMEOUT;
+
+ /**
+ * Convert String to TBTState
+ * @param value String
+ * @return TBTState
+ */
+ public static TBTState valueForString(String value) {
+ try{
+ return valueOf(value);
+ }catch(Exception e){
+ return null;
+ }
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/TextAlignment.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/TextAlignment.java
new file mode 100644
index 000000000..b188d6ba8
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/TextAlignment.java
@@ -0,0 +1,33 @@
+package com.smartdevicelink.proxy.rpc.enums;
+
+/**
+ * The list of possible alignments of text in a field.
+ * @since SmartDeviceLink 1.0
+ */
+public enum TextAlignment {
+ /**
+ * Text aligned left.
+ */
+ LEFT_ALIGNED,
+ /**
+ * Text aligned right.
+ */
+ RIGHT_ALIGNED,
+ /**
+ * Text aligned centered.
+ */
+ CENTERED;
+
+ /**
+ * Convert String to TextAlignment
+ * @param value String
+ * @return TextAlignment
+ */
+ public static TextAlignment valueForString(String value) {
+ try{
+ return valueOf(value);
+ }catch(Exception e){
+ return null;
+ }
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/TextFieldName.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/TextFieldName.java
new file mode 100644
index 000000000..ded9d0571
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/TextFieldName.java
@@ -0,0 +1,166 @@
+package com.smartdevicelink.proxy.rpc.enums;
+/** Names of the text fields that can appear on the display.
+ *
+ * @since SmartDeviceLink 1.0
+ *
+ */
+
+public enum TextFieldName {
+ /** The first line of first set of main fields of the persistent display; applies to "Show"
+ *
+ */
+
+ mainField1,
+ /** The second line of first set of main fields of the persistent display; applies to "Show"
+ *
+ */
+
+ mainField2,
+ /** The first line of second set of main fields of persistent display; applies to "Show"
+ *
+ */
+
+ mainField3,
+ /** The second line of second set of main fields of the persistent display; applies to "Show"
+ *
+ */
+
+ mainField4,
+ /** The status bar on NGN; applies to "Show"
+ *
+ */
+
+ statusBar,
+ /** Text value for MediaClock field; applies to "Show"
+ *
+ */
+
+ mediaClock,
+ /** The track field of NGN and GEN1.1 MFD displays. This field is only available for media applications; applies to "Show"
+ *
+ */
+
+ mediaTrack,
+ /** The first line of the alert text field; applies to "Alert"
+ *
+ */
+
+ alertText1,
+ /** The second line of the alert text field; applies to "Alert"
+ *
+ */
+
+ alertText2,
+ /** The third line of the alert text field; applies to "Alert"
+ *
+ */
+
+ alertText3,
+ /** Long form body of text that can include newlines and tabs; applies to "ScrollableMessage"
+ *
+ */
+
+ scrollableMessageBody,
+ /** First line suggestion for a user response (in the case of VR enabled interaction)
+ *
+ */
+
+ initialInteractionText,
+ /** First line of navigation text
+ *
+ */
+
+ navigationText1,
+ /** Second line of navigation text
+ *
+ */
+
+ navigationText2,
+ /** Estimated Time of Arrival time for navigation
+ *
+ */
+
+ ETA,
+ /** Total distance to destination for navigation
+ *
+ */
+
+ totalDistance,
+ /** First line of text for audio pass thru
+ *
+ */
+
+ audioPassThruDisplayText1,
+ /** Second line of text for audio pass thru
+ *
+ */
+
+ audioPassThruDisplayText2,
+ /** Header text for slider
+ *
+ */
+
+ sliderHeader,
+ /** Footer text for slider
+ *
+ */
+
+ sliderFooter,
+ /** Primary text for Choice
+ *
+ */
+
+ menuName,
+ /** Secondary text for Choice
+ *
+ */
+
+ secondaryText,
+ /** Tertiary text for Choice
+ *
+ */
+
+ tertiaryText,
+ /** Optional text to label an app menu button (for certain touchscreen platforms).
+ *
+ */
+ menuTitle,
+ /**
+ * Optional name / title of intended location for SendLocation.
+ *
+ * @since SmartDeviceLink 4.0
+ */
+ locationName,
+ /**
+ * Optional description of intended location / establishment (if applicable) for SendLocation
+ *
+ * @since SmartDeviceLink 4.0
+ */
+ locationDescription,
+ /**
+ * Optional location address (if applicable) for SendLocation.
+ *
+ * @since SmartDeviceLink 4.0
+ */
+ addressLines,
+ /**
+ * Optional hone number of intended location / establishment (if applicable) for SendLocation.
+ *
+ * @since SmartDeviceLink 4.0
+ */
+ phoneNumber,
+ ;
+ /**
+ * Convert String to TextFieldName
+ * @param value String
+ * @return TextFieldName
+ */
+
+ public static TextFieldName valueForString(String value) {
+ try{
+ return valueOf(value);
+ }catch(Exception e){
+ return null;
+ }
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/TouchType.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/TouchType.java
new file mode 100644
index 000000000..952904915
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/TouchType.java
@@ -0,0 +1,37 @@
+package com.smartdevicelink.proxy.rpc.enums;
+/** The type of touch event.
+ *
+ * @since SmartDeviceLink 2.3.2
+ *
+ */
+
+public enum TouchType {
+ /** The user has touched the screen.
+ *
+ */
+
+ BEGIN,
+ /** The User has moved his finger over the screen.
+ *
+ */
+
+ MOVE,
+ /** The User has removed his finger from the screen.
+ *
+ */
+
+ END;
+ /**
+ * Convert String to TouchType
+ * @param value String
+ * @return TouchType
+ */
+
+ public static TouchType valueForString(String value) {
+ try{
+ return valueOf(value);
+ }catch(Exception e){
+ return null;
+ }
+ }
+} \ No newline at end of file
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/TriggerSource.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/TriggerSource.java
new file mode 100644
index 000000000..169721705
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/TriggerSource.java
@@ -0,0 +1,47 @@
+package com.smartdevicelink.proxy.rpc.enums;
+
+import java.util.EnumSet;
+
+/**
+ * Indicates whether choice/command was selected via VR or via a menu selection
+ * (using SEEKRIGHT/SEEKLEFT, TUNEUP, TUNEDOWN and OK buttons)
+ *
+ * @since SmartDeviceLink 1.0
+ *
+ */
+public enum TriggerSource {
+ /**
+ * Selection made via menu (i.e. using SEEKRIGHT/SEEKLEFT, TUNEUP, TUNEDOWN
+ * and OK buttons)
+ */
+ TS_MENU("MENU"),
+ /**
+ * Selection made via VR session
+ */
+ TS_VR("VR"),
+
+ TS_KEYBOARD("KEYBOARD");
+
+ private final String INTERNAL_NAME;
+
+ private TriggerSource(String internalName) {
+ this.INTERNAL_NAME = internalName;
+ }
+
+ public String toString() {
+ return this.INTERNAL_NAME;
+ }
+
+ public static TriggerSource valueForString(String value) {
+ if(value == null){
+ return null;
+ }
+
+ for (TriggerSource anEnum : EnumSet.allOf(TriggerSource.class)) {
+ if (anEnum.toString().equals(value)) {
+ return anEnum;
+ }
+ }
+ return null;
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/UpdateMode.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/UpdateMode.java
new file mode 100644
index 000000000..cd9bf6dfe
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/UpdateMode.java
@@ -0,0 +1,42 @@
+package com.smartdevicelink.proxy.rpc.enums;
+
+/**
+ * Specifies what function should be performed on the media clock/counter
+ *
+ *
+ * @since SmartDeviceLink 1.0
+ */
+public enum UpdateMode {
+ /**
+ * Starts the media clock timer counting upward, in increments of 1 second
+ */
+ COUNTUP,
+ /**
+ * Starts the media clock timer counting downward, in increments of 1 second
+ */
+ COUNTDOWN,
+ /**
+ * Pauses the media clock timer
+ */
+ PAUSE,
+ /**
+ * Resumes the media clock timer. The timer resumes counting in whatever
+ * mode was in effect before pausing (i.e. COUNTUP or COUNTDOWN)
+ */
+ RESUME,
+ CLEAR;
+
+
+ /**
+ * Returns an UpdateMode value (COUNTUP, COUNTDOWN, PAUSE or RESUME)
+ * @param value a String
+ * @return UpdateMode -COUNTUP, COUNTDOWN, PAUSE or RESUME
+ */
+ public static UpdateMode valueForString(String value) {
+ try{
+ return valueOf(value);
+ }catch(Exception e){
+ return null;
+ }
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/VehicleDataEventStatus.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/VehicleDataEventStatus.java
new file mode 100644
index 000000000..64a5dd898
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/VehicleDataEventStatus.java
@@ -0,0 +1,32 @@
+package com.smartdevicelink.proxy.rpc.enums;
+
+/**
+ * Reflects the status of a vehicle data event; e.g. a seat belt event status.
+ * @since SmartDeviceLink 2.0
+ */
+public enum VehicleDataEventStatus {
+ /**
+ * No event available
+ */
+ NO_EVENT,
+ NO,
+ YES,
+ /**
+ * Vehicle data event is not support
+ */
+ NOT_SUPPORTED,
+ FAULT;
+
+ /**
+ * Convert String to VehicleDataEventStatus
+ * @param value String
+ * @return VehicleDataEventStatus
+ */
+ public static VehicleDataEventStatus valueForString(String value) {
+ try{
+ return valueOf(value);
+ }catch(Exception e){
+ return null;
+ }
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/VehicleDataNotificationStatus.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/VehicleDataNotificationStatus.java
new file mode 100644
index 000000000..d7bca9fc7
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/VehicleDataNotificationStatus.java
@@ -0,0 +1,41 @@
+package com.smartdevicelink.proxy.rpc.enums;
+
+/**
+ * Reflects the status of a vehicle data notification.
+ * @since SmartDeviceLink 2.0
+ *
+ * @see SoftButtonCapabilities
+ * @see ButtonCapabilities
+ * @see OnButtonPress
+ */
+public enum VehicleDataNotificationStatus {
+ /**
+ * VehicleDataNotificationStatus is not supported.
+ */
+ NOT_SUPPORTED,
+ /**
+ * VehicleDataNotificationStatus is normal.
+ */
+ NORMAL,
+ /**
+ * VehicleDataNotificationStatus is active.
+ */
+ ACTIVE,
+ /**
+ * VehicleDataNotificationStatus is not in use.
+ */
+ NOT_USED;
+
+ /**
+ * Convert String to VehicleDataNotificationStatus
+ * @param value String
+ * @return VehicleDataNotificationStatus
+ */
+ public static VehicleDataNotificationStatus valueForString(String value) {
+ try{
+ return valueOf(value);
+ }catch(Exception e){
+ return null;
+ }
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/VehicleDataResultCode.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/VehicleDataResultCode.java
new file mode 100644
index 000000000..45c2e7c11
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/VehicleDataResultCode.java
@@ -0,0 +1,65 @@
+package com.smartdevicelink.proxy.rpc.enums;
+/** Enumeration that describes possible result codes of a vehicle data entry request.
+ *
+ * @since SmartDeviceLink 2.0
+ *
+ *@see DIDResult
+ *@see ReadDID
+ */
+
+public enum VehicleDataResultCode {
+ /**Individual vehicle data item / DTC / DID request or subscription successful
+ *
+ */
+
+ SUCCESS,
+ /**
+ *DTC / DID request successful, however, not all active DTCs or full contents of DID location available
+ *
+ * @since SmartDeviceLink 4.0
+ */
+
+ TRUNCATED_DATA,
+ /** This vehicle data item is not allowed for this app .The request is not authorized in local policies.
+ *
+ */
+
+ DISALLOWED,
+ /** The user has not granted access to this type of vehicle data item at this time.
+ *
+ */
+
+ USER_DISALLOWED,
+ /** The ECU ID referenced is not a valid ID on the bus / system.
+ *
+ */
+
+ INVALID_ID,
+ /** The requested vehicle data item / DTC / DID is not currently available or responding on the bus / system.
+ *
+ */
+
+ VEHICLE_DATA_NOT_AVAILABLE,
+ /** The vehicle data item is already subscribed.
+ *
+ */
+
+ DATA_ALREADY_SUBSCRIBED,
+ /** The vehicle data item cannot be unsubscribed because it is not currently subscribed.
+ *
+ */
+
+ DATA_NOT_SUBSCRIBED,
+ /** The request for this item is ignored because it is already in progress
+ */
+
+ IGNORED;
+
+ public static VehicleDataResultCode valueForString(String value) {
+ try{
+ return valueOf(value);
+ }catch(Exception e){
+ return null;
+ }
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/VehicleDataStatus.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/VehicleDataStatus.java
new file mode 100644
index 000000000..2245bbe71
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/VehicleDataStatus.java
@@ -0,0 +1,36 @@
+package com.smartdevicelink.proxy.rpc.enums;
+
+/**
+ * Reflects the status of a binary vehicle data item.
+ * @since SmartDeviceLink 2.0
+ *
+ */
+public enum VehicleDataStatus {
+ /**
+ * No data available
+ */
+ NO_DATA_EXISTS,
+ /**
+ * The vehicle item is in Off state
+ */
+
+ OFF,
+ /**
+ * The vehicle item is in On state
+ */
+
+ ON;
+
+ /**
+ * Convert String to VehicleDataStatus
+ * @param value String
+ * @return VehicleDataStatus
+ */
+ public static VehicleDataStatus valueForString(String value) {
+ try{
+ return valueOf(value);
+ }catch(Exception e){
+ return null;
+ }
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/VehicleDataType.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/VehicleDataType.java
new file mode 100644
index 000000000..adebca268
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/VehicleDataType.java
@@ -0,0 +1,125 @@
+package com.smartdevicelink.proxy.rpc.enums;
+
+/**
+ * Defines the vehicle data types that can be published and subscribed to.
+ *
+ */
+public enum VehicleDataType {
+ /**
+ * Notifies GPSData may be subscribed
+ */
+ VEHICLEDATA_GPS,
+ /**
+ * Notifies SPEED Data may be subscribed
+ */
+ VEHICLEDATA_SPEED,
+ /**
+ * Notifies RPMData may be subscribed
+ */
+ VEHICLEDATA_RPM,
+ /**
+ * Notifies FUELLEVELData may be subscribed
+ */
+ VEHICLEDATA_FUELLEVEL,
+ /**
+ * Notifies FUELLEVEL_STATEData may be subscribed
+ */
+ VEHICLEDATA_FUELLEVEL_STATE,
+/**
+ * Notifies FUELCONSUMPTIONData may be subscribed
+ */
+ VEHICLEDATA_FUELCONSUMPTION,
+ /**
+ * Notifies EXTERNTEMPData may be subscribed
+ */
+ VEHICLEDATA_EXTERNTEMP,
+ /**
+ * Notifies VINData may be subscribed
+ */
+ VEHICLEDATA_VIN,
+ /**
+ * Notifies PRNDLData may be subscribed
+ */
+ VEHICLEDATA_PRNDL,
+ /**
+ * Notifies TIREPRESSUREData may be subscribed
+ */
+ VEHICLEDATA_TIREPRESSURE,
+ /**
+ * Notifies ODOMETERData may be subscribed
+ */
+ VEHICLEDATA_ODOMETER,
+ /**
+ * Notifies BELTSTATUSData may be subscribed
+ */
+ VEHICLEDATA_BELTSTATUS,
+ /**
+ * Notifies BODYINFOData may be subscribed
+ */
+ VEHICLEDATA_BODYINFO,
+ /**
+ * Notifies DEVICESTATUSData may be subscribed
+ */
+ VEHICLEDATA_DEVICESTATUS,
+ /**
+ * Notifies BRAKINGData may be subscribed
+ */
+ VEHICLEDATA_BRAKING,
+ /**
+ * Notifies WIPERSTATUSData may be subscribed
+ */
+ VEHICLEDATA_WIPERSTATUS,
+ /**
+ * Notifies HEADLAMPSTATUSData may be subscribed
+ */
+ VEHICLEDATA_HEADLAMPSTATUS,
+ /**
+ * Notifies BATTVOLTAGEData may be subscribed
+ */
+ VEHICLEDATA_BATTVOLTAGE,
+ /**
+ * Notifies EGINETORQUEData may be subscribed
+ */
+ VEHICLEDATA_ENGINETORQUE,
+ /**
+ * Notifies ACCPEDALData may be subscribed
+ */
+ VEHICLEDATA_ACCPEDAL,
+ /**
+ * Notifies STEERINGWHEELData may be subscribed
+ */
+ VEHICLEDATA_STEERINGWHEEL,
+ /**
+ * Notifies ECALLINFOData may be subscribed
+ */
+ VEHICLEDATA_ECALLINFO,
+ /**
+ * Notifies AIRBAGSTATUSData may be subscribed
+ */
+ VEHICLEDATA_AIRBAGSTATUS,
+ /**
+ * Notifies EMERGENCYEVENTData may be subscribed
+ */
+ VEHICLEDATA_EMERGENCYEVENT,
+ /**
+ * Notifies CLUSTERMODESTATUSData may be subscribed
+ */
+ VEHICLEDATA_CLUSTERMODESTATUS,
+ /**
+ * Notifies MYKEYData may be subscribed
+ */
+ VEHICLEDATA_MYKEY;
+ /**
+ * Convert String to VehicleDataType
+ * @param value String
+ * @return VehicleDataType
+ */
+
+ public static VehicleDataType valueForString(String value) {
+ try{
+ return valueOf(value);
+ }catch(Exception e){
+ return null;
+ }
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/VrCapabilities.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/VrCapabilities.java
new file mode 100644
index 000000000..e228638ce
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/VrCapabilities.java
@@ -0,0 +1,42 @@
+package com.smartdevicelink.proxy.rpc.enums;
+
+/**
+ * The VR capabilities of the connected SDL platform.
+ *
+ */
+public enum VrCapabilities {
+ /**
+ * The SDL platform is capable of recognizing spoken text in the current
+ * language.
+ *
+ * @since SmartDeviceLink 1.0
+ */
+ @Deprecated
+ Text,
+
+ /**
+ * The SDL platform is capable of recognizing spoken text in the current
+ * language.
+ *
+ * @since SmartDeviceLink 3.0
+ */
+ TEXT,
+ ;
+
+ public static VrCapabilities valueForString(String value) {
+ if(value == null){
+ return null;
+ }
+
+ if (value.equalsIgnoreCase(TEXT.toString()))
+ {
+ return TEXT;
+ }
+
+ try{
+ return valueOf(value);
+ }catch(Exception e){
+ return null;
+ }
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/WarningLightStatus.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/WarningLightStatus.java
new file mode 100644
index 000000000..3d002e651
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/WarningLightStatus.java
@@ -0,0 +1,34 @@
+package com.smartdevicelink.proxy.rpc.enums;
+
+/**
+ * Reflects the status of a cluster instrument warning light.
+ * @since SmartDeviceLink 2.0
+ */
+public enum WarningLightStatus {
+ /**
+ * Warninglight Off
+ */
+ OFF,
+ /**
+ * Warninglight On
+ */
+ ON,
+ /**
+ * Warninglight is flashing
+ */
+ FLASH,
+ NOT_USED;
+
+ /**
+ * Convert String to WarningLightStatus
+ * @param value String
+ * @return WarningLightStatus
+ */
+ public static WarningLightStatus valueForString(String value) {
+ try{
+ return valueOf(value);
+ }catch(Exception e){
+ return null;
+ }
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/WayPointType.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/WayPointType.java
new file mode 100644
index 000000000..120facaef
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/WayPointType.java
@@ -0,0 +1,15 @@
+package com.smartdevicelink.proxy.rpc.enums;
+
+public enum WayPointType {
+ ALL,
+ DESTINATION,
+ ;
+
+ public static WayPointType valueForString(String value) {
+ try{
+ return valueOf(value);
+ }catch(Exception e){
+ return null;
+ }
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/WiperStatus.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/WiperStatus.java
new file mode 100644
index 000000000..546cf05b5
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/WiperStatus.java
@@ -0,0 +1,98 @@
+package com.smartdevicelink.proxy.rpc.enums;
+/** This enumeration reflects the status of the wipers.
+ *
+ * @since SmartDeviceLink 2.0
+ *
+ * @see GetVehicleData
+ * @see OnVehicleData
+ */
+
+public enum WiperStatus {
+ /** The wipers are off.
+ *
+ */
+
+ OFF,
+ /** The wipers are automatically off after detecting the wipers do not need to be engaged (rain stopped, etc.).
+ *
+ */
+
+ AUTO_OFF,
+ /** Means that though set to off, somehow the wipers have been engaged (physically moved enough to engage a wiping motion).
+ *
+ */
+
+ OFF_MOVING,
+ /** The wipers are manually off after having been working.
+ *
+ */
+
+ MAN_INT_OFF,
+ /** The wipers are manually on.
+ *
+ */
+
+ MAN_INT_ON,
+ /** The wipers are manually set to low speed.
+ *
+ */
+
+ MAN_LOW,
+ /** The wipers are manually set to high speed.
+ *
+ */
+
+ MAN_HIGH,
+ /** The wipers are manually set for doing a flick.
+ *
+ */
+
+ MAN_FLICK,
+ /** The wipers are set to use the water from vehicle washer bottle for cleaning the windscreen.
+ *
+ */
+
+ WASH,
+ /** The wipers are automatically set to low speed.
+ *
+ */
+
+ AUTO_LOW,
+ /** The wipers are automatically set to high speed.
+ *
+ */
+
+ AUTO_HIGH,
+ /** This is for when a user has just initiated a WASH and several seconds later a secondary wipe is automatically initiated to clear remaining fluid
+ */
+
+ COURTESYWIPE,
+ /** This is set as the user moves between possible automatic wiper speeds.
+ *
+ */
+
+ AUTO_ADJUST,
+ /** The wiper is stalled to its place. There may be an obstruction.
+ *
+ */
+
+ STALLED,
+ /** The sensor / module cannot provide any information for wiper.
+ *
+ */
+
+ NO_DATA_EXISTS;
+ /**
+ * Convert String to WiperStatus
+ * @param value String
+ * @return WiperStatus
+ */
+
+ public static WiperStatus valueForString(String value) {
+ try{
+ return valueOf(value);
+ }catch(Exception e){
+ return null;
+ }
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/listeners/OnPutFileUpdateListener.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/listeners/OnPutFileUpdateListener.java
new file mode 100644
index 000000000..1a8e4f35f
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/listeners/OnPutFileUpdateListener.java
@@ -0,0 +1,48 @@
+package com.smartdevicelink.proxy.rpc.listeners;
+
+import com.smartdevicelink.proxy.RPCResponse;
+
+public abstract class OnPutFileUpdateListener extends OnRPCResponseListener{
+
+ long totalSize = 0;
+
+ public OnPutFileUpdateListener(){
+ setListenerType(UPDATE_LISTENER_TYPE_PUT_FILE);
+ }
+
+ @Override
+ public final void onStart(int correlationId) {
+ super.onStart(correlationId);
+ onStart(correlationId, totalSize); //We do this so we can send back the total size
+ }
+
+ public void onStart(int correlationId, long totalSize){
+
+ }
+
+ @Override
+ public final void onResponse(int correlationId, RPCResponse response) {
+ onResponse(correlationId, response, totalSize); //Calling our special abstract method
+ }
+ /**
+ * Called when the putfile request is responded to.
+ * @param correlationId
+ * @param message
+ * @param totalSize
+ */
+ public abstract void onResponse(int correlationId, RPCResponse response, long totalSize);
+
+ /**
+ * onUpdate is called during a putfile stream request
+ * @param correlationId of the original request
+ * @param bytesWritten
+ * @param totalSize
+ */
+ public void onUpdate(int correlationId, long bytesWritten, long totalSize){
+
+ };
+
+ public final void setTotalSize(long totalSize){
+ this.totalSize = totalSize;
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/listeners/OnRPCNotificationListener.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/listeners/OnRPCNotificationListener.java
new file mode 100644
index 000000000..e760618b1
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/listeners/OnRPCNotificationListener.java
@@ -0,0 +1,8 @@
+package com.smartdevicelink.proxy.rpc.listeners;
+
+import com.smartdevicelink.proxy.RPCNotification;
+
+public abstract class OnRPCNotificationListener {
+
+ public abstract void onNotified(RPCNotification notification);
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/listeners/OnRPCResponseListener.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/listeners/OnRPCResponseListener.java
new file mode 100644
index 000000000..4bc5ccd79
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/listeners/OnRPCResponseListener.java
@@ -0,0 +1,73 @@
+package com.smartdevicelink.proxy.rpc.listeners;
+
+import com.smartdevicelink.proxy.RPCResponse;
+import com.smartdevicelink.proxy.rpc.enums.Result;
+
+public abstract class OnRPCResponseListener {
+ /**
+ * Generic listener type that will work for most RPCs
+ */
+ public final static int UPDATE_LISTENER_TYPE_BASE_RPC = 0;
+ /**
+ * Listener type specific to putfile
+ */
+ public final static int UPDATE_LISTENER_TYPE_PUT_FILE = 1;
+
+ /**
+ * Stores what type of listener this instance is. This prevents of from having to use reflection
+ */
+ int listenerType;
+
+ /**
+ * This is the base listener for all RPCs.
+ */
+ public OnRPCResponseListener(){
+ setListenerType(UPDATE_LISTENER_TYPE_BASE_RPC);
+ }
+
+ protected final void setListenerType(int type){
+ this.listenerType = type;
+ }
+ /**
+ * This is used to see what type of listener this instance is. It is needed
+ * because some RPCs require additional callbacks. Types are constants located in this class
+ * @return the type of listener this is
+ */
+ public int getListenerType(){
+ return this.listenerType;
+ }
+
+ /* *****************************************************************
+ ************************* Event Callbacks *************************
+ *******************************************************************/
+
+ /**
+ * This method will be called once the packet has been entered into the queue of messages to send
+ * @param correlationId
+ */
+ public void onStart(int correlationId){
+
+ };
+
+ /**
+ * This is the only method that must be extended. Other methods that are able to be extended are
+ * onStart and onError.
+ * @param correlationId
+ * @param response This will be the response message received from the core side. It should be cast into a corresponding RPC Response type. ie, if setting this
+ * for a PutFile request, the message parameter should be cast to a PutFileResponse class.
+ */
+ public abstract void onResponse(int correlationId, final RPCResponse response);
+
+ /**
+ * Called when there was some sort of error during the original request.
+ * @param correlationId
+ * @param resultCode
+ * @param info
+ */
+ public void onError(int correlationId, Result resultCode, String info){
+
+ };
+
+
+
+}