API Only for Mobile Terminals

The following methods are mobile-specific methods on the FR object .

location

Methodlocation(function)

It is used to realize the positioning function and obtain the latitude and longitude, which can be used in https, enterprise WeChat, and DingTalk

   Parameterfunction(status, message){...}

-

Return value-

status: whether the positioning is successful, string

  • "success": The positioning is successful

  • Other: positioning failed message: receipt message

  • Returns latitude and longitude when positioning is successful

  • Returns the corresponding error message when the positioning fails

     Example

Get the geographic location, return the latitude and longitude successfully, and return the error message if it fails:

FR.location(function(status, message){
if(status=="success") {
FR.Msg.alert("Current location is " + message);
contentPane.setCellValue(23, message); 
else {
FR.Msg.alert(message); 
}
});
  Application example

Click the button to get the latitude and longitude and then fill in the corresponding cells. See the implementation method: [App] JS to get the current geographic location

1.png

   MobileSupport mobile

Mobile.getDeviceInfo

MethodMobile.getDeviceInfo()

Get device information

Parameter-

-

Return value

DeviceInfo:

{

Model: String,

DeviceID: String

}

DeviceInfo: Json object with two properties

Model: device model,

DeviceID: device unique id 

     Example

Get device information and print:

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

View device information on the mobile terminal, see the implementation method: [App] JS Get mobile device information

2.png

   MobileApp only


Attachment List


Theme: Secondary Development
  • 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