CN114726905B - Method, device, equipment and storage medium for accessing Tbox network into Android system - Google Patents

Method, device, equipment and storage medium for accessing Tbox network into Android system Download PDF

Info

Publication number
CN114726905B
CN114726905B CN202210225392.6A CN202210225392A CN114726905B CN 114726905 B CN114726905 B CN 114726905B CN 202210225392 A CN202210225392 A CN 202210225392A CN 114726905 B CN114726905 B CN 114726905B
Authority
CN
China
Prior art keywords
network
tbox
android system
extended
factory
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
CN202210225392.6A
Other languages
Chinese (zh)
Other versions
CN114726905A (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.)
ThunderSoft Co Ltd
Original Assignee
ThunderSoft 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 ThunderSoft Co Ltd filed Critical ThunderSoft Co Ltd
Priority to CN202210225392.6A priority Critical patent/CN114726905B/en
Publication of CN114726905A publication Critical patent/CN114726905A/en
Application granted granted Critical
Publication of CN114726905B publication Critical patent/CN114726905B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Stored Programmes (AREA)
  • Telephonic Communication Services (AREA)

Abstract

The embodiment of the application discloses a method, a device, equipment and a storage medium for accessing a Tbox network into an Android system. The method comprises the following steps: responding to the starting of the Android system, registering and creating an expansion connection service; creating an extended network tracking object based on the extended connection service; after the extended connection service creates a thread, calling a starting interface of the extended network tracking object to acquire a network management object; creating a Tbox network factory object by the extended network tracking object according to the network management object as the Tbox type; and controlling the Tbox network factory object to register with the connectivityService of the Android system, and establishing a communication mechanism between the connectivityService and the Tbox network factory object. The technical scheme provided by the application can enable the Tbox type expanded network to establish a communication mechanism with the connectivityService of the Android system, and the connectivityService is utilized to manage the Tbox type expanded network, so that the network requirement of an application layer App of the Android system is met.

Description

