WO2019196295A1 - 移动终端中实现软电话拨打的方法及装置 - Google Patents
移动终端中实现软电话拨打的方法及装置 Download PDFInfo
- Publication number
- WO2019196295A1 WO2019196295A1 PCT/CN2018/101557 CN2018101557W WO2019196295A1 WO 2019196295 A1 WO2019196295 A1 WO 2019196295A1 CN 2018101557 W CN2018101557 W CN 2018101557W WO 2019196295 A1 WO2019196295 A1 WO 2019196295A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- mobile terminal
- njs
- native
- dialing
- middle layer
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M1/00—Substation equipment, e.g. for use by subscribers
- H04M1/72—Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
- H04M1/724—User interfaces specially adapted for cordless or mobile telephones
- H04M1/72403—User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
- H04M1/72406—User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality by software upgrading or downloading
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M1/00—Substation equipment, e.g. for use by subscribers
- H04M1/02—Constructional features of telephone sets
- H04M1/0202—Portable telephone sets, e.g. cordless phones, mobile phones or bar type handsets
- H04M1/026—Details of the structure or mounting of specific components
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/54—Interprogram communication
- G06F9/545—Interprogram communication where tasks reside in different layers, e.g. user- and kernel-space
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M1/00—Substation equipment, e.g. for use by subscribers
- H04M1/72—Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
- H04M1/724—User interfaces specially adapted for cordless or mobile telephones
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M1/00—Substation equipment, e.g. for use by subscribers
- H04M1/72—Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
- H04M1/724—User interfaces specially adapted for cordless or mobile telephones
- H04M1/72448—User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
- H04M1/72454—User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions according to context-related or environment-related conditions
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M1/00—Substation equipment, e.g. for use by subscribers
- H04M1/72—Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
- H04M1/724—User interfaces specially adapted for cordless or mobile telephones
- H04M1/72469—User interfaces specially adapted for cordless or mobile telephones for operating the device by selecting functions from two or more displayed items, e.g. menus or icons
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M1/00—Substation equipment, e.g. for use by subscribers
- H04M1/72—Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
- H04M1/724—User interfaces specially adapted for cordless or mobile telephones
- H04M1/72484—User interfaces specially adapted for cordless or mobile telephones wherein functions are triggered by incoming communication events
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M2250/00—Details of telephonic subscriber devices
- H04M2250/12—Details of telephonic subscriber devices including a sensor for measuring a physical value, e.g. temperature or motion
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M2250/00—Details of telephonic subscriber devices
- H04M2250/22—Details of telephonic subscriber devices including a touch pad, a touch sensor or a touch detector
Definitions
- the present application relates to the field of mobile terminal technologies, and in particular, to a method and apparatus for implementing softphone dialing in a mobile terminal.
- the service personnel mainly processes various services based on various function pages provided by the PC, and one of the function pages provides a softphone dialing function for the business personnel, so that the business personnel can communicate with the customer through the softphone dialing function.
- the inventors realized that the mobile terminal does not only provide a native telephone dialing interface, and the types of native interfaces involved are very complicated and complex, and the developer provides a native interface for the mobile terminal and related native code. The level of familiarity is high, resulting in high development costs.
- an object of the present application is to provide a method and apparatus for implementing softphone dialing in a mobile terminal.
- a method for implementing softphone dialing in a mobile terminal includes: loading, in an application running in the mobile terminal, a page providing a softphone dialing function; and performing soft according to the trigger in the page a telephone dialing operation, initiating a softphone dialing request to the application; responding to the softphone dialing request by the running NJS middle layer, and calling the native telephone dialing interface provided by the mobile terminal for the application; The native phone dialing interface performs a softphone call for the application.
- a device for implementing softphone dialing in a mobile terminal includes: a page loading module configured to load a page providing a softphone dialing function in an application running in the mobile terminal; requesting an initiating module, Configuring to initiate a softphone dialing request to the application according to the softphone dialing operation triggered by the triggering in the page; the interface calling module is configured to respond to the softphone dialing request by the running NJS middle layer, and The application invokes a native telephone dialing interface provided by the mobile terminal; the softphone dialing module is configured to perform a softphone call for the application by calling the native telephone dialing interface.
- a device for implementing softphone dialing in a mobile terminal includes a processor and a memory, wherein the memory stores computer readable instructions, and the computer readable instructions are implemented by the processor.
- a computer readable storage medium having stored thereon a computer program, the computer program being executed by a processor to implement a method of implementing softphone dialing in a mobile terminal as described above.
- the native telephone dialing interface provided by the mobile terminal can be invoked for the application, and the developer can independently develop without using the native interface provided by the mobile terminal and the related native code. This solves the problem of excessive development cost existing in the prior art.
- FIG. 1 is a block diagram showing a hardware structure of a mobile terminal according to an exemplary embodiment.
- FIG. 2 is a flowchart of a method for implementing softphone dialing in a mobile terminal according to an exemplary embodiment.
- 3 is a flowchart of a method for implementing softphone dialing in another mobile terminal according to an exemplary embodiment.
- step 310 is a flow chart of an embodiment of step 310 in the corresponding embodiment of FIG. 3.
- FIG. 5 is a flow diagram of an embodiment of step 250 in the corresponding embodiment of FIG. 2.
- FIG. 6 is a flow chart of an embodiment of step 255 in the corresponding embodiment of FIG. 5.
- FIG. 7 is a schematic structural diagram of an NJS middle layer and an application program according to an embodiment of the present application.
- FIG. 8 is a block diagram of an apparatus for implementing softphone dialing in a mobile terminal, according to an exemplary embodiment.
- FIG. 9 is a block diagram showing a structure of an apparatus for implementing softphone dialing in a mobile terminal according to an exemplary embodiment.
- the mobile terminal is only an example that is suitable for the present application, and is not considered to provide any limitation on the scope of use of the present application.
- the mobile terminal is also not to be construed as having to rely on or must have one or more of the exemplary mobile terminals 100 shown in FIG.
- the mobile terminal 100 includes a memory 101, a memory controller 103, one or more (only one shown in FIG. 1) processor 105, a peripheral interface 107, a radio frequency module 109, and a positioning module 111.
- the memory 101 can be used to store computer programs and modules, as in the exemplary embodiment of the present application.
- the method and apparatus for implementing softphone dialing in a mobile mobile terminal corresponds to computer readable instructions and modules, and the processor 105 executes various functions and data processing by executing computer readable instructions stored in the memory 101, that is, completing the mobile A method of implementing softphone dialing in a mobile terminal.
- the memory 101 may be a random access memory such as a high speed random access memory, a non-volatile memory such as one or more magnetic storage devices, flash memory, or other solid state memory.
- the storage method can be short-term storage or permanent storage.
- the peripheral interface 107 may include at least one wired or wireless network interface, at least one serial-to-parallel conversion interface, at least one input/output interface, and at least one USB interface, etc., for calling external external input/output devices to the memory 101 and the processor 105 are configured to implement communication with various external input/output devices.
- the radio frequency module 109 is configured to transmit and receive electromagnetic waves, and realize mutual conversion between electromagnetic waves and electric signals, thereby communicating with other devices through the communication network.
- the communication network includes a cellular telephone network, a wireless local area network, or a metropolitan area network, and the above communication networks can use various communication standards, protocols, and technologies.
- the positioning module 111 is configured to acquire the current geographic location of the mobile terminal 100.
- Examples of positioning module 111 include, but are not limited to, Global Positioning System (GPS), wireless local area network or mobile communication network based positioning technology.
- GPS Global Positioning System
- wireless local area network wireless local area network
- mobile communication network based positioning technology wireless local area network
- the camera module 113 belongs to the camera and is used for taking pictures or videos.
- the captured picture or video can be stored in the memory 101, and can also be sent to the host computer through the radio frequency module 109.
- the audio module 115 provides an audio interface to the user, which may include one or more microphone interfaces, one or more speaker interfaces, and one or more earphone interfaces. Audio data interaction with other devices via the audio interface.
- the audio data can be stored in the memory 101 and can also be sent through the radio frequency module 109.
- the touch screen 117 provides an input and output interface between the mobile terminal 100 and the user. Specifically, the user can perform an input operation through the touch screen 117, such as a click, touch, slide, or the like, to cause the mobile terminal 100 to respond to the input operation.
- the mobile terminal 100 displays the output content formed by any one or combination of text, picture or video to the user through the touch screen 117.
- the button module 119 includes at least one button for providing an interface for the user to input to the mobile terminal 100, and the user can cause the mobile terminal 100 to perform different functions by pressing different buttons.
- the sound adjustment button allows the user to adjust the volume of the sound played by the mobile terminal 100.
- a method for implementing softphone dialing in a mobile mobile terminal is applicable to a mobile terminal, and the structure of the mobile terminal may be as shown in FIG. 1.
- the method for implementing softphone dialing in the mobile mobile terminal may be performed by the mobile terminal, and may include the following steps:
- Step 210 Load, in an application running on the mobile terminal, a page that provides a softphone dialing function
- the mobile terminal may be a smart phone, a tablet computer, a palmtop computer, or other portable electronic device that can be used by an application, and is not limited herein.
- the application generally refers to any application that can provide a softphone dialing function through page loading, and is not limited herein.
- the page providing the softphone dialing function can be loaded and displayed in the running application, thereby enabling the user to enjoy the page by online access to the displayed page.
- the softphone dialing feature provided.
- the page display is implemented by a floating frame, that is, a floating frame is created for the loaded page, and the page-related component is embedded in the floating frame to be performed in the application through the floating frame.
- the floating display of the page is implemented by a floating frame, that is, a floating frame is created for the loaded page, and the page-related component is embedded in the floating frame to be performed in the application through the floating frame.
- the user is a service personnel
- the service personnel log in to a service application running by the mobile terminal
- the service program displays a page for providing the softphone dialing function to the service personnel, thereby, the service
- the person can communicate with the customer based on the softphone dialing function provided on the page in the mobile terminal.
- Step 230 Initiate a softphone dialing request to the application according to the softphone dialing operation triggered by the trigger in the page.
- the user is provided with a softphone dialing entry, which may be a virtual icon, a virtual button, etc. in the page.
- the softphone dialing operation is triggered at the portal.
- the softphone dialing is a virtual icon.
- the click operation is a softphone call operation triggered at the portal.
- the softphone dialing operation triggered by the application displayed on the page displayed by the application can be detected by the event listener.
- the user After detecting the softphone dialing operation, that is, knowing that the user wants to make a softphone dialing, the user can initiate a softphone dialing request to the application, so that the softphone dialing can be performed for the user later.
- Step 250 The soft-phone dialing request is responded to by the running NJS middle layer, and the native telephone dialing interface provided by the mobile terminal is invoked for the application.
- the middle layer is based on the runtime environment deployed in the mobile terminal. JavaScript technology is used to call the native interface.
- the native interface includes but is not limited to the native phone dialing interface.
- the NJS middle layer runs, and after the softphone dialing request is initiated, the running NJS middle layer will respond to the softphone dialing request to make a native telephone call for the application. The call to the interface.
- Step 270 Perform a softphone call for the application by calling the native telephone dialing interface.
- the NJS middle layer enables the application to implement the native interface provided by the mobile terminal across platforms.
- the developer will write a non-native interface using JavaScript technology, whereby the NJS middle layer can invoke the native interface provided by the mobile terminal through the non-native interface.
- the non-native interface is directly accessed, and the soft interface for the application is dialed by the native interface, thereby achieving cross-platform access of the application.
- the developer can develop the non-native interface independently without being familiar with the native interface provided by the mobile terminal and the related native code, thereby improving the development efficiency and reducing the development cost.
- the method as described above may further include the following steps:
- Step 310 The NJS middle layer is configured by the application calling the native telephone dialing interface provided by the mobile terminal. Construct.
- step 310 may include the following steps:
- Step 311 Import a native class object for describing a native phone dialing interface.
- Step 313 Create an associated instance object according to the imported native class object.
- the native class object is described by the native code to dial the interface of the native phone, and is generated when the mobile terminal deploys the running environment.
- An instance object also known as a JS object, is a description of a non-native phone dialing interface using JavaScript technology.
- creation refers to the escaping of a native class object to a JS object, and can also be understood as mapping a native class object to a JS object.
- Step 315 Configure a call attribute for the associated instance object, and construct an NJS middle layer by the instance object configured with the call attribute.
- the calling attribute refers to a method of calling an instance object, and then calling the native object by calling the instance object, thereby implementing the calling of the native interface described by the native object.
- the native interface is a dialog box
- the native class object is used to describe the dialog box
- the associated instance object is created for it and the configured calling property is displayed, thereby, when the native interface is called for the application, Display a dialog for the application.
- the NJS middle layer essentially maps the native class object used to describe the native interface to a JS object according to the native interface provided by the mobile terminal, to pass the JS object. Invoking a call to the associated native object, thereby enabling the application to implement the native interface provided by the mobile terminal across platforms.
- the NJS middle layer stores instance objects for a plurality of native class objects describing the native interface, and is not limited to the native phone dialing interface.
- Step 330 Encapsulate the constructed NJS middle layer to an installation package of the application.
- Step 350 Load the NJS middle layer to the memory of the mobile terminal by installing the package in the mobile terminal
- Step 370 When the application runs on the mobile terminal, triggering the NJS middle layer loaded into the mobile terminal memory to run.
- the softphone dialing request can be responded to to invoke the native telephone dialing interface provided by the mobile terminal for subsequent application calls.
- step 250 may include the following steps:
- Step 251 Extracting a parameter from a softphone dialing request.
- a softphone call operation is triggered in the page to initiate a softphone call request to the application.
- the softphone dialing request can be used to know that the user wants to make a softphone dialing, thereby determining the native telephone dialing interface that needs to be provided for the application to invoke the mobile terminal.
- the softphone dialing request carries a parameter, which is used to instruct the NJS middle layer to call the native telephone dialing interface provided by the mobile terminal for the application.
- the parameter can be extracted from the softphone dialing request, and then the NJS middle layer performs the subsequent native telephone dialing interface call according to the parameter indication.
- Step 253 Invoke the parameter configured by the application to the incoming interface to pass the parameter to the NJS middle layer.
- the parameter incoming interface is configured when the application is installed to the mobile terminal, and is used to perform parameter delivery for the application, for example, the parameter carried in the softphone dialing request is transmitted to the NJS middle layer.
- Step 255 triggering, according to the incoming parameter, the NJS middle layer to invoke the native telephone dialing provided by the mobile terminal.
- the NJS middle layer can know that the user wishes to make a softphone call, and then invokes the native telephone dialing interface provided by the mobile terminal for the application.
- step 255 may include the following steps:
- Step 2551 Detect an operating environment deployed in the mobile terminal by using an NJS intermediate layer.
- the operating environment deployed in the mobile terminal A is an Android system
- the operating environment deployed in the mobile terminal B is an IOS system
- the mobile terminal C The running environment deployed in is the other operating system.
- the mobile terminal will provide a corresponding native interface according to the operating environment in which it is deployed.
- the versions of the native interfaces provided by the mobile terminal are different.
- the Anzhuo system provides an Android version of the native phone dialing interface
- the IOS system provides an IOS version of the native phone dialing interface.
- the NJS intermediate layer needs to perform detection of the operating environment deployed by the mobile terminal.
- a configuration file is formed, so as to store relevant application configuration information for each application running in the running environment, for example, the application configuration information includes the application.
- the identification also provides the application with system configuration information related to the running environment.
- the system configuration information includes the operating system identifier.
- the NJS middle layer will read the operating system identifier in the system configuration information from the configuration file to determine the operating environment deployed by the mobile terminal according to the operating system identifier.
- the operating system is identified as "Android”, it is determined that the operating environment deployed in the mobile terminal is an AZ system.
- Step 2553 Determine an instance object in the NJS middle layer according to the parameter, and obtain, by the instance object, a native class object for describing a native call according to the detected running environment.
- the H5 page loaded by the application can be displayed through the browser kernel embedded in the Android system, or through the browser kernel embedded in the IOS system. Display, that is, regardless of the operating environment deployed by the mobile terminal, the H5 page can be compatible, thereby improving the development efficiency of the H5 page.
- the softphone dialing request initiated according to the softphone dialing operation triggered by the H5 page indicates that the NJS middle layer only calls the native telephone dialing interface. , and does not indicate which version of the native phone dialing interface is called by the NJS middle layer.
- the instance object is determined according to the indication of the parameter, and the native object is obtained by the instance object according to the detected running environment. At this time, the native object is used. It describes the native phone dialing interface that is compatible with the operating environment, which provides sufficient guarantee for subsequent calls.
- Step 2555 Perform a call of the native class object according to the calling property configured for the instance object.
- the calling of the native class object is implemented based on the calling method of the instance object indicated by the calling property, so that the application can access the native interface provided by the mobile terminal by using the instance object, and avoid relying on the development of the native code. Only when it can be realized, the development complexity is greatly reduced, which is conducive to improving development efficiency.
- an apparatus 900 for implementing softphone dialing in a mobile mobile terminal includes, but is not limited to: a page loading module 910, a request initiating module 930, an interface invoking module 950, and a soft The telephone dials module 970.
- the page loading module 910 is configured to load a page that provides a softphone dialing function in an application running on the mobile terminal.
- the request initiating module 930 is configured to send a softphone dialing request to the application according to the softphone dialing operation triggered by the page.
- the interface invoking module 950 is configured to respond to the softphone dialing request through the running NJS middle layer, and invoke the native telephone dialing interface provided by the mobile terminal for the application.
- the softphone dialing module 970 is configured to perform softphone dialing for the application by calling the native telephone dialing interface.
- the embodiment of the method for implementing softphone dialing in a mobile mobile terminal provided by the foregoing embodiment and the method for implementing softphone dialing in a mobile mobile terminal belong to the same concept, and a specific manner in which each module performs an operation is already in the method. The detailed description is given in the embodiment, and details are not described herein again.
- a device 1000 for implementing softphone dialing in a mobile mobile terminal includes a processor 1001 and a memory 1004.
- the apparatus 1000 also includes a communication interface 1002 and a communication bus 1003.
- the processor 1001 reads computer readable instructions stored in the memory 1004 via a communication bus 1003.
- the memory 1004 stores computer readable instructions, and when the computer readable instructions are executed by the processor 1001, the method for implementing softphone dialing in the mobile mobile terminal in the foregoing embodiments is implemented.
- a computer readable storage medium having stored thereon a computer program, when executed by a processor, implements softphone dialing in a mobile mobile terminal in each of the above embodiments. method.
Landscapes
- Engineering & Computer Science (AREA)
- Human Computer Interaction (AREA)
- Signal Processing (AREA)
- Computer Networks & Wireless Communication (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Environmental & Geological Engineering (AREA)
- Telephone Function (AREA)
- Telephonic Communication Services (AREA)
- Stored Programmes (AREA)
Abstract
本申请涉及了一种移动终端中实现软电话拨打的方法及装置,所述移动终端中实现软电话拨打的方法,包括:在运行于移动终端的应用程序中,加载提供软电话拨打功能的页面;根据所述页面中触发进行的软电话拨打操作,向所述应用程序发起软电话拨打请求;通过运行的NJS中间层响应所述软电话拨打请求,并为所述应用程序调用所述移动终端提供的原生电话拨打接口;通过调用的原生电话拨打接口为所述应用程序执行软电话拨打。采用本申请所提供的移动终端中实现软电话拨打的方法及装置能够有效地降低开发成本。
Description
发明名称:移动终端中实现软电话拨打的方法及装置 技术领域
[0001] 本申请要求 2018年 4月 9日递交、 发明名称为“移动终端中实现软电话拨打的方 法及装置”的中国专利申请 CN 201810311980.5的优先权, 在此通过引用将其全部 内容合并于此。
[0002] 本申请涉及移动终端技术领域, 尤其涉及一种移动终端中实现软电话拨打的方 法及装置。
背景技术
[0003] 目前, 业务人员主要是基于 PC端所提供的各种功能页面处理各项业务, 其中一 种功能页面为业务人员提供软电话拨打功能, 方便业务人员通过软电话拨打功 能与客户沟通。
[0004] 可以理解, 一旦业务人员仅携带了移动终端外出, 例如智能手机, 将无法基于 PC端所提供的软电话拨打功能与客户沟通。 随着移动终端技术的发展, 逐渐可 以利用移动终端所提供的原生电话拨打接口执行软电话拨打。
[0005] 然而, 发明人意识到: 移动终端并非仅提供原生电话拨打接口, 其所涉及的原 生接口种类非常庞杂而且复杂度较高, 对开发人员关于移动终端所提供原生接 口以及相关原生代码的熟悉程度要求很高, 从而导致开发成本居高不下。
发明概述
技术问题
问题的解决方案
技术解决方案
[0006] 为了解决上述技术问题, 本申请的一个目的在于提供一种移动终端中实现软电 话拨打的方法及装置。
[0007] 其中, 本申请所采用的技术方案为:
[0008] 一方面, 一种移动终端中实现软电话拨打的方法, 包括: 在运行于移动终端的 应用程序中, 加载提供软电话拨打功能的页面; 根据所述页面中触发进行的软
电话拨打操作, 向所述应用程序发起软电话拨打请求; 通过运行的 NJS中间层响 应所述软电话拨打请求, 并为所述应用程序调用所述移动终端提供的原生电话 拨打接口; 通过调用的原生电话拨打接口为所述应用程序执行软电话拨打。
[0009] 另一方面, 一种移动终端中实现软电话拨打的装置, 包括: 页面加载模块, 配 置为在运行于移动终端的应用程序中, 加载提供软电话拨打功能的页面; 请求 发起模块, 配置为根据所述页面中触发进行的软电话拨打操作, 向所述应用程 序发起软电话拨打请求; 接口调用模块, 配置为通过运行的 NJS中间层响应所述 软电话拨打请求, 并为所述应用程序调用所述移动终端提供的原生电话拨打接 口; 软电话拨打模块, 配置为通过调用的原生电话拨打接口为所述应用程序执 行软电话拨打。
[0010] 另一方面, 一种移动终端中实现软电话拨打的装置, 包括处理器及存储器, 所 述存储器上存储有计算机可读指令, 所述计算机可读指令被所述处理器执行时 实现如上所述的移动终端中实现软电话拨打的方法。
[0011] 另一方面, 一种计算机可读存储介质, 其上存储有计算机程序, 所述计算机程 序被处理器执行时实现如上所述的移动终端中实现软电话拨打的方法。
[0012] 在上述技术方案中, 基于 NJS中间层, 能够为应用程序调用移动终端提供的原 生电话拨打接口, 开发人员不需要熟悉移动终端所提供的原生接口以及相关原 生代码即可独立开发, 由此解决了现有技术所存在的开发成本过高的问题。
[0013] 应当理解的是, 以上的一般描述和后文的细节描述仅是示例性和解释性的, 并 不能限制本申请。
发明的有益效果
对附图的简要说明
附图说明
[0014] 此处的附图被并入说明书中并构成本说明书的一部分, 示出了符合本申请的实 施例, 并于说明书一起用于解释本申请的原理。
[0015] 图 1是根据一示例性实施例示出的一种移动终端的硬件结构框图。
[0016] 图 2是根据一示例性实施例示出的一种移动终端中实现软电话拨打的方法的流 程图。
[0017] 图 3是根据一示例性实施例示出的另一种移动终端中实现软电话拨打的方法的 流程图。
[0018] 图 4是图 3对应实施例中步骤 310在一个实施例的流程图。
[0019] 图 5是图 2对应实施例中步骤 250在一个实施例的流程图。
[0020] 图 6是图 5对应实施例中步骤 255在一个实施例的流程图。
[0021] 图 7是本申请实施例所涉及的 NJS中间层与应用程序的架构示意图。
[0022] 图 8是根据一示例性实施例示出的一种移动终端中实现软电话拨打的装置的框 图。
[0023] 图 9是根据一示例性实施例示出的一种移动终端中实现软电话拨打的装置的结 构框图。
[0024] 通过上述附图, 已示出本申请明确的实施例, 后文中将有更详细的描述, 这些 附图和文字描述并不是为了通过任何方式限制本申请构思的范围, 而是通过参 考特定实施例为本领域技术人员说明本申请的概念。
发明实施例
本发明的实施方式
[0025] 这里将详细地对示例性实施例执行说明, 其示例表示在附图中。 下面的描述涉 及附图时, 除非另有表示, 不同附图中的相同数字表示相同或相似的要素。 以 下示例性实施例中所描述的实施方式并不代表与本申请相一致的所有实施方式 。 相反, 它们仅是与如所附权利要求书中所详述的、 本申请的一些方面相一致 的装置和方法的例子。
[0026] 需要说明的是, 该移动终端只是一个适配于本申请的示例, 不能认为是提供了 对本申请的使用范围的任何限制。 该移动终端也不能解释为需要依赖于或者必 须具有图 1中示出的示例性的移动终端 100中的一个或者多个组件。
[0027] 如图 1所示, 移动终端 100包括存储器 101、 存储控制器 103、 一个或多个 (图 1 中仅示出一个) 处理器 105、 外设接口 107、 射频模块 109、 定位模块 111、 摄像 模块 113、 音频模块 115、 触控屏幕 117以及按键模块 119。 这些组件通过一条或 多条通讯总线 /信号线 121相互通讯。
[0028] 其中, 存储器 101可用于存储计算机程序以及模块, 如本申请示例性实施例中
的移动移动终端中实现软电话拨打的方法及装置对应的计算机可读指令及模块 , 处理器 105通过运行存储在存储器 101内的计算机可读指令, 从而执行各种功 能以及数据处理, 即完成移动移动终端中实现软电话拨打的方法。
[0029] 存储器 101作为资源存储的载体, 可以是随机存储器、 例如高速随机存储器、 非易失性存储器, 如一个或多个磁性存储装置、 闪存、 或者其它固态存储器。 存储方式可以是短暂存储或者永久存储。
[0030] 外设接口 107可以包括至少一有线或无线网络接口、 至少一串并联转换接口、 至少一输入输出接口以及至少一 USB接口等, 用于将外部各种输入 /输出装置稱 合至存储器 101以及处理器 105, 以实现与外部各种输入 /输出装置的通信。
[0031] 射频模块 109用于收发电磁波, 实现电磁波与电信号的相互转换, 从而通过通 讯网络与其他设备进行通讯。 通信网络包括蜂窝式电话网、 无线局域网或者城 域网, 上述通信网络可以使用各种通信标准、 协议及技术。
[0032] 定位模块 111用于获取移动终端 100的当前所在的地理位置。 定位模块 111的实 例包括但不限于全球卫星定位系统 (GPS) 、 基于无线局域网或者移动通信网的 定位技术。
[0033] 摄像模块 113隶属于摄像头, 用于拍摄图片或者视频。 拍摄的图片或者视频可 以存储至存储器 101内, 还可以通过射频模块 109发送至上位机。
[0034] 音频模块 115向用户提供音频接口, 其可包括一个或多个麦克风接口、 一个或 多个扬声器接口以及一个或多个耳机接口。 通过音频接口与其它设备进行音频 数据的交互。 音频数据可以存储至存储器 101内, 还可以通过射频模块 109发送
[0035] 触控屏幕 117在移动终端 100与用户之间提供一个输入输出界面。 具体地, 用户 可通过触控屏幕 117进行输入操作, 例如点击、 触摸、 滑动等手势操作, 以使移 动终端 100对该输入操作进行响应。 移动终端 100则将文字、 图片或者视频任意 一种形式或者组合所形成的输出内容通过触控屏幕 117向用户显示输出。
[0036] 按键模块 119包括至少一个按键, 用以提供用户向移动终端 100进行输入的接口 , 用户可以通过按下不同的按键使移动终端 100执行不同的功能。 例如, 声音调 节按键可供用户实现对移动终端 100播放的声音音量的调节。
[0037] 可以理解, 图 1所示的结构仅为示意, 移动终端还可包括比图 1中所示更多或更 少的组件, 或者具有与图 1所示不同的组件。 图 1中所示的各组件可以采用硬件 、 软件或者其组合来实现。
[0038] 请参阅图 2, 在一示例性实施例中, 一种移动移动终端中实现软电话拨打的方 法适用于移动终端, 该移动终端的结构可以如图 1所示。
[0039] 该种移动移动终端中实现软电话拨打的方法可以由移动终端执行, 可以包括以 下步骤:
[0040] 步骤 210, 在运行于移动终端的应用程序中, 加载提供软电话拨打功能的页面
[0041] 移动终端, 可以是智能手机、 平板电脑、 掌上电脑或者其他可供应用程序运行 的便携式电子设备, 在此不进行限定。
[0042] 相应地, 应用程序, 泛指可以通过页面加载而提供软电话拨打功能的任意应用 程序, 此处也并未加以限定。
[0043] 随着移动终端中应用程序的运行, 提供软电话拨打功能的页面即可进行加载, 并在运行的应用程序中显示, 由此使得用户通过对该显示页面的在线访问而享 受该页面所提供的软电话拨打功能。
[0044] 在一实施例的具体实现中, 页面显示是通过浮动框架实现的, 即为加载的页面 创建浮动框架, 并将页面相关的组件嵌入该浮动框架, 以通过浮动框架在应用 程序中进行页面的浮动显示。
[0045] 在一应用场景中, 用户为业务人员, 该业务人员登录移动终端运行的某个业务 类应用程序, 该业务类程序向该业务人员显示提供软电话拨打功能的页面, 由 此, 业务人员便可基于移动终端中该页面所提供的软电话拨打功能与客户沟通
[0046] 步骤 230, 根据页面中触发进行的软电话拨打操作, 向应用程序发起软电话拨 打请求。
[0047] 显示的页面中, 为用户提供一个软电话拨打入口, 该入口可是页面中的虚拟图 标、 虚拟按键等等, 当用户希望进行软电话拨打时, 将在该入口触发软电话拨 打操作。
[0048] 例如, 软电话拨打入口为一个虚拟图标, 当用户点击该虚拟图标时, 即认为用 户希望进行软电话拨打, 此时, 点击操作即为在该入口触发的软电话拨打操作
[0049] 在一实施例的具体实现中, 通过事件监听器即可检测到应用程序所显示页面中 触发进行的软电话拨打操作。
[0050] 在检测到软电话拨打操作之后, 即获知用户希望进行软电话拨打, 便能够为用 户向应用程序发起软电话拨打请求, 方可在后续为用户执行软电话拨打。
[0051] 步骤 250, 通过运行的 NJS中间层响应软电话拨打请求, 并为应用程序调用移动 终端提供的原生电话拨打接口。
[0052] NJS (Native Java
Script) 中间层, 是基于移动终端中部署的运行环境采用 JavaScript技术为调用原 生 (Native) 接口而构建的, 该原生接口包括但不限于原生电话拨打接口。
[0053] 具体而言, 当应用程序运行于移动终端, NJS中间层随之运行, 在软电话拨打 请求发起之后, 运行的 NJS中间层将会响应该软电话拨打请求为应用程序进行原 生电话拨打接口的调用。
[0054] 步骤 270, 通过调用的原生电话拨打接口为应用程序执行软电话拨打。
[0055] 如前所述, NJS中间层使得应用程序跨平台访问移动终端所提供的原生接口得 以实现。
[0056] 具体地, 开发人员将运用 JavaScript技术编写非原生接口, 由此, NJS中间层便 可以通过非原生接口调用移动终端所提供的原生接口。
[0057] 对于应用程序而言, 直接访问的是非原生接口, 而为应用程序执行软电话拨打 的却是原生接口, 从而实现了应用程序的跨平台访问。
[0058] 通过如上所述过程, 开发人员不需要熟悉移动终端所提供的原生接口以及相关 原生代码而能够独立开发非原生接口, 以此提高了开发效率, 有利于降低开发 成本。
[0059] 请参阅图 3, 在一示例性实施例中, 步骤 250之前, 如上所述的方法还可以包括 以下步骤:
[0060] 步骤 310, 为应用程序调用移动终端提供的原生电话拨打接口进行 NJS中间层的
构建。
[0061] 在一实施例的具体实现中, 如图 4所示, 步骤 310可以包括以下步骤:
[0062] 步骤 311, 导入用于描述原生电话拨打接口的原生类对象。
[0063] 步骤 313, 根据导入的原生类对象创建关联的实例对象。
[0064] 其中, 原生类对象, 是通过原生代码对原生电话拨打接口进行描述, 在移动终 端部署运行环境时生成的。
[0065] 实例对象, 也被称为 JS对象, 是运用 JavaScript技术对非原生电话拨打接口进行 描述。
[0066] 为此, 创建, 指的是由原生类对象到 JS对象的转义, 也可以理解为, 将原生类 对象映射为 JS对象。
[0067] 可选地, 由于移动终端所涉及的原生接口种类非常庞杂, 相应地, 用于描述原 生接口的原生类对象也不止一个, 基于此, 在为原生类对象创建了实例对象之 后, 还将在原生类对象与实例对象之间建立关联关系, 以此保证二者之间的一 一对应关系。
[0068] 步骤 315 , 为关联的实例对象配置调用属性, 由配置了调用属性的实例对象构 建得到 NJS中间层。
[0069] 其中, 调用属性是指调用实例对象的方法, 进而通过实例对象的调用而对原生 类对象进行调用, 以此实现原生类对象所描述的原生接口的调用。
[0070] 例如, 原生接口为对话框, 原生类对象用于描述该对话框, 为其创建关联的实 例对象并配置的调用属性是显示, 由此, 在为应用程序调用原生接口时, 即是 为应用程序显示对话框。
[0071] 通过上述过程, 实现了 NJS层的构建, NJS中间层, 实质是根据移动终端所提 供的原生接口, 将用于描述该原生接口的原生类对象映射为 JS对象, 以通过 JS对 象的调用进行所关联原生类对象的调用, 进而为应用程序实现跨平台访问移动 终端所提供的原生接口。
[0072] 应当理解, NJS中间层, 为多个描述原生接口的原生类对象分别存储了实例对 象, 并非仅限于原生电话拨打接口。
[0073] 步骤 330, 将构建的 NJS中间层封装至应用程序的安装包。
[0074] 步骤 350, 通过安装包在移动终端中的运行, 加载 NJS中间层至移动终端的内存
[0075] 步骤 370当应用程序运行于移动终端时, 触发加载至移动终端内存的 NJS中间层 运行。
[0076] 由此, 随着 NJS中间层的运行, 便能够响应该软电话拨打请求, 以在后续为应 用程序调用移动终端提供的原生电话拨打接口。
[0077] 请参阅图 5, 在一示例性实施例中, 步骤 250可以包括以下步骤:
[0078] 步骤 251, 由软电话拨打请求中提取得到参数。
[0079] 如前所述, 当用户希望拨打软电话, 将在页面中触发进行软电话拨打操作而向 应用程序发起软电话拨打请求。
[0080] 对于 NJS中间层而言, 通过软电话拨打请求便可以获知用户希望进行软电话拨 打, 进而确定需要为应用程序调用移动终端所提供的原生电话拨打接口。
[0081] 为此, 软电话拨打请求中携带有参数, 该参数用于指示 NJS中间层为应用程序 调用移动终端所提供的原生电话拨打接口。
[0082] 由上可知, 在接收到软电话拨打请求之后, 便能够从软电话拨打请求中提取得 到参数, 进而按照参数的指示使得 NJS中间层执行后续的原生电话拨打接口调用
[0083] 步骤 253, 调用应用程序配置的参数传入接口将参数传入 NJS中间层。
[0084] 参数传入接口, 由应用程序安装至移动终端时配置, 用于为应用程序执行参数 传递, 例如, 将软电话拨打请求中携带的参数传入 NJS中间层。
[0085] 步骤 255 , 根据传入的参数触发 NJS中间层调用移动终端提供的原生电话拨打接
[0086] 随着参数的传入, NJS中间层便能够获知用户希望进行软电话拨打, 进而为应 用程序调用移动终端所提供的原生电话拨打接口。
[0087] 在一实施例的具体实现中, 如图 6所示, 步骤 255可以包括以下步骤:
[0088] 步骤 2551, 通过 NJS中间层检测移动终端中部署的运行环境。
[0089] 应当理解, 不同移动终端可以部署不同的运行环境。 例如, 移动终端 A中部署 的运行环境为安卓系统, 移动终端 B中部署的运行环境为 IOS系统, 而移动终端 C
中部署的运行环境为其他操作系统。
[0090] 相应地, 移动终端将根据其所部署的运行环境提供相应的原生接口, 换而言之 , 不同的运行环境中, 移动终端所提供的原生接口的版本有所区别。 例如, 安 卓系统提供安卓版的原生电话拨打接口, IOS系统提供 IOS版的原生电话拨打接
[0091] 因此, 本实施例中, 在进行原生电话拨打接口的调用之前, 需要通过 NJS中间 层进行移动终端所部署运行环境的检测。
[0092] 具体而言, 随着移动终端中运行环境的部署, 将形成一配置文件, 以便于后续 为运行环境中运行的各应用程序存储相关的应用配置信息, 例如, 应用配置信 息包括应用程序标识, 同时, 也为应用程序提供运行环境相关的系统配置信息 , 例如, 系统配置信息包括操作系统标识。
[0093] 由此, NJS中间层将由配置文件读取系统配置信息中的操作系统标识, 以根据 操作系统标识判断移动终端所部署的运行环境。
[0094] 例如, 如果操作系统标识为“Android”, 则判定移动终端中部署的运行环境为安 卓系统。
[0095] 步骤 2553, 根据参数确定 NJS中间层中的实例对象, 并根据检测到的运行环境 由实例对象关联得到用于描述原生拨打电话的原生类对象。
[0096] 如图 7所示, 本实施例中, 对于应用程序所加载 H5页面而言, 既可以通过安卓 系统内嵌的浏览器内核进行显示, 也可以通过 IOS系统内嵌的浏览器内核进行显 示, 也就是说, 无论移动终端所部署的运行环境是哪种, H5页面都可以兼容, 以此提高 H5页面的开发效率。
[0097] 可以理解, 由于 H5页面对运行环境的兼容性, 根据该 H5页面中触发进行的软 电话拨打操作而发起的软电话拨打请求中, 参数仅指示 NJS中间层进行原生电话 拨打接口的调用, 而未指示 NJS中间层调用哪一种版本的原生电话拨打接口。
[0098] 因此, 原生类对象获取中, 需要结合软电话拨打请求中的参数以及检测到的运 行环境。
[0099] 具体地, 在构建的 NJS中间层中, 按照参数的指示确定实例对象, 并根据检测 到的运行环境由该实例对象关联得到原生类对象, 此时, 该原生类对象即是用
于描述与运行环境相适配的原生电话拨打接口, 进而为后续调用提供了充分的 保障。
[0100] 步骤 2555 , 按照为实例对象配置的调用属性, 进行原生类对象的调用。
[0101] 由此, 原生类对象的调用, 是基于调用属性所指示的实例对象的调用方法实现 的, 使得应用程序能够借助实例对象访问移动终端所提供的原生接口, 避免依 赖于原生代码的开发才能够实现, 大幅度降低了开发复杂度, 有利于提高开发 效率。
[0102] 此外, 开发人员仅需要熟悉 JS对象以及 JavaScript技术即可, 而 JS对象以及 Java Script技术相对于原生类对象以及相关原生代码更为简单, 进一步有利于提高开 发效率, 从而有效地降低了开发成本。
[0103] 下述为本申请装置实施例, 可以用于执行本申请所涉及的移动移动终端中实现 软电话拨打的方法。 对于本申请装置实施例中未披露的细节, 请参照本申请所 涉及的移动移动终端中实现软电话拨打的方法的实施例。
[0104] 请参阅图 8, 在一示例性实施例中, 一种移动移动终端中实现软电话拨打的装 置 900包括但不限于: 页面加载模块 910、 请求发起模块 930、 接口调用模块 950 和软电话拨打模块 970。
[0105] 其中, 页面加载模块 910用于在运行于移动终端的应用程序中, 加载提供软电 话拨打功能的页面。
[0106] 请求发起模块 930用于根据页面中触发进行的软电话拨打操作, 向应用程序发 起软电话拨打请求。
[0107] 接口调用模块 950用于通过运行的 NJS中间层响应软电话拨打请求, 并为应用程 序调用移动终端提供的原生电话拨打接口。
[0108] 软电话拨打模块 970用于通过调用的原生电话拨打接口为应用程序执行软电话 拨打。
[0109] 需要说明的是, 上述实施例所提供的移动移动终端中实现软电话拨打的装置在 进行移动移动终端中实现软电话拨打的处理时, 仅以上述各功能模块的划分进 行举例说明, 实际应用中, 可以根据需要而将上述功能分配由不同的功能模块 完成, 即移动移动终端中实现软电话拨打的装置的内部结构将划分为不同的功
能模块, 以完成以上描述的全部或者部分功能。
[0110] 另外, 上述实施例所提供的移动移动终端中实现软电话拨打的装置与移动移动 终端中实现软电话拨打的方法的实施例属于同一构思, 其中各个模块执行操作 的具体方式已经在方法实施例中进行了详细描述, 此处不再赘述。
[0111] 请参阅图 9, 在一示例性实施例中, 一种移动移动终端中实现软电话拨打的装 置 1000, 包括处理器 1001及存储器 1004。 所述装置 1000还包括通信接口 1002和 通信总线 1003。 所述处理器 1001通过通信总线 1003读取所述存储器 1004中存储 的计算机可读指令。
[0112] 其中, 存储器 1004上存储有计算机可读指令, 该计算机可读指令被处理器 1001 执行时实现上述各实施例中的移动移动终端中实现软电话拨打的方法。
[0113] 在一示例性实施例中, 一种计算机可读存储介质, 其上存储有计算机程序, 该 计算机程序被处理器执行时实现上述各实施例中的移动移动终端中实现软电话 拨打的方法。
[0114] 上述内容, 仅为本申请的较佳示例性实施例, 并非用于限制本申请的实施方案 , 本领域普通技术人员根据本申请的主要构思和精神, 可以十分方便地进行相 应的变通或修改, 故本申请的保护范围应以权利要求书所要求的保护范围为准
Claims
[权利要求 1] 一种移动终端中实现软电话拨打的方法, 其中, 所述方法包括: 在运行于移动终端的应用程序中, 加载提供软电话拨打功能的页面; 根据所述页面中触发进行的软电话拨打操作, 向所述应用程序发起软 电话拨打请求;
通过运行的 NJS中间层响应所述软电话拨打请求, 并为所述应用程序 调用所述移动终端提供的原生电话拨打接口;
通过调用的原生电话拨打接口为所述应用程序执行软电话拨打。
[权利要求 2] 如权利要求 1所述的方法, 其中, 所述通过运行的 NJS中间层响应所 述软电话拨打请求, 并为所述应用程序调用所述移动终端提供的原生 电话拨打接口之前, 所述方法还包括:
为所述应用程序调用所述移动终端提供的原生电话拨打接口进行所述 NJS中间层的构建;
将构建的 NJS中间层封装至所述应用程序的安装包;
通过所述安装包在所述移动终端中的运行, 加载所述 NJS中间层至所 述移动终端的内存;
当所述应用程序运行于所述移动终端时, 触发加载至所述移动终端内 存的所述 NJS中间层运行。
[权利要求 3] 如权利要求 2所述的方法, 其中, 所述为所述应用程序调用所述移动 终端提供的原生电话拨打接口进行所述 NJS中间层的构建, 包括: 导入用于描述所述原生电话拨打接口的原生类对象;
根据导入的原生类对象创建关联的实例对象;
为关联的实例对象配置调用属性, 由配置了调用属性的实例对象构建 得到所述 NJS中间层。
[权利要求 4] 如权利要求 1至 3任一项所述的方法, 其中, 所述通过运行的 NJS中间 层响应所述软电话拨打请求, 并为所述应用程序调用所述移动终端提 供的原生电话拨打接口, 包括:
由所述软电话拨打请求中提取得到参数;
调用所述应用程序配置的参数传入接口将所述参数传入所述 NJS中间 层;
根据传入的所述参数触发所述 NJS中间层调用所述移动终端提供的原 生电话拨打接口。
[权利要求 5] 如权利要求 4所述的方法, 其中, 所述根据传入的所述参数触发所述
NJS中间层调用所述移动终端提供的原生电话拨打接口, 包括: 通过所述 NJS中间层检测所述移动终端中部署的运行环境; 根据所述参数确定所述 NJS中间层中的实例对象, 并根据检测到的运 行环境由所述实例对象关联得到用于描述所述原生拨打电话的原生类 对象;
按照为所述实例对象配置的调用属性, 进行所述原生类对象的调用。
[权利要求 6] —种移动终端中实现软电话拨打的装置, 其中, 所述装置包括: 页面加载模块, 配置为在运行于移动终端的应用程序中, 加载提供软 电话拨打功能的页面;
请求发起模块, 配置为根据所述页面中触发进行的软电话拨打操作, 向所述应用程序发起软电话拨打请求;
接口调用模块, 配置为通过运行的 NJS中间层响应所述软电话拨打请 求, 并为所述应用程序调用所述移动终端提供的原生电话拨打接口; 软电话拨打模块, 配置为通过调用的原生电话拨打接口为所述应用程 序执行软电话拨打。
[权利要求 7] 如权利要求 6所述的装置, 其中, 所述装置还包括:
中间层构建模块, 配置为为所述应用程序调用所述移动终端提供的原 生电话拨打接口进行所述 NJS中间层的构建;
中间层封装模块, 配置为将构建的 NJS中间层封装至所述应用程序的 安装包;
中间层加载模块, 配置为通过所述安装包在所述移动终端中的运行, 加载所述 NJS中间层至所述移动终端的内存;
中间层运行模块, 配置为当所述应用程序运行于所述移动终端时, 触
发加载至所述移动终端内存的所述 NJS中间层运行。
[权利要求 8] 如权利要求 7所述的装置, 其中, 所述中间层构建模块包括:
对象导入单元, 配置为导入用于描述所述原生电话拨打接口的原生类 对象; 对象关联单元, 配置为根据导入的原生类对象创建关联的实例 对象;
属性配置单元, 配置为为关联的实例对象配置调用属性, 由配置了调 用属性的实例对象构建得到所述 NJS中间层。
[权利要求 9] 如权利要求 6至 8任一项所述的装置, 其中, 所述软电话拨打模块包括 参数提取单元, 配置为由所述软电话拨打请求中提取得到参数; 参数传入单元, 配置为调用所述应用程序配置的参数传入接口将所述 参数传入所述 NJS中间层;
原生接口调用单元, 配置为根据传入的所述参数触发所述 NJS中间层 调用所述移动终端提供的原生电话拨打接口。
[权利要求 10] 如权利要求 9所述的装置, 其中, 所述原生接口调用单元包括:
环境检测子单元, 配置为通过所述 NJS中间层检测所述移动终端中部 署的运行环境;
对象获取子单元, 配置为根据所述参数确定所述 NJS中间层中的实例 对象, 并根据检测到的运行环境由所述实例对象关联得到用于描述所 述原生拨打电话的原生类对象;
对象调用子单元, 配置为按照为所述实例对象配置的调用属性, 进行 所述原生类对象的调用。
[权利要求 11] 一种移动终端中实现软电话拨打的装置, 其中, 所述装置包括: 处理器; 及
存储器, 所述存储器上存储有计算机可读指令, 所述计算机可读指令 被所述处理器执行以下步骤:
在运行于移动终端的应用程序中, 加载提供软电话拨打功能的页面; 根据所述页面中触发进行的软电话拨打操作, 向所述应用程序发起软
电话拨打请求;
通过运行的 NJS中间层响应所述软电话拨打请求, 并为所述应用程序 调用所述移动终端提供的原生电话拨打接口;
通过调用的原生电话拨打接口为所述应用程序执行软电话拨打。
[权利要求 12] 如权利要求 11所述的装置, 其中, 所述通过运行的 NJS中间层响应所 述软电话拨打请求, 并为所述应用程序调用所述移动终端提供的原生 电话拨打接口步骤之前, 所述处理器还执行以下步骤:
为所述应用程序调用所述移动终端提供的原生电话拨打接口进行所述 NJS中间层的构建;
将构建的 NJS中间层封装至所述应用程序的安装包;
通过所述安装包在所述移动终端中的运行, 加载所述 NJS中间层至所 述移动终端的内存;
当所述应用程序运行于所述移动终端时, 触发加载至所述移动终端内 存的所述 NJS中间层运行。
[权利要求 13] 如权利要求 12所述的装置, 其中, 所述为所述应用程序调用所述移动 终端提供的原生电话拨打接口进行所述 NJS中间层的构建步骤中, 所 述处理器执行以下步骤:
导入用于描述所述原生电话拨打接口的原生类对象;
根据导入的原生类对象创建关联的实例对象;
为关联的实例对象配置调用属性, 由配置了调用属性的实例对象构建 得到所述 NJS中间层。
[权利要求 14] 如权利要求 11至 13任一项所述的装置, 其中, 所述通过运行的 NJS中 间层响应所述软电话拨打请求, 并为所述应用程序调用所述移动终端 提供的原生电话拨打接口步骤中, 所述处理器执行以下步骤: 由所述软电话拨打请求中提取得到参数;
调用所述应用程序配置的参数传入接口将所述参数传入所述 NJS中间 层;
根据传入的所述参数触发所述 NJS中间层调用所述移动终端提供的原
生电话拨打接口。
[权利要求 15] 如权利要求 14所述的装置, 其中, 所述根据传入的所述参数触发所述
NJS中间层调用所述移动终端提供的原生电话拨打接口步骤中, 所述 处理器执行以下步骤:
通过所述 NJS中间层检测所述移动终端中部署的运行环境; 根据所述参数确定所述 NJS中间层中的实例对象, 并根据检测到的运 行环境由所述实例对象关联得到用于描述所述原生拨打电话的原生类 对象;
按照为所述实例对象配置的调用属性, 进行所述原生类对象的调用。
[权利要求 16] 一种计算机可读存储介质, 其上存储有计算机程序, 其中, 所述计算 机程序被处理器执行以下步骤:
在运行于移动终端的应用程序中, 加载提供软电话拨打功能的页面; 根据所述页面中触发进行的软电话拨打操作, 向所述应用程序发起软 电话拨打请求;
通过运行的 NJS中间层响应所述软电话拨打请求, 并为所述应用程序 调用所述移动终端提供的原生电话拨打接口;
通过调用的原生电话拨打接口为所述应用程序执行软电话拨打。
[权利要求 17] 如权利要求 16所述的计算机可读存储介质, 其中, 所述通过运行的 N
JS中间层响应所述软电话拨打请求, 并为所述应用程序调用所述移动 终端提供的原生电话拨打接口步骤之前, 所述处理器还执行以下步骤 为所述应用程序调用所述移动终端提供的原生电话拨打接口进行所述 NJS中间层的构建;
将构建的 NJS中间层封装至所述应用程序的安装包;
通过所述安装包在所述移动终端中的运行, 加载所述 NJS中间层至所 述移动终端的内存;
当所述应用程序运行于所述移动终端时, 触发加载至所述移动终端内 存的所述 NJS中间层运行。
[权利要求 18] 如权利要求 17所述的计算机可读存储介质, 其中, 所述为所述应用程 序调用所述移动终端提供的原生电话拨打接口进行所述 NJS中间层的 构建步骤中, 所述处理器执行以下步骤:
导入用于描述所述原生电话拨打接口的原生类对象;
根据导入的原生类对象创建关联的实例对象;
为关联的实例对象配置调用属性, 由配置了调用属性的实例对象构建 得到所述 NJS中间层。
[权利要求 19] 如权利要求 16至 18任一项所述的计算机可读存储介质, 其中, 所述通 过运行的 NJS中间层响应所述软电话拨打请求, 并为所述应用程序调 用所述移动终端提供的原生电话拨打接口步骤中, 所述处理器执行以 下步骤:
由所述软电话拨打请求中提取得到参数;
调用所述应用程序配置的参数传入接口将所述参数传入所述 NJS中间 层;
根据传入的所述参数触发所述 NJS中间层调用所述移动终端提供的原 生电话拨打接口。
[权利要求 20] 如权利要求 19所述的计算机可读存储介质, 其中, 所述根据传入的所 述参数触发所述 NJS中间层调用所述移动终端提供的原生电话拨打接 口步骤中, 所述处理器执行以下步骤:
通过所述 NJS中间层检测所述移动终端中部署的运行环境; 根据所述参数确定所述 NJS中间层中的实例对象, 并根据检测到的运 行环境由所述实例对象关联得到用于描述所述原生拨打电话的原生类 对象;
按照为所述实例对象配置的调用属性, 进行所述原生类对象的调用。
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201810311980.5 | 2018-04-09 | ||
| CN201810311980.5A CN108616657B (zh) | 2018-04-09 | 2018-04-09 | 移动终端中实现软电话拨打的方法及装置 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2019196295A1 true WO2019196295A1 (zh) | 2019-10-17 |
Family
ID=63659876
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2018/101557 Ceased WO2019196295A1 (zh) | 2018-04-09 | 2018-08-21 | 移动终端中实现软电话拨打的方法及装置 |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN108616657B (zh) |
| WO (1) | WO2019196295A1 (zh) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN116301759A (zh) * | 2023-05-12 | 2023-06-23 | 国网信息通信产业集团有限公司 | 一种移动组件共享方法、系统、设备及存储介质 |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN109639918A (zh) * | 2018-10-30 | 2019-04-16 | 平安科技(深圳)有限公司 | 软电话通信方法、装置、设备及计算机可读存储介质 |
Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN203251323U (zh) * | 2012-12-24 | 2013-10-23 | 方正国际软件有限公司 | 一种基于html5的呼叫中心cti软电话实现装置 |
| CN104683607A (zh) * | 2015-03-24 | 2015-06-03 | 深圳市有信网络技术有限公司 | 一种提升软电话接通率的方法及其装置 |
| CN105739941A (zh) * | 2014-12-30 | 2016-07-06 | Gn奈康有限公司 | 操作计算机的方法和计算机 |
Family Cites Families (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101005543A (zh) * | 2006-12-25 | 2007-07-25 | 北京邮电大学 | 智能移动终端上的ip电话实现方案 |
| CN103428384A (zh) * | 2013-08-12 | 2013-12-04 | 深圳市吉祥腾达科技有限公司 | 手持智能设备实现VoIP移动电话业务的系统及方法 |
| US9948787B2 (en) * | 2014-06-23 | 2018-04-17 | Invariant Telecom, LLC | VoIP voice and messaging application |
-
2018
- 2018-04-09 CN CN201810311980.5A patent/CN108616657B/zh active Active
- 2018-08-21 WO PCT/CN2018/101557 patent/WO2019196295A1/zh not_active Ceased
Patent Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN203251323U (zh) * | 2012-12-24 | 2013-10-23 | 方正国际软件有限公司 | 一种基于html5的呼叫中心cti软电话实现装置 |
| CN105739941A (zh) * | 2014-12-30 | 2016-07-06 | Gn奈康有限公司 | 操作计算机的方法和计算机 |
| CN104683607A (zh) * | 2015-03-24 | 2015-06-03 | 深圳市有信网络技术有限公司 | 一种提升软电话接通率的方法及其装置 |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN116301759A (zh) * | 2023-05-12 | 2023-06-23 | 国网信息通信产业集团有限公司 | 一种移动组件共享方法、系统、设备及存储介质 |
| CN116301759B (zh) * | 2023-05-12 | 2023-11-03 | 国网信息通信产业集团有限公司 | 一种移动组件共享方法、系统、设备及存储介质 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN108616657B (zh) | 2021-04-23 |
| CN108616657A (zh) | 2018-10-02 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US11864248B2 (en) | Application function implementation method and electronic device | |
| US9843667B2 (en) | Electronic device and call service providing method thereof | |
| US12363220B2 (en) | Audio output method and terminal device | |
| US11785128B2 (en) | Caller identification display method based on application, and terminal device | |
| CN104756080B (zh) | 扩展主机设备的功能 | |
| WO2019178869A1 (zh) | 一种eSIM卡的开户方法及终端 | |
| WO2018121649A1 (en) | Incoming call management method and apparatus | |
| CN111061524A (zh) | 一种应用数据处理方法及相关装置 | |
| WO2019192128A1 (zh) | 网页访问方法及装置 | |
| WO2020181814A1 (zh) | 应用程序升级方法、装置、终端及计算机可读存储介质 | |
| CN114422639B (zh) | 信息显示方法和可穿戴设备 | |
| CN113489600B (zh) | 一种网络参数的配置方法、装置以及存储介质 | |
| CN110413420B (zh) | 数据传输方法、装置、终端及存储介质 | |
| WO2022253158A1 (zh) | 一种用户隐私保护方法及装置 | |
| US20240095408A1 (en) | Data protection method and system, medium, and electronic device | |
| KR20150084284A (ko) | 전자 장치의 상태 메시지 서비스 제공 방법 및 그 전자 장치 | |
| WO2022199672A1 (zh) | 精准撤销权限的访问控制方法、相关装置及系统 | |
| WO2019196295A1 (zh) | 移动终端中实现软电话拨打的方法及装置 | |
| US10652388B2 (en) | Communication systems and methods for causing display of visual content on a screen associated with a calling device | |
| CN114268653B (zh) | 设备调用方法、装置、设备、介质及产品 | |
| CN112328330B (zh) | iOS组件的调用方法、装置、中间件、电子设备及介质 | |
| WO2023124141A1 (zh) | 一种输入法调用方法及相关设备 | |
| CN114449088A (zh) | 一种拨打电话的方法和电子设备 | |
| CN116055643B (zh) | 可视化语音信箱服务启动方法及电子设备 | |
| CN117768580A (zh) | 基于虚拟号实现云手机呼叫的方法及电子设备 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 18914584 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 18914584 Country of ref document: EP Kind code of ref document: A1 |