CN106954205B - Mobile data switch control method and device and mobile terminal - Google Patents

Mobile data switch control method and device and mobile terminal Download PDF

Info

Publication number
CN106954205B
CN106954205B CN201710310631.7A CN201710310631A CN106954205B CN 106954205 B CN106954205 B CN 106954205B CN 201710310631 A CN201710310631 A CN 201710310631A CN 106954205 B CN106954205 B CN 106954205B
Authority
CN
China
Prior art keywords
data switch
state
mobile
mobile data
value
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
Application number
CN201710310631.7A
Other languages
Chinese (zh)
Other versions
CN106954205A (en
Inventor
周汉心
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Oneplus Technology Shenzhen Co Ltd
Original Assignee
Oneplus Technology Shenzhen Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Oneplus Technology Shenzhen Co Ltd filed Critical Oneplus Technology Shenzhen Co Ltd
Priority to CN201710310631.7A priority Critical patent/CN106954205B/en
Publication of CN106954205A publication Critical patent/CN106954205A/en
Application granted granted Critical
Publication of CN106954205B publication Critical patent/CN106954205B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W8/00Network data management
    • H04W8/18Processing of user or subscriber data, e.g. subscribed services, user preferences or user profiles; Transfer of user or subscriber data
    • H04W8/183Processing at user equipment or user record carrier

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Telephone Function (AREA)
  • Telephonic Communication Services (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The invention provides a mobile data switch control method, a device and a mobile terminal, which relate to the technical field of communication, and the method is applied to the mobile terminal and comprises the following steps: when the state of the mobile data switch needs to be modified, judging whether the mobile terminal is currently provided with a data card or not; if not, using the identification value of the default data card to retrieve the mobile data switch state field in the preset database; the state value of the retrieved mobile data switch state field is changed. The invention can ensure the normal change of the mobile data switch state no matter whether the user executes the hot plug operation or not, ensures the smooth proceeding of the subsequent internet data service and effectively improves the user experience.

Description

Mobile data switch control method and device and mobile terminal
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a mobile data switch control method, an apparatus, and a mobile terminal.
Background
A mobile terminal (e.g., a mobile phone) is usually provided with a manual network searching function, and after the manual network searching function is started, the mobile terminal searches all networks in the environment where the mobile terminal is located for a user to manually select. In general, when a user enters system Settings and performs a manual Network searching operation, a Network operator application may first close a Mobile data switch to ensure that a Network searching process is not interrupted by a higher priority data service, record a state of the Mobile data switch in a Settings database with a character string of Mobile _ data + phoneSubId as a flag, and then start a PLMN (Public Land Mobile Network) searching process to search an operator Network. After the network is searched successfully or the user exits from the search process, the network operator application opens the mobile data switch marked by the mobile _ data + phonesubdi string again to recover the data service.
However, if the user performs a hot plug operation on the data card (i.e. the SIM card currently performing network communication) during the manual network searching process, the network searching process is forcibly interrupted. The network operator still turns on the data switch after the card is unplugged, because after the card is unplugged, the mobile terminal clears the subId (data card identifier), the subId becomes an invalid value 2147483643, the subId is an index value for searching the mobile data switch status character string in the Settings database, and the invalid subId causes that the corresponding mobile data switch status character string cannot be found, so the network operator applies the data switch which is closed before being correctly switched on, no data exists after the network searching process, and the user cannot surf the internet.
In order to solve the problem that the mobile data switch cannot be normally changed due to the hot plug operation, no effective solution is provided at present.
Disclosure of Invention
In view of the above, an object of the present invention is to provide a method and an apparatus for controlling a mobile data switch, and a mobile terminal, so as to solve the problem in the prior art that the mobile data switch cannot be normally changed due to hot plug operation.
The first technical scheme adopted by the invention is as follows: a mobile data switch control method is applied to a mobile terminal and comprises the following steps: when the state of a mobile data switch needs to be modified, judging whether a data card is installed at the current time of the mobile terminal; if not, using the identification value of the default data card to retrieve the mobile data switch state field in the preset database; the state value of the retrieved mobile data switch state field is changed.
Further, the method further comprises: and when a change instruction of the mobile data switch state is acquired, determining that the mobile data switch state needs to be modified.
Further, the method further comprises: when a change instruction of the mobile data switch state is acquired, reading a current telephone phone object and searching an identification value phoneSubId of a data card subId corresponding to the phone object; the step of retrieving the mobile data switch status field in the preset database using the identification value of the default data card includes: the identification value ddsSubId of the default data card is read, phoneSubId is replaced with ddsSubId, and the mobile data switch status field labeled mobile _ data + ddsSubId is retrieved from a preset database.
Further, the step of changing the state value of the retrieved mobile data switch state field includes: acquiring a value for setting a switch function enabled from the change instruction of the mobile data switch state; when the value of enabled is true, setting the state value of the searched mobile data switch state field to be 1; when the value of enabled is false, the state value of the retrieved mobile data switch state field is set to 0.
Further, the default data card is a SIM card that is defaulted by the system in advance to perform a data networking service, or the default data card is a data card when the state of the last mobile data switch is modified so far.
Further, the step of judging whether the mobile terminal is currently provided with the data card comprises: judging whether a data card of the mobile terminal is in a ready state or not; and if not, determining that the mobile terminal is not provided with the data card currently.
Further, the method further comprises: when a manual network searching starting instruction is received, a change instruction for closing the state of a mobile data switch is generated; and when a manual network searching ending instruction is received, generating a change instruction for starting the state of the mobile data switch.
Further, the method further comprises: and when the state value of the mobile data switch state field indicates that the mobile data switch is in an open state, starting a data dialing process to carry out internet surfing operation.
The second technical scheme adopted by the invention is as follows: a mobile data switch control device, which is applied to a mobile terminal, comprises: the judging module is used for judging whether the mobile terminal is currently provided with a data card or not when the state of the mobile data switch needs to be modified; the retrieval module is used for retrieving a mobile data switch state field in a preset database by using the identification value of the default data card when the judgment result of the judgment module is negative; and the state value changing module is used for changing the state value of the searched mobile data switch state field.
The third technical scheme adopted by the invention is as follows: a mobile terminal comprising a processor and a memory for storing instructions executable by the processor; the processor is configured to: when the state of a mobile data switch needs to be modified, judging whether a data card is installed at the current time of the mobile terminal; if not, using the identification value of the default data card to retrieve the mobile data switch state field in the preset database; the state value of the retrieved mobile data switch state field is changed.
The embodiment of the invention has the following beneficial effects:
according to the mobile data switch control method, the mobile data switch control device and the mobile terminal provided by the embodiment of the invention, whether the mobile terminal is provided with the data card or not is judged when the mobile data switch state needs to be modified, and the mobile data switch state field is searched by using the identification value of the default data card when the mobile data switch state does not exist, and the state value of the mobile data switch field is modified. According to the method, when the data card is hot-plugged, although the data card identification is removed, the mobile data switch state field can be searched by adopting the identification value of the default data card, so that the change of the state value is completed, the normal opening and closing operation of the mobile data switch is realized, the smooth proceeding of the subsequent internet data service is ensured, and the user experience degree is effectively improved.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
In order to make the aforementioned and other objects, features and advantages of the present invention comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a flowchart illustrating a first mobile data switch control method according to an embodiment of the present invention;
fig. 2 is a flowchart illustrating a second mobile data switch control method according to an embodiment of the present invention;
fig. 3 is a flowchart illustrating a third mobile data switch control method according to an embodiment of the present invention;
FIG. 4 is a flow chart of a manual network searching process involving data switch control provided by an embodiment of the present invention;
FIG. 5 is a schematic flow chart of a mobile data switch control method according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a first mobile data switch control device according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of a second mobile data switch control device according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of a third mobile data switch control device according to an embodiment of the present invention;
fig. 9 shows a schematic structural diagram of a mobile terminal according to an embodiment of the present invention.
Detailed Description
To make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The mobile terminal is provided with a mobile data switch, the state of the mobile data switch can be changed manually, for example, the icon of the mobile data switch is selected, that is, the mobile data switch is turned on, and correspondingly, the state value corresponding to the character string of mobile _ data + phonesubbid in the Settings database is 1, and the mobile terminal is used for performing data internet access service by using a mobile network. When the icon of the mobile data switch is not selected, the mobile data switch is in a closed state, and correspondingly, the state value corresponding to the character string of mobile _ data + phonesubdi in the Settings database is 0, namely the data internet access service of the mobile network is closed on the mobile terminal side. In addition to manually changing the state of the mobile data switch, the mobile terminal may also automatically modify its state according to current operational needs. In order to ensure that the state value of the mobile data switch can be correctly modified when the state of the mobile data switch needs to be modified, embodiments of the present invention provide a method, an apparatus, and a mobile terminal for controlling the mobile data switch.
The first embodiment is as follows:
referring to a flowchart of a first mobile data switch control method shown in fig. 1, the method is applied to a mobile terminal, and specifically includes the following steps:
step S102, when the state of the mobile data switch needs to be modified, judging whether the mobile terminal is currently provided with a data card or not;
in this embodiment, the mobile terminal is provided with at least two SIM cards, one of the SIM cards is used as a data card, and the data card is a network card, so as to implement the network access function of the mobile terminal.
Whether the mobile terminal is provided with the data card can be determined by checking the state of the data card, and if the state of the data card is ready, the mobile terminal is determined to be provided with the data card; otherwise, determining that the mobile terminal is not provided with the data card.
Of course, other ways than the above-described way of reading the status of the data card may be taken, such as: the method has the advantages that the judgment of whether the mobile terminal is provided with the data card or not is realized by setting the record value of the plug-in data card, and in this way, when the data card is pulled out or inserted every time, the corresponding numerical value is recorded in the designated storage area, and whether the data card is arranged or not is determined according to the recorded numerical value. A person skilled in the art may select a specific implementation manner for determining whether the mobile terminal is currently installed with the data card according to the actual application, which is not limited in this embodiment of the present invention.
Considering that the hot plug operation may cause the real value (also called effective value) of the data card identification subId of the mobile terminal to be cleared and further become a randomly generated numerical value, which is called an invalid value, and the invalid value and the original true valid value of the subId are both in an integer form, it is difficult to judge whether the subId is valid according to the specific numerical value of the subId. By adopting the above method for judging whether the data card exists or not, the method can simply and reliably judge whether the subId is effective or not, and further guarantee the rationality of subsequent operation.
Step S104, retrieving a mobile data switch state field in a preset database by using the identification value of the default data card;
the mobile data card can be fixed as an SIM card corresponding to a certain card slot, or a system default SIM card can be used as the data card, or which SIM card is not fixed as the data card but determined as the data card according to the setting of a user; furthermore, the default data card of this embodiment may be a SIM card default to the system for performing data networking services in advance, or the default data card may also be a data card when the state of the last mobile data switch is modified so far.
In this embodiment, the preset database is specifically a settings database in the mobile terminal, the mobile data switch uses a mobile _ data + phonesubda string as a flag to be stored in the settings database in advance, and in addition, the settings database also stores a data card identifier subld, which corresponds to an identity of the SIM card itself, and the subld is also an index for retrieving a status string of the mobile data switch. However, after unplugging the subId, it is cleared and its identification value becomes a random invalid value, so that the mobile data switch cannot be found and its state changed. Based on this, in this embodiment, a manner of retrieving the mobile data switch status field in the settings database by using the identification value of the default data card may specifically be to update the mobile _ data + phonesubdic character string by using the identification value of the default data card, so that the updated mobile _ data + phonesubdic character string can be identified.
And step S106, changing the state value of the searched mobile data switch state field.
For example, changing the state value to 1 indicates that the data switch is to be opened, changing the state value to 0 indicates that the data switch is to be closed, and specifically, changing the state value to 1 or 0 is determined according to the actual application.
In the above mobile data switch control method provided in this embodiment, when the mobile data switch state needs to be modified, it is determined whether a data card is installed in the mobile terminal, and when there is no card, the default data card identification value is used to retrieve the mobile data switch state field, and change the state value. According to the method, when the data card is hot-plugged, although the data card identification is removed, the mobile data switch state field can be searched by adopting the identification value of the default data card, so that the change of the state value is completed, the normal opening and closing operation of the mobile data switch is realized, the smooth proceeding of the subsequent internet data service is ensured, and the user experience degree is effectively improved.
Example two:
based on the mobile data switch control method provided in the first embodiment, referring to a flowchart of a second mobile data switch control method shown in fig. 2, the method is described by taking an example of obtaining a change instruction of a mobile data switch state, and specifically includes the following steps:
step S202, acquiring a change instruction of the state of the mobile data switch;
and when a change instruction of the mobile data switch state is acquired, determining that the mobile data switch state needs to be modified. Specifically, the change instruction has the following two acquisition modes:
(1) when a manual network searching starting instruction is received, a change instruction for closing the state of a mobile data switch is generated;
(2) and when a manual network searching ending instruction is received, generating a change instruction for starting the state of the mobile data switch.
And step S204, judging whether the mobile terminal is currently provided with the data card. If not, go to step S206; if so, step S208 is performed.
In step S206, the mobile data switch status field in the preset database is retrieved using the identification value of the default data card.
And step S208, retrieving the mobile data switch state field in the preset database by using the identification value of the current data card.
And step S210, changing the state value of the searched mobile data switch state field according to the change instruction.
For example, when the change instruction is to close the mobile data switch state, the state value of the mobile data switch state field is changed to 0; when the change instruction is to turn on the mobile data switch state, the state value of the mobile data switch state field is changed to 1.
Further, the method further comprises: and when the state value of the state field of the mobile data switch indicates that the mobile data switch is in an open state, starting a data dialing process to carry out internet surfing operation.
According to the mobile data switch control method provided by the embodiment of the invention, the change of the state value of the mobile data switch is triggered through the change instruction, the operation process is simple and feasible, and the accuracy and reliability of the change of the state value are ensured. And searching by adopting the current data card identification value when judging that the data card exists, and searching by adopting the default data card identification value when judging that the data card does not exist. The method can ensure normal opening and closing operation of the mobile data switch no matter whether the data card exists or not, ensures smooth proceeding of subsequent internet data service, and effectively improves user experience.
Example three:
referring to a flowchart of a third mobile data switch control method shown in fig. 3, the method provides an embodiment of mobile data switch control, and specifically includes the following steps:
step S302, when a change instruction of the mobile data switch state is acquired, reading a current telephone phone object and searching an identification value phoneSubId of a data card subId corresponding to the phone object;
specifically, the modification command may be characterized by a set switch value enabled parameter, which indicates that the mobile data switch is to be turned on if the parameter is true, and indicates that the mobile data switch is to be turned off if the parameter is false. And when the change instruction is acquired, continuing the reading operation.
The phone object is a variable in an Android system and is used for managing various service requests of an upper layer, such as a call request, a short message request and the like; if the mobile phone is a dual-card mobile phone, 2 phone objects are arranged in the mobile phone. Typically, the identification value phoneSubId of the data card subId is an integer valid value, but results in the data card subId being cleared after a hot plug operation, with its identification value phoneSubId becoming an invalid value, such as 2147483643.
Step S304, judging whether the data card of the mobile terminal is in a ready state; if yes, executing steps S306 and S308; if not, executing step S310;
step S306, determining that the mobile terminal is currently provided with a data card;
step S308, searching a mobile data switch state field marked as mobile _ data + phoneSubId in a preset database; the mobile _ data + phonesubdid is specifically a mark field of a mobile data switch state corresponding to an identification value of a current data card in a settings database.
Step S310, determining that the mobile terminal is not provided with a data card currently;
step S312, reading the identification value ddsSubId of the default data card;
step S314, replace phoneSubId with ddsSubId;
step S316, searching a mobile data switch state field marked as mobile _ data + ddsSubId in a preset database; the mobile _ data + ddsSubId is specifically a tag field of the mobile data switch state corresponding to the identification value of the default data card in the settings database, and is a character string, for example, a character string "mobile _ data 1".
Step S318, obtaining the value of the setting switch function enabled from the change instruction of the mobile data switch state;
specifically, if the value of enabled is true, it indicates that the mobile data switch is to be turned on, and if the value of enabled is false, it indicates that the mobile data switch is to be turned off.
Step S320, judging whether the value of enabled is true or false; if it is true, go to steps S322 and S324; if false, go to step S326; normally, setting the value of enable to be "true" indicates turning on the mobile data switch, and setting the value of enable to be "false" indicates turning off the mobile data switch.
Step S322, setting the state value of the searched mobile data switch state field as 1; that is, when the state value is 1, it indicates that the movement data switch is in the on state.
Step S324, start the data dialing process to perform the internet access operation.
Step S326, setting the state value of the searched mobile data switch state field to be 0; that is, when the state value is 0, it indicates that the mobile data switch is in the off state.
The method for controlling a mobile data switch provided in this embodiment can read the identification value ddsSubId of the default data card and replace the original phoneSubId with ddsSubId when it is determined that the data card is not installed in the mobile terminal, so that the mobile data switch status field marked as mobile _ data + ddsSubId can be retrieved from the preset database, and the status value of the field can be normally changed.
Example four:
for the mobile data switch control method provided in the foregoing embodiment, the present embodiment takes manual network searching as an example for description, and refer to a manual network searching flowchart related to data switch control shown in fig. 4, which specifically includes the following steps:
step S402, starting network operator application, and entering manual network searching;
step S404, executing a data switch control flow; specifically, the data switch detection module acquires an enabled (false) parameter in the state change instruction, and executes a mobile data switch control flow;
step S406, starting a manual network searching process;
step S408, executing a data switch control flow; specifically, the data switch detection module acquires an enabled (true) parameter in the state change instruction, and executes a mobile data switch control flow;
step S410, starting a data dialing process;
step S412, the user accesses the internet.
In practical applications, the data switch control flow in the above steps S404 and S408 can be executed according to any one of the mobile data switch control methods in fig. 1-3, and can also be executed by referring to the following schematic flow chart of a mobile data switch control method shown in fig. 5, where fig. 5 simply and clearly shows the following key steps:
step S502, an enabled parameter is obtained. Specifically, the set switch value enabled is obtained, which indicates that the mobile data switch is to be turned on if it is tune, and indicates that the mobile data switch is to be turned off if it is false.
In step S504, phoneSubId is acquired. That is, the current phone object is acquired, and the value phonesubdi of the subId corresponding to the phone object is acquired.
Step S506, judging whether the SIM card is ready. If yes, go to step S512; if not, go to step S508; the SIM card is a data card.
Step S508, acquiring ddsSubId of the default data card; the value is not cleared by the hot plug operation, and is not changed even after the card is unplugged.
In step S510, phoneSubId is set to ddsSubId.
In step S512, the value of the mobile data switch state is set to enabled in the Settings database. Specifically, a value of the mobile data switch status marked with "mobile _ data" + phonesubdc in the Settings database is set, and the value is updated to a value corresponding to enable, and if enable is true, the value is set to 1, and if enable is false, the value is set to 0.
The data switch control flow in fig. 4 may be executed according to the above-described steps shown in fig. 5, so as to implement the control of the mobile data switch. No matter whether the data card exists or not, normal opening and closing operations of the mobile data switch can be guaranteed, and user experience is effectively improved.
Example five:
corresponding to the above embodiment, referring to the schematic structural diagram of the first mobile data switch control device shown in fig. 6, the device is applied to a mobile terminal, and specifically includes the following parts:
the determining module 602 is configured to determine whether a data card is currently installed in the mobile terminal when the mobile data switch state needs to be modified;
a retrieving module 604, configured to retrieve a mobile data switch status field in a preset database using the identification value of the default data card when the determination result of the determining module is negative;
a status value changing module 606 for changing the status value of the retrieved mobile data switch status field.
The mobile data switch control device provided in this embodiment determines whether a data card is installed in the mobile terminal when the mobile data switch state needs to be modified, and retrieves the mobile data switch state field using the identification value of the default data card when the mobile data switch state does not exist, and changes the state value of the mobile data switch state field. The method can avoid the problem that the mobile data switch state field cannot be correctly searched due to the fact that the data card identification is removed due to hot plug operation, and the default data card identification value is directly adopted for searching when no card exists so as to correctly search the mobile data switch state field and change the state value of the mobile data switch state field. The embodiment of the invention can ensure that the mobile data switch is normally opened no matter whether the user executes hot plug operation or not, thereby improving the user experience.
Further, referring to the schematic structural diagram of the second mobile data switch control device shown in fig. 7, on the basis of fig. 6, the second mobile data switch control device further includes:
and a modification determining module 702, configured to determine that the mobile data switch state needs to be modified when the change instruction of the mobile data switch state is acquired.
When a manual network searching starting instruction is received, a change instruction for closing the state of a mobile data switch is generated; and when a manual network searching ending instruction is received, generating a change instruction for starting the state of the mobile data switch.
And the internet access module 704 is used for starting a data dialing process to perform internet access operation.
Referring to the schematic structural diagram of the third mobile data switch control device shown in fig. 8, on the basis of fig. 7, the third mobile data switch control device further includes:
a reading module 802, configured to, when a change instruction of a mobile data switch state is acquired, read a current phone object and search for an identification value phonesubdi of a data card subId corresponding to the phone object;
the retrieval module 604 specifically includes a default card reading unit 6042, a replacement unit 6044, and a retrieval unit 6046. A default card reading unit 6042 configured to read the identification value ddsSubId of the default data card; a replacement unit 6044 for replacing phoneSubId with ddsSubId; the retrieving unit 6046 is configured to retrieve the mobile data switch status field labeled mobile _ data + ddsSubId in the preset database.
The state value changing module 606 specifically includes a switch value acquiring unit 6062, a first setting unit 6064, and a second setting unit 6066; the switch value acquiring unit 6062 is configured to acquire a value for setting a switch function enabled from the change instruction of the mobile data switch state; a first setting unit 6064 configured to set the state value of the retrieved mobile data switch state field to 1 when the value of enabled is true; the second setting unit 6066 is configured to set the state value of the retrieved mobile data switch state field to 0 when the value of enabled is false.
The device provided by the embodiment has the same implementation principle and technical effect as the foregoing embodiment, and for the sake of brief description, reference may be made to the corresponding contents in the foregoing method embodiment for the portion of the embodiment of the device that is not mentioned.
In summary, when the mobile data switch control device provided in this embodiment determines that the data card is not installed in the mobile terminal, the identification value ddsSubId of the default data card can be read, and the original phoneSubId is replaced with ddsSubId, so that the mobile data switch status field marked as mobile _ data + ddsSubId can be retrieved from the preset database, and the status value of the field can be normally changed.
Example six:
corresponding to the methods and apparatuses provided by the foregoing embodiments, the present embodiment provides a mobile terminal including a processor and a memory for storing processor-executable instructions;
the processor is configured to: when the state of the mobile data switch needs to be modified, judging whether the mobile terminal is currently provided with a data card or not; if not, using the identification value of the default data card to retrieve the mobile data switch state field in the preset database; the state value of the retrieved mobile data switch state field is changed.
Specifically, refer to fig. 9, which is a schematic structural diagram of a mobile terminal applicable to the embodiment of the present invention. The mobile terminal 100 includes a mobile data switch control device 101, a memory 102, a storage controller 104, one or more (only one shown) processors 106, a peripheral interface 108, a radio frequency module 110, an audio module 112, a touch screen 114, and the like. These components communicate with each other via one or more communication buses/signal lines 116.
The memory 102 may be used to store software programs and modules, such as program instructions/modules corresponding to the mobile data switch control method and apparatus in the embodiments of the present invention, and the processor 106 executes various functional applications and data processing, such as the mobile data switch control method provided in the embodiments of the present invention, by running the software programs and modules stored in the memory 102.
The memory 102 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. Access to the memory 102 by the processor 106, and possibly other components, may be under the control of the memory controller 104.
The peripheral interface 108 couples various input/output devices to the processor 106 as well as to the memory 102. In some embodiments, the peripheral interface 108, the processor 106, and the memory controller 104 may be implemented in a single chip. In other examples, they may be implemented separately from the individual chips.
The rf module 110 is used for receiving and transmitting electromagnetic waves, and implementing interconversion between the electromagnetic waves and electrical signals, so as to communicate with a communication network or other devices.
Audio module 112 provides an audio interface to a user that may include one or more microphones, one or more speakers, and audio circuitry.
The touch screen 114 provides both an output and an input interface between the mobile terminal 100 and a user. In the present embodiment, the touch screen 114 supports single-point and multi-point touch operations, for example, the touch screen 114 may be a capacitive touch screen or a resistive touch screen supporting single-point and multi-point touch operations. Supporting single and multi-touch operations is that the touch screen 114 senses simultaneous touch operations from one or more locations on the touch screen and passes the sensed multi-touch operations to the processor 106 for processing.
It is to be understood that the structure shown in fig. 9 is merely exemplary, and that the mobile terminal 100 may include more or fewer components than shown in fig. 9, or have a different configuration than shown in fig. 9. The components shown in fig. 9 may be implemented in hardware, software, or a combination thereof.
An embodiment of the present invention further provides a computer storage medium for storing computer software instructions for the mobile data switch control device, which includes a program designed for executing the above aspect for the active set update device. The instructions included in the program may be used to execute the method in the foregoing method embodiment, and specific implementation may refer to the method embodiment, which is not described herein again.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In the several embodiments provided in the present application, it should be understood that the disclosed method, system, and apparatus may be implemented in other ways. The above-described apparatus embodiments are merely illustrative, and for example, the division of the module is merely a logical division, and there may be other divisions in actual implementation, and for example, a plurality of modules or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
Finally, it should be noted that: the above-mentioned embodiments are only specific embodiments of the present invention, which are used for illustrating the technical solutions of the present invention and not for limiting the same, and the protection scope of the present invention is not limited thereto, although the present invention is described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: any person skilled in the art can modify or easily conceive the technical solutions described in the foregoing embodiments or equivalent substitutes for some technical features within the technical scope of the present disclosure; such modifications, changes or substitutions do not depart from the spirit and scope of the embodiments of the present invention, and they should be construed as being included therein. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (9)

1. A mobile data switch control method is applied to a mobile terminal and comprises the following steps:
when the state of a mobile data switch needs to be modified, judging whether a data card is installed at the current time of the mobile terminal;
if not, using the identification value of the default data card to retrieve the mobile data switch state field in the preset database;
changing the state value of the retrieved mobile data switch state field;
the method further comprises the following steps:
when a manual network searching starting instruction is received, a change instruction for closing the state of a mobile data switch is generated;
and when a manual network searching ending instruction is received, generating a change instruction for starting the state of the mobile data switch.
2. The method of claim 1, further comprising:
and when a change instruction of the mobile data switch state is acquired, determining that the mobile data switch state needs to be modified.
3. The method of claim 2, further comprising: when a change instruction of the mobile data switch state is acquired, reading a current telephone phone object and searching an identification value phoneSubId of a data card subId corresponding to the phone object;
the step of retrieving the mobile data switch status field in the preset database using the identification value of the default data card includes: reading the identification value ddsSubId of the default data card, replacing phoneSubId with ddsSubId, and retrieving the mobile data switch status field labeled mobile _ data + ddsSubId in the preset database.
4. The method of claim 2, wherein the step of changing the state value of the retrieved mobile data switch state field comprises:
acquiring a value for setting a switch function enabled from the change instruction of the mobile data switch state;
when the value of enabled is true, setting the state value of the searched mobile data switch state field to be 1;
when the value of enabled is false, the state value of the retrieved mobile data switch state field is set to 0.
5. The method of claim 1, wherein the default data card is a system pre-default SIM card for data networking service, or the default data card is a data card when a last mobile data switch status is modified so far.
6. The method according to claim 1, wherein the step of determining whether the mobile terminal is currently installed with the data card comprises:
judging whether a data card of the mobile terminal is in a ready state or not;
and if not, determining that the mobile terminal is not provided with the data card currently.
7. The method according to any one of claims 1-6, further comprising: and when the state value of the mobile data switch state field indicates that the mobile data switch is in an open state, starting a data dialing process to carry out internet surfing operation.
8. A mobile data switch control device, which is applied to a mobile terminal, comprises:
the judging module is used for judging whether the mobile terminal is currently provided with a data card or not when the state of the mobile data switch needs to be modified;
the retrieval module is used for retrieving a mobile data switch state field in a preset database by using the identification value of the default data card when the judgment result of the judgment module is negative;
the state value changing module is used for changing the state value of the searched mobile data switch state field;
the modification determining module is used for generating a modification instruction for closing the state of the mobile data switch when receiving a manual network searching starting instruction; and when a manual network searching ending instruction is received, generating a change instruction for starting the state of the mobile data switch.
9. A mobile terminal comprising a processor and a memory for storing instructions executable by the processor;
the processor is configured to: when the state of a mobile data switch needs to be modified, judging whether a data card is installed at the current time of the mobile terminal; if not, using the identification value of the default data card to retrieve the mobile data switch state field in the preset database; changing the state value of the retrieved mobile data switch state field; when a manual network searching starting instruction is received, a change instruction for closing the state of a mobile data switch is generated; and when a manual network searching ending instruction is received, generating a change instruction for starting the state of the mobile data switch.
CN201710310631.7A 2017-05-04 2017-05-04 Mobile data switch control method and device and mobile terminal Active CN106954205B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710310631.7A CN106954205B (en) 2017-05-04 2017-05-04 Mobile data switch control method and device and mobile terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710310631.7A CN106954205B (en) 2017-05-04 2017-05-04 Mobile data switch control method and device and mobile terminal

Publications (2)

Publication Number Publication Date
CN106954205A CN106954205A (en) 2017-07-14
CN106954205B true CN106954205B (en) 2019-12-27

Family

ID=59478213

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710310631.7A Active CN106954205B (en) 2017-05-04 2017-05-04 Mobile data switch control method and device and mobile terminal

Country Status (1)

Country Link
CN (1) CN106954205B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104104774A (en) * 2013-04-02 2014-10-15 中兴通讯股份有限公司 SIM card hot plugging method, device and system
CN106231080A (en) * 2016-07-22 2016-12-14 努比亚技术有限公司 Mobile terminal based on virtual client identification module card recovers method and mobile terminal
CN106358221A (en) * 2016-08-26 2017-01-25 刘华英 Method and device for recovering main card data

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104104774A (en) * 2013-04-02 2014-10-15 中兴通讯股份有限公司 SIM card hot plugging method, device and system
CN106231080A (en) * 2016-07-22 2016-12-14 努比亚技术有限公司 Mobile terminal based on virtual client identification module card recovers method and mobile terminal
CN106358221A (en) * 2016-08-26 2017-01-25 刘华英 Method and device for recovering main card data

Also Published As

Publication number Publication date
CN106954205A (en) 2017-07-14

Similar Documents

Publication Publication Date Title
US20100093396A1 (en) Systems and methods for storing or performing functions within removable memory, such as a subscriber identity module of a mobile device
CN106507445B (en) Wireless fidelity Wi-Fi scanning method and mobile terminal
CN107402835A (en) Abnormality eliminating method, device and the storage medium and mobile terminal of application program
CN109408465B (en) File attribution information recording method, device, storage medium and terminal
CN107911319B (en) Routing method of multiple security modules, NFC controller and NFC equipment
CN110475229B (en) Method and device for accessing service data, computer equipment and storage medium
CN107844342A (en) Management-control method, device and the storage medium and mobile terminal of application program keep-alive
WO2016197461A1 (en) Application software permission recommendation method, apparatus and system, and storage medium
US20160092441A1 (en) File Acquiring Method and Device
CN104991847A (en) Memory leakage automatic testing method and apparatus and mobile terminal
US11232066B2 (en) Method for data migration and terminal
CN108112010A (en) Access method, apparatus, terminal and the computer readable storage medium of network
CN107423064A (en) Message treatment method, device, terminal device and storage medium
CN107844341A (en) Management-control method, device and the storage medium and mobile terminal of process initiation
EP3486823A1 (en) System notification service control method, apparatus, terminal device, and storage medium
WO2014071774A1 (en) Method for registering terminal and terminal
US10938773B2 (en) Method and apparatus for synchronizing contact information and medium
JP2019510303A (en) Icon processing method and apparatus for application
EP2835737A1 (en) Data terminal running mode switching method, device, and data terminal
CN106954205B (en) Mobile data switch control method and device and mobile terminal
CN107734496A (en) Mobile terminal searches network control method, device and mobile terminal
US9753933B2 (en) Electronic device and method for mounting file system using virtual block device
CN109981873B (en) Address book permission opening method and device and electronic equipment
CN106507434B (en) Data processing method and device
CN104317727A (en) Mobile terminal and processing method of data partition

Legal Events

Date Code Title Description
PB01 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