Method, device, equipment and storage medium for accessing Tbox network into Android system
Technical Field
The embodiment of the application relates to the technical field of communication, in particular to a method, a device, equipment and a storage medium for accessing a Tbox network into an Android system.
Background
Tbox (Telematics BOX) remote communication box Can read car Can bus data and private protocol, is mainly used for mobile phone App (application program) and background system communication, and realizes the control to the vehicle. Along with development of vehicle-mounted entertainment, more and more vehicle-mounted application programs need to realize entertainment functions through a network, the network generally needs to pass through a Tbox, and the Tbox is not only responsible for surfing the Internet, but also responsible for interacting with core components, so that a general vehicle-mounted entertainment system and the Tbox are separated, and in order to meet the requirement of providing diversified services for users, the general vehicle-mounted entertainment system adopts an Android system. At present, when a Tbox is accessed to an Android system, a path is often set through a strategy of VLAN, ip route and ip rule, namely, the path is directly set in a Native layer instead of being set through a Android Framework layer. Therefore, the network access can be set only, and the network requirements of an application layer App of the Android system cannot be met.
Disclosure of Invention
The embodiment of the application provides a method, a device, equipment and a storage medium for accessing a Tbox network into an Android system, wherein a communication mechanism is established between a Tbox type expansion network and a connectityService of the Android system, the connectityService is utilized to manage the Tbox type expansion network, and the Android Framework layer is set to meet the network requirements of an application layer App of the Android system. The technical proposal is as follows:
in one aspect, an embodiment of the present application provides a method for accessing a Tbox network to an Android system, where the method includes:
responding to the starting of the Android system, registering and creating an expansion connection service;
creating an extended network tracking object based on the extended connection service;
after the extended connection service creates a thread, calling a starting interface of the extended network tracking object, and acquiring a network management object;
creating a Tbox network factory object by the extended network tracking object according to the network management object as the Tbox type;
and controlling the Tbox network factory object to register with the connectivityService of the Android system, and establishing a communication mechanism between the connectivityService and the Tbox network factory object.
On the other hand, an embodiment of the present application provides a device for accessing a Tbox network to an Android system, where the device includes:
the connection service registration module is used for registering and creating an expansion connection service in response to the starting of the Android system;
the tracking object creation module is used for creating an extended network tracking object based on the extended connection service;
the management object acquisition module is used for calling a starting interface of the extended network tracking object after the extended connection service creates a thread and acquiring a network management object;
the factory object creating module is used for creating a Tbox network factory object for the expanding network tracking object according to the network management object as the Tbox type;
and the system service registration module is used for controlling the Tbox network factory object to register with the connectityService of the Android system and establishing a communication mechanism between the connectityService and the Tbox network factory object.
In yet another aspect, an embodiment of the present application provides a computer device, where the computer device includes a processor and a memory, where at least one instruction, at least one program, a code set, or a set of instructions is stored, where the at least one instruction, the at least one program, the set of code, or the set of instructions are loaded and executed by the processor to implement the method described in the above aspect.
In yet another aspect, embodiments of the present application provide a computer readable storage medium having stored therein at least one instruction, at least one program, a set of codes, or a set of instructions, the at least one instruction, the at least one program, the set of codes, or the set of instructions being loaded and executed by a processor to implement the method of the above aspect.
In yet another aspect, embodiments of the present application provide a computer program product for performing the method of the above aspect when the computer program product is executed.
According to the technical scheme provided by the embodiment of the application, after receiving the starting instruction of the Android system, the Android system is started, and the expansion connection service is registered and created; when the extended connection service is created, an extended network tracking object is created, and the extended network tracking object is used for tracking and managing an extended network; after the expansion connection service creates the expansion network tracking object, creating a thread, calling a starting interface of the expansion network tracking object to initialize in the thread, and acquiring a network management object by using the expansion network tracking object; creating a Tbox network factory object by expanding a network tracking object according to the network management object as the Tbox type; and further controlling the Tbox network factory object to register with the connectivityService of the Android system, and establishing a communication mechanism between the connectivityService and the Tbox network factory object. After a communication mechanism between connectivityService and Tbox network factory objects is established, the connectivityService of the Android system can be utilized to manage the Tbox network factory objects, when network needs exist in an application layer, the connectivityService is utilized to provide network services for the application layer, the Framework layer of the Android system is set, expansion connection services are additionally arranged, and network requirements of an application layer App of the Android system can be met through the expansion connection services and native services provided by the Android system.
Drawings
Fig. 1 is a flow chart of a method for accessing a Tbox network to an Android system according to an embodiment of the present application;
fig. 2 is a flowchart of a method for accessing a Tbox network to an Android system according to an embodiment of the present application;
fig. 3 is a flowchart second time sequence diagram of a method for accessing a Tbox network to an Android system according to another embodiment of the present application;
fig. 4 is a system block diagram corresponding to a method for accessing a Tbox network to an Android system according to an embodiment of the present application;
fig. 5 is a block diagram of a device for accessing a Tbox network to an Android system according to an embodiment of the present application;
fig. 6 is a block diagram of a computer device according to an embodiment of the present application.
Detailed Description
Summary of the application
In the method, after receiving a starting instruction of the Android system, the Android system is started, and an expansion connection service is registered and created; when the extended connection service is created, an extended network tracking object is created, and the extended network tracking object is used for tracking and managing an extended network; after the expansion connection service creates the expansion network tracking object, creating a thread, calling a starting interface of the expansion network tracking object to initialize in the thread, and acquiring a network management object by using the expansion network tracking object; according to the network management object being of a Tbox type, expanding the network tracking object to create a Tbox network factory object; and further controlling the Tbox network factory object to register with the connectivityService of the Android system, and establishing a communication mechanism between the connectivityService and the Tbox network factory object. After a communication mechanism between connectivityService and Tbox network factory objects is established, the connectivityService of the Android system can be utilized to manage the Tbox network factory objects, when network needs exist in an application layer, the connectivityService is utilized to provide network services for the application layer, the Framework layer of the Android system is set, expansion connection services are additionally arranged, and network requirements of an application layer App of the Android system can be met through the expansion connection services and native services provided by the Android system.
Embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
Referring to fig. 1, a flowchart of a method for accessing a Tbox network to an Android system according to an embodiment of the present application is shown. The method may comprise the following steps:
and step 101, in response to the starting of the Android system, registering and creating an expansion connection service.
In an embodiment, after receiving a start instruction, the Android system starts to start, and when the Android system starts, registration of an extension connection service (extconnectityservice) is performed. Specifically, in response to the start of the Android system, after the Package Manager Service scanning system of the Android system is applied, starting an expansion connection service through Activity Manager Service and registering the expansion connection service, wherein the expansion connection service is integrated in the Android system, and Package Manager Service (package management service) manages all tasks related to the package.
In one possible implementation, package Manager Service may be utilized to start the ExtConnectivityServiceApp, after the Android System is started, the system_server will be started, the system_server process will be started Package Manager Service and Activity Manager Service, activity Manager Service will start the relevant process according to the information in Package Manager Service, and start the ExtConnectivityServiceApp.
In one embodiment, referring to fig. 2, extconnectityserviceapp calls an onCreate () function, and a startService () function is further called in the onCreate () function to turn on the registered extconnectityservice through startService (). Specifically, the ExtConnectivyServiceApp sets android, persistence= "true" so that the ExtConnectivyServiceApp starts along with the start of the system, and after the ExtConnectivyServiceApp is forcibly terminated, the system restarts the ExtConnectivyServiceApp so that the ExtConnectivyServiceService can work normally and no influence is exerted on network connection.
And 102, creating an extended network tracking object based on the extended connection service.
In one embodiment, an extended network trace object (ExtNetworkTracker) is responsible for tracking an extended network of management.
It should be noted that, if the implementation manner of the interface method is directly defined when the extconnectityservice interface corresponding to the extended connection service is defined, at this time, the extended connection service corresponds to the extconnectityservice, and further, a new ExtNetworkTracker may be created by directly using the extconnectityservice to call new ExtNetworkTracker () function, and after the ExtNetworkTracker is created, the ExtNetworkTracker returns the creation result to the extconnectityservice.
If an interface method is needed to be specifically implemented by using an ExtConnectiyServicempl when an ExtConnectiyServiceService interface corresponding to the extended connection service is defined, the extended connection service corresponds to ExtConnectiyServiceServicempl and ExtConnectiyServiceServicempl. In one possible implementation, referring to fig. 2, after the extconnectityservice is started, the extconnectityservice calls onCreate () function and calls start () function to create extconnectityservicell, where the extconnectityservicell is a real core service for expanding the network, and provides network service capability for the application layer, which is a specific implementation of the extconnectityservicel. When the ExtConnectitivinyServicelmpl is created, a new ExtNetworkTracker () function is called, a new ExtNetworkTracker is created, and after the ExtNetworkTracker is created, the ExtNetworkTracker returns the creation result to the ExtConnectitivinyServicelmpl.
Step 103, after the extended connection service creates a thread, calling a starting interface of the extended network tracking object, and acquiring a network management object.
In an embodiment, after the extnetwork tracker is created, the ExtConnectivityService creates a thread, then calls a start interface of the extnetwork tracker in the thread to start initialization processing, and then the extnetwork tracker needs to acquire a network management object in order to realize tracking management of the extended network.
Specifically, the calling the starting interface of the extended network tracking object and obtaining the network management object includes: calling a starting interface of the extended network tracking object to initialize; reading configuration information from a resource file; and constructing a virtual network based on the configuration information, and acquiring a network management object. When a network management object is acquired, the ExtNetworkTracker firstly reads configuration information (see the content in 13-19 in FIG. 2) from a resource file (resource in FIG. 2), then analyzes the configuration information, judges whether an Overlay process is required according to an analysis result, and currently, an Android system supports two types of static Overlay and dynamic Overlay, wherein the static Overlay is mainly used for items capable of modifying source codes, namely, the configuration file is modified; the dynamic overlay is mainly used for modifying the binary release item, and in this embodiment, the overlay action is mainly performed on the binary modified item. A virtual network can be constructed on the existing physical network by utilizing the overlay technology, so that the virtual network is constructed, and a network management object is acquired. In a possible implementation manner, the Tbox is accessed to the Android system through the USB, and a network management object of the Tbox type is constructed by using a virtual network card protocol of the USB, so that the subsequent Android system can meet the network interaction requirement of an Android Native/Framework/App layer in a network card control mode.
And step 104, creating a Tbox network factory object by the extended network tracking object according to the network management object as the Tbox type.
In one embodiment, after the network management object is acquired, the ExtNetworkTracker creates a Tbox network factory object (Tbox network factory) when the network management object is of a Tbox type. Creating a tboxnetworkfactor provides conditions for subsequent registration with ConnectivityService.
And 105, controlling the Tbox network factory object to register with the connectivityService of the Android system, and establishing a communication mechanism between the connectivityService and the Tbox network factory object.
In an embodiment, after the tboxnetworkfactor is established, the tboxnetworkfactor registers with connectivintyservice of the Android system, a communication mechanism between connectityservice and tboxnetworkfactor is established, and interaction between connectityservice and tboxnetworkfactor is implemented based on the communication mechanism. The ConnectivityService is a system network connection management service, is a core class of the whole Android Framework layer network framework, and mainly processes App network monitoring and request to inform network change; processing network registration of each link and updating link information; and detecting network quality evaluation and selecting a network.
In a possible implementation manner, referring to fig. 3, the controlling the registration of the Tbox network factory object with the ConnectivityService of the Android system includes: the Tbox network factory object calls a registration method to register a network factor of an Android system; and the network factory calls a network factory registering method to register the Tbox network factory object into the connectivityService through a connectivityManager of the Android system.
In the implementation manner, when the network management object is a Tbox type (ifname=tbox), the extranetworktracker creates and registers a Tbox networkfactor, after registering the Tbox networkfactor, the Tbox networkfactor further calls a register () function to register NetworkFactory, networkFactory of the Android system to call the register networkfactor () function to be registered with connectityservice, and when registering, the register networkfactor () function called by networkfactor is first registered with the connectitymanager, so that the connectitymanager further calls the register networkfactor () to be registered with connectityservice. The ConnectivityManager is mainly responsible for inquiring the network connection state and sending out a notification when the connection state changes.
Specifically, after registration is completed, connectivityService returns a registration result to ConnectivityManager, connectivityManager returns a registration result to networkfactor, networkfactor returns a registration result to tboxnetworkfactor, and tboxnetworkfactor returns a registration result to ExtNetworkTracker (see contents 28-31 in fig. 3).
In one possible implementation manner, the extended network tracking object registers a monitoring function with a network management service of the Android system, and acquires state data of the network management object based on the monitoring function. Specifically, after the ExtNetworkTracker obtains the returned registration result, a monitoring function (refer to the content 34-35 in FIG. 3) is registered with NetworkManagementService, where NetworkManagementService is a network management service, a channel for communication with Netd is established for the services in connectityService and other frameworks, and Netd is responsible for management and control of the Android network. The monitoring function is utilized to acquire the state data of the network management object, and when the state data shows that the state of the network changes, the configuration operation can be carried out on the network port of the network management object. That is, in this embodiment, by adding ExtConnectivityService to the Android Framework layer network framework, and simultaneously using the Android native networkfactor, the Android system NetworkManagementService, netd, and the like, the change of the network is monitored, and the system service is notified of the change through extconnectivityserice, and finally the change is fed back to each App, so as to meet the requirements of the Android system application layer App for connecting Tbox networks.
In a possible implementation manner, after the step of calling the network factory to register the Tbox network factory object in the ConnectivityService through the ConnectivityManager of the Android system, the method further includes: the ConnectivityService requests a network from the network factor; and the network factor processes the request to call a network opening method in the Tbox network factory object, and acquires a network address corresponding to the Tbox network factor for network connection.
In the implementation manner, connectityservice makes a network REQUEST to a network factor corresponding to the Tbox network, and referring to 36-40 in fig. 3, connectityservice sends cmd_request_ NETWORK, networkFactory to the network factor to process the network REQUEST, that is, call a handleAddRequest () function, and call a startNetwork () function in the Tbox network factor, so that the Tbox network factor calls maybe startIpManager () function, and starts a StartIpManager to process an address of the Tbox, so that a network service is provided by using the Tbox network, and a communication mechanism between connectityservice and a factory object of the Tbox network is established.
It should be noted that, in the startup process of the SystemServer, various services are started, and because the extconnectityservice needs to interact with the connectityservice in this embodiment, after the SystemServer starts the connectityservice, the extconnectityservice is started, where the SystemServer is one of the cores of the Android system, and is the most basic requirement for the Android system to operate, and most of the services provided by the Android operate in this process.
In the embodiment provided by the application, after receiving the starting instruction of the Android system, the Android system is started, and the expansion connection service is registered and created; when the extended connection service is created, an extended network tracking object is created, and the extended network tracking object is used for tracking and managing an extended network; after the expansion connection service creates the expansion network tracking object, creating a thread, calling a starting interface of the expansion network tracking object to initialize in the thread, and acquiring a network management object by using the expansion network tracking object; according to the network management object being of a Tbox type, expanding the network tracking object to create a Tbox network factory object; and further controlling the Tbox network factory object to register with the connectivityService of the Android system, and establishing a communication mechanism between the connectivityService and the Tbox network factory object. After a communication mechanism between connectivityService and Tbox network factory objects is established, connectivityService of an Android system can be utilized to manage the Tbox network factory objects, when network needs exist in an application layer, connectivityService is utilized to provide network services for the application layer, framework layers of the Android system are set, expansion connection services are additionally arranged, development of the Tbox is customized through the expansion connection services and native services provided by the Android system, and network requirements of an application layer App of the Android system are met under the condition that customized development of application programs of a third party is not needed.
In an exemplary embodiment of the present application, before the creating a Tbox network factory object for the Tbox type according to the network management object, the method further includes:
and step 106, determining the management type of the network management object, wherein the management type comprises a Tbox type and an Ethernet type.
In an embodiment, the network management object includes not only a Tbox type but also an Ethernet type, so after the network management object is acquired, the management type of the network management object is determined, and when the network management object is a Tbox type, the expansion network tracking object creates a Tbox network factory object.
In an embodiment, the method further comprises: and step 107, if the network management object is an Ethernet type, the extended network tracking object creates an extraethernet network factory object.
And step 108, controlling the ExtEthernet network factory object to register with the connectityService and establishing a communication mechanism between the connectityService and the ExtEthernet network factory object.
In one embodiment, when the network management object is an Ethernet type, the ExtNetworkTracker creates an ExtEthernet network factory object (ExtEthernet factory).
After the establishment of the ExtEthernet network factor, the ExtEthernet network factor registers with the connectityService of the Android system, and a communication mechanism between the connectityService and the ExtEthernet network factor is established.
In a possible implementation manner, the controlling the registration of the extraethernet network factory object with the ConnectivityService of the Android system includes: the ExtEthernet network factory object calls a registration method to register a network factor of an Android system; and calling a network factory registration network factory method corresponding to the ExtEthernet network factory object to register the ExtEthernet network factory object to a connectityservice through a connectitymanager of an Android system.
In the above implementation, referring to 23-27 in fig. 3, when the extnetworktracker is in ifname=ethernet, an extnetworkfactor is created and registered, after the extnetworkfactor is registered, the extnetworkfactor further calls a register () function to register NetworkFactory, networkFactory of the Android system, and when registering, the register networkfactor () function called by the networkfactor is first registered in the connectitymanager, so that the connectitymanager further calls the register networkfactor () function to register to connectityservice.
Specifically, after registration is completed, connectivityService returns a registration result to ConnectivityManager, connectivityManager returns a registration result to networkfactor corresponding to the extraethernet network factory object, which returns a registration result to extraethernet workfactor, and extraethernet workfactor returns a registration result to extranetworktracker (refer to contents of 28, 29, 32, and 33 in fig. 3).
In one possible implementation manner, the ExtNetworkTracker registers a monitoring function with a networkmanagement service of the Android system, and acquires state data of the network management object based on the monitoring function. After the ExtNetworkTracker obtains the returned registration result, registering a monitoring function with the NetworkManagementService, obtaining the state data of the network management object by using the monitoring function, and carrying out configuration operation on the network port of the network management object when the state data shows that the state of the network is changed.
In a possible implementation manner, after the step of calling the network factory registration method by the Ethernet factory object corresponding to the network factory to register the Ethernet factory object in the ConnectivityManager of the Android system, the method further includes: the ConnectivityService requests a network from the network factor; and the network factor corresponding to the ExtEthernet network factor processes the request to call a network opening method in the Ethernet network factory object, and acquires a network address corresponding to the ExtEthernet network factor for network connection.
In the implementation manner, connectityservice makes a network REQUEST to a network factor corresponding to an Ethernet network factor, and as shown in 36, 37 and 41-43 in fig. 3, connectityservice sends cmd_request_ NETWORK, networkFactory to the network factor to process the network REQUEST, that is, call a handleAddRequest () function, and call a startNetwork () function in the Ethernet network factor, so that the Ethernet network factor calls maybe startIpManager () function, and starts StartIpManager to process an address of Ethernet, so that a network service is provided by using the Ethernet network, and a communication mechanism between connectityservice and the Ethernet network factor is established.
In the above embodiment, the interaction between the extconnectityservice and the connectityservice is utilized to implement the management of the connectityservice on the Tbox network, the Ethernet network and other networks, so as to meet the network requirements of the Android system application layer App.
Fig. 4 shows a possible system frame diagram corresponding to the method for accessing the Android system through the Tbox network, where ExtConnectivityService, extConnectivityManager and oemfirewall. Sh are added in the system frame diagram. The ExtConnectivityManager is an Android API for expanding network configuration, and specifically is an Android API of a Tbox network; oemFirewall.sh is a firewall setting that ensures proper interaction between ExtConnectitiyService and ConnectiyService. And Netd, ethernetservice and Settings/Apps in the system are adaptively adjusted, and NetworkPolicyManager, networkPolicyManagerService, networkStatsManager, networkStatsService, connectivityManager, connectivityService, ethernetManager, networkManagementService, tethering, ifconfig, vconfig, VLAN in the system frame provides the native function for the Android system.
The following are examples of the apparatus of the present application that may be used to perform the method embodiments of the present application. For details not disclosed in the embodiments of the apparatus of the present application, please refer to the embodiments of the method of the present application.
Referring to fig. 5, a block diagram of an apparatus for accessing a Tbox network to an Android system according to an embodiment of the present application is shown. The device has the function of realizing the method example, and the function can be realized by hardware or can be realized by executing corresponding software by hardware. The apparatus 500 may include: the connection service registration module 510, the tracking object creation module 520, the management object acquisition module 530, the plant object creation module 540, and the system service registration module 550.
The connection service registration module 510 is configured to register and create an extended connection service in response to the startup of the Android system;
a tracking object creation module 520, configured to create an extended network tracking object based on the extended connection service;
a management object obtaining module 530, configured to invoke a start interface of the extended network tracking object after the extended connection service creates a thread, and obtain a network management object;
a factory object creation module 540, configured to create a Tbox network factory object for the extended network tracking object according to the network management object as a Tbox type;
and the system service registration module 550 is configured to control the Tbox network factory object to register with a connectityservice of the Android system, and establish a communication mechanism between the connectityservice and the Tbox network factory object.
In an exemplary embodiment of the application, the apparatus further comprises:
and the type determination processing module is used for determining the management type of the network management object, wherein the management type comprises a Tbox type and an Ethernet type.
In an exemplary embodiment of the application, the apparatus further comprises:
the type object processing module is used for creating an ExtEthernet network factory object by the extended network tracking object according to the Ethernet type of the network management object;
and the communication mechanism establishment module is used for controlling the ExtEthernet network factory object to register with the connectityService and establishing a communication mechanism between the connectityService and the ExtEthernet network factory object.
In an exemplary embodiment of the present application, a system service registration module includes:
the first registration processing unit is used for calling a registration method by the Tbox network factory object to register the network factor of the Android system;
and the second registration processing unit is used for calling a registration network factory method by the network factory so as to register the Tbox network factory object to the connectityservice through the connectitymanager of the Android system and establish a communication mechanism between the connectityservice and the Tbox network factory object.
In an exemplary embodiment of the present application, the second registration processing unit is configured to request, from the network factor, the network by using the ConnectivityService; and the network factor processes the request to call a network opening method in the Tbox network factory object, acquires a network address corresponding to the Tbox network factory object, performs network connection, and establishes a communication mechanism between the connectivityService and the Tbox network factory object.
In an exemplary embodiment of the present application, a management object obtaining module is configured to invoke a start interface of the extended network tracking object to initialize after the extended connection service creates a thread; reading configuration information from a resource file; and constructing a virtual network based on the configuration information, and acquiring a network management object.
In an exemplary embodiment of the application, the apparatus further comprises:
and the state data acquisition module is used for registering a monitoring function to the networkmanager service of the Android system by the extended network tracking object and acquiring the state data of the network management object based on the monitoring function.
It should be noted that, in the apparatus provided in the foregoing embodiment, when implementing the functions thereof, only the division of the foregoing functional modules is used as an example, in practical application, the foregoing functional allocation may be implemented by different functional modules, that is, the internal structure of the device is divided into different functional modules, so as to implement all or part of the functions described above. In addition, the apparatus and the method embodiments provided in the foregoing embodiments belong to the same concept, and specific implementation processes of the apparatus and the method embodiments are detailed in the method embodiments and are not repeated herein.
Referring to fig. 6, a block diagram of a computer device according to an embodiment of the application is shown. The computer device can be used for implementing the method for accessing the Android system to the Tbox network provided in the embodiment. The computer device may be a PC or server, or other device with data processing and storage capabilities. Specifically, the present application relates to a method for manufacturing a semiconductor device.
The computer apparatus 600 includes a Central Processing Unit (CPU) 601, a system memory 604 including a Random Access Memory (RAM) 602 and a Read Only Memory (ROM) 603, and a system bus 605 connecting the system memory 604 and the central processing unit 601. The computer device 600 also includes a basic input/output system (I/O system) 606 for facilitating the transfer of information between various devices within the computer, and a mass storage device 607 for storing an operating system 613, first application programs 614, and other program modules 615.
The basic input/output system 606 includes a display 608 for displaying information and an input device 609, such as a mouse, keyboard, etc., for a user to input information. Wherein the display 608 and the input device 609 are connected to the central processing unit 601 through an input output controller 610 connected to the system bus 605. The basic input/output system 606 may also include an input/output controller 610 for receiving and processing input from a number of other devices, such as a keyboard, mouse, or electronic stylus. Similarly, the input output controller 610 also provides output to a display screen, a printer, or other type of output device.
The mass storage device 607 is connected to the central processing unit 601 through a mass storage controller (not shown) connected to the system bus 605. The mass storage device 607 and its associated computer-readable media provide non-volatile storage for the computer device 600. That is, the mass storage device 607 may include a computer readable medium (not shown) such as a hard disk or CD-ROM drive.
The computer readable medium may include computer storage media and communication media without loss of generality. Computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Computer storage media includes RAM, ROM, EPROM, EEPROM, flash memory or other solid state memory technology, CD-ROM, DVD or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices. Of course, those skilled in the art will recognize that the computer storage medium is not limited to the one described above. The system memory 604 and mass storage device 607 described above may be collectively referred to as memory.
According to various embodiments of the application, the computer device 600 may also operate by being connected to a remote computer on a network, such as the Internet. I.e., the computer device 600 may be connected to the network 612 through a network interface unit 611 coupled to the system bus 605, or alternatively, the network interface unit 611 may be used to connect to other types of networks or remote computer systems (not shown).
The memory also includes one or more programs stored in the memory and configured to be executed by the one or more processors. The one or more programs include instructions for performing the method of accessing the Android system by the Tbox network.
In an example embodiment, there is also provided a computer device including a processor and a memory having at least one instruction, at least one program, set of codes, or set of instructions stored therein. The at least one instruction, at least one program, code set, or instruction set is configured to be executed by one or more processors to implement the method for accessing an Android system by a Tbox network described above.
In an exemplary embodiment, a computer readable storage medium is further provided, where at least one instruction, at least one program, a set of codes, or a set of instructions is stored, where the at least one instruction, the at least one program, the set of codes, or the set of instructions, when executed by a processor of a computer device, implement a method for accessing the Android system by the Tbox network.
Alternatively, the above-described computer-readable storage medium may be ROM, RAM, CD-ROM, magnetic tape, floppy disk, optical data storage device, or the like.
In an exemplary embodiment, a computer program product is also provided, which, when executed, is adapted to implement the method for accessing the Android system by the Tbox network.
It should be understood that references herein to "a plurality" are to two or more. "and/or", describes an association relationship of an association object, and indicates that there may be three relationships, for example, a and/or B, and may indicate: a exists alone, A and B exist together, and B exists alone. The character "/" generally indicates that the context-dependent object is an "or" relationship.
The foregoing description of the exemplary embodiments of the application is not intended to limit the application to the particular embodiments disclosed, but on the contrary, the intention is to cover all modifications, equivalents, and alternatives falling within the spirit and scope of the application.

