Webportal

emmbedded apps

API Class

    CAR #

    OVERVIEW

    Provides the methods to manage information about the vehicle.

    METHODS SUMMARY

    Method Response Type Description
    Car.GetVINCode() String Gets the VIN code of the vehicle.
    Car.GetFuelType() Number Gets the fuel type of the vehicle.
    Car.GetSpeed() Number Gets the current speed.
    Car.GetBatteryAutonomy() Number Gets the remaining battery autonomy.
    Car.GetBatteryLevel() Number Gets the current battery level.
    Car.GetDrivingState() Boolean Gets the current driving state.
    Car.GetTime() Boolean Synchronizes time values.
    Car.Time.Hours() Number Gets current hour.
    Car.Time.Minutes() Number Gets current minute.
    Car.Time.OffsetUTC() Number Gets current offset.
    Car.GetFuelLevel() Number Gets current fuel level.
    Car.GetFuelUnit() String Gets current fuel unit.
    Car.GetMileage() Number Gets current mileage.
    Car.GetDayNightStatus() Integer Returns if the portal should use the day or night theme.

    EVENTS SUMMARY

    Event Description
    Car.driverDistractionOn Event triggered when the driving state is changed to False.
    Car.driverDistractionOff Event triggered when the driving state is changed to True.
    Car.distanceUnit Event triggered when the distance unit is changed.
    Car.fuelUnit Event triggered when the fuel unit is changed.
    Car.speedUnit Event triggered when the speed unit is changed.


    CONNECTIVITY #

    OVERVIEW

    Provides the methods to manage connectivity events.

    EVENTS SUMMARY

    Event Description
    Connectivity.connectivityOn Event triggered when the connectivity is up.
    Connectivity.connectivityOff Even triggered when the connectivity goes down.


    DEVICE #

    OVERVIEW

    Provides the methods to manage information related to general settings.

    METHODS SUMMARY

    Method Response Type Description
    Device.GetInternetStatus() String Gets the current internet status.
    Device.GetCarBrand() Integer Returns the brand of the vehicle.
    Device.GetDistanceUnit() String Gets the currently used distance unit.
    Device.GetHMIFocus() Boolean Indicates if the browser is currently in focus.
    Device.GetHMITheme() Integer Returns the index of the current theme.
    Device.GetSoftwareRelease() String Returns the value of the system version.
    Device.GetSpeedUnit() String Gets the currently used speed unit.
    Device.GetUIN() String Gets the UIN (ID Number).


    HMI #

    OVERVIEW

    Provides the methods to manage the HMI.

    EVENTS SUMMARY

    Event Description
    HMI.Settings.languageSet Event triggered when the language is changed.
    HMI.homeBtnClick Event triggered when the user clicks on the Home button.
    HMI.Settings.themeSet Event triggered when the used theme is changed.
    HMI.WebBrowser.hide Event triggered when the browser loses focus.
    HMI.WebBrowser.show Event triggered when the browser gains focus.


    MEDIA #

    OVERVIEW

    Provides the methods to interact with the Media player.

    METHODS SUMMARY

    Method Response Type Description
    Media.GetAlbumName() String Gets the album name.
    Media.GetArtistName() String Gets the artist name.
    Media.GetCurrentTrack() Number Gets the current track number.
    Media.GetFolderName() String Returns the folder where the current media is located.
    Media.GetMediaState() Number Gets the current state of the media.
    Media.GetTotalTracks() Number Gets the total number of tracks.
    Media.GetTrackName() String Gets the name of the current track.
    Media.GetTypeName() Number Returns the current media’s type.
    Media.audio.configure() None Connects or disconnects an audio source.

    EVENTS SUMMARY

    Event Description
    Media.Audio.audioAvailable Triggered when audio source is connected.
    Media.Audio.audioLost Triggered when audio source is disconnected.


    NAVIGATION #

    OVERVIEW

    Provides the methods to manage the Navigation system.

    METHODS SUMMARY

    Method Response Type Description
    Navigation.GetCurrentPositionLatitude() Number Gets the current position’s latitude in WGS84 Signed Decimal Degrees.
    Navigation.GetCurrentPositionLongitude() Number Gets the current position’s longitude in WGS84 Signed Decimal Degrees.
    Navigation.GetCurrentPosition() Boolean Retrieves the current position and store it inside Navigation.CurrentPosition.
    Navigation.GetDestination() Boolean Retrieves the current position and store it inside Navigation.Destination.
    Navigation.LaunchGuidance() Boolean Starts the navigation to the specified destination and passing through all intermediary destinations.
    Navigation.LaunchGuidanceWaypoints() Boolean Starts the navigation to the specified destination and passing through all the specified waypoints.
    Navigation.GetManeuverInfo() Boolean Retrieves information on the next maneuver and store it inside Navigation.ManeuverInfo.
    Navigation.GetJourneyInfo() Boolean Retrieves information on the estimated time of arrival at destination and store it inside Navigation.JourneyInfo.
    Navigation.GetNextWaypoint.ETAHours() Number Returns the estimated hour of arrival at the next waypoint.
    Navigation.GetNextWaypoint.ETAMinutes() Number Returns the estimated minute of arrival at the next waypoint.

    EVENTS SUMMARY

    Event Description
    Navigation.InvalidCoordinates Event triggered when at least one coordinate passed is invalid.
    Navigation.RouteCalculationSuccessful Event triggered when the calculation of itinerary was completed successfully.
    Navigation.RouteCalculationCancelled Event triggered when the calculation of itinerary was cancelled abruptly.
    Navigation.RouteCalculationFailed Event triggered when the calculation of itinerary ended with an error.
    Navigation.WebDestinationReached Event triggered when the destination has been reached.

    The Navigation events are triggered only if the Navigation was launched using either LaunchGuidance or LaunchGuidanceWaypoints and not through the car’s Navigation GUI.


    PHONE #

    OVERVIEW

    Provides the methods to manage the phone connected through Hands-Free profile.

    METHODS SUMMARY

    Method Response Type Description
    Phone.LaunchPhoneCall() boolean Initiates a phone call.


    PRIVACY #

    EXAMPLE

    Provides the methods to manage information about the privacy settings.

    METHODS SUMMARY

    Method Response Type Description
    Privacy.Mode() String Get the privacy mode

    MESSAGE SUMMARY

    Message Type Description
    Privacy.ModeFull Triggered when the user switches to the most restrictive privacy mode.
    Privacy.ModeGeoloc Triggered when the user switches to the geolocation restricted mode.
    Privacy.ModePublic Triggered when the user switches to the public privacy mode.


    RADIO #

    OVERVIEW

    Provides the methods to manage the Radio system.

    METHODS SUMMARY

    Method Response Type Description
    Radio.GetFrequency() Number Gets the current frequency.
    Radio.GetPreset() Number Gets the current preset.
    Radio.GetBand() String Gets the currently used frequency band.
    Radio.PSName() String Return the program service name.
    Radio.PTY() boolean Returns if the program type is avaiable.
    Radio.RDS() boolean Return if the current radio station supports RDS.
    Radio.Text() String Return the radio text.
    Radio.TA() boolean Returns if traffic announcement is available.


    SYSTEM #

    OVERVIEW

    Provides the methods to manage system events.

    EVENTS SUMMARY

    Event Description
    System.OnShutDown Event triggered right before the system completely shuts down.


    WEBPORTAL #

    OVERVIEW

    Provides messages corresponding to events useful for managing your app.

    Method Return Type Description
    WebPortal.getCountry() String Gets the country currently selected.
    WebPortal.getLanguage() String Gets the language currently being used.
    WebPortal.getPendingNotifications() Array Gets the notifications currently pending.
    WebPortal.openNativePopup() None Request from your application to display a disruptive popup.

    MESSAGES SUMMARY

    Message Type Description
    WebPortal.okBtnPopupRequestClicked Triggered when Ok button is clicked in popup.
    WebPortal.cancelBtnPopupRequestClicked Triggered when Cancel button is clicked in popup.
    WebPortal.closeTimeoutPopupRequest Triggered after the interval for user action (10 seconds) has passed without any user interaction.
    WebPortal.onCurrentNotificationReceived Triggered when a new notification is received.
    WebPortal.onApplicationUnloaded Triggered when the application is unloaded.
    WebPortal.onApplicationShow Triggered when the application gains focus.
    WebPortal.onApplicationHide Triggered when the application loses focus.
    WebPortal.onApplicationUpdated Triggered when the application has been updated.
    WebPortal.onApplicationLoaded Must be sent by the application when it has fully loaded.
    WebPortal.nativePopup.evt.ok Event triggered when the OK button of the native popup is clicked.
    WebPortal.nativePopup.evt.cancel Event triggered when the Cancel button of the native popup is clicked.
    WebPortal.nativePopup.evt.timeout Event triggered when the timeout of the native popup is finish.

    Note: onApplicationLoaded must be sent, to the portal, by your Application after it has been launched.