SDL_Android/SmartDeviceLinkAndroidProxy - added the correct version of the proxy
[profile/ivi/smartdevicelink.git] / SDL_Android / SmartDeviceLinkProxyAndroid / src / com / smartdevicelink / proxy / SmartDeviceLinkProxyALM.java
1 package com.smartdevicelink.proxy;\r
2 \r
3 import java.util.Vector;\r
4 \r
5 import android.app.Service;\r
6 \r
7 import com.smartdevicelink.exception.SmartDeviceLinkException;\r
8 import com.smartdevicelink.exception.SmartDeviceLinkExceptionCause;\r
9 import com.smartdevicelink.proxy.Version;\r
10 import com.smartdevicelink.proxy.interfaces.IProxyListenerALM;\r
11 import com.smartdevicelink.proxy.rpc.ButtonCapabilities;\r
12 import com.smartdevicelink.proxy.rpc.DisplayCapabilities;\r
13 import com.smartdevicelink.proxy.rpc.PresetBankCapabilities;\r
14 import com.smartdevicelink.proxy.rpc.SoftButtonCapabilities;\r
15 import com.smartdevicelink.proxy.rpc.smartdevicelinkMsgVersion;\r
16 import com.smartdevicelink.proxy.rpc.TTSChunk;\r
17 import com.smartdevicelink.proxy.rpc.VehicleType;\r
18 import com.smartdevicelink.proxy.rpc.enums.AppHMIType;\r
19 import com.smartdevicelink.proxy.rpc.enums.HmiZoneCapabilities;\r
20 import com.smartdevicelink.proxy.rpc.enums.Language;\r
21 import com.smartdevicelink.proxy.rpc.enums.SpeechCapabilities;\r
22 import com.smartdevicelink.proxy.rpc.enums.SmartDeviceLinkDisconnectedReason;\r
23 import com.smartdevicelink.proxy.rpc.enums.VrCapabilities;\r
24 import com.smartdevicelink.trace.SmartDeviceLinkTrace;\r
25 import com.smartdevicelink.transport.BTTransportConfig;\r
26 import com.smartdevicelink.transport.BaseTransportConfig;\r
27 import com.smartdevicelink.transport.TransportType;\r
28 \r
29 public class SmartDeviceLinkProxyALM extends SmartDeviceLinkProxyBase<IProxyListenerALM> {\r
30         \r
31         private static final String SMARTDEVICELINK_LIB_TRACE_KEY = "42baba60-eb57-11df-98cf-0800200c9a66";\r
32         private static final String SMARTDEVICELINK_LIB_PRIVATE_TOKEN = "{DAE1A88C-6C16-4768-ACA5-6F1247EA01C2}";\r
33         \r
34         /**\r
35          * Constructor for the SmartDeviceLinkProxy object, the proxy for communicating between the App and SMARTDEVICELINK\r
36          * \r
37          * Takes advantage of the advanced lifecycle management.\r
38          * @param listener - Reference to the object in the App listening to callbacks from SMARTDEVICELINK. \r
39          * @param appName - Name of the application displayed on SMARTDEVICELINK. \r
40          * @param isMediaApp - Indicates if the app is a media application.\r
41          */\r
42         public SmartDeviceLinkProxyALM(IProxyListenerALM listener, String appName, Boolean isMediaApp, \r
43                         Language languageDesired, Language hmiDisplayLanguageDesired, String appID) throws SmartDeviceLinkException {\r
44                 super(  listener, \r
45                                 /*smartDeviceLink proxy configuration resources*/null, \r
46                                 /*enable advanced lifecycle management*/true, \r
47                                 appName,\r
48                                 /*TTS Name*/null,\r
49                                 /*ngn media app*/null,\r
50                                 /*vr synonyms*/null,\r
51                                 /*is media app*/isMediaApp,\r
52                                 /*smartDeviceLinkMsgVersion*/null,\r
53                                 /*language desired*/languageDesired,\r
54                                 /*HMI Display Language Desired*/hmiDisplayLanguageDesired,\r
55                                 /*App Type*/null,\r
56                                 /*App ID*/appID,\r
57                                 /*autoActivateID*/null,\r
58                                 /*callbackToUIThread*/ false,\r
59                                 new BTTransportConfig());\r
60                 \r
61                 SmartDeviceLinkTrace.logProxyEvent("Application constructed SmartDeviceLinkProxyALM (using legacy constructor for BT transport) instance passing in: IProxyListener, appName, and isMediaApp.", SMARTDEVICELINK_LIB_TRACE_KEY);\r
62         }\r
63         \r
64         /**\r
65          * Constructor for the SmartDeviceLinkProxy object, the proxy for communicating between the App and SMARTDEVICELINK.\r
66          * \r
67          * Takes advantage of the advanced lifecycle management. \r
68          * \r
69          * @param listener - Reference to the object in the App listening to callbacks from SMARTDEVICELINK. \r
70          * @param appName - Name of the application displayed on SMARTDEVICELINK. \r
71          * @param ngnMediaScreenAppName - Name of the application displayed on SMARTDEVICELINK for Navigation equipped \r
72          * vehicles. Limited to five characters. \r
73          * @param vrSynonyms - A vector of strings, all of which can be used as voice commands to \r
74          * @param isMediaApp - Indicates if the app is a media application.\r
75          * @param smartDeviceLinkMsgVersion - Indicates the version of SMARTDEVICELINK SmartDeviceLink Messages desired. Must be less than\r
76          * or equal to the version of SMARTDEVICELINK SmartDeviceLink running on the vehicle. \r
77          * @param languageDesired - Indicates the language desired for the SMARTDEVICELINK interface.\r
78          * @param autoActivateID - ID used to re-register previously registered application.\r
79          * @throws SmartDeviceLinkException\r
80          */\r
81         public SmartDeviceLinkProxyALM(IProxyListenerALM listener, String appName, String ngnMediaScreenAppName, \r
82                         Vector<String> vrSynonyms, Boolean isMediaApp, smartdevicelinkMsgVersion smartDeviceLinkMsgVersion, \r
83                         Language languageDesired, Language hmiDisplayLanguageDesired, String appID, \r
84                         String autoActivateID) throws SmartDeviceLinkException {\r
85                 super(  listener, \r
86                                 /*smartDeviceLink proxy configuration resources*/null, \r
87                                 /*enable advanced lifecycle management*/true, \r
88                                 appName,\r
89                                 /*TTS Name*/null,\r
90                                 ngnMediaScreenAppName,\r
91                                 vrSynonyms,\r
92                                 isMediaApp,\r
93                                 smartDeviceLinkMsgVersion,\r
94                                 languageDesired,\r
95                                 /*HMI Display Language Desired*/hmiDisplayLanguageDesired,\r
96                                 /*App Type*/null,\r
97                                 /*App ID*/appID,\r
98                                 autoActivateID,\r
99                                 /*callbackToUIThread*/ false,\r
100                                 new BTTransportConfig());\r
101                 \r
102                 SmartDeviceLinkTrace.logProxyEvent("Application constructed SmartDeviceLinkProxyALM (using legacy constructor for BT transport) instance passing in: IProxyListener, appName, ngnMediaScreenAppName, " +\r
103                                 "vrSynonyms, isMediaApp, smartDeviceLinkMsgVersion, languageDesired, and autoActivateID.", SMARTDEVICELINK_LIB_TRACE_KEY);\r
104         }\r
105         \r
106         /**\r
107          * Constructor for the SmartDeviceLinkProxy object, the proxy for communicating between the App and SMARTDEVICELINK.\r
108          * \r
109          * Takes advantage of the advanced lifecycle management. \r
110          * \r
111          * @param listener - Reference to the object in the App listening to callbacks from SMARTDEVICELINK. \r
112          * @param appName - Name of the application displayed on SMARTDEVICELINK. \r
113          * @param ngnMediaScreenAppName - Name of the application displayed on SMARTDEVICELINK for Navigation equipped \r
114          * vehicles. Limited to five characters. \r
115          * @param vrSynonyms - A vector of strings, all of which can be used as voice commands to \r
116          * @param isMediaApp - Indicates if the app is a media application.\r
117          * @param smartDeviceLinkMsgVersion - Indicates the version of SMARTDEVICELINK SmartDeviceLink Messages desired. Must be less than\r
118          * or equal to the version of SMARTDEVICELINK SmartDeviceLink running on the vehicle. \r
119          * @param languageDesired - Indicates the language desired for the SMARTDEVICELINK interface.\r
120          * @param autoActivateID - ID used to re-register previously registered application.\r
121          * @throws SmartDeviceLinkException\r
122          */\r
123         public SmartDeviceLinkProxyALM(IProxyListenerALM listener, SmartDeviceLinkProxyConfigurationResources smartDeviceLinkProxyConfigurationResources, \r
124                         String appName, String ngnMediaScreenAppName, Vector<String> vrSynonyms, \r
125                         Boolean isMediaApp, smartdevicelinkMsgVersion smartDeviceLinkMsgVersion, Language languageDesired, \r
126                         Language hmiDisplayLanguageDesired, String appID, String autoActivateID) throws SmartDeviceLinkException {\r
127                 super(  listener, \r
128                                 smartDeviceLinkProxyConfigurationResources, \r
129                                 /*enable advanced lifecycle management*/true, \r
130                                 appName,\r
131                                 /*TTS Name*/null,\r
132                                 ngnMediaScreenAppName,\r
133                                 vrSynonyms,\r
134                                 isMediaApp,\r
135                                 smartDeviceLinkMsgVersion,\r
136                                 languageDesired,\r
137                                 /*HMI Display Language Desired*/hmiDisplayLanguageDesired,\r
138                                 /*App Type*/null,\r
139                                 /*App ID*/appID,\r
140                                 autoActivateID,\r
141                                 /*callbackToUIThread*/ false,\r
142                                 new BTTransportConfig());\r
143                 \r
144                 SmartDeviceLinkTrace.logProxyEvent("Application constructed SmartDeviceLinkProxyALM (using legacy constructor for BT transport) instance passing in: IProxyListener, smartDeviceLinkProxyConfigurationResources, " +\r
145                                 "appName, ngnMediaScreenAppName, vrSynonyms, isMediaApp, smartDeviceLinkMsgVersion, languageDesired, and autoActivateID.", SMARTDEVICELINK_LIB_TRACE_KEY);\r
146         }\r
147         \r
148         /**\r
149          * Constructor for the SmartDeviceLinkProxy object, the proxy for communicating between the App and SMARTDEVICELINK.\r
150          * \r
151          * Takes advantage of the advanced lifecycle management. \r
152          * \r
153          * @param listener - Reference to the object in the App listening to callbacks from SMARTDEVICELINK. \r
154          * @param appName - Name of the application displayed on SMARTDEVICELINK. \r
155          * @param ngnMediaScreenAppName - Name of the application displayed on SMARTDEVICELINK for Navigation equipped \r
156          * vehicles. Limited to five characters. \r
157          * @param vrSynonyms - A vector of strings, all of which can be used as voice commands to \r
158          * @param isMediaApp - Indicates if the app is a media application.\r
159          * @param smartDeviceLinkMsgVersion - Indicates the version of SMARTDEVICELINK SmartDeviceLink Messages desired. Must be less than\r
160          * or equal to the version of SMARTDEVICELINK SmartDeviceLink running on the vehicle. \r
161          * @param languageDesired - Indicates the language desired for the SMARTDEVICELINK interface.\r
162          * @param autoActivateID - ID used to re-register previously registered application.\r
163          * @param callbackToUIThread - If true, all callbacks will occur on the UI thread.\r
164          * @throws SmartDeviceLinkException\r
165          */\r
166         public SmartDeviceLinkProxyALM(IProxyListenerALM listener, String appName, String ngnMediaScreenAppName, \r
167                         Vector<String> vrSynonyms, Boolean isMediaApp, smartdevicelinkMsgVersion smartDeviceLinkMsgVersion, \r
168                         Language languageDesired, Language hmiDisplayLanguageDesired, String appID, \r
169                         String autoActivateID, boolean callbackToUIThread) throws SmartDeviceLinkException {\r
170                 super(  listener, \r
171                                 /*smartDeviceLink proxy configuration resources*/null,\r
172                                 /*enable advanced lifecycle management*/true, \r
173                                 appName,\r
174                                 /*TTS Name*/null,\r
175                                 ngnMediaScreenAppName,\r
176                                 vrSynonyms,\r
177                                 isMediaApp,\r
178                                 smartDeviceLinkMsgVersion,\r
179                                 languageDesired,\r
180                                 /*HMI Display Language Desired*/hmiDisplayLanguageDesired,\r
181                                 /*App Type*/null,\r
182                                 /*App ID*/appID,\r
183                                 autoActivateID,\r
184                                 callbackToUIThread,\r
185                                 new BTTransportConfig());\r
186                 \r
187                 SmartDeviceLinkTrace.logProxyEvent("Application constructed SmartDeviceLinkProxyALM (using legacy constructor for BT transport) instance passing in: IProxyListener, " +\r
188                                 "appName, ngnMediaScreenAppName, vrSynonyms, isMediaApp, smartDeviceLinkMsgVersion, languageDesired, autoActivateID, " +\r
189                                 "and callbackToUIThread", SMARTDEVICELINK_LIB_TRACE_KEY);\r
190         }\r
191         \r
192         /**\r
193          * Constructor for the SmartDeviceLinkProxy object, the proxy for communicating between the App and SMARTDEVICELINK.\r
194          * \r
195          * Takes advantage of the advanced lifecycle management. \r
196          * \r
197          * @param listener - Reference to the object in the App listening to callbacks from SMARTDEVICELINK. \r
198          * @param appName - Name of the application displayed on SMARTDEVICELINK. \r
199          * @param ngnMediaScreenAppName - Name of the application displayed on SMARTDEVICELINK for Navigation equipped \r
200          * vehicles. Limited to five characters. \r
201          * @param vrSynonyms - A vector of strings, all of which can be used as voice commands to \r
202          * @param isMediaApp - Indicates if the app is a media application.\r
203          * @param smartDeviceLinkMsgVersion - Indicates the version of SMARTDEVICELINK SmartDeviceLink Messages desired. Must be less than\r
204          * or equal to the version of SMARTDEVICELINK SmartDeviceLink running on the vehicle. \r
205          * @param languageDesired - Indicates the language desired for the SMARTDEVICELINK interface.\r
206          * @param autoActivateID - ID used to re-register previously registered application.\r
207          * @param callbackToUIThread - If true, all callbacks will occur on the UI thread.\r
208          * @throws SmartDeviceLinkException\r
209          */\r
210         public SmartDeviceLinkProxyALM(IProxyListenerALM listener, SmartDeviceLinkProxyConfigurationResources smartDeviceLinkProxyConfigurationResources, \r
211                         String appName, String ngnMediaScreenAppName, Vector<String> vrSynonyms, Boolean isMediaApp, \r
212                         smartdevicelinkMsgVersion smartDeviceLinkMsgVersion, Language languageDesired, Language hmiDisplayLanguageDesired, \r
213                         String appID, String autoActivateID, \r
214                         boolean callbackToUIThread) throws SmartDeviceLinkException {\r
215                 super(  listener, \r
216                                 smartDeviceLinkProxyConfigurationResources,\r
217                                 /*enable advanced lifecycle management*/true, \r
218                                 appName,\r
219                                 /*TTS Name*/null,\r
220                                 ngnMediaScreenAppName,\r
221                                 vrSynonyms,\r
222                                 isMediaApp,\r
223                                 smartDeviceLinkMsgVersion,\r
224                                 languageDesired,\r
225                                 /*HMI Display Language Desired*/hmiDisplayLanguageDesired,\r
226                                 /*App Type*/null,\r
227                                 /*App ID*/appID,\r
228                                 autoActivateID,\r
229                                 callbackToUIThread,\r
230                                 new BTTransportConfig());\r
231                 \r
232                 SmartDeviceLinkTrace.logProxyEvent("Application constructed SmartDeviceLinkProxyALM (using legacy constructor for BT transport) instance passing in: IProxyListener, smartDeviceLinkProxyConfigurationResources, " +\r
233                                 "appName, ngnMediaScreenAppName, vrSynonyms, isMediaApp, smartDeviceLinkMsgVersion, languageDesired, autoActivateID, " +\r
234                                 "and callbackToUIThread", SMARTDEVICELINK_LIB_TRACE_KEY);\r
235         }\r
236         \r
237         public SmartDeviceLinkProxyALM(IProxyListenerALM listener, SmartDeviceLinkProxyConfigurationResources smartDeviceLinkProxyConfigurationResources, \r
238                         String appName, String ngnMediaScreenAppName, Vector<String> vrSynonyms, Boolean isMediaApp, \r
239                         smartdevicelinkMsgVersion smartDeviceLinkMsgVersion, Language languageDesired, Language hmiDisplayLanguageDesired, \r
240                         String appID, String autoActivateID, boolean callbackToUIThread, boolean preRegister) throws SmartDeviceLinkException {\r
241                 super(  listener, \r
242                                 smartDeviceLinkProxyConfigurationResources,\r
243                                 /*enable advanced lifecycle management*/true, \r
244                                 appName,\r
245                                 /*TTS Name*/null,\r
246                                 ngnMediaScreenAppName,\r
247                                 vrSynonyms,\r
248                                 isMediaApp,\r
249                                 smartDeviceLinkMsgVersion,\r
250                                 languageDesired,\r
251                                 /*HMI Display Language Desired*/hmiDisplayLanguageDesired,\r
252                                 /*App Type*/null,\r
253                                 /*App ID*/appID,\r
254                                 autoActivateID,\r
255                                 callbackToUIThread,\r
256                                 preRegister,\r
257                                 new BTTransportConfig());\r
258                 \r
259                 SmartDeviceLinkTrace.logProxyEvent("Application constructed SmartDeviceLinkProxyALM (using legacy constructor for BT transport) instance passing in: IProxyListener, smartDeviceLinkProxyConfigurationResources, " +\r
260                                 "appName, ngnMediaScreenAppName, vrSynonyms, isMediaApp, smartDeviceLinkMsgVersion, languageDesired, autoActivateID, " +\r
261                                 "callbackToUIThread and version", SMARTDEVICELINK_LIB_TRACE_KEY);\r
262         }\r
263         \r
264         /********************************************** TRANSPORT SWITCHING SUPPORT *****************************************/\r
265 \r
266         /**\r
267          * Constructor for the SmartDeviceLinkProxy object, the proxy for communicating between the App and SMARTDEVICELINK via specified transport.\r
268          * \r
269          * Takes advantage of the advanced lifecycle management.\r
270          * \r
271          * @param listener Reference to the object in the App listening to callbacks from SMARTDEVICELINK. \r
272          * @param appName Name of the application displayed on SMARTDEVICELINK. \r
273          * @param isMediaApp Indicates if the app is a media application.\r
274          * @param transportConfig Initial configuration for transport.\r
275          * @throws SmartDeviceLinkException\r
276          */\r
277         public SmartDeviceLinkProxyALM(IProxyListenerALM listener, String appName, Boolean isMediaApp, \r
278                         Language languageDesired, Language hmiDisplayLanguageDesired, String appID,\r
279                         BaseTransportConfig transportConfig) throws SmartDeviceLinkException {\r
280                 super(  listener, \r
281                                 /*smartDeviceLink proxy configuration resources*/null, \r
282                                 /*enable advanced lifecycle management*/true, \r
283                                 appName,\r
284                                 /*TTS Name*/null,\r
285                                 /*ngn media app*/null,\r
286                                 /*vr synonyms*/null,\r
287                                 /*is media app*/isMediaApp,\r
288                                 /*smartDeviceLinkMsgVersion*/null,\r
289                                 /*language desired*/languageDesired,\r
290                                 /*HMI Display Language Desired*/hmiDisplayLanguageDesired,\r
291                                 /*App Type*/null,\r
292                                 /*App ID*/appID,\r
293                                 /*autoActivateID*/null,\r
294                                 /*callbackToUIThread*/ false,\r
295                                 transportConfig);\r
296                 \r
297                 SmartDeviceLinkTrace.logProxyEvent("Application constructed SmartDeviceLinkProxyALM (using new constructor with specified transport) instance passing in: IProxyListener, appName, and isMediaApp.", SMARTDEVICELINK_LIB_TRACE_KEY);\r
298         }\r
299         \r
300         /**\r
301          * Constructor for the SmartDeviceLinkProxy object, the proxy for communicating between the App and SMARTDEVICELINK via specified transport.\r
302          * \r
303          * Takes advantage of the advanced lifecycle management. \r
304          * \r
305          * @param listener Reference to the object in the App listening to callbacks from SMARTDEVICELINK. \r
306          * @param appName Name of the application displayed on SMARTDEVICELINK. \r
307          * @param ngnMediaScreenAppName Name of the application displayed on SMARTDEVICELINK for Navigation equipped \r
308          * vehicles. Limited to five characters. \r
309          * @param vrSynonyms A vector of strings, all of which can be used as voice commands to \r
310          * @param isMediaApp Indicates if the app is a media application.\r
311          * @param smartDeviceLinkMsgVersion Indicates the version of SMARTDEVICELINK SmartDeviceLink Messages desired. Must be less than\r
312          * or equal to the version of SMARTDEVICELINK SmartDeviceLink running on the vehicle. \r
313          * @param languageDesired Indicates the language desired for the SMARTDEVICELINK interface.\r
314          * @param autoActivateID ID used to re-register previously registered application.\r
315          * @param transportConfig Initial configuration for transport. \r
316          * @throws SmartDeviceLinkException\r
317          */\r
318         public SmartDeviceLinkProxyALM(IProxyListenerALM listener, String appName, String ngnMediaScreenAppName, \r
319                         Vector<String> vrSynonyms, Boolean isMediaApp, smartdevicelinkMsgVersion smartDeviceLinkMsgVersion, \r
320                         Language languageDesired, Language hmiDisplayLanguageDesired, String appID, \r
321                         String autoActivateID, TransportType transportType, BaseTransportConfig transportConfig) throws SmartDeviceLinkException {\r
322                 super(  listener, \r
323                                 /*smartDeviceLink proxy configuration resources*/null, \r
324                                 /*enable advanced lifecycle management*/true, \r
325                                 appName,\r
326                                 /*TTS Name*/null,\r
327                                 ngnMediaScreenAppName,\r
328                                 vrSynonyms,\r
329                                 isMediaApp,\r
330                                 smartDeviceLinkMsgVersion,\r
331                                 languageDesired,\r
332                                 /*HMI Display Language Desired*/hmiDisplayLanguageDesired,\r
333                                 /*App Type*/null,\r
334                                 /*App ID*/appID,\r
335                                 autoActivateID,\r
336                                 /*callbackToUIThread*/ false,\r
337                                 transportConfig);\r
338                 \r
339                 SmartDeviceLinkTrace.logProxyEvent("Application constructed SmartDeviceLinkProxyALM (using new constructor with specified transport) instance passing in: IProxyListener, appName, ngnMediaScreenAppName, " +\r
340                                 "vrSynonyms, isMediaApp, smartDeviceLinkMsgVersion, languageDesired, and autoActivateID.", SMARTDEVICELINK_LIB_TRACE_KEY);\r
341         }\r
342         \r
343         /**\r
344          * Constructor for the SmartDeviceLinkProxy object, the proxy for communicating between the App and SMARTDEVICELINK via specified transport.\r
345          * \r
346          * Takes advantage of the advanced lifecycle management. \r
347          * \r
348          * @param listener Reference to the object in the App listening to callbacks from SMARTDEVICELINK. \r
349          * @param appName Name of the application displayed on SMARTDEVICELINK. \r
350          * @param ngnMediaScreenAppName Name of the application displayed on SMARTDEVICELINK for Navigation equipped \r
351          * vehicles. Limited to five characters. \r
352          * @param vrSynonyms A vector of strings, all of which can be used as voice commands to \r
353          * @param isMediaApp Indicates if the app is a media application.\r
354          * @param smartDeviceLinkMsgVersion Indicates the version of SMARTDEVICELINK SmartDeviceLink Messages desired. Must be less than\r
355          * or equal to the version of SMARTDEVICELINK SmartDeviceLink running on the vehicle. \r
356          * @param languageDesired Indicates the language desired for the SMARTDEVICELINK interface.\r
357          * @param autoActivateID ID used to re-register previously registered application.\r
358          * @param transportConfig Initial configuration for transport. \r
359          * @throws SmartDeviceLinkException\r
360          */\r
361         public SmartDeviceLinkProxyALM(IProxyListenerALM listener, SmartDeviceLinkProxyConfigurationResources smartDeviceLinkProxyConfigurationResources, \r
362                         String appName, String ngnMediaScreenAppName, Vector<String> vrSynonyms, \r
363                         Boolean isMediaApp, smartdevicelinkMsgVersion smartDeviceLinkMsgVersion, Language languageDesired, \r
364                         Language hmiDisplayLanguageDesired, String appID, String autoActivateID,\r
365                         BaseTransportConfig transportConfig) throws SmartDeviceLinkException {\r
366                 super(  listener, \r
367                                 smartDeviceLinkProxyConfigurationResources, \r
368                                 /*enable advanced lifecycle management*/true, \r
369                                 appName,\r
370                                 /*TTS Name*/null,\r
371                                 ngnMediaScreenAppName,\r
372                                 vrSynonyms,\r
373                                 isMediaApp,\r
374                                 smartDeviceLinkMsgVersion,\r
375                                 languageDesired,\r
376                                 /*HMI Display Language Desired*/hmiDisplayLanguageDesired,\r
377                                 /*App Type*/null,\r
378                                 /*App ID*/appID,\r
379                                 autoActivateID,\r
380                                 /*callbackToUIThread*/ false,\r
381                                 transportConfig);\r
382                 \r
383                 SmartDeviceLinkTrace.logProxyEvent("Application constructed SmartDeviceLinkProxyALM (using new constructor with specified transport) instance passing in: IProxyListener, smartDeviceLinkProxyConfigurationResources, " +\r
384                                 "appName, ngnMediaScreenAppName, vrSynonyms, isMediaApp, smartDeviceLinkMsgVersion, languageDesired, and autoActivateID.", SMARTDEVICELINK_LIB_TRACE_KEY);\r
385         }\r
386         \r
387         /**\r
388          * Constructor for the SmartDeviceLinkProxy object, the proxy for communicating between the App and SMARTDEVICELINK via specified transport.\r
389          * \r
390          * Takes advantage of the advanced lifecycle management. \r
391          * \r
392          * @param listener Reference to the object in the App listening to callbacks from SMARTDEVICELINK. \r
393          * @param appName Name of the application displayed on SMARTDEVICELINK. \r
394          * @param ngnMediaScreenAppName Name of the application displayed on SMARTDEVICELINK for Navigation equipped \r
395          * vehicles. Limited to five characters. \r
396          * @param vrSynonyms A vector of strings, all of which can be used as voice commands to \r
397          * @param isMediaApp Indicates if the app is a media application.\r
398          * @param smartDeviceLinkMsgVersion Indicates the version of SMARTDEVICELINK SmartDeviceLink Messages desired. Must be less than\r
399          * or equal to the version of SMARTDEVICELINK SmartDeviceLink running on the vehicle. \r
400          * @param languageDesired Indicates the language desired for the SMARTDEVICELINK interface.\r
401          * @param autoActivateID ID used to re-register previously registered application.\r
402          * @param callbackToUIThread If true, all callbacks will occur on the UI thread.\r
403          * @param transportConfig Initial configuration for transport. \r
404          * @throws SmartDeviceLinkException\r
405          */\r
406         public SmartDeviceLinkProxyALM(IProxyListenerALM listener, String appName, String ngnMediaScreenAppName, \r
407                         Vector<String> vrSynonyms, Boolean isMediaApp, smartdevicelinkMsgVersion smartDeviceLinkMsgVersion, \r
408                         Language languageDesired, Language hmiDisplayLanguageDesired, String appID, \r
409                         String autoActivateID, boolean callbackToUIThread, \r
410                         BaseTransportConfig transportConfig) throws SmartDeviceLinkException {\r
411                 super(  listener, \r
412                                 /*smartDeviceLink proxy configuration resources*/null,\r
413                                 /*enable advanced lifecycle management*/true, \r
414                                 appName,\r
415                                 /*TTS Name*/null,\r
416                                 ngnMediaScreenAppName,\r
417                                 vrSynonyms,\r
418                                 isMediaApp,\r
419                                 smartDeviceLinkMsgVersion,\r
420                                 languageDesired,\r
421                                 /*HMI Display Language Desired*/hmiDisplayLanguageDesired,\r
422                                 /*App Type*/null,\r
423                                 /*App ID*/appID,\r
424                                 autoActivateID,\r
425                                 callbackToUIThread,\r
426                                 transportConfig);\r
427                 \r
428                 SmartDeviceLinkTrace.logProxyEvent("Application constructed SmartDeviceLinkProxyALM (using new constructor with specified transport) instance passing in: IProxyListener, " +\r
429                                 "appName, ngnMediaScreenAppName, vrSynonyms, isMediaApp, smartDeviceLinkMsgVersion, languageDesired, autoActivateID, " +\r
430                                 "and callbackToUIThread", SMARTDEVICELINK_LIB_TRACE_KEY);\r
431         }\r
432         \r
433         /**\r
434          * Constructor for the SmartDeviceLinkProxy object, the proxy for communicating between the App and SMARTDEVICELINK via specified transport.\r
435          * \r
436          * Takes advantage of the advanced lifecycle management. \r
437          * \r
438          * @param listener Reference to the object in the App listening to callbacks from SMARTDEVICELINK. \r
439          * @param appName Name of the application displayed on SMARTDEVICELINK. \r
440          * @param ngnMediaScreenAppName Name of the application displayed on SMARTDEVICELINK for Navigation equipped \r
441          * vehicles. Limited to five characters.\r
442          * @param vrSynonyms A vector of strings, all of which can be used as voice commands too\r
443          * @param isMediaApp Indicates if the app is a media application.\r
444          * @param smartDeviceLinkMsgVersion Indicates the version of SMARTDEVICELINK SmartDeviceLink Messages desired. Must be less than\r
445          * or equal to the version of SMARTDEVICELINK SmartDeviceLink running on the vehicle. \r
446          * @param languageDesired Indicates the language desired for the SMARTDEVICELINK interface.\r
447          * @param autoActivateID ID used to re-register previously registered application.\r
448          * @param callbackToUIThread If true, all callbacks will occur on the UI thread.\r
449          * @param transportConfig Initial configuration for transport. \r
450          * @throws SmartDeviceLinkException\r
451          */\r
452         public SmartDeviceLinkProxyALM(IProxyListenerALM listener, SmartDeviceLinkProxyConfigurationResources smartDeviceLinkProxyConfigurationResources, \r
453                         String appName, String ngnMediaScreenAppName, Vector<String> vrSynonyms, Boolean isMediaApp, \r
454                         smartdevicelinkMsgVersion smartDeviceLinkMsgVersion, Language languageDesired, Language hmiDisplayLanguageDesired, \r
455                         String appID, String autoActivateID, \r
456                         boolean callbackToUIThread, BaseTransportConfig transportConfig) throws SmartDeviceLinkException {\r
457                 super(  listener, \r
458                                 smartDeviceLinkProxyConfigurationResources,\r
459                                 /*enable advanced lifecycle management*/true, \r
460                                 appName,\r
461                                 /*TTS Name*/null,\r
462                                 ngnMediaScreenAppName,\r
463                                 vrSynonyms,\r
464                                 isMediaApp,\r
465                                 smartDeviceLinkMsgVersion,\r
466                                 languageDesired,\r
467                                 /*HMI Display Language Desired*/hmiDisplayLanguageDesired,\r
468                                 /*App Type*/null,\r
469                                 /*App ID*/appID,\r
470                                 autoActivateID,\r
471                                 callbackToUIThread,\r
472                                 transportConfig);\r
473                 \r
474                 SmartDeviceLinkTrace.logProxyEvent("Application constructed SmartDeviceLinkProxyALM (using new constructor with specified transport) instance passing in: IProxyListener, smartDeviceLinkProxyConfigurationResources, " +\r
475                                 "appName, ngnMediaScreenAppName, vrSynonyms, isMediaApp, smartDeviceLinkMsgVersion, languageDesired, autoActivateID, " +\r
476                                 "and callbackToUIThread", SMARTDEVICELINK_LIB_TRACE_KEY);\r
477         }\r
478 \r
479         /**\r
480          * Constructor for the SmartDeviceLinkProxy object, the proxy for communicating between the App and SMARTDEVICELINK via specified transport.\r
481          * \r
482          * Takes advantage of the advanced lifecycle management. \r
483          * \r
484          * @param listener Reference to the object in the App listening to callbacks from SMARTDEVICELINK.\r
485          * @param smartDeviceLinkProxyConfigurationResources Proxy configuration resources.\r
486          * @param appName Name of the application displayed on SMARTDEVICELINK.\r
487          * @param ngnMediaScreenAppName Name of the application displayed on SMARTDEVICELINK for Navigation equipped \r
488          * vehicles. Limited to five characters.\r
489          * @param vrSynonyms A vector of strings, all of which can be used as voice commands too\r
490          * @param isMediaApp Indicates if the app is a media application.\r
491          * @param smartDeviceLinkMsgVersion Indicates the version of SMARTDEVICELINK SmartDeviceLink Messages desired. Must be less than\r
492          * or equal to the version of SMARTDEVICELINK SmartDeviceLink running on the vehicle.\r
493          * @param languageDesired Indicates the language desired for the SMARTDEVICELINK interface.\r
494          * @param hmiDisplayLanguageDesired Desired language in HMI.\r
495          * @param appID Identifier of the client application.\r
496          * @param autoActivateID ID used to re-register previously registered application.\r
497          * @param callbackToUIThread If true, all callbacks will occur on the UI thread.\r
498          * @param preRegister Flag that indicates that client should be pre-registred or not\r
499          * @param transportConfig Initial configuration for transport. \r
500          * @throws SmartDeviceLinkException\r
501          */\r
502         public SmartDeviceLinkProxyALM(IProxyListenerALM listener, SmartDeviceLinkProxyConfigurationResources smartDeviceLinkProxyConfigurationResources, \r
503                         String appName, String ngnMediaScreenAppName, Vector<String> vrSynonyms, Boolean isMediaApp, \r
504                         smartdevicelinkMsgVersion smartDeviceLinkMsgVersion, Language languageDesired, Language hmiDisplayLanguageDesired, \r
505                         String appID, String autoActivateID, boolean callbackToUIThread, boolean preRegister,\r
506                         BaseTransportConfig transportConfig) throws SmartDeviceLinkException {\r
507                 super(  listener, \r
508                                 smartDeviceLinkProxyConfigurationResources,\r
509                                 /*enable advanced lifecycle management*/true, \r
510                                 appName,\r
511                                 /*TTS Name*/null,\r
512                                 ngnMediaScreenAppName,\r
513                                 vrSynonyms,\r
514                                 isMediaApp,\r
515                                 smartDeviceLinkMsgVersion,\r
516                                 languageDesired,\r
517                                 /*HMI Display Language Desired*/hmiDisplayLanguageDesired,\r
518                                 /*App Type*/null,\r
519                                 /*App ID*/appID,\r
520                                 autoActivateID,\r
521                                 callbackToUIThread,\r
522                                 preRegister,\r
523                                 transportConfig);\r
524                 \r
525                 SmartDeviceLinkTrace.logProxyEvent("Application constructed SmartDeviceLinkProxyALM (using new constructor with specified transport) instance passing in: IProxyListener, smartDeviceLinkProxyConfigurationResources, " +\r
526                                 "appName, ngnMediaScreenAppName, vrSynonyms, isMediaApp, smartDeviceLinkMsgVersion, languageDesired, autoActivateID, " +\r
527                                 "callbackToUIThread and version", SMARTDEVICELINK_LIB_TRACE_KEY);\r
528         }\r
529 \r
530         /**\r
531          * Constructor for the SmartDeviceLinkProxy object, the proxy for communicating between the App and SMARTDEVICELINK via specified transport.\r
532          * \r
533          * Takes advantage of the advanced lifecycle management. \r
534          * \r
535          * @param listener Reference to the object in the App listening to callbacks from SMARTDEVICELINK.\r
536          * @param appName Name of the application displayed on SMARTDEVICELINK.\r
537          * @param isMediaApp Indicates if the app is a media application.\r
538          * @param languageDesired Indicates the language desired for the SMARTDEVICELINK interface.\r
539          * @param hmiDisplayLanguageDesired Desired language in HMI.\r
540          * @param appID Identifier of the client application.\r
541          * @param callbackToUIThread If true, all callbacks will occur on the UI thread.\r
542          * @param preRegister Flag that indicates that client should be pre-registred or not\r
543          * @throws SmartDeviceLinkException\r
544          */     \r
545         public SmartDeviceLinkProxyALM(IProxyListenerALM listener, String appName, Boolean isMediaApp,Language languageDesired, Language hmiDisplayLanguageDesired,\r
546                                                 String appID, boolean callbackToUIThread, boolean preRegister) throws SmartDeviceLinkException \r
547         {\r
548                 super(  listener, \r
549                         /*smartDeviceLinkProxyConfigurationResources*/null,\r
550                         /*enable advanced lifecycle management*/true, \r
551                         appName,\r
552                         /*ttsName*/null,\r
553                         /*ngnMediaScreenAppName*/null,\r
554                         /*vrSynonyms*/null,\r
555                         isMediaApp,\r
556                         /*smartDeviceLinkMsgVersion*/null,\r
557                         languageDesired,\r
558                         hmiDisplayLanguageDesired,\r
559                         /*App Type*/null,\r
560                         /*App ID*/appID,\r
561                         /*autoActivateID*/null,\r
562                         callbackToUIThread,\r
563                         preRegister,\r
564                         new BTTransportConfig());\r
565                 \r
566                 SmartDeviceLinkTrace.logProxyEvent("Application constructed SmartDeviceLinkProxyALM (using legacy constructor for BT transport) instance passing in: IProxyListener, " +\r
567                         "appName, isMediaApp, languageDesired, hmiDisplayLanguageDesired" + "callbackToUIThread and version", SMARTDEVICELINK_LIB_TRACE_KEY);\r
568         }\r
569         \r
570         /**\r
571          * Constructor for the SmartDeviceLinkProxy object, the proxy for communicating between the App and SMARTDEVICELINK via specified transport.\r
572          * \r
573          * Takes advantage of the advanced lifecycle management. \r
574          * \r
575          * @param listener Reference to the object in the App listening to callbacks from SMARTDEVICELINK.\r
576          * @param appName Name of the application displayed on SMARTDEVICELINK.\r
577          * @param isMediaApp Indicates if the app is a media application.\r
578          * @param appID Identifier of the client application.\r
579          * @throws SmartDeviceLinkException\r
580          */             \r
581         public SmartDeviceLinkProxyALM(IProxyListenerALM listener, String appName, Boolean isMediaApp,String appID) throws SmartDeviceLinkException {\r
582                 super(  listener, \r
583                                 /*smartDeviceLinkProxyConfigurationResources*/null,\r
584                                 /*enable advanced lifecycle management*/true, \r
585                                 appName,\r
586                                 /*ttsName*/null,\r
587                                 /*ngnMediaScreenAppName*/null,\r
588                                 /*vrSynonyms*/null,\r
589                                 isMediaApp,\r
590                                 /*smartDeviceLinkMsgVersion*/null,\r
591                                 /*languageDesired*/null,\r
592                                 /*hmiDisplayLanguageDesired*/null,\r
593                                 /*App Type*/null,\r
594                                 /*App ID*/appID,\r
595                                 /*autoActivateID*/null,\r
596                                 false,\r
597                                 false,\r
598                                 new BTTransportConfig());\r
599                 \r
600                 SmartDeviceLinkTrace.logProxyEvent("Application constructed SmartDeviceLinkProxyALM (using legacy constructor for BT transport) instance passing in: IProxyListener, " +\r
601                                 "appName, isMediaApp, appID", SMARTDEVICELINK_LIB_TRACE_KEY);\r
602         }\r
603 \r
604         \r
605         \r
606         /**\r
607          * Constructor for the SmartDeviceLinkProxy object, the proxy for communicating between the App and SMARTDEVICELINK via specified transport.\r
608          * \r
609          * Takes advantage of the advanced lifecycle management. \r
610          * \r
611          * @param listener Reference to the object in the App listening to callbacks from SMARTDEVICELINK.\r
612          * @param appName Name of the application displayed on SMARTDEVICELINK.\r
613          * @param isMediaApp Indicates if the app is a media application.\r
614          * @param appID Identifier of the client application.\r
615          * @param callbackToUIThread If true, all callbacks will occur on the UI thread.\r
616          * @param preRegister Flag that indicates that client should be pre-registred or not\r
617          * @throws SmartDeviceLinkException\r
618          */             \r
619         public SmartDeviceLinkProxyALM(IProxyListenerALM listener, String appName, Boolean isMediaApp,String appID, \r
620                                                  boolean callbackToUIThread, boolean preRegister) throws SmartDeviceLinkException {\r
621                 super(  listener, \r
622                                 /*smartDeviceLinkProxyConfigurationResources*/null,\r
623                                 /*enable advanced lifecycle management*/true, \r
624                                 appName,\r
625                                 /*ttsName*/null,\r
626                                 /*ngnMediaScreenAppName*/null,\r
627                                 /*vrSynonyms*/null,\r
628                                 isMediaApp,\r
629                                 /*smartDeviceLinkMsgVersion*/null,\r
630                                 /*languageDesired*/null,\r
631                                 /*hmiDisplayLanguageDesired*/null,\r
632                                 /*App Type*/null,\r
633                                 /*App ID*/appID,\r
634                                 /*autoActivateID*/null,\r
635                                 callbackToUIThread,\r
636                                 preRegister,\r
637                                 new BTTransportConfig());\r
638                 \r
639                 SmartDeviceLinkTrace.logProxyEvent("Application constructed SmartDeviceLinkProxyALM (using legacy constructor for BT transport) instance passing in: IProxyListener, " +\r
640                                 "appName, isMediaApp, " + "callbackToUIThread and version", SMARTDEVICELINK_LIB_TRACE_KEY);\r
641         }\r
642 \r
643         /**\r
644          * Constructor for the SmartDeviceLinkProxy object, the proxy for communicating between the App and SMARTDEVICELINK via specified transport.\r
645          * \r
646          * Takes advantage of the advanced lifecycle management. \r
647          * @param appService Reference to the apps service object. \r
648          * @param listener Reference to the object in the App listening to callbacks from SMARTDEVICELINK.\r
649          * @param smartDeviceLinkProxyConfigurationResources Proxy configuration resources.\r
650          * @param appName Name of the application displayed on SMARTDEVICELINK.\r
651          * @param ttsName TTS name.\r
652          * @param ngnMediaScreenAppName Name of the application displayed on SMARTDEVICELINK for Navigation equipped \r
653          * vehicles. Limited to five characters.\r
654          * @param vrSynonyms A vector of strings, all of which can be used as voice commands too\r
655          * @param isMediaApp Indicates if the app is a media application.\r
656          * @param smartDeviceLinkMsgVersion Indicates the version of SMARTDEVICELINK SmartDeviceLink Messages desired. Must be less than\r
657          * or equal to the version of SMARTDEVICELINK SmartDeviceLink running on the vehicle.\r
658          * @param languageDesired Indicates the language desired for the SMARTDEVICELINK interface.\r
659          * @param hmiDisplayLanguageDesired Desired language in HMI.\r
660          * @param appID Identifier of the client application.\r
661          * @param autoActivateID ID used to re-register previously registered application.\r
662          * @param callbackToUIThread If true, all callbacks will occur on the UI thread.\r
663          * @param preRegister Flag that indicates that client should be pre-registred or not\r
664          * @throws SmartDeviceLinkException\r
665          */     \r
666         public SmartDeviceLinkProxyALM(Service appService, IProxyListenerALM listener, SmartDeviceLinkProxyConfigurationResources smartDeviceLinkProxyConfigurationResources, \r
667                         String appName, Vector<TTSChunk> ttsName, String ngnMediaScreenAppName, Vector<String> vrSynonyms, Boolean isMediaApp, \r
668                         smartdevicelinkMsgVersion smartDeviceLinkMsgVersion, Language languageDesired, Language hmiDisplayLanguageDesired, \r
669                         String appID, String autoActivateID, boolean callbackToUIThread, boolean preRegister) throws SmartDeviceLinkException {\r
670                 super(  listener, \r
671                                 smartDeviceLinkProxyConfigurationResources,\r
672                                 /*enable advanced lifecycle management*/true, \r
673                                 appName,\r
674                                 ttsName,\r
675                                 ngnMediaScreenAppName,\r
676                                 vrSynonyms,\r
677                                 isMediaApp,\r
678                                 smartDeviceLinkMsgVersion,\r
679                                 languageDesired,\r
680                                 /*HMI Display Language Desired*/hmiDisplayLanguageDesired,\r
681                                 /*App Type*/null,\r
682                                 /*App ID*/appID,\r
683                                 autoActivateID,\r
684                                 callbackToUIThread,\r
685                                 preRegister,\r
686                                 new BTTransportConfig());\r
687                 \r
688                                 this.setAppService(appService);\r
689                 SmartDeviceLinkTrace.logProxyEvent("Application constructed SmartDeviceLinkProxyALM (using legacy constructor for BT transport) instance passing in: IProxyListener, smartDeviceLinkProxyConfigurationResources, " +\r
690                                 "appName, ngnMediaScreenAppName, vrSynonyms, isMediaApp, smartDeviceLinkMsgVersion, languageDesired, autoActivateID, " +\r
691                                 "callbackToUIThread and version", SMARTDEVICELINK_LIB_TRACE_KEY);\r
692         }\r
693         \r
694         \r
695         \r
696         /**\r
697          * Constructor for the SmartDeviceLinkProxy object, the proxy for communicating between the App and SMARTDEVICELINK via specified transport.\r
698          * \r
699          * Takes advantage of the advanced lifecycle management. \r
700          * \r
701          * @param listener Reference to the object in the App listening to callbacks from SMARTDEVICELINK.\r
702          * @param smartDeviceLinkProxyConfigurationResources Proxy configuration resources.\r
703          * @param appName Name of the application displayed on SMARTDEVICELINK.\r
704          * @param ttsName TTS name.\r
705          * @param ngnMediaScreenAppName Name of the application displayed on SMARTDEVICELINK for Navigation equipped \r
706          * vehicles. Limited to five characters.\r
707          * @param vrSynonyms A vector of strings, all of which can be used as voice commands too\r
708          * @param isMediaApp Indicates if the app is a media application.\r
709          * @param smartDeviceLinkMsgVersion Indicates the version of SMARTDEVICELINK SmartDeviceLink Messages desired. Must be less than\r
710          * or equal to the version of SMARTDEVICELINK SmartDeviceLink running on the vehicle.\r
711          * @param languageDesired Indicates the language desired for the SMARTDEVICELINK interface.\r
712          * @param hmiDisplayLanguageDesired Desired language in HMI.\r
713          * @param appID Identifier of the client application.\r
714          * @param autoActivateID ID used to re-register previously registered application.\r
715          * @param callbackToUIThread If true, all callbacks will occur on the UI thread.\r
716          * @param preRegister Flag that indicates that client should be pre-registred or not\r
717          * @throws SmartDeviceLinkException\r
718          */     \r
719         public SmartDeviceLinkProxyALM(IProxyListenerALM listener, SmartDeviceLinkProxyConfigurationResources smartDeviceLinkProxyConfigurationResources, \r
720                         String appName, Vector<TTSChunk> ttsName, String ngnMediaScreenAppName, Vector<String> vrSynonyms, Boolean isMediaApp, \r
721                         smartdevicelinkMsgVersion smartDeviceLinkMsgVersion, Language languageDesired, Language hmiDisplayLanguageDesired, \r
722                         String appID, String autoActivateID, boolean callbackToUIThread, boolean preRegister) throws SmartDeviceLinkException {\r
723                 super(  listener, \r
724                                 smartDeviceLinkProxyConfigurationResources,\r
725                                 /*enable advanced lifecycle management*/true, \r
726                                 appName,\r
727                                 ttsName,\r
728                                 ngnMediaScreenAppName,\r
729                                 vrSynonyms,\r
730                                 isMediaApp,\r
731                                 smartDeviceLinkMsgVersion,\r
732                                 languageDesired,\r
733                                 /*HMI Display Language Desired*/hmiDisplayLanguageDesired,\r
734                                 /*App Type*/null,\r
735                                 /*App ID*/appID,\r
736                                 autoActivateID,\r
737                                 callbackToUIThread,\r
738                                 preRegister,\r
739                                 new BTTransportConfig());\r
740                 \r
741                 SmartDeviceLinkTrace.logProxyEvent("Application constructed SmartDeviceLinkProxyALM (using legacy constructor for BT transport) instance passing in: IProxyListener, smartDeviceLinkProxyConfigurationResources, " +\r
742                                 "appName, ngnMediaScreenAppName, vrSynonyms, isMediaApp, smartDeviceLinkMsgVersion, languageDesired, autoActivateID, " +\r
743                                 "callbackToUIThread and version", SMARTDEVICELINK_LIB_TRACE_KEY);\r
744         }\r
745 \r
746                 \r
747         /**\r
748          * Constructor for the SmartDeviceLinkProxy object, the proxy for communicating between the App and SMARTDEVICELINK via specified transport.\r
749          * \r
750          * Takes advantage of the advanced lifecycle management. \r
751          * \r
752          * @param listener Reference to the object in the App listening to callbacks from SMARTDEVICELINK.\r
753          * @param smartDeviceLinkProxyConfigurationResources Proxy configuration resources.\r
754          * @param appName Name of the application displayed on SMARTDEVICELINK.\r
755          * @param ttsName TTS name.\r
756          * @param ngnMediaScreenAppName Name of the application displayed on SMARTDEVICELINK for Navigation equipped \r
757          * vehicles. Limited to five characters.\r
758          * @param vrSynonyms A vector of strings, all of which can be used as voice commands too\r
759          * @param isMediaApp Indicates if the app is a media application.\r
760          * @param smartDeviceLinkMsgVersion Indicates the version of SMARTDEVICELINK SmartDeviceLink Messages desired. Must be less than\r
761          * or equal to the version of SMARTDEVICELINK SmartDeviceLink running on the vehicle.\r
762          * @param languageDesired Indicates the language desired for the SMARTDEVICELINK interface.\r
763          * @param hmiDisplayLanguageDesired Desired language in HMI.\r
764          * @param appID Identifier of the client application.\r
765          * @param autoActivateID ID used to re-register previously registered application.\r
766          * @param callbackToUIThread If true, all callbacks will occur on the UI thread.\r
767          * @param preRegister Flag that indicates that client should be pre-registred or not\r
768          * @param transportConfig Initial configuration for transport. \r
769          * @throws SmartDeviceLinkException\r
770          */\r
771         public SmartDeviceLinkProxyALM(IProxyListenerALM listener, SmartDeviceLinkProxyConfigurationResources smartDeviceLinkProxyConfigurationResources, \r
772                         String appName, Vector<TTSChunk> ttsName, String ngnMediaScreenAppName, Vector<String> vrSynonyms, Boolean isMediaApp, \r
773                         smartdevicelinkMsgVersion smartDeviceLinkMsgVersion, Language languageDesired, Language hmiDisplayLanguageDesired, \r
774                         String appID, String autoActivateID, boolean callbackToUIThread, boolean preRegister,\r
775                         BaseTransportConfig transportConfig) throws SmartDeviceLinkException {\r
776                 super(  listener, \r
777                                 smartDeviceLinkProxyConfigurationResources,\r
778                                 /*enable advanced lifecycle management*/true, \r
779                                 appName,\r
780                                 ttsName,\r
781                                 ngnMediaScreenAppName,\r
782                                 vrSynonyms,\r
783                                 isMediaApp,\r
784                                 smartDeviceLinkMsgVersion,\r
785                                 languageDesired,\r
786                                 /*HMI Display Language Desired*/hmiDisplayLanguageDesired,\r
787                                 /*App Type*/null,\r
788                                 /*App ID*/appID,\r
789                                 autoActivateID,\r
790                                 callbackToUIThread,\r
791                                 preRegister,\r
792                                 transportConfig);\r
793                 \r
794                 SmartDeviceLinkTrace.logProxyEvent("Application constructed SmartDeviceLinkProxyALM (using new constructor with specified transport) instance passing in: IProxyListener, smartDeviceLinkProxyConfigurationResources, " +\r
795                                 "appName, ngnMediaScreenAppName, vrSynonyms, isMediaApp, smartDeviceLinkMsgVersion, languageDesired, autoActivateID, " +\r
796                                 "callbackToUIThread and version", SMARTDEVICELINK_LIB_TRACE_KEY);\r
797         }               \r
798         \r
799         /**\r
800          * Constructor for the SmartDeviceLinkProxy object, the proxy for communicating between the App and SMARTDEVICELINK via specified transport.\r
801          * \r
802          * Takes advantage of the advanced lifecycle management. \r
803          * \r
804          * @param listener Reference to the object in the App listening to callbacks from SMARTDEVICELINK.\r
805          * @param smartDeviceLinkProxyConfigurationResources Proxy configuration resources.\r
806          * @param appName Name of the application displayed on SMARTDEVICELINK.\r
807          * @param ttsName TTS name.\r
808          * @param ngnMediaScreenAppName Name of the application displayed on SMARTDEVICELINK for Navigation equipped \r
809          * vehicles. Limited to five characters.\r
810          * @param vrSynonyms A vector of strings, all of which can be used as voice commands too\r
811          * @param isMediaApp Indicates if the app is a media application.\r
812          * @param smartDeviceLinkMsgVersion Indicates the version of SMARTDEVICELINK SmartDeviceLink Messages desired. Must be less than\r
813          * or equal to the version of SMARTDEVICELINK SmartDeviceLink running on the vehicle.\r
814          * @param languageDesired Indicates the language desired for the SMARTDEVICELINK interface.\r
815          * @param hmiDisplayLanguageDesired Desired language in HMI. \r
816          * @param appType Type of application. \r
817          * @param appID Identifier of the client application.\r
818          * @param autoActivateID ID used to re-register previously registered application.\r
819          * @param callbackToUIThread If true, all callbacks will occur on the UI thread.\r
820          * @param preRegister Flag that indicates that client should be pre-registred or not\r
821          * @throws SmartDeviceLinkException\r
822          */     \r
823         public SmartDeviceLinkProxyALM(IProxyListenerALM listener, SmartDeviceLinkProxyConfigurationResources smartDeviceLinkProxyConfigurationResources, \r
824                         String appName, Vector<TTSChunk> ttsName, String ngnMediaScreenAppName, Vector<String> vrSynonyms, Boolean isMediaApp, \r
825                         smartdevicelinkMsgVersion smartDeviceLinkMsgVersion, Language languageDesired, Language hmiDisplayLanguageDesired, \r
826                         Vector<AppHMIType> appType, String appID, String autoActivateID, boolean callbackToUIThread, boolean preRegister) throws SmartDeviceLinkException {\r
827                 super(  listener, \r
828                                 smartDeviceLinkProxyConfigurationResources,\r
829                                 /*enable advanced lifecycle management*/true, \r
830                                 appName,\r
831                                 ttsName,\r
832                                 ngnMediaScreenAppName,\r
833                                 vrSynonyms,\r
834                                 isMediaApp,\r
835                                 smartDeviceLinkMsgVersion,\r
836                                 languageDesired,\r
837                                 /*HMI Display Language Desired*/hmiDisplayLanguageDesired,\r
838                                 /*App Type*/appType,\r
839                                 /*App ID*/appID,\r
840                                 autoActivateID,\r
841                                 callbackToUIThread,\r
842                                 preRegister,\r
843                                 new BTTransportConfig());\r
844                 \r
845                 SmartDeviceLinkTrace.logProxyEvent("Application constructed SmartDeviceLinkProxyALM (using legacy constructor for BT transport) instance passing in: IProxyListener, smartDeviceLinkProxyConfigurationResources, " +\r
846                                 "appName, ngnMediaScreenAppName, vrSynonyms, isMediaApp, smartDeviceLinkMsgVersion, languageDesired, appType, appID, autoActivateID, " +\r
847                                 "callbackToUIThread and version", SMARTDEVICELINK_LIB_TRACE_KEY);\r
848         }       \r
849         \r
850         /**\r
851          * Constructor for the SmartDeviceLinkProxy object, the proxy for communicating between the App and SMARTDEVICELINK via specified transport.\r
852          * \r
853          * Takes advantage of the advanced lifecycle management. \r
854          * \r
855          * @param listener Reference to the object in the App listening to callbacks from SMARTDEVICELINK.\r
856          * @param smartDeviceLinkProxyConfigurationResources Proxy configuration resources.\r
857          * @param appName Name of the application displayed on SMARTDEVICELINK.\r
858          * @param ttsName TTS name.\r
859          * @param ngnMediaScreenAppName Name of the application displayed on SMARTDEVICELINK for Navigation equipped \r
860          * vehicles. Limited to five characters.\r
861          * @param vrSynonyms A vector of strings, all of which can be used as voice commands too\r
862          * @param isMediaApp Indicates if the app is a media application.\r
863          * @param smartDeviceLinkMsgVersion Indicates the version of SMARTDEVICELINK SmartDeviceLink Messages desired. Must be less than\r
864          * or equal to the version of SMARTDEVICELINK SmartDeviceLink running on the vehicle.\r
865          * @param languageDesired Indicates the language desired for the SMARTDEVICELINK interface.\r
866          * @param hmiDisplayLanguageDesired Desired language in HMI.\r
867          * @param appType Type of application.\r
868          * @param appID Identifier of the client application.\r
869          * @param autoActivateID ID used to re-register previously registered application.\r
870          * @param callbackToUIThread If true, all callbacks will occur on the UI thread.\r
871          * @param preRegister Flag that indicates that client should be pre-registred or not\r
872          * @param transportConfig Initial configuration for transport. \r
873          * @throws SmartDeviceLinkException\r
874          */\r
875         public SmartDeviceLinkProxyALM(IProxyListenerALM listener, SmartDeviceLinkProxyConfigurationResources smartDeviceLinkProxyConfigurationResources, \r
876                         String appName, Vector<TTSChunk> ttsName, String ngnMediaScreenAppName, Vector<String> vrSynonyms, Boolean isMediaApp, \r
877                         smartdevicelinkMsgVersion smartDeviceLinkMsgVersion, Language languageDesired, Language hmiDisplayLanguageDesired, Vector<AppHMIType> appType, \r
878                         String appID, String autoActivateID, boolean callbackToUIThread, boolean preRegister,\r
879                         BaseTransportConfig transportConfig) throws SmartDeviceLinkException {\r
880                 super(  listener, \r
881                                 smartDeviceLinkProxyConfigurationResources,\r
882                                 /*enable advanced lifecycle management*/true, \r
883                                 appName,\r
884                                 ttsName,\r
885                                 ngnMediaScreenAppName,\r
886                                 vrSynonyms,\r
887                                 isMediaApp,\r
888                                 smartDeviceLinkMsgVersion,\r
889                                 languageDesired,\r
890                                 /*HMI Display Language Desired*/hmiDisplayLanguageDesired,\r
891                                 /*App Type*/appType,\r
892                                 /*App ID*/appID,\r
893                                 autoActivateID,\r
894                                 callbackToUIThread,\r
895                                 preRegister,\r
896                                 transportConfig);\r
897                 \r
898                 SmartDeviceLinkTrace.logProxyEvent("Application constructed SmartDeviceLinkProxyALM (using new constructor with specified transport) instance passing in: IProxyListener, smartDeviceLinkProxyConfigurationResources, " +\r
899                                 "appName, ngnMediaScreenAppName, vrSynonyms, isMediaApp, smartDeviceLinkMsgVersion, languageDesired, appType, appID, autoActivateID, " +\r
900                                 "callbackToUIThread and version", SMARTDEVICELINK_LIB_TRACE_KEY);\r
901         }       \r
902         /***************************************** END OF TRANSPORT SWITCHING SUPPORT ***************************************/\r
903         \r
904         // Allow applications using ALM to reset the proxy (dispose and reinstantiate)\r
905         /**\r
906          * Disconnects the application from SMARTDEVICELINK, then recreates the transport such that\r
907          * the next time a SMARTDEVICELINK unit discovers applications, this application will be\r
908          * available.\r
909          */\r
910         public void resetProxy() throws SmartDeviceLinkException {\r
911                 super.cycleProxy(SmartDeviceLinkDisconnectedReason.APPLICATION_REQUESTED_DISCONNECT);\r
912         }\r
913         \r
914         /********* Getters for values returned by RegisterAppInterfaceResponse **********/\r
915         \r
916         /**\r
917          * Gets buttonCapabilities set when application interface is registered.\r
918          * \r
919          * @return buttonCapabilities\r
920          * @throws SmartDeviceLinkException\r
921          */\r
922         public Vector<ButtonCapabilities> getButtonCapabilities() throws SmartDeviceLinkException{\r
923                 // Test if proxy has been disposed\r
924                 if (_proxyDisposed) {\r
925                         throw new SmartDeviceLinkException("This object has been disposed, it is no long capable of executing methods.", SmartDeviceLinkExceptionCause.SMARTDEVICELINK_PROXY_DISPOSED);\r
926                 }\r
927                 \r
928                 // Test SMARTDEVICELINK availability \r
929                 if (!_appInterfaceRegisterd) {\r
930                         throw new SmartDeviceLinkException("SMARTDEVICELINK is unavailable. Unable to get the buttonCapabilities.", SmartDeviceLinkExceptionCause.SMARTDEVICELINK_UNAVAILALBE);\r
931                 }\r
932                 return _buttonCapabilities;\r
933         }\r
934         \r
935         /**\r
936          * Gets getSoftButtonCapabilities set when application interface is registered.\r
937          * \r
938          * @return softButtonCapabilities \r
939          * @throws SmartDeviceLinkException\r
940          */\r
941         public Vector<SoftButtonCapabilities> getSoftButtonCapabilities() throws SmartDeviceLinkException {\r
942                 // Test if proxy has been disposed\r
943                 if (_proxyDisposed) {\r
944                         throw new SmartDeviceLinkException("This object has been disposed, it is no long capable of executing methods.", SmartDeviceLinkExceptionCause.SMARTDEVICELINK_PROXY_DISPOSED);\r
945                 }\r
946                 \r
947                 // Test SMARTDEVICELINK availability \r
948                 if (!_appInterfaceRegisterd) {\r
949                         throw new SmartDeviceLinkException("SMARTDEVICELINK is not connected. Unable to get the softButtonCapabilities.", SmartDeviceLinkExceptionCause.SMARTDEVICELINK_UNAVAILALBE);\r
950                 }\r
951                 return _softButtonCapabilities;\r
952         }\r
953         \r
954         /**\r
955          * Gets getPresetBankCapabilities set when application interface is registered.\r
956          * \r
957          * @return presetBankCapabilities \r
958          * @throws SmartDeviceLinkException\r
959          */\r
960         public PresetBankCapabilities getPresetBankCapabilities() throws SmartDeviceLinkException {\r
961                 // Test if proxy has been disposed\r
962                 if (_proxyDisposed) {\r
963                         throw new SmartDeviceLinkException("This object has been disposed, it is no long capable of executing methods.", SmartDeviceLinkExceptionCause.SMARTDEVICELINK_PROXY_DISPOSED);\r
964                 }\r
965                 \r
966                 // Test SMARTDEVICELINK availability \r
967                 if (!_appInterfaceRegisterd) {\r
968                         throw new SmartDeviceLinkException("SMARTDEVICELINK is not connected. Unable to get the presetBankCapabilities.", SmartDeviceLinkExceptionCause.SMARTDEVICELINK_UNAVAILALBE);\r
969                 }\r
970                 return _presetBankCapabilities;\r
971         }\r
972         \r
973         /**\r
974          * Gets the current version information of the proxy.\r
975          * \r
976          * @return String\r
977          * @throws SmartDeviceLinkException\r
978          */\r
979         public String getProxyVersionInfo() throws SmartDeviceLinkException {\r
980                 // Test if proxy has been disposed\r
981                 if (_proxyDisposed) {\r
982                         throw new SmartDeviceLinkException("This object has been disposed, it is no long capable of executing methods.", SmartDeviceLinkExceptionCause.SMARTDEVICELINK_PROXY_DISPOSED);\r
983                 }               \r
984 \r
985                 if (Version.VERSION != null)\r
986                                 return  Version.VERSION;\r
987                 \r
988                 return null;\r
989         }\r
990 \r
991         \r
992         \r
993         /**\r
994          * Gets displayCapabilities set when application interface is registered.\r
995          * \r
996          * @return displayCapabilities\r
997          * @throws SmartDeviceLinkException\r
998          */\r
999         public DisplayCapabilities getDisplayCapabilities() throws SmartDeviceLinkException {\r
1000                 // Test if proxy has been disposed\r
1001                 if (_proxyDisposed) {\r
1002                         throw new SmartDeviceLinkException("This object has been disposed, it is no long capable of executing methods.", SmartDeviceLinkExceptionCause.SMARTDEVICELINK_PROXY_DISPOSED);\r
1003                 }\r
1004                 \r
1005                 // Test SMARTDEVICELINK availability \r
1006                 if (!_appInterfaceRegisterd) {\r
1007                         throw new SmartDeviceLinkException("SMARTDEVICELINK is unavailable. Unable to get the displayCapabilities.", SmartDeviceLinkExceptionCause.SMARTDEVICELINK_UNAVAILALBE);\r
1008                 }\r
1009                 return _displayCapabilities;\r
1010         }\r
1011         \r
1012         /**\r
1013          * Gets hmiZoneCapabilities set when application interface is registered.\r
1014          * \r
1015          * @return hmiZoneCapabilities\r
1016          * @throws SmartDeviceLinkException\r
1017          */\r
1018         public Vector<HmiZoneCapabilities> getHmiZoneCapabilities() throws SmartDeviceLinkException {\r
1019                 // Test if proxy has been disposed\r
1020                 if (_proxyDisposed) {\r
1021                         throw new SmartDeviceLinkException("This object has been disposed, it is no long capable of executing methods.", SmartDeviceLinkExceptionCause.SMARTDEVICELINK_PROXY_DISPOSED);\r
1022                 }\r
1023                 \r
1024                 // Test SMARTDEVICELINK availability \r
1025                 if (!_appInterfaceRegisterd) {\r
1026                         throw new SmartDeviceLinkException("SMARTDEVICELINK is unavailable. Unable to get the hmiZoneCapabilities.", SmartDeviceLinkExceptionCause.SMARTDEVICELINK_UNAVAILALBE);\r
1027                 }\r
1028                 return _hmiZoneCapabilities;\r
1029         }\r
1030         \r
1031         /**\r
1032          * Gets speechCapabilities set when application interface is registered.\r
1033          * \r
1034          * @return speechCapabilities\r
1035          * @throws SmartDeviceLinkException\r
1036          */\r
1037         public Vector<SpeechCapabilities> getSpeechCapabilities() throws SmartDeviceLinkException {\r
1038                 // Test if proxy has been disposed\r
1039                 if (_proxyDisposed) {\r
1040                         throw new SmartDeviceLinkException("This object has been disposed, it is no long capable of executing methods.", SmartDeviceLinkExceptionCause.SMARTDEVICELINK_PROXY_DISPOSED);\r
1041                 }\r
1042                 \r
1043                 // Test SMARTDEVICELINK availability \r
1044                 if (!_appInterfaceRegisterd) {\r
1045                         throw new SmartDeviceLinkException("SMARTDEVICELINK is unavailable. Unable to get the speechCapabilities.", SmartDeviceLinkExceptionCause.SMARTDEVICELINK_UNAVAILALBE);\r
1046                 }\r
1047                 \r
1048                 return _speechCapabilities;\r
1049         }\r
1050         \r
1051         /**\r
1052          * Gets smartDeviceLinkLanguage set when application interface is registered.\r
1053          * \r
1054          * @return smartDeviceLinkLanguage\r
1055          * @throws SmartDeviceLinkException\r
1056          */\r
1057         public Language getSmartDeviceLinkLanguage() throws SmartDeviceLinkException {\r
1058                 // Test if proxy has been disposed\r
1059                 if (_proxyDisposed) {\r
1060                         throw new SmartDeviceLinkException("This object has been disposed, it is no long capable of executing methods.", SmartDeviceLinkExceptionCause.SMARTDEVICELINK_PROXY_DISPOSED);\r
1061                 }\r
1062                 \r
1063                 // Test SMARTDEVICELINK availability \r
1064                 if (!_appInterfaceRegisterd) {\r
1065                         throw new SmartDeviceLinkException("SMARTDEVICELINK is unavailable. Unable to get the smartDeviceLinkLanguage.", SmartDeviceLinkExceptionCause.SMARTDEVICELINK_UNAVAILALBE);\r
1066                 }\r
1067                 return _smartDeviceLinkLanguage;\r
1068         }\r
1069         \r
1070         /**\r
1071          * Gets getHmiDisplayLanguage set when application interface is registered.\r
1072          * \r
1073          * @return hmiDisplayLanguage \r
1074          * @throws SmartDeviceLinkException\r
1075          */\r
1076         public Language getHmiDisplayLanguage() throws SmartDeviceLinkException {\r
1077                 // Test if proxy has been disposed\r
1078                 if (_proxyDisposed) {\r
1079                         throw new SmartDeviceLinkException("This object has been disposed, it is no long capable of executing methods.", SmartDeviceLinkExceptionCause.SMARTDEVICELINK_PROXY_DISPOSED);\r
1080                 }\r
1081                 \r
1082                 // Test SMARTDEVICELINK availability \r
1083                 if (!_appInterfaceRegisterd) {\r
1084                         throw new SmartDeviceLinkException("SMARTDEVICELINK is not connected. Unable to get the hmiDisplayLanguage.", SmartDeviceLinkExceptionCause.SMARTDEVICELINK_UNAVAILALBE);\r
1085                 }\r
1086                 return _hmiDisplayLanguage;\r
1087         }\r
1088         \r
1089         /**\r
1090          * Gets smartDeviceLinkMsgVersion set when application interface is registered.\r
1091          * \r
1092          * @return smartDeviceLinkMsgVersion\r
1093          * @throws SmartDeviceLinkException\r
1094          */\r
1095         public smartdevicelinkMsgVersion getsmartdevicelinkMsgVersion() throws SmartDeviceLinkException {\r
1096                 // Test if proxy has been disposed\r
1097                 if (_proxyDisposed) {\r
1098                         throw new SmartDeviceLinkException("This object has been disposed, it is no long capable of executing methods.", SmartDeviceLinkExceptionCause.SMARTDEVICELINK_PROXY_DISPOSED);\r
1099                 }\r
1100                 \r
1101                 // Test SMARTDEVICELINK availability \r
1102                 if (!_appInterfaceRegisterd) {\r
1103                         throw new SmartDeviceLinkException("SMARTDEVICELINK is unavailable. Unable to get the smartDeviceLinkMsgVersion.", SmartDeviceLinkExceptionCause.SMARTDEVICELINK_UNAVAILALBE);\r
1104                 }\r
1105                 return _smartDeviceLinkMsgVersion;\r
1106         }\r
1107         \r
1108         /**\r
1109          * Gets vrCapabilities set when application interface is registered.\r
1110          * \r
1111          * @return vrCapabilities\r
1112          * @throws SmartDeviceLinkException\r
1113          */\r
1114         public Vector<VrCapabilities> getVrCapabilities() throws SmartDeviceLinkException {\r
1115                 // Test if proxy has been disposed\r
1116                 if (_proxyDisposed) {\r
1117                         throw new SmartDeviceLinkException("This object has been disposed, it is no long capable of executing methods.", SmartDeviceLinkExceptionCause.SMARTDEVICELINK_PROXY_DISPOSED);\r
1118                 }\r
1119                 \r
1120                 // Test SMARTDEVICELINK availability \r
1121                 if (!_appInterfaceRegisterd) {\r
1122                         throw new SmartDeviceLinkException("SMARTDEVICELINK is unavailable. Unable to get the vrCapabilities.", SmartDeviceLinkExceptionCause.SMARTDEVICELINK_UNAVAILALBE);\r
1123                 }\r
1124                 return _vrCapabilities;\r
1125         }\r
1126         \r
1127         /**\r
1128          * Gets getVehicleType set when application interface is registered.\r
1129          * \r
1130          * @return vehicleType \r
1131          * @throws SmartDeviceLinkException\r
1132          */\r
1133         public VehicleType getVehicleType() throws SmartDeviceLinkException {\r
1134                 // Test if proxy has been disposed\r
1135                 if (_proxyDisposed) {\r
1136                         throw new SmartDeviceLinkException("This object has been disposed, it is no long capable of executing methods.", SmartDeviceLinkExceptionCause.SMARTDEVICELINK_PROXY_DISPOSED);\r
1137                 }\r
1138                 \r
1139                 // Test SMARTDEVICELINK availability \r
1140                 if (!_appInterfaceRegisterd) {\r
1141                         throw new SmartDeviceLinkException("SMARTDEVICELINK is not connected. Unable to get the vehicleType.", SmartDeviceLinkExceptionCause.SMARTDEVICELINK_UNAVAILALBE);\r
1142                 }\r
1143                 return _vehicleType;\r
1144         }\r
1145 }\r