Claims (11)

1. A method for accessing a Tbox network to an Android system, the method comprising:
responding to the starting of the Android system, registering and creating an expansion connection service;
creating an extended network tracking object based on the extended connection service;
after the extended connection service creates a thread, calling a starting interface of the extended network tracking object, and acquiring a network management object;
creating a Tbox network factory object by the extended network tracking object according to the network management object as the Tbox type;
and controlling the Tbox network factory object to register with the connectivityService of the Android system, and establishing a communication mechanism between the connectivityService and the Tbox network factory object.
2. The method of claim 1, wherein prior to said creating a Tbox network factory object for said Tbox type from said network management object, said extended network tracking object further comprises:
and determining the management type of the network management object, wherein the management type comprises a Tbox type and an Ethernet type.
3. The method according to claim 2, wherein the method further comprises:
establishing an ExtEthernet network factory object by the expanded network tracking object according to the network management object which is of the Ethernet type;
and controlling the ExtEthernet network factory object to register with the connectityService, and establishing a communication mechanism between the connectityService and the ExtEthernet network factory object.
4. The method of claim 1, wherein controlling the registration of the Tbox network factory object with the ConnectivityService of the Android system comprises:
the Tbox network factory object calls a registration method to register a network factor of an Android system;
and the network factory calls a network factory registering method to register the Tbox network factory object into the connectivityService through a connectivityManager of the Android system.
5. The method of claim 4, wherein after the step of calling a register network factory method to register the Tbox network factory object into a ConnectivityService through a ConnectivityManager of an Android system, the method further comprises:
the ConnectivityService requests a network from the network factor;
and the network factor processes the request and calls a network opening method in the Tbox network factory object so as to acquire a network address corresponding to the Tbox network factory object for network connection.
6. The method of claim 1, wherein the invoking the start interface of the extended network tracking object and the acquiring the network management object comprises:
calling a starting interface of the extended network tracking object to initialize;
reading configuration information from a resource file;
and constructing a virtual network based on the configuration information, and acquiring a network management object.
7. The method according to claim 1, wherein the method further comprises:
the extended network tracking object registers a monitoring function to the network management service of the Android system;
and acquiring state data of the network management object based on the monitoring function.
8. The method of any one of claims 1-7, wherein registering an extended connectivity service in response to a start-up of an Android system comprises:
in response to starting of the Android system, after Package Manager Service of the Android system scans system applications, starting expansion connection service through Activity Manager Service and registering the expansion connection service, wherein the expansion connection service is integrated in the Android system.
9. A device for accessing a Tbox network to an Android system, the device comprising:
the connection service registration module is used for registering and creating an expansion connection service in response to the starting of the Android system;
the tracking object creation module is used for creating an extended network tracking object based on the extended connection service;
the management object acquisition module is used for calling a starting interface of the extended network tracking object after the extended connection service creates a thread and acquiring a network management object;
the factory object creating module is used for creating a Tbox network factory object for the expanding network tracking object according to the network management object as the Tbox type;
and the system service registration module is used for controlling the Tbox network factory object to register with the connectityService of the Android system and establishing a communication mechanism between the connectityService and the Tbox network factory object.
10. A computer device comprising a processor and a memory having stored therein at least one instruction, at least one program, code set or instruction set that is loaded and executed by the processor to implement the method of any one of claims 1 to 8.
11. A computer readable storage medium having stored therein at least one instruction, at least one program, code set, or instruction set, the at least one instruction, the at least one program, the code set, or instruction set being loaded and executed by a processor to implement the method of any one of claims 1 to 8.
CN202210225392.6A 2022-03-07 2022-03-07 Method, device, equipment and storage medium for accessing Tbox network into Android system Active CN114726905B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210225392.6A CN114726905B (en) 2022-03-07 2022-03-07 Method, device, equipment and storage medium for accessing Tbox network into Android system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210225392.6A CN114726905B (en) 2022-03-07 2022-03-07 Method, device, equipment and storage medium for accessing Tbox network into Android system

