CN106506405B - Method for connecting network and device - Google Patents
Method for connecting network and device Download PDFInfo
- Publication number
- CN106506405B CN106506405B CN201610922135.2A CN201610922135A CN106506405B CN 106506405 B CN106506405 B CN 106506405B CN 201610922135 A CN201610922135 A CN 201610922135A CN 106506405 B CN106506405 B CN 106506405B
- Authority
- CN
- China
- Prior art keywords
- network
- private nni
- nni
- private
- connecting request
- 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.)
- Active
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/70—Admission control; Resource allocation
- H04L47/80—Actions related to the user profile or the type of traffic
- H04L47/803—Application aware
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
Present disclose provides a kind of method for connecting network and device, to solve the destination application of mobile terminal when accessing network service, other applications may escape flow the technical issues of.This method comprises: obtaining the network connecting request that application program is initiated;Meet preset condition in the network connecting request, and when current cellular networks are in close state, calls private NNI;Network service is accessed according to the private NNI.
Description
Technical field
This disclosure relates to the communications field, in particular to a kind of method for connecting network and device.
Background technique
With the continuous development of smart phone industry, smart phone is become increasingly popular.It is full of in current software application market
Various fee suction softwares, cause smartphone data flow escaption phenomenon it is serious.All kinds of fee suction softwares are stealthily transported on mobile phone backstage
Row, generates uncontrollable flow, seriously compromises the interests of mobile phone user.For example, partially being provided to mobile phone user free soft
Part can all be built-in with advertisement, when mobile phone user downloads and installs these freewares, using can default in initial setting
Message push function is opened, to produce a large amount of flow.
In order to stimulate the user of the mobile terminals such as mobile phone, tablet computer to use the enthusiasm of network service, the relevant technologies are adopted
With, to charging mode, being cooperated by the provider of Web content with network operator, can be provided for mobile terminal user after flow
Exempt from the network service of flow.That is, user uses certain specific nets in the case where mobile terminal opens mobile network
Traffic fee is exempted from network service, for example, promoting the application downloading of class.Simultaneously, other network services that user uses
It is that charge on traffic is carried out to user.
Summary of the invention
Purpose of this disclosure is to provide a kind of method for connecting network and devices, to solve the destination application of mobile terminal
Access network service when, other applications may escape flow the technical issues of.
To achieve the above object, the disclosure adopts the following technical scheme that
In a first aspect, providing a kind of method for connecting network, comprising:
Obtain the network connecting request that application program is initiated;
Meet the preset condition in the network connecting request, and when current cellular networks are in close state, calls
Private NNI, the private NNI are the disclosed network interfaces in system level;
Network service is accessed according to the private NNI.
Using above-mentioned method for connecting network, in the case that the cellular network of mobile terminal is in close state, specific net
Network connection request passes through the still accessible network service of private NNI.And for other network connecting requests, when it
When being unsatisfactory for preset condition, since the cellular network of mobile terminal is also turned off, can not connected network, avoid it is mobile eventually
In end when specific application program access network service, other applications escaption flow.
With reference to first aspect, in the first possible implementation of the first aspect, the preset condition, comprising: institute
The application identities for including in network connecting request are stated to be consistent with default application identities.That is, having specific application mark, example
As user identity proves that the application program of (User Identification, Uid) can be closed in the cellular network of mobile terminal
In the case where access network service.Wherein, the default application identities can be preset according to actual needs.
With reference to first aspect or the first possible implementation of first aspect, second in first aspect are possible
Implementation in, the private NNI be connectivity management ConnectivityManager class realize one it is privately owned
Interface, the calling private NNI includes: to begin to use network function according to the ConnectivityManager class
Private NNI described in StartUsingNetworkFeature method call, wherein described
The incoming parameter of StartUsingNetworkFeature method includes specified network interconnection Protocol IP address.The explanation of value
It is that ConnectivityManager is a class of Android system bottom, is mainly used for managing and being connected to the network relevant behaviour
Make.Above-mentioned possible implementation newly defines a privately owned interface in system bottom, allows specifically to apply in mobile terminal
Program passes through the privately owned interfacing between network in the case where cellular network is turned off.
The possible implementation of second with reference to first aspect, in the third possible implementation of first aspect
In, it is described that network service is accessed according to the private NNI, comprising: to be accessed according to the private NNI in the finger
Determine the specific network service of IP address deployment.In above-mentioned possible implementation, the provider of network service can be with net
Network operators in co-operation, the IP or IP that the provider of network service specifies specific Web Service Deployment in network operator
Section, so that provider's offer of mobile terminal also accessible network service in the case where cellular network is closed is specific
Service.The specific network service, which can be, exempts from flow prepaid mobile phone recharging, application program downloading etc..
In certain possible implementations, the method also includes: it is in close state in current cellular networks, and institute
When stating network connecting request and being unsatisfactory for the preset condition, Xiang Suoshu application program returns to network connection failure message.Above-mentioned
In possible implementation, in the case that the cellular network of the mobile terminal is turned off, for meeting the network of preset condition
Connection request, the mobile terminal can access network service by private NNI, for being unsatisfactory for the net of preset condition
Network connection request, the mobile terminal return to network connection failure message, application program are forbidden to network, and avoid escaption flow.
Second aspect provides a kind of network connection device, comprising:
Module is obtained, is configured as obtaining the network connecting request that application program is initiated;
Interface calling module is configured as meeting preset condition in the network connecting request that the acquisition module is got,
And current cellular network calls private NNI, the private NNI is in system level when being in close state
Upper disclosed network interface;
Network access module is configured as accessing net according to the private NNI that the interface calling module calls
Network service.
In conjunction with second aspect, in the first possible implementation of the second aspect, the preset condition, comprising: institute
The application identities for including in network connecting request are stated to be consistent with default application identities.
In conjunction with the possible implementation of the first of second aspect or second aspect, second in second aspect may
Implementation in, the private NNI be connectivity management ConnectivityManager class realize one it is privately owned
Interface, the interface calling module are configured as: meet preset condition in the network connecting request that the acquisition module is got,
And current cellular networks begin to use network function according to the ConnectivityManager class when being in close state
Private NNI described in StartUsingNetworkFeature method call, wherein described
The incoming parameter of StartUsingNetworkFeature method includes specified IP address.
In conjunction with the third possible implementation of second aspect, in the third possible implementation of second aspect
In, the network access module is configured as: the spy disposed according to private NNI access in the specified IP address
Fixed network service.
The third aspect provides a kind of network connection device, comprising:
Processor;
For storing the memory of the executable instruction of the processor;
Wherein, the processor is configured to:
Obtain the network connecting request that application program is initiated;
Meet preset condition in the network connecting request, and when current cellular networks are in close state, calls dedicated
Network interface, the private NNI are the disclosed network interfaces in system level;
Network service is accessed according to the private NNI.
In certain possible implementations of the third aspect, the processor is also used to execute appointing for above-mentioned first aspect
A kind of method described in possible implementation.
Fourth aspect provides a kind of computer-readable medium, and for storing computer program, which includes using
The instruction of method in any possible implementation for executing first aspect or first aspect.
The disclosure can also be further combined on the basis of the implementation that above-mentioned various aspects provide to provide more
More implementations.Other feature and advantage of the disclosure will the following detailed description will be given in the detailed implementation section.
Detailed description of the invention
Attached drawing is and to constitute part of specification for providing further understanding of the disclosure, with following tool
Body embodiment is used to explain the disclosure together, but does not constitute the limitation to the disclosure.In the accompanying drawings:
Fig. 1 is a kind of disclosure schematic diagram of implementation environment shown according to an exemplary embodiment.
Fig. 2 is a kind of disclosure flow diagram of method for connecting network shown according to an exemplary embodiment.
Fig. 3 is a kind of flow diagram for method for connecting network that the disclosure is shown according to another exemplary embodiment.
Fig. 4 is a kind of flow diagram for method for connecting network that the disclosure is shown according to a further exemplary embodiment.
Fig. 5 is a kind of flow diagram of method for connecting network of the disclosure shown according to another exemplary embodiment.
Fig. 6 is a kind of flow diagram of method for connecting network of the disclosure shown according to another exemplary embodiment.
Fig. 7 is a kind of disclosure block diagram of network connection device shown according to an exemplary embodiment.
Fig. 8 is a kind of block diagram for network connection device that the disclosure is shown according to a further exemplary embodiment.
Specific embodiment
Example embodiments are described in detail here, and the example is illustrated in the accompanying drawings.Following description is related to
When attached drawing, unless otherwise indicated, the same numbers in different drawings indicate the same or similar elements.Following exemplary embodiment
Described in embodiment do not represent all implementations consistent with this disclosure.On the contrary, they be only with it is such as appended
The example of the consistent device and method of some aspects be described in detail in claims, the disclosure.
Fig. 1 is a kind of schematic diagram of implementation environment shown according to an exemplary embodiment.As shown in Figure 1, the implementation ring
Border includes mobile terminal 100.The mobile terminal 100 can be the user equipment that network service is accessed by mobile communications network,
Such as the user equipmenies such as smart phone, tablet computer, laptop.Fig. 1 illustrates so that mobile terminal 100 is smart phone.
Specifically, terminal device 100 can be installed there are many application program, and application program is sent out when accessing network service
Network connecting request is played, the network connecting request is based on, which can connect mobile communications network, access network clothes
Business.Wherein, Fig. 1 shows the service that prepaid mobile phone recharging is carried out on network.
Fig. 2 is a kind of flow chart of method for connecting network shown according to an exemplary embodiment, to solve the relevant technologies
Middle destination application access network service when, other applications may escape flow the technical issues of.The present embodiment shows
The method for connecting network out can be applied to mobile terminal as shown in Figure 1, as shown in Fig. 2, this method comprises:
In step 201, the network connecting request that application program is initiated is obtained.
In step 202, meet preset condition in the network connecting request, and current cellular networks are in close state
When, call private NNI.
Wherein, the private NNI is the disclosed network interface in system level.
In Android platform, the connectivity management ConnectivityManager class of system bottom is mainly responsible for inquiry net
It network connection status and gives notice when connection status changes.Its main function responsibility is as follows: monitoring is network-like
State, when network state changes, transmission broadcast notifies, can attempt to connect other networks after network connection failure, be application
Program provides API (Application Programming Interface, application programming interface), for obtaining network
Status information etc..
Illustratively, after receiving the network connecting request of application program transmission, pass through ConnectivityManager class
For the API that application program provides, whether the cellular network that can inquire the mobile terminal is closed.It, should if cellular network is opened
Mobile terminal can connect network according to the network connecting request according to existing process.If the cellular network is closed, and described
Network connecting request meets preset condition, for example, the application identities in the network connecting request are consistent with default application identities,
Then call private NNI.
It is worth noting that since the private NNI is disclosed network interface, basis in system level
The private NNI, application program can also access network in the case where the cellular network of application is closed.
In step 203, network service is accessed according to the private NNI.
Using above-mentioned method for connecting network, in the case that the cellular network of mobile terminal is in close state, specific net
Network connection request passes through the still accessible network service of private NNI.And for other network connecting requests, when it
When being unsatisfactory for preset condition, since the cellular network of mobile terminal is also turned off, can not connected network, avoid it is mobile eventually
In end when specific application program access network service, other applications escaption flow.
Fig. 3 is a kind of flow chart of the method for connecting network shown according to another exemplary embodiment.The present embodiment is shown
The method for connecting network can be applied to mobile terminal as shown in Figure 1, as shown in figure 3, this method comprises:
In step 301, the network connecting request that application program is initiated is obtained.
In step 302, the application identities for including in the network connecting request are consistent with default application identities, and work as
When preceding cellular network is in close state, private NNI is called.
In step 305, network service is accessed according to the private NNI.
That is, there is specific application mark, such as the application program of Uid can be closed in the cellular network of mobile terminal
Network service is accessed in the case where closing.Wherein, which can preset according to actual needs.
Above-mentioned to be merely illustrative, the disclosure can also preset other conditions in the specific implementation to control and apply journey
Sequence accesses the permission of network service by private NNI, for example, it is also possible to determine the URL in the network connecting request
Whether (Uniform Resource Locator, uniform resource locator) is consistent with default URL.The present invention does not limit this
It is fixed.
It is specific to be connected to the network in the case where the cellular network of mobile terminal is in close state using the above method
Request passes through the still accessible network service of private NNI.And for other network connecting requests, when it is unsatisfactory for
When preset condition, since the cellular network of mobile terminal is also turned off, can not connected network, avoid in mobile terminal special
When fixed application program access network services, other applications escaption flow.
Fig. 4 is a kind of flow chart of the method for connecting network shown according to another exemplary embodiment.The present embodiment is shown
The method for connecting network can be applied to mobile terminal as shown in Figure 1, as shown in figure 4, this method comprises:
In step 401, the network connecting request that application program is initiated is obtained.
In step 402, determine that current cellular network is in close state.
In step 403, determine whether the network connecting request meets preset condition.
Further, when the network connecting request meets the preset condition, step 404 and step 405 are executed;?
When the network connecting request is unsatisfactory for the preset condition, step 406 is executed.
In step 404, when the network connecting request meets the preset condition, private NNI is called.
In step 405, network service is accessed according to the private NNI.
In a step 406, when the network connecting request is unsatisfactory for the preset condition, Xiang Suoshu application program is returned
Network connection failure message.
In this way, in the case that the cellular network of the mobile terminal is turned off, for meeting the network connection of preset condition
Request, the mobile terminal can access network service by private NNI, and the network for being unsatisfactory for preset condition connects
Request is connect, the mobile terminal returns to network connection failure message, application program is forbidden to network, and avoids escaption flow.
Fig. 5 is a kind of flow chart of the method for connecting network shown according to another exemplary embodiment.The present embodiment is shown
The method for connecting network can be applied to mobile terminal as shown in Figure 1, as shown in figure 5, this method comprises:
In step 501, the network connecting request that application program is initiated is obtained.
In step 502, meet preset condition in the network connecting request, and current cellular networks are in close state
When, according to the StartUsingNetworkFeature method call private NNI of ConnectivityManager class.
Wherein, the private NNI is the privately owned interface that ConnectivityManager class is realized, described
The incoming parameter of StartUsingNetworkFeature method includes specified IP address.
Wherein, which can be mobile terminal and parses what the URL carried in the network connecting request was obtained
IP address shows position of the network service of network connecting request access on network.
In step 503, network service is accessed according to the private NNI.
The explanation of value, ConnectivityManager are a classes of Android system bottom, be mainly used for management and
It is connected to the network relevant operation.Above-mentioned possible implementation newly defines a privately owned interface in system bottom, allows to move
Specific application program passes through the privately owned interfacing between network in the case where cellular network is turned off in terminal.
In this way, specific network connecting request passes through in the case where the cellular network of mobile terminal is in close state
The still accessible network service of private NNI.And for other network connecting requests, when it is unsatisfactory for preset condition
When, since the cellular network of mobile terminal is also turned off, can not connected network, avoid in mobile terminal and specifically apply
When routine access network services, other applications escaption flow.
Fig. 6 is a kind of flow chart of the method for connecting network shown according to another exemplary embodiment.The present embodiment is shown
The method for connecting network can be applied to mobile terminal as shown in Figure 1, as shown in fig. 6, this method comprises:
In step 601, the network connecting request that the application program of mobile terminal is initiated is obtained.
In step 602, meet preset condition in the network connecting request, and current cellular networks are in close state
When, it is connect according to dedicated network described in the StartUsingNetworkFeature method call of ConnectivityManager class
Mouthful.
Wherein, the private NNI is the privately owned interface that ConnectivityManager class is realized, described
The incoming parameter of StartUsingNetworkFeature method includes specified network interconnection Protocol IP address.
In step 603, the specific network service in specified IP address deployment is accessed according to the private NNI.
Wherein, the provider of network service can cooperate with network operator, and the provider of network service is by specific net
IP that network service arrangement is specified in network operator or IP sections, so that mobile terminal is in the case where cellular network is closed
Also the specific service that the provider of accessible network service provides.The specific network service, which can be, exempts from flow mobile phone
It supplements with money, application program downloading etc..
Illustratively, the specific network service can be free charging mobile phone flow.Wherein, the provider of mobile data traffic with
And network operator can negotiate in advance, it is specified that smart phone user fills the campus network of flow generation by offer by network
Quotient undertakes.In this way, can disappear in the request for establishing network connection when smart phone fills flow on the net by mobile communications network
The mark that provider is carried in breath after network operator detects the mark of provider, can carry out charging to provider.
Under a kind of possible application scenarios, the flow package of smart phone has been used up, and ambient enviroment is without WLAN
(Wireless Local Area Networks, Wireless LAN), if at this point, smart phone will be undertaken with flow again
Costly campus network.At this time user would generally buy flow summation packet, continue to use the flow of material benefit.However, now
The buying behavior of almost all of flow packet requires to buy by internet, in this way, in the related technology, smart phone is being opened
Flow is bought in the case where cellular network, be will lead to other software networking and is expended a large amount of high price flows.
In the embodiments of the present disclosure, smart phone can allow to buy the net of flow in the case where closing cellular network
Network connection request is networked by private NNI.Since cellular network is turned off, other network connecting requests can not connect
Open network avoids smart phone when buying flow, other applications escaption flow.
Above-mentioned to be merely illustrative, the specific network service can also be other network services, for example, information pushes away
Extensively.Illustratively, after cell phone manufacturer's publication Mobile phone, in order to attract the official website of user's entry firm, cell phone manufacturer can and net
Network operator negotiates in advance, it is specified that the traffic fee that user accesses official website generation is undertaken by cell phone manufacturer.In this way, smart phone
Browser can initiate asking for the official website for accessing the cell phone manufacturer by private NNI in the case where cellular network is closed
Message is sought, realizes and exempts from traffic fee connection network and avoid when accessing specific network service, other of smart phone are answered
With program escaption flow.
Following Installation practices for the disclosure, can be used for executing disclosed method embodiment.The disclosure is filled
Undisclosed details in embodiment is set, disclosed method embodiment is please referred to.
Fig. 7 is the block diagram of disclosure one kind shown according to an exemplary embodiment.The device can pass through software, hardware
Or both be implemented in combination with as some or all of of mobile terminal.Wherein, which can also configure
In mobile terminal as shown in Figure 1.As shown in fig. 7, the device 700 may include:
Module 710 is obtained, is configured as obtaining the network connecting request that application program is initiated;
Interface calling module 720 is configured as meeting in the network connecting request that the acquisition module 710 is got default
Condition, and when current cellular networks closing, call private NNI;
Network access module 730 is configured as the private NNI called according to the interface calling module 720
Access network service.
It is specific to be connected to the network in the case where the cellular network of mobile terminal is in close state using above-mentioned apparatus
Request passes through the still accessible network service of private NNI.And for other network connecting requests, when it is unsatisfactory for
When preset condition, since the cellular network of mobile terminal is also turned off, can not connected network, avoid in mobile terminal special
When fixed application program access network services, other applications escaption flow.
Optionally, the preset condition includes the application identities for including and default application mark in the network connecting request
Sensible symbol.That is, there is specific application mark, such as the application program of Uid can be closed in the cellular network of mobile terminal
Network service is accessed in the case where closing.Wherein, which can preset according to actual needs.It is above-mentioned only to lift
Example explanation, the disclosure can also preset other conditions in the specific implementation and pass through private NNI to control application program
The permission of network service is accessed, for example, it is also possible to determine whether the URL in the network connecting request is consistent with default URL.This
Invention does not limit this.
Optionally, the private NNI is the privately owned interface that ConnectivityManager class is realized, described
Interface calling module 720 is configured as: meet preset condition in the network connecting request that the acquisition module 710 is got, and
When current cellular networks are in close state, according to the ConnectivityManager class
Private NNI described in StartUsingNetworkFeature method call, wherein described
The incoming parameter of StartUsingNetworkFeature method includes specified IP address.
The explanation of value, ConnectivityManager are a classes of Android system bottom, be mainly used for management and
It is connected to the network relevant operation.Above-mentioned possible implementation newly defines a privately owned interface in system bottom, allows to move
Specific application program passes through the privately owned interfacing between network in the case where cellular network is turned off in terminal.
Optionally, the network access module 730 is configured as: according to private NNI access described specified
The specific network service of IP address deployment.
That is, the provider of network service can cooperate with network operator, the provider of network service will be specific
The IP that specifies in network operator of Web Service Deployment or IP sections so that the feelings that mobile terminal is closed in cellular network
Also the specific service that the provider of accessible network service under condition provides.The specific network service, which can be, exempts from flow
Prepaid mobile phone recharging, application program downloading etc..
It is worth noting that the above module division to network connection device is a kind of logical function partition, it is practical to realize
When there may be another division manner.Also, the physics realization of above-mentioned each functional module may also be there are many implementation.
Also, about the device in above-described embodiment, wherein modules execute the concrete mode of operation related
It is described in detail in the embodiment of this method, no detailed explanation will be given here.
Fig. 8 is the block diagram of another network connection device 800 shown according to an exemplary embodiment.For example, device 800
It can be mobile phone, computer, tablet device etc..
Referring to Fig. 8, device 800 may include following one or more components: processing component 802, memory 804, electric power
Component 806, multimedia component 808, audio component 810, the interface 812 of input/output (I/O), sensor module 814, and
Communication component 816.
The integrated operation of the usual control device 800 of processing component 802, such as with display, telephone call, data communication, phase
Machine operation and record operate associated operation.Processing component 802 may include that one or more processors 820 refer to execute
It enables, to complete all or part of the steps of above-mentioned method for connecting network.In addition, processing component 802 may include one or more
Module, convenient for the interaction between processing component 802 and other assemblies.For example, processing component 802 may include multi-media module,
To facilitate the interaction between multimedia component 808 and processing component 802.
Memory 804 is configured as storing various types of data to support the operation in device 800.These data are shown
Example includes the instruction of any application or method for operating on device 800, contact data, and telephone book data disappears
Breath, picture, video etc..Memory 804 can be by any kind of volatibility or non-volatile memory device or their group
It closes and realizes, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM) is erasable to compile
Journey read-only memory (EPROM), programmable read only memory (PROM), read-only memory (ROM), magnetic memory, flash
Device, disk or CD.
Electric power assembly 806 provides electric power for the various assemblies of device 800.Electric power assembly 806 may include power management system
System, one or more power supplys and other with for device 800 generate, manage, and distribute the associated component of electric power.
Multimedia component 808 includes the screen of one output interface of offer between described device 800 and user.One
In a little embodiments, screen may include liquid crystal display (LCD) and touch panel (TP).If screen includes touch panel, screen
Curtain may be implemented as touch screen, to receive input signal from the user.Touch panel includes one or more touch sensings
Device is to sense the gesture on touch, slide, and touch panel.The touch sensor can not only sense touch or sliding action
Boundary, but also detect duration and pressure associated with the touch or slide operation.In some embodiments, more matchmakers
Body component 808 includes a front camera and/or rear camera.When device 800 is in operation mode, such as screening-mode or
When video mode, front camera and/or rear camera can receive external multi-medium data.Each front camera and
Rear camera can be a fixed optical lens system or have focusing and optical zoom capabilities.
Audio component 810 is configured as output and/or input audio signal.For example, audio component 810 includes a Mike
Wind (MIC), when device 800 is in operation mode, when such as call mode, recording mode, and voice recognition mode, microphone is matched
It is set to reception external audio signal.The received audio signal can be further stored in memory 804 or via communication set
Part 816 is sent.In some embodiments, audio component 810 further includes a loudspeaker, is used for output audio signal.
I/O interface 812 provides interface between processing component 802 and peripheral interface module, and above-mentioned peripheral interface module can
To be keyboard, click wheel, button etc..These buttons may include, but are not limited to: home button, volume button, start button and lock
Determine button.
Sensor module 814 includes one or more sensors, and the state for providing various aspects for device 800 is commented
Estimate.For example, sensor module 814 can detecte the state that opens/closes of device 800, and the relative positioning of component, for example, it is described
Component is the display and keypad of device 800, and sensor module 814 can be with 800 1 components of detection device 800 or device
Position change, the existence or non-existence that user contacts with device 800,800 orientation of device or acceleration/deceleration and device 800
Temperature change.Sensor module 814 may include proximity sensor, be configured to detect without any physical contact
Presence of nearby objects.Sensor module 814 can also include optical sensor, such as CMOS or ccd image sensor, at
As being used in application.In some embodiments, which can also include acceleration transducer, gyro sensors
Device, Magnetic Sensor, pressure sensor or temperature sensor.
Communication component 816 is configured to facilitate the communication of wired or wireless way between device 800 and other equipment.Device
800 can access the wireless network based on communication standard, such as WiFi, 2G or 3G or their combination.In an exemplary implementation
In example, communication component 816 receives broadcast singal or broadcast related information from external broadcasting management system via broadcast channel.
In one exemplary embodiment, the communication component 816 further includes near-field communication (NFC) module, to promote short range communication.Example
Such as, NFC module can be based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra wide band (UWB) technology,
Bluetooth (BT) technology and other technologies are realized.
In the exemplary embodiment, device 800 can be believed by one or more application specific integrated circuit (ASIC), number
Number processor (DSP), digital signal processing appts (DSPD), programmable logic device (PLD), field programmable gate array
(FPGA), controller, microcontroller, microprocessor or other electronic components are realized, for executing above-mentioned method for connecting network.
In the exemplary embodiment, a kind of non-transitorycomputer readable storage medium including instruction, example are additionally provided
It such as include the memory 804 of instruction, above-metioned instruction can be executed by the processor 820 of device 800 to complete above-mentioned network connection side
Method.For example, the non-transitorycomputer readable storage medium can be ROM, random access memory (RAM), CD-ROM, magnetic
Band, floppy disk and optical data storage devices etc..
Those skilled in the art will readily occur to other embodiment party of the disclosure after considering specification and practicing the disclosure
Case.This application is intended to cover any variations, uses, or adaptations of the disclosure, these modifications, purposes or adaptability
Variation follows the general principles of this disclosure and including the undocumented common knowledge or usual skill in the art of the disclosure
Art means.The description and examples are only to be considered as illustrative, and the true scope and spirit of the disclosure are by following claim
It points out.
It should be understood that the present disclosure is not limited to the precise structures that have been described above and shown in the drawings, and
And various modifications and changes may be made without departing from the scope thereof.The scope of the present disclosure is only limited by the accompanying claims.
Claims (5)
1. a kind of method for connecting network characterized by comprising
Obtain the network connecting request that application program is initiated;
Meet preset condition in the network connecting request, and when current cellular networks are in close state, calls dedicated network
Interface, the private NNI are the disclosed network interfaces in system level;
Network service is accessed according to the private NNI;
Wherein, the private NNI is the privately owned interface that connectivity management ConnectivityManager class is realized,
The calling private NNI includes:
Begin to use the network function side StartUsingNetworkFeature according to the ConnectivityManager class
Method calls the private NNI, wherein the incoming parameter of the StartUsingNetworkFeature method includes referring to
Determine network interconnection Protocol IP address;
It is described that network service is accessed according to the private NNI, comprising:
The specific network service disposed according to private NNI access in the specified IP address.
2. the method according to claim 1, wherein the preset condition, comprising:
The application identities for including in the network connecting request are consistent with default application identities.
3. a kind of network connection device characterized by comprising
Module is obtained, is configured as obtaining the network connecting request that application program is initiated;
Interface calling module is configured as meeting preset condition in the network connecting request that the acquisition module is got, and works as
When preceding cellular network is in close state, private NNI is called, the private NNI is disclosed in system level
Network interface;
Network access module is configured as the private NNI access network clothes called according to the interface calling module
Business;
Wherein, the private NNI is the privately owned interface that connectivity management ConnectivityManager class is realized,
The interface calling module is configured as:
Meet preset condition in the network connecting request that the acquisition module is got, and current cellular networks are in close state
When, the network function side StartUsingNetworkFeature is begun to use according to the ConnectivityManager class
Method calls the private NNI, wherein the incoming parameter of the StartUsingNetworkFeature method includes referring to
Determine IP address;
The network access module is configured as:
The specific network service disposed according to private NNI access in the specified IP address.
4. device according to claim 3, which is characterized in that the preset condition, including
The application identities for including in the network connecting request are consistent with default application identities.
5. a kind of network connection device characterized by comprising
Processor;
For storing the memory of the executable instruction of the processor;
Wherein, the processor is configured to:
Obtain the network connecting request that application program is initiated;
Meet preset condition in the network connecting request, and when current cellular networks are in close state, calls dedicated network
Interface, the private NNI are the disclosed network interfaces in system level;
Network service is accessed according to the private NNI;
Wherein, the private NNI is the privately owned interface that connectivity management ConnectivityManager class is realized,
The calling private NNI includes:
Begin to use the network function side StartUsingNetworkFeature according to the ConnectivityManager class
Method calls the private NNI, wherein the incoming parameter of the StartUsingNetworkFeature method includes referring to
Determine network interconnection Protocol IP address;
It is described that network service is accessed according to the private NNI, comprising:
The specific network service disposed according to private NNI access in the specified IP address.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610922135.2A CN106506405B (en) | 2016-10-21 | 2016-10-21 | Method for connecting network and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610922135.2A CN106506405B (en) | 2016-10-21 | 2016-10-21 | Method for connecting network and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106506405A CN106506405A (en) | 2017-03-15 |
CN106506405B true CN106506405B (en) | 2019-09-10 |
Family
ID=58319383
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610922135.2A Active CN106506405B (en) | 2016-10-21 | 2016-10-21 | Method for connecting network and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106506405B (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP2742616A2 (en) * | 2011-08-10 | 2014-06-18 | Samsung Electronics Co., Ltd. | System and method for applying extended accessing barring in wireless communication system |
CN104902454A (en) * | 2015-06-30 | 2015-09-09 | 北京奇虎科技有限公司 | Method, gateway and network access system for controlling data acquired by mobile terminal |
CN105050070A (en) * | 2015-07-07 | 2015-11-11 | 山东贝丰信息科技有限公司 | Free flux usage method and system |
CN105848117A (en) * | 2015-07-31 | 2016-08-10 | 维沃移动通信有限公司 | Recharging method and recharging device |
-
2016
- 2016-10-21 CN CN201610922135.2A patent/CN106506405B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP2742616A2 (en) * | 2011-08-10 | 2014-06-18 | Samsung Electronics Co., Ltd. | System and method for applying extended accessing barring in wireless communication system |
CN104902454A (en) * | 2015-06-30 | 2015-09-09 | 北京奇虎科技有限公司 | Method, gateway and network access system for controlling data acquired by mobile terminal |
CN105050070A (en) * | 2015-07-07 | 2015-11-11 | 山东贝丰信息科技有限公司 | Free flux usage method and system |
CN105848117A (en) * | 2015-07-31 | 2016-08-10 | 维沃移动通信有限公司 | Recharging method and recharging device |
Also Published As
Publication number | Publication date |
---|---|
CN106506405A (en) | 2017-03-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104159255B (en) | Terminal room shares the method and device of network | |
CN105450655B (en) | Apparatus bound method and apparatus | |
CN105392213B (en) | Connect the method and device of controlled smart machine | |
CN106126685B (en) | Page loading method and device | |
CN106507437B (en) | Intelligent equipment networking method and device | |
CN105553963B (en) | The control method and device of positioning service | |
CN104935744A (en) | Verification code display method, verification code display device and mobile terminal | |
CN104333643B (en) | Add the method for contact person, system and terminal | |
CN105657805B (en) | A kind of method and device of smart machine access wireless network | |
CN108833585A (en) | Information interacting method, device and storage medium | |
CN104093216A (en) | Method and device for wireless data transmission | |
CN106201610A (en) | Web application accesses the method and device of the primary function of terminal | |
CN106101177B (en) | Network Access Method and device | |
CN106488450B (en) | Connect the method and device of wireless network | |
CN106454998A (en) | Wireless local area network access method and apparatus, and terminal | |
CN108924820B (en) | Method, device, equipment and storage medium for realizing sharing of SIM card | |
CN108600529A (en) | Information interacting method, device and computer readable storage medium | |
CN105763601A (en) | File sharing method and device | |
CN104113620A (en) | Contact list updating method, updating device and user terminal | |
CN105307288B (en) | The method and apparatus disconnected | |
CN107070707B (en) | Method and device for determining initialization mode of router | |
CN106535194B (en) | Screen content sharing method, apparatus and system | |
CN105376399B (en) | For controlling the method and device of smart machine | |
CN104158851B (en) | A kind of dissemination system of Network, method and apparatus | |
CN105430642B (en) | Document transmission method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |