Compatible many APN concurrent method and the system thereof supporting handheld device Android application program
Technical field
The present invention relates to network parameters Access Point Name (APN) on a kind of mobile terminal operating system and the handheld equipment operating system of interconnection network is set, the handhold device system that especially the many APN of compatible support Android application program are concurrent.
Background technology
The literal sense of Android mono-word refers to " robot ", the title of the mobile phone operating system of increasing income based on Linux platform that to be also simultaneously Google announce on November 5th, 2007, this platform is made up of operating system, middleware, user interface and application software, is first real opening of making for mobile terminal and complete mobile software.Similar to iPhone, Android adopts WebKit browser engine, possess touch-screen, advanced figure display and function of surfing the Net, user can check Email, search network address and viewing video frequency program etc. on mobile phone, function of search is more emphasized than other mobile phones such as iPhone, interface is more powerful, can be described as a kind of single platform incorporating whole Web and apply.Access point APN(Access Point Name) parameter that must configure when being handheld device online.At present domestic operator substantially comprises following two large class: CMWAP/UNIWAP/3GWAP(and accesses WAP business by GPRS), the service of CMNET/UNINET/3GNET(except WAP all use CMNET, such as connection internet etc. at present.Along with the high speed development of mobile interchange, all kinds of Mobile solution emerges in an endless stream.
Android is a kind ofly mainly used in mobile device based on the freedom of Linux and the operating system of open source code, as intelligent handheld device and panel computer, is led and exploitation by Google company and open handheld device alliance.Not yet have uniform Chinese title, the more people in CONTINENTAL AREA OF CHINA uses " Android " or " peace causes ".Android operation system is developed by AndyRubin at first, mainly supports handheld device.In August, 2005 is purchased by Google and registers capital to.In November, 2007, Google and 84 hardware manufacturer, software developer and Telecom operators are set up open handheld device alliance and are are jointly researched and developed improvement android system.Google increases income with Apache the authorization of licence subsequently, has issued the source code of Android.First Android intelligent handheld device is published in October, 2008.Android expands on panel computer and other field gradually, as TV, digital camera, game machine etc.The first quarter in 2011, the market share of Android in the whole world exceedes Saipan system first, leaps to the whole world first.In November, 2012 data display, Android occupies the share in global intelligent handheld device operating system market 76%, and Chinese market occupation rate is 90%.Along with the high speed development of mobile interchange, android system constantly extends at all kinds of Mobile solution.In actual use, based on difference safety, difference rate etc. various demand and application, be satisfied different mobile device service application demand and the concurrent application new model of different passage, mobile terminal needs the APN passage of access setting different application.Current, Android android system is the maximum handheld equipment operating system of occupation rate of market, this system has huge software resource and can utilize, but there is the configuration and the use that only provide a group of access point parameter to application program equally in this system, and the concurrent needs of different business can not be met, and when different application uses different APN, mobile terminal can only the mode of handover network APN passage by hand realize.The setting of usually opening inside mobile device only has a network connection point, as " GPRS connecting Internet " is arranged, and entered function table-setting-linkage function-bearing mode-the Internet.Here the access way of a GPRS connecting Internet may be had, can not find the connection of other mobile networks at all, and download QQ time above directly give tacit consent to regard to an access point, reelect to select and all can not select, therefore domestic consumer is not when having relevant professional knowledge, normally cannot automatically switch and realize the conversion that different business network options arranges access point.
The mobile terminal product of current portions ANDROID system is in based on some application-specific, the concurrent of many APN access can be realized, the function of multimedia message module of such as system can access independently CMWAP access point perform download while access CMNET browsing page on backstage, but this concurrent data service is only for some application modules that system is built-in, application program can not be provided freely to use, so for the application program operated in above this series products, ANDROID system remains the system of single access point, so the many APN accesses of application program still cannot be realized.
Summary of the invention
The present invention seeks to arrange access point weak point by single channel for prior art, there is provided one can compatible android system application program, simultaneously can provide the APN passage of multidiameter delay for this application program, and multi-channel A PN network can be carried out connect and the mobile terminal operating system scheme of managerial ability.In addition, the present invention also will provide the many APN concurrent system using the method.
Above-mentioned purpose of the present invention can be achieved by following technical solution, a kind of compatibility supports many APN concurrent method of handheld device Android application program, there is following technical characteristic: in the following submodule of the application framework layer module of android system code, under the prerequisite not changing original external interface type function and parameter definition and code logic:
1) in phone Phone module 7 and connection manager module 3 program, set up multiple network type field, grid descriptor and mobile network and judge branched program, for Phone Module recognition and the multiple APN network channel of management;
2) in the network savvy interface routine of Connection Service module 9, add the process branched program of corresponding newly-increased network type, the network connection type increased newly is distinguished with the original network connection type of android system, and when can make the application call networking interface run under android system, newly-increased network type parameters can be imported into, passage is accessed to newly-increased APN and carries out networking operation, and newly-increased network trace example can be created;
3) in radio interface layer module 6, add the mark constant value of corresponding above-mentioned newly-increased network connection type, call for relevant network trace module, as long as choosing of constant value meets type span, and other constant not original with system conflicts;
4) in network trace module 5 and its derivation module, add the connection of corresponding newly-increased network, disconnect the corresponding relation that message processing program realizes newly-increased passage descriptor and bottom data passage, and follow the trail of the connection status change that each road increases network newly, and add the radio program module feeding back these message to application program.
A kind of many APN concurrent system using compatible support handheld device Android application program method, mainly comprise in android system, be cross-linked Net network management module 1 and the telephone service module 2 of application layer module successively, it is characterized in that: android system module name framework is provided with the Networking Interface for APN access point, when application program module needs to connect APN access point, Net network management module 1 is called by Networking Interface, to network request forwarding to telephone service module 2, and networking request initiated by the modulator-demodulator being positioned at bottom by mobile terminal to base station; Wherein, connection manager module 3 initiates the APN networking request that application program needs, request forwarding will be networked to Connection Service module 4, branched program is judged by the multiple network type field in network trace module 5, grid descriptor and mobile network, by the 1-N of required APN type newly-increased network trace example, through Inter-Process Communication, request forwarding is identified the multiple APN network channels with administrative institute's request to telephony interface administration module 6; After data cube computation tracker module 8 receives request, a newly-increased data cube computation tracker example is created in Data connection module 9, Connection Service module 9 calls networking interface by the process branched program of newly-increased network type corresponding in network savvy interface routine, newly-increased network type parameters is imported into radio management layer module, passage is accessed to newly-increased APN and carries out networking operation, initiate network connecting request and safeguard the connection status of this road network network.
The present invention presses: (1) does not change original external interface CWinInetConnection type and parameter definition; (2) new content also can not revise original code logic; (3) suitably to three amendment principles that internal interface is modified, application framework (Frameworks) layer of android system is modified, ensure that any change can not occur the original function interface that original application framework layer application programs module provides, so can ensure the favorable compatibility to original android system application program.
The present invention has following beneficial effect compared to prior art:
The present invention utilizes android system to have good opening, the principle have followed during transformation and do not revise original external interface, do not revised Android original function internal implementation, judging branched program by adding network type field in Phone module, grid descriptor and mobile network on the open version of Android, enabling Phone module identify the network type be connected with for concurrent APN.
The present invention is by adding the process branched program of corresponding newly-increased network type in Connection Service module 9, the network connection type increased newly is distinguished with the original network connection type of android system, and when can make the application call networking interface run under android system, newly-increased network type parameters can being imported into, enabling original networking interface being supplied to operation application program use under the invention carry out networking operation by importing newly-increased network type parameters into newly-increased APN access passage.
The present invention, by adding the mark constant value of corresponding above-mentioned newly-increased network connection type in radio interface layer module 6, can provide the distinguishing mark of newly-increased network for relevant network trace module.
The present invention by adding the connection of corresponding newly-increased network in network trace module and its derivation module, disconnect message processing program, and interpolation feeds back the radio program module of these message to realize the corresponding relation of newly-increased passage descriptor and bottom data passage to application program, the connection status change that each road increases network newly can be followed the trail of, and by variable condition by message feedback to application program, thus the ability achieved as the single or multiple application programs operated on present system provide multidiameter delay APN network to connect, achieve the compatibility of system to Android program simultaneously.
Accompanying drawing explanation
In order to more clearly understand the present invention, now by the embodiment of the present invention, simultaneously with reference to accompanying drawing, the present invention will be described, wherein:
Fig. 1 is the single deck tape-recorder program module schematic diagram that the present invention's compatibility supports many APN concurrent system of handheld device Android application program.
In figure: 1Net network management module, 2 telephone service module, 3 connection manager modules, 4 Connection Service modules, 5 network trace modules, 6 telephony interface administration modules, 7 phone modules, 8 data cube computation tracker modules, 9 Data connection module, 10 radio interface layer modules.
Embodiment
In embodiment described below, the present invention's compatibility supports the system program modules that many APN of handheld device Android application program are concurrent, mainly comprise in android system, be cross-linked Net network management module 1 and the telephone service module 2 of application program module successively, the connection management module 3 that wherein Net network management module 1 mainly comprises directly and application layer module is crosslinked, Connection Service module 4, Connection Service module 4 is by process communication program and telephone service module 2 interaction data, telephone service module 2 provides the result data of networking request by transmission broadcast and process communication to Connection Service module 4.Connection manager module 3 adds newly-increased network type field, and this field belongs to newly-increased network type, and title is wanted to describe network characterization, and does not repeat with legacy network type field, and value does not have network type value with system identical.Then in the method obtaining network type title, add the newly-increased grid descriptor of corresponding newly-increased network type, the name of grid descriptor should be able to describe newly-increased network of network feature, for carry out debugging or application program runs time the feature of network is described by display word.Finally judging whether network belongs in the method isNetworkTypeMobile of mobile data network the process branched program increasing corresponding newly-increased network class offset, in branched program, return newly-increased network type belong to mobile data network, thus this newly-increased connection is defined as mobile data network.
Connection Service module 4 comprise by android system legacy network follow the trail of example and the present invention increase newly network trace example 1 ... increase network trace example N-1, increase the network trace module of network trace example N formation.Containing the original network savvy interface of android system and the process branched program being added with corresponding newly-increased network type in Connection Service module 4, process branched program enables the network connection type increased newly distinguish with the original network connection type of android system, and the networking interface that the application program under original Android being supplied to operate in present system uses, networking operation can be carried out by the APN access style importing newly-increased network type parameters into newly-increased to connection manager module 3, and newly-increased network trace example can be created, N in figure is the newly-increased total number of network example, N is natural number.
The telephone service module 2 that the present invention adds newly-increased network type field formation at android system phone module comprises phone module 7 and the telephony interface administration module 6 with phone module 7 interaction data.The newly-increased network type field that phone module 7 adds is that a group name claims to describe network characterization, and the newly-increased network type field do not repeated with legacy network type field, android system phone module is identified and manages the newly-increased network type be connected for concurrent APN.In the mobile phone of some many cards, corresponding may have multiple phone module, will carry out above-mentioned amendment for each phone module realizing many APN access function that needs.Phone module 7 comprises data cube computation tracker module 8, Data connection module 9 and radio interface layer module (RIL) 10.Data connection module 9 comprise android system legacy data connect example and the some newly-increased connection examples 1 of the present invention ... newly-increased connection example M-1, newly-increased connection example M, M represent the current newly-increased data cube computation tracker sum connected, and M is natural number.Be added with the mark constant value of corresponding newly-increased network connection type in radio interface layer module RIL, call for relevant network trace module, other constant value not original with android system of choosing of constant value is conflicted.
Android system application framework is provided with the Networking Interface for APN access point.When the program of answering run on above present system needs to connect mobile terminal specific APN access point, application program module calls Net network management module by Networking Interface.Net network management module 1 initiates APN type parameter networking request by connection manager module 3 networking interface, and request forwarding of networking is to telephone service module 2, and networking request initiated by modulator-demodulator mobile terminal being positioned to bottom to base station; Contain the APN type parameter needing to connect in networking request, different networking requests is distinguished by APN type parameter, and newly-increased type and original type process respectively, do not affect mutually.
In Net network management module 1, connection manager module 3 initiates the APN networking request that application program needs, Net network management module 1 is called by Networking Interface, to network request forwarding to telephone service module 2, and networking request initiated by the modulator-demodulator being positioned at bottom by mobile terminal to base station.Connection manager module 3 will network request forwarding to Connection Service module 4, the connection of corresponding newly-increased network is added in network trace module 5 and its derivation module, disconnect the corresponding relation that message processing program realizes newly-increased passage descriptor and bottom data passage, and follow the trail of the connection status change that each road increases network newly, and add the radio program module feeding back these message to application program, by the multiple network type field in network trace module 5, grid descriptor and mobile network judge branched program, by the 1-N of required APN type newly-increased network trace example, through Inter-Process Communication, request forwarding is identified the multiple APN network channels with administrative institute's request to telephony interface administration module 6.
In telephone service module 2, after telephony interface administration module 6 analysis request, call the networking interface of phone module again, request forwarding to the data cube computation tracker module in phone module; After data cube computation tracker module receives request, the data cube computation tracker example that establishment one is new in Data connection module 9, namely in Data connection module 9, create the newly-increased data cube computation tracker example of APN type required for a correspondence, this new data cube computation tracker is initiated actual connection request subsequently to radio interface layer module 10 and is safeguarded the connection status of this road network network, the APN access point number of the corresponding current concurrent connection of data cube computation tracker sum M, M is natural number; Connection Service module 9 calls networking interface by the process branched program of newly-increased network type corresponding in network savvy interface routine, newly-increased network type parameters is imported into radio management layer module, radio management layer module 10 accesses passage to newly-increased APN and carries out networking operation, network connecting request is initiated after receiving request, control mobile terminal hardware initiate actual networking request to base station and receive the response of base station to networking request simultaneously, safeguard the connection status of this road network network.Successful for networking message is returned to data cube computation tracker module 8 by radio management layer module 10, and by the Data connection module 9 processing selecting newly-increased data cube computation example corresponding with this road network network of this road network network of management, then this message is sent to network trace module by the mode of broadcast by data cube computation example, after in network trace module, corresponding newly-increased network of network tracker example receives this message, by this message informing connection manager module 3, connection manager module 3 employs the application program of this road network network connection by broadcast mode notice, make the application program using this road to increase the connection of APN network newly can obtain the successful message of networking.
Above-described is only the preferred embodiments of the present invention.Should be understood that, for the person of ordinary skill of the art, under the premise without departing from the principles of the invention, some distortion and improvement can also be made, such as described program can be stored in mobile terminal readable storage medium storing program for executing, alternatively, each module/unit of above-described embodiment terminal can adopt the form of hardware to realize, and the form of software function module also can be adopted to realize.The present invention is not restricted to the combination of the hardware and software of any particular form, also belongs to category of the present invention, and these change and change and should be considered as belonging to protection scope of the present invention.