Publications (2)

Publication Number Publication Date
CN114726905A CN114726905A (en) 2022-07-08
CN114726905B true CN114726905B (en) 2023-09-15

Family

ID=82238207

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210225392.6A Active CN114726905B (en) 2022-03-07 2022-03-07 Method, device, equipment and storage medium for accessing Tbox network into Android system

Country Status (1)

Country Link
CN (1) CN114726905B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115695088B (en) * 2022-10-26 2024-08-06 中国第一汽车股份有限公司 VLAN (virtual local area network) division method for Android system and vehicle-mounted Android system

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5764915A (en) * 1996-03-08 1998-06-09 International Business Machines Corporation Object-oriented communication interface for network protocol access using the selected newly created protocol interface object and newly created protocol layer objects in the protocol stack
CN208479957U (en) * 2018-07-24 2019-02-05 中国航天空气动力技术研究院 A kind of car-mounted terminal T-BOX and the car networking massaging device towards V2X net connection automobile
CN109413198A (en) * 2018-11-15 2019-03-01 上海赫千电子科技有限公司 T-Box and T-Box system and T-Box control method
CN109634573A (en) * 2018-12-18 2019-04-16 宁夏隆基宁光仪表股份有限公司 Android operation system App development approach, device and medium
CN112787828A (en) * 2021-01-08 2021-05-11 重庆创通联智物联网有限公司 Application flow statistical method and device and mobile electronic device
CN113377556A (en) * 2021-06-30 2021-09-10 Tcl通讯(宁波)有限公司 Method for realizing non-invasive communication service of Android platform

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7437440B2 (en) * 2003-01-27 2008-10-14 Microsoft Corporation Peer-to-peer networking framework application programming interfaces
CN103902390B (en) * 2014-03-12 2017-04-19 深圳创维-Rgb电子有限公司 Inter-process communication method based on Android application layer and basis application communication system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5764915A (en) * 1996-03-08 1998-06-09 International Business Machines Corporation Object-oriented communication interface for network protocol access using the selected newly created protocol interface object and newly created protocol layer objects in the protocol stack
CN208479957U (en) * 2018-07-24 2019-02-05 中国航天空气动力技术研究院 A kind of car-mounted terminal T-BOX and the car networking massaging device towards V2X net connection automobile
CN109413198A (en) * 2018-11-15 2019-03-01 上海赫千电子科技有限公司 T-Box and T-Box system and T-Box control method
CN109634573A (en) * 2018-12-18 2019-04-16 宁夏隆基宁光仪表股份有限公司 Android operation system App development approach, device and medium
CN112787828A (en) * 2021-01-08 2021-05-11 重庆创通联智物联网有限公司 Application flow statistical method and device and mobile electronic device
CN113377556A (en) * 2021-06-30 2021-09-10 Tcl通讯(宁波)有限公司 Method for realizing non-invasive communication service of Android platform

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
Android系统中Wi-Fi网络的研究与实现;陈法海;杨斌;;成都信息工程学院学报(05);全文 *

