Methods only for Mobile Terminals

  • Last update:August 09, 2024
  • Version

    Report Server Version

    App Version

    Functional Change

    11.0

    11.0

    /

    11.0.26

    11.0.91

    The interface supported the

    FineVis Data Visualization plugin of 

    version 2.6.0 and later.

    The following methods are mobile-specific methods for FR objects.

    iconNote:
    In the FVS template, the interface usage remains consistent, but the method for calling the interface needs to be changed from FR to duchamp.

    location

    Method

    location(function)

    Implements location functionality and obtains latitude and longitude, which can be used in HTTPS.

    Parameter

    function(status, message, coordinate){...}

    /

    Return Value

    /

    Android

    status: Indicates whether the locating is successful, as a string.

    "success": Indicates that the locating is successful.

    Others: Indicates that the locating is unsuccessful.

    message: Indicates the acknowledgment message.

    1. It returns latitude and longitude when the locating is 

    successful.

    2. It returns the corresponding error message when the 

    locating is unsuccessful.

    coordinate: Indicates the coordinate system information.

    "WGS84": Indicates the World Geodetic System 1984 

    (the global standard which is used by Google Maps and 

    the coordinate system returned by iOS devices).

    "GCJ02": Indicates the Mars Coordinate System

    (the Chinese standard which is used by Amap and 

    Tencent Map. The coordinate system returned by Android devices).

    Example

    Example 1: Obtaining the geographic location (Latitude and longitude are returned if the locating is 

    successful, and the error message is returned if the locating is unsuccessful.)

    FR.location(function(status,  message)//Obtains the geographic location.
    if(status=="success") {
    //The parameter message returns latitude and longitude if the locating is successful.
    FR.Msg.alert("The current location is" + message);
    contentPane.setCellValue(23,  message);
    else {
    //The parameter message returns the error message if the locating is unsuccessful.
    FR.Msg.alert(message); //The locating is unsuccessful.
    }
    });

    Example  2: Obtaining the geographic location in the FVS template. (Latitude and longitude are returned if the locating is successful, and the error message is returned if the locating is unsuccessful.)

    duchamp.location(function(status,  message)//Obatains the geographic location.
    if(status=="success") {
    //The parameter message returns latitude and longitude if the locating is successful.
      duchamp.Msg.alert({
        title: "Location",
       message: JSON.stringify(message)
       });
    else {
    //The parameter message returns the error message if the locating is unsuccessful.
      duchamp.Msg.alert({
      title: "Locating Failed",
      message: `Cause:${message}`
      })
     }
    });
    Show Code

    Application Example

    After  you click a button, latitude and longitude are obtained and filled in the corresponding cells. For details, see [App] Getting Current Geographic Location.

    c23c5427403f75850c23576d74d853d.png

    Mobile Terminal

    Supports mobile terminals.

    Mobile.getDeviceInfo

    Method

    Mobile.getDeviceInfo

    Obtains device information.

    Parameter

    /

    /

    Return Value

    DeviceInfo

    {

    ModelString,

    DeviceIDString

    }

    DeviceInfo: Indicates the Jason object containing two 

    properties.

    Model: Indicates the device model.

    DeviceID: Indicates the unique ID of the device.

    Example

    Example 1: Obtaining the current device information.

    var  deviceInfo = FR.Mobile.getDeviceInfo();
    FR.Msg.alert("Model: " + deviceInfo.Model
    "\n DeviceID: " +  deviceInfo.DeviceID);

    Example 2: Obtaining the current device information in the FVS template.

    var deviceInfo = duchamp.getDeviceInfo();
    duchamp.Msg.alert({
    title: deviceInfo.Model,
    message: deviceInfo.DeviceID
    });

    Application Example

    You can view device information on the mobile terminal. For details, see [App] JS Getting Mobile Device Information.

    556dea9b31d61eb33fb90933995520a.png

    Mobile Terminal

    Only supports App (DataAnalysis).


    Attachment List


    Theme: Secondary Development
    Already the First
    Already the Last
    • Helpful
    • Not helpful
    • Only read

    滑鼠選中內容,快速回饋問題

    滑鼠選中存在疑惑的內容,即可快速回饋問題,我們將會跟進處理。

    不再提示

    10s後關閉

    Get
    Help
    Online Support
    Professional technical support is provided to quickly help you solve problems.
    Online support is available from 9:00-12:00 and 13:30-17:30 on weekdays.
    Page Feedback
    You can provide suggestions and feedback for the current web page.
    Pre-Sales Consultation
    Business Consultation
    Business: international@fanruan.com
    Support: support@fanruan.com
    Page Feedback
    *Problem Type
    Cannot be empty
    Problem Description
    0/1000
    Cannot be empty

    Submitted successfully

    Network busy