Also Published As

Publication number Publication date
CN114726905A (en) 2022-07-08

Similar Documents

Publication Publication Date Title
CN109547570B (en) Service registration method, device, registration center management equipment and storage medium
KR102385081B1 (en) Method, system, and non-transitory computer readable record medium for sharing information in chat room using application added to platform in messenger
CN111625293B (en) Terminal dual system based on linux kernel and hardware access management method thereof
US20180124150A1 (en) Remote access of cellular communication devices for software development and testing
CN106027631B (en) Data transmission method and device
US20170033980A1 (en) Agent manager for distributed transaction monitoring system
CN110968331A (en) Method and device for running application program
CN112486620A (en) Cross-process off-screen rendering method and device, electronic equipment and storage medium
CN114726905B (en) Method, device, equipment and storage medium for accessing Tbox network into Android system
CN112688915A (en) Cross-protocol communication method, device and server
CN113612643B (en) Network configuration method, device and equipment of cloud mobile phone and storage medium
CN112698930B (en) Method, device, equipment and medium for obtaining server identification
CN114222003A (en) Service calling method, system, device, equipment and storage medium
CN102426537B (en) Method and device for calling main program progress by external integration progress in CAD (Computer - Aided Design)
CN113448650A (en) Live broadcast function plug-in loading method, device, equipment and storage medium
CN109445960B (en) Application routing method, device and storage medium
CN108712298B (en) Network equipment upgrading method and device, network equipment and storage medium
CN102968807A (en) Automatic image generating method and automatic image generating system
CN115599669A (en) Debugging method and device of microservice, electronic equipment and readable storage medium
CN107301089B (en) APP deployment and calling method and terminal
TWI581185B (en) Method and system for installing application
CN114500598A (en) Equipment access method, system and proxy service equipment
CN114301970A (en) Service calling method and device, electronic equipment and storage medium
CN113596958B (en) Terminal equipment data interaction method, system, equipment and storage medium
CN111541566B (en) Switch device networking method, switch device supporting profinet protocol and storage medium

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