CN110399196B - Wearable device, interface switching implementation method thereof and computer readable storage medium - Google Patents

Wearable device, interface switching implementation method thereof and computer readable storage medium Download PDF

Info

Publication number
CN110399196B
CN110399196B CN201910694453.1A CN201910694453A CN110399196B CN 110399196 B CN110399196 B CN 110399196B CN 201910694453 A CN201910694453 A CN 201910694453A CN 110399196 B CN110399196 B CN 110399196B
Authority
CN
China
Prior art keywords
interface
wearable device
plug
script
resource
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
CN201910694453.1A
Other languages
Chinese (zh)
Other versions
CN110399196A (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.)
Nubia Technology Co Ltd
Original Assignee
Nubia Technology 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 Nubia Technology Co Ltd filed Critical Nubia Technology Co Ltd
Priority to CN201910694453.1A priority Critical patent/CN110399196B/en
Publication of CN110399196A publication Critical patent/CN110399196A/en
Application granted granted Critical
Publication of CN110399196B publication Critical patent/CN110399196B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/42Syntactic analysis
    • G06F8/427Parsing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • G06F9/44526Plug-ins; Add-ons
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • User Interface Of Digital Computer (AREA)
  • Telephone Function (AREA)

Abstract

The application relates to intelligent wearing, and provides wearable equipment, a wearable equipment interface switching implementation method and a computer readable storage medium thereof, which are provided by the embodiment of the application, for acquiring an Android application resource manager object; acquiring interface resources of an Android installation package in the plug-in through the resource manager object; classifying the interface resources and naming the resource names according to specifications; and analyzing file names representing interface contents from the interface resources, and loading the interface resources. By classifying the interface resources, naming the resource names according to naming standards, determining the control ids (codes) in the resource layout according to naming standards, and then accurately finding the control corresponding to the code in an external control program, loading the control corresponding to the code, and carrying out related operation, so that interface switching, namely updating of a display interface, is completed.

Description

Wearable device, interface switching implementation method thereof and computer readable storage medium
Technical Field
The embodiment of the application relates to the technical field of intelligent wearing, in particular to wearable equipment, an interface switching implementation method thereof and a computer readable storage medium.
Background
With the development of wearable devices, for example, smart bracelets and smart watches can record real-time data such as exercise, sleep, diet and the like in daily life.
The wearable device is generally equipped with a display screen, but how to replace the display interface so as to provide the appearance display of the five-flower eight door for the user is a problem to be solved.
Disclosure of Invention
In view of the above, an object of an embodiment of the present application is to provide a wearable device, an interface switching implementation method thereof, and a computer readable storage medium, so as to solve the technical problem of interface switching of the existing wearable device.
The technical scheme adopted by the embodiment of the application for solving the technical problems is as follows:
According to an aspect of an embodiment of the present application, there is provided a method for implementing interface switching of a wearable device, the wearable device including a wristband/watch, the wearable device including an interface for display, the method including:
Acquiring an Android application resource manager object;
Acquiring an Android installation package in the plug-in through the resource manager object, and creating an interface resource object;
classifying interface resources and naming the interface resource names to be standard;
And analyzing file names representing interface contents from the interface resources, and loading the interface resources.
In one embodiment, the method further comprises:
and the interface resource of the Android installation package in the plug-in carries a script describing dynamic behavior, and the script is loaded to complete dynamic interface replacement.
In one embodiment, the interface resource of the Android installation package in the plug-in carries a script describing dynamic behavior, and loading the script to complete the dynamic interface replacement specifically includes:
and analyzing to obtain the script by using a script analyzer, and completing the replacement of the dynamic interface.
In an embodiment, the interface resource of the Android installation package in the plug-in carries a script describing dynamic behavior, and loading the script to complete the dynamic interface replacement specifically further includes:
And loading the plug-in through the plug-in packaging class, and inquiring the components and the scripts in the plug-in according to the codes.
In one embodiment, the loading the plug-in through the plug-in package class and querying the components and the scripts in the plug-in according to the code specifically includes:
the package class of the plug-in comprises the script parser.
In one embodiment, the loading the plug-in through the plug-in package class and querying the components and the scripts in the plug-in according to the code specifically includes:
and transmitting the control semantics to the plug-in package class through a control program.
In one embodiment, the script is a custom script; after the step of transferring the manipulation semantics to the package class of the plug-in through the control program, the method further includes:
The plug-in package class executes different actions, sets the corresponding components, or executes a certain section of the custom script.
In one embodiment, the classifying the interface resources, and the naming standards of the resource names specifically include:
Classifying the interface resources into a time portion, a date portion, a weather portion, and an athletic health portion;
Defining the layout name of the plug-in as 'real_plate'; the time portion is defined by the names "hour".
According to another aspect of an embodiment of the present application, there is provided a wearable device including:
A memory, a processor, and a computer program stored on the memory and executable on the processor;
The computer program, when executed by the processor, implements the steps of the method as described above.
According to another aspect of the embodiment of the present application, there is provided a computer readable storage medium, on which a wearable device interface switching implementation program of a wearable device is stored, where the wearable device interface switching implementation program of the wearable device implements the steps of the wearable device interface switching implementation method described above when executed by the processor.
According to the wearable device and the method for realizing interface switching of the wearable device and the computer-readable storage medium, which are disclosed by the embodiment of the application, an Android application resource manager object is obtained; acquiring interface resources of an Android installation package in the plug-in through the resource manager object; classifying the interface resources and naming the resource names according to specifications; and analyzing file names representing interface contents from the interface resources, and loading the interface resources. By classifying the interface resources, naming the resource names according to naming standards, determining the control ids (codes) in the resource layout according to naming standards, and then accurately finding the control corresponding to the code in an external control program, loading the control corresponding to the code, and carrying out related operation, so that interface switching, namely updating of a display interface, is completed.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
In order to more clearly illustrate the embodiments of the invention or the technical solutions of the prior art, the drawings which are used in the description of the embodiments or the prior art will be briefly described, and it will be obvious to a person skilled in the art that other drawings can be obtained from these drawings without inventive effort.
Fig. 1 is a schematic hardware structure of an implementation manner of a wearable device according to an embodiment of the present invention;
Fig. 2 is a hardware schematic diagram of an implementation manner of a wearable device according to an embodiment of the present application;
fig. 3 is a hardware schematic of an implementation manner of a wearable device according to an embodiment of the present application;
Fig. 4 is a hardware schematic of an implementation manner of a wearable device according to an embodiment of the present application;
fig. 5 is a hardware schematic of an implementation manner of a wearable device according to an embodiment of the present application;
Fig. 6 is a flowchart of an implementation method for interface switching of a wearable device according to an embodiment of the present application;
fig. 7 is a flowchart of another implementation method for implementing interface switching of a wearable device according to an embodiment of the present application;
Fig. 8 is a schematic diagram of a method for implementing interface switching of a wearable device according to an embodiment of the present application;
Fig. 9 is a block diagram of a wearable device according to an embodiment of the present application.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
In the following description, suffixes such as "module", "component", or "unit" for representing elements are used only for facilitating the description of the present invention, and have no specific meaning per se. Thus, "module," "component," or "unit" may be used in combination.
The wearable device provided by the embodiment of the invention comprises a mobile terminal such as an intelligent bracelet, an intelligent watch and an intelligent mobile phone. With the continuous development of screen technology, mobile terminals such as smart phones and the like can also be used as wearable devices due to the appearance of screen forms such as flexible screens, folding screens and the like. The wearable device provided in the embodiment of the invention can comprise: RF (Radio Frequency) unit, wiFi module, audio output unit, A/V (audio/video) input unit, sensor, display unit, user input unit, interface unit, memory, processor, and power supply.
In the following description, a wearable device will be taken as an example, please refer to fig. 1, which is a schematic hardware structure of a wearable device implementing various embodiments of the present invention, where the wearable device 100 may include: an RF (Radio Frequency) unit 101, a WiFi module 102, an audio output unit 103, an a/V (audio/video) input unit 104, a sensor 105, a display unit 106, a user input unit 107, an interface unit 108, a memory 109, a processor 110, and a power supply 111. Those skilled in the art will appreciate that the wearable device structure shown in fig. 1 does not constitute a limitation of the wearable device, and that the wearable device may include more or fewer components than shown, or certain components in combination, or a different arrangement of components.
The following describes the various components of the wearable device in detail with reference to fig. 1:
The radio frequency unit 101 may be used to send and receive information or send signals in a call process, specifically, the radio frequency unit 101 may send uplink information to the base station, or may send downlink information sent by the base station to the processor 110 of the wearable device to process the downlink information, where the downlink information sent by the base station to the radio frequency unit 101 may be generated according to the uplink information sent by the radio frequency unit 101, or may be actively pushed to the radio frequency unit 101 after the information update of the wearable device is utilized, for example, after the geographic position where the wearable device is utilized changes, the base station may send a notification of the geographic position change to the radio frequency unit 101 of the wearable device, after receiving the notification of the message, the radio frequency unit 101 may send the notification of the message to the processor 110 of the wearable device to process, and the processor 110 of the wearable device may control the notification of the message to be displayed on the display panel 1061 of the wearable device; typically, the radio frequency unit 101 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. In addition, the radio frequency unit 101 may also communicate with a network and other devices through wireless communication, which may specifically include: through wireless communication with a server in a network system, for example, the wearable device can download file resources from the server through wireless communication, for example, an application program can be downloaded from the server, after the wearable device finishes downloading a certain application program, if the file resources corresponding to the application program in the server are updated, the server can push a message notification of the resource update to the wearable device through wireless communication so as to remind a user to update the application program. The wireless communication may use any communication standard or protocol, including but not limited to GSM (Global System of Mobile communication, global System for Mobile communications), GPRS (GENERAL PACKET Radio Service), CDMA2000 (CodeDivision Multiple Access, code Division multiple Access 2000), WCDMA (Wideband Code Division Multiple Access ), TD-SCDMA (Time Division-Synchronous Code Division Multiple Access, time Division synchronous code Division multiple Access), FDD-LTE (Frequency Division Duplexing-Long Term Evolution, frequency Division Duplex Long term evolution) and TDD-LTE (Time Division Duplexing-Long Term Evolution, time Division Duplex Long term evolution), etc.
In one embodiment, the wearable device 100 may access an existing communication network by inserting a SIM card.
In another embodiment, the wearable device 100 may access an existing communication network by setting esim cards (Embedded-SIMs), and by adopting esim cards, the internal space of the wearable device may be saved and the thickness may be reduced.
It will be appreciated that although fig. 1 shows a radio frequency unit 101, it will be appreciated that the radio frequency unit 101 is not an essential component of a wearable device and may be omitted entirely as required within the scope of not changing the essence of the invention. The wearable device 100 may implement communication connection with other devices or communication networks through the wifi module 102 alone, which is not limited by the embodiment of the present invention.
WiFi belongs to a short-distance wireless transmission technology, and the wearable device can help a user to send and receive emails, browse webpages, access streaming media and the like through the WiFi module 102, so that wireless broadband Internet access is provided for the user. Although fig. 1 shows a WiFi module 102, it is understood that it does not belong to the necessary constitution of the wearable device, and can be omitted entirely as required within the scope of not changing the essence of the invention.
The audio output unit 103 may convert audio data received by the radio frequency unit 101 or the WiFi module 102 or stored in the memory 109 into an audio signal and output as sound when the wearable device 100 is in a call signal reception mode, a talk mode, a recording mode, a voice recognition mode, a broadcast reception mode, or the like. Also, the audio output unit 103 may also provide audio output (e.g., call signal reception sound, message reception sound, etc.) related to a specific function performed by the wearable device 100. The audio output unit 103 may include a speaker, a buzzer, and the like.
The a/V input unit 104 is used to receive an audio or video signal. The a/V input unit 104 may include a graphics processor (Graphics Processing Unit, GPU) 1041 and a microphone 1042, the graphics processor 1041 processing image data of still pictures or video obtained by an image capturing device (e.g. a camera) in a video capturing mode or an image capturing mode. The processed image frames may be displayed on the display unit 106. The image frames processed by the graphics processor 1041 may be stored in the memory 109 (or other storage medium) or transmitted via the radio frequency unit 101 or the WiFi module 102. The microphone 1042 can receive sound (audio data) via the microphone 1042 in a phone call mode, a recording mode, a voice recognition mode, and the like, and can process such sound into audio data. The processed audio (voice) data may be converted into a format output that can be transmitted to the mobile communication base station via the radio frequency unit 101 in the case of a telephone call mode. The microphone 1042 may implement various types of noise cancellation (or suppression) algorithms to cancel (or suppress) noise or interference generated in the course of receiving and transmitting the audio signal.
In one embodiment, the wearable device 100 includes one or more cameras, and by opening the cameras, capturing of images, photographing, video recording and other functions can be achieved, and the positions of the cameras can be set as required.
The wearable device 100 further comprises at least one sensor 105, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor and a proximity sensor, wherein the ambient light sensor can adjust the brightness of the display panel 1061 according to the brightness of ambient light, and the proximity sensor can turn off the display panel 1061 and/or the backlight when the wearable device 100 moves to the ear. As one type of motion sensor, the accelerometer sensor can use the acceleration in all directions (typically three axes), and can use the gravity and direction when stationary, and can be used for applications for recognizing the gesture of a mobile phone (such as horizontal-vertical screen switching, related games, magnetometer gesture calibration), vibration recognition related functions (such as pedometer, knocking), and the like.
In one embodiment, the wearable device 100 further comprises a proximity sensor, by employing the proximity sensor, the wearable device is able to achieve non-contact manipulation, providing more modes of operation.
In one embodiment, the wearable device 100 further comprises a heart rate sensor, which when worn, enables detection of heart rate by being in close proximity to the user.
In one embodiment, the wearable device 100 may further include a fingerprint sensor, by reading a fingerprint, security verification or the like can be achieved.
The display unit 106 is used to display information input by a user or information provided to the user. The display unit 106 may include a display panel 1061, and the display panel 1061 may be configured in the form of a Liquid crystal display (Liquid CRYSTAL DISPLAY, LCD), an Organic Light-Emitting Diode (OLED), or the like.
In one embodiment, the display panel 1061 employs a flexible display screen, and the wearable device employing the flexible display screen is capable of bending when worn, thereby fitting more. Optionally, the flexible display screen may be an OLED screen body and a graphene screen body, and in other embodiments, the flexible display screen may also be other display materials, which is not limited to this embodiment.
In one embodiment, the display panel 1061 of the wearable device may take a rectangular shape for ease of wrapping when worn. In other embodiments, other approaches may be taken as well.
The user input unit 107 may be used to receive input numeric or character information and to generate key signal inputs related to user settings and function control of the wearable device. In particular, the user input unit 107 may include a touch panel 1071 and other input devices 1072. The touch panel 1071, also referred to as a touch screen, may collect touch operations thereon or thereabout by a user (e.g., operations of the user on the touch panel 1071 or thereabout by using any suitable object or accessory such as a finger, a stylus, etc.) and drive the corresponding connection device according to a predetermined program. The touch panel 1071 may include two parts of a touch utilization device and a touch controller. The touch utilization device utilizes the touch azimuth of a user and utilizes signals brought by touch operation to transmit the signals to the touch controller; the touch controller receives touch information from the touch utilization device, converts it into touch point coordinates, and sends the touch point coordinates to the processor 110, and can receive and execute commands sent from the processor 110. Further, the touch panel 1071 may be implemented in various types such as resistive, capacitive, infrared, and surface acoustic wave. The user input unit 107 may include other input devices 1072 in addition to the touch panel 1071. In particular, other input devices 1072 may include, but are not limited to, one or more of a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, mouse, joystick, etc., as specifically not limited herein.
In one embodiment, the sides of the wearable device 100 may be provided with one or more buttons. The button can realize a plurality of modes such as short pressing, long pressing, rotation and the like, thereby realizing a plurality of operation effects. The number of the buttons can be multiple, and different buttons can be combined for use, so that multiple operation functions are realized.
Further, the touch panel 1071 may overlay the display panel 1061, and when the touch panel 1071 is operated by a touch thereon or thereabout, the touch panel 1071 is transferred to the processor 110 to determine the type of touch event, and then the processor 110 provides a corresponding visual output on the display panel 1061 according to the type of touch event. Although in fig. 1, the touch panel 1071 and the display panel 1061 are two independent components for implementing the input and output functions of the wearable device, in some embodiments, the touch panel 1071 may be integrated with the display panel 1061 to implement the input and output functions of the wearable device, which is not limited herein. For example, when a message notification of a certain application is received through the rf unit 101, the processor 110 may control the message notification to be displayed in a certain preset area of the display panel 1061, where the preset area corresponds to a certain area of the touch panel 1071, and may control the message notification displayed in the corresponding area on the display panel 1061 by performing a touch operation on the certain area of the touch panel 1071.
The interface unit 108 serves as an interface through which at least one external device can be connected with the wearable apparatus 100. For example, the external devices may include a wired or wireless headset port, an external power (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. The interface unit 108 may be used to receive input (e.g., data information, power, etc.) from an external device and transmit the received input to one or more elements within the wearable apparatus 100 or may be used to transmit data between the wearable apparatus 100 and the external device.
In one embodiment, the interface unit 108 of the wearable device 100 adopts a contact structure, and is connected with other corresponding devices through the contact, so as to realize functions of charging, connection and the like. The contact can also be waterproof.
Memory 109 may be used to store software programs as well as various data. The memory 109 may mainly include a storage program area that may store an operating system, application programs required for at least one function (such as a sound playing function, an image playing function, etc.), and a storage data area; the storage data area may store data (such as audio data, phonebook, etc.) created according to the use of the handset, etc. In addition, memory 109 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device.
The processor 110 is a control center of the wearable device, connects various parts of the entire wearable device with various interfaces and lines, performs various functions of the wearable device and processes data by running or executing software programs and/or modules stored in the memory 109, and invoking data stored in the memory 109, thereby performing overall monitoring of the wearable device. Processor 110 may include one or more processing units; preferably, the processor 110 may integrate an application processor that primarily handles operating systems, user interfaces, applications, etc., with a modem processor that primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 110.
The wearable device 100 may further include a power source 111 (such as a battery) for powering the various components, and preferably, the power source 111 may be logically connected to the processor 110 through a power management system, so as to perform functions of managing charging, discharging, and power consumption management through the power management system.
Although not shown in fig. 1, the wearable device 100 may further include a bluetooth module or the like, which is not described herein. The wearable device 100 can be connected with other terminal devices through bluetooth to realize communication and information interaction.
Fig. 2 to fig. 4 are schematic structural diagrams of a wearable device according to an embodiment of the present invention. The wearable device comprises a flexible screen. When the wearable device is unfolded, the flexible screen is in a strip shape; when the wearable device is in a wearing state, the flexible screen is bent to be annular. Fig. 2 and 3 show schematic structural diagrams of the wearable device screen when unfolded, and fig. 4 shows schematic structural diagrams of the wearable device screen when bent.
Based on the above embodiments, it can be seen that if the device is a wristwatch, a wearable device, or a wearable device, the screen of the device may not cover the watchband area of the device, or may cover the watchband area of the device. The present application proposes an alternative embodiment, in which the device may be a wristwatch, a wearable device or a wearable device, the device comprising a screen and a connection. The screen may be a flexible screen and the connection may be a wristband. Alternatively, the screen of the device or the display area of the screen may be partially or fully overlaid on the wristband of the device. Fig. 5 is a schematic hardware diagram of an implementation manner of a wearable device according to an embodiment of the present application, where a screen of the device extends to two sides, and a part of the screen is covered on a watchband of the device. In other embodiments, the screen of the device may also be entirely covered on the watchband of the device, which is not limited to the embodiment of the present application.
First embodiment
Wearable devices typically carry a display screen, such as a bracelet or a wristwatch, with the background of the display screen being a dial. Based on the needs of the user's individualization, a function supporting dynamic replacement of the dial is required in order to provide the user with the appearance display of the five-flower eight door. Even allowing users to download new dial inserts from the web to enrich their UIs (User interfaces).
The embodiment of the application provides a solution idea. As shown in fig. 6, an embodiment of the present application provides a method for implementing interface switching of a wearable device, where the wearable device includes a wristband or a watch, and the wearable device includes an interface for display, and the method includes:
step 10, acquiring an Android application program resource manager object;
Specifically, the Android application resource manager object is ASSETMANAGER.
Step 20, acquiring an Android installation package in a plug-in through the resource manager object, and creating an interface resource object;
On the Android platform, the ASSETMANAGER class ADDASSETPATH () can be used to load an APK (Android installation package) file, and then an Resources object is created by using the obtained ASSETMANAGER object, so that the Resources in the plug-in can be accessed.
Step 30, classifying interface resources, and naming the interface resource names to be standard;
Specifically, the interface resources are classified into a time portion, a date portion, a weather portion, and a sports health portion;
and 40, analyzing file names representing interface contents from the interface resources, and loading the interface resources.
Defining the layout name of the plug-in as 'real_plate'; the names defining the time portion are "hour"; introducing calendar naming to define the date portion; words of weather "sunny", "cloudy", "windy", "snowy", "rainy" and "foggy" are used to define weather portions; the statement of health is introduced and the sort is used to describe the sports health parts, such as health, sub-health, illness, etc.
When a Resource is acquired in a component, a getResource object (interface Resource object) is used to obtain a Resource object through which related resources, such as text, pictures, colors, etc., can be accessed. The obtained interface resource object is a global variable of the application. ASSETMANAGER, the global variables are imported in the Resource's constructor, so the final acquisition resources are all acquired through ASSETMANAGER.
By tracing the associated source code of ASSETMANAGER, the constructor of ASSETMANAGER is not disclosed for api and cannot be created using new; context.getAssets () can get ASSETMANAGER of the current context; the object is thus available for retrieval using the reflection AssetManager.class.newInstance ().
According to the method for realizing interface switching of the wearable device, which is disclosed by the embodiment of the application, the Android application resource manager object is obtained; acquiring interface resources of an Android installation package in the plug-in through the resource manager object; classifying the interface resources and naming the resource names according to specifications; and analyzing file names representing interface contents from the interface resources, and loading the interface resources. By classifying the interface resources, naming the resource names according to naming standards, determining the control ids (codes) in the resource layout according to naming standards, and then accurately finding the control corresponding to the code in an external control program, loading the control corresponding to the code, and carrying out related operation, so that interface switching, namely updating of a display interface, is completed.
In another embodiment of the present application, as shown in fig. 7, the method further includes:
And 50, carrying a script describing dynamic behaviors by the interface resources of the Android installation package in the plug-in, and loading the script to complete dynamic interface replacement.
Specifically, a script parser may be used to parse out the script and complete the dynamic interface replacement.
Further, the plug-in is loaded through the plug-in packaging class, and the components and the scripts in the plug-in are queried according to codes.
It will be appreciated that the script parser is contained in the plug-in package class.
And the control program transmits the control semantics to the plug-in package class.
The plug-in package class executes different actions, sets the corresponding components, or executes a certain section of the custom script.
A series of provisions may be made for the interface resource names in Resources. Because of the content on the dial, basically the above-mentioned categories are: time portion, date portion, weather portion, sports health portion, etc. In this way, the dial appearance, and other components related thereto, can be correctly resolved from Resources. Even a section of custom script carried in the plug-in can be run (the grammar of the script is also self-formulated). And in the control code, a script parser which can be further used parses the fetched script and completes dynamic actions.
The package class of the plug-in can load the plug-in and inquire the components and scripts in the plug-in according to id (code). The package class of the plug-in unit contains a script parser which can parse the fetched script. After the control program transmits the control semantics to the plug-in package class, the package class can execute different actions, set corresponding components or execute a section of script. The above steps can be seen by the schematic diagram of fig. 8.
The embodiment of the application expands a set of wearable equipment interface switching implementation scheme on the basis of the common Android plug-in technology. Resources can be rapidly loaded, controls in the plug-in can be accurately accessed by standard naming, and extensible dynamic functions are provided by utilizing custom scripts. Thus, more gorgeous and various dial effects/interface dynamic switching can be realized.
In order to realize the dynamically updatable dial/interface, each dial plug-in is understood as an Android application without java codes, and the resource packaging mode of the Android application is not different from that of a common Android application. However, a series of determined requirements are set for the control ids in the resource layout, so that the control corresponding to the id can be accurately found in the external control code, and related operations are performed, thereby completing the updating of the dial interface.
Second embodiment
As shown in fig. 9, a second embodiment of the present application provides a wearable device including a memory 41, a processor 42, and a wearable device interface switching implementation program of the wearable device stored on the memory 41 and executable on the processor 42;
The wearable device interface switching implementation program of the wearable device is configured to implement the steps of the wearable device interface switching implementation method of the wearable device, when executed by the processor 42:
The embodiment of the application provides a method for realizing interface switching of a wearable device, wherein the wearable device comprises an intelligent bracelet or an intelligent watch, the wearable device comprises at least two mounting positions, and sensors are mounted on the mounting positions. Typically, the mounting location is mounted on a strap of a smart band or smart watch. The method comprises the following steps:
and step 10, acquiring an Android application program resource manager object.
And step 20, acquiring an Android installation package in the plug-in through the resource manager object, and creating an interface resource object.
And step 30, classifying the interface resources and naming the interface resource names according to the specification.
And 40, analyzing file names representing interface contents from the interface resources, and loading the interface resources.
The wearable device acquires the Android application resource manager object; acquiring interface resources of an Android installation package in the plug-in through the resource manager object; classifying the interface resources and naming the resource names according to specifications; and analyzing file names representing interface contents from the interface resources, and loading the interface resources. By classifying the interface resources, naming the resource names according to naming standards, determining the control ids (codes) in the resource layout according to naming standards, and then accurately finding the control corresponding to the code in an external control program, loading the control corresponding to the code, and carrying out related operation, so that interface switching, namely updating of a display interface, is completed.
In another embodiment of the present application, the method further comprises:
And 50, carrying a script describing dynamic behaviors by the interface resources of the Android installation package in the plug-in, and loading the script to complete dynamic interface replacement.
Specifically, a script parser may be used to parse out the script and complete the dynamic interface replacement.
Further, the plug-in is loaded through the plug-in packaging class, and the components and the scripts in the plug-in are queried according to codes.
It will be appreciated that the script parser is contained in the plug-in package class.
And the control program transmits the control semantics to the plug-in package class.
The plug-in package class executes different actions, sets the corresponding components, or executes a certain section of the custom script.
It should be noted that, the apparatus embodiment of the present embodiment and the method of the first embodiment are based on the same inventive concept, the specific implementation process thereof is detailed in the method embodiment, and the technical features of the method embodiment are correspondingly applicable in the present embodiment, which is not described in detail herein.
The embodiment of the application expands a set of wearable equipment interface switching implementation scheme on the basis of the common Android plug-in technology. Resources can be rapidly loaded, controls in the plug-in can be accurately accessed by standard naming, and extensible dynamic functions are provided by utilizing custom scripts. Thus, more gorgeous and various dial effects/interface dynamic switching can be realized.
Third embodiment
A third embodiment of the present application provides a computer readable storage medium, where a wearable device interface switching implementation program of a wearable device is stored on the computer readable storage medium, where the wearable device interface switching implementation program of the wearable device is used to implement the steps of the wearable device interface switching implementation method of the wearable device described in the first embodiment when executed by a processor.
It should be noted that, the computer readable storage medium of the present embodiment belongs to the same concept as the method of the first embodiment, the specific implementation process of the computer readable storage medium is detailed in the method embodiment, and the technical features of the method embodiment are correspondingly applicable in the present embodiment, which is not repeated herein.
The computer readable storage medium of the embodiment of the application acquires an Android application resource manager object; acquiring interface resources of an Android installation package in the plug-in through the resource manager object; classifying the interface resources and naming the resource names according to specifications; and analyzing file names representing interface contents from the interface resources, and loading the interface resources. By classifying the interface resources, naming the resource names according to naming standards, determining the control ids (codes) in the resource layout according to naming standards, and then accurately finding the control corresponding to the code in an external control program, loading the control corresponding to the code, and carrying out related operation, so that interface switching, namely updating of a display interface, is completed.
Those of ordinary skill in the art will appreciate that all or some of the steps, systems, functional modules/units in the apparatus, and methods disclosed above may be implemented as software, firmware, hardware, and suitable combinations thereof. In a hardware implementation, the division between the functional modules/units mentioned in the above description does not necessarily correspond to the division of physical components; for example, one physical component may have multiple functions, or one function or step may be performed cooperatively by several physical components. Some or all of the physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on computer readable media, which may include computer storage media (or non-transitory media) and communication media (or transitory media). The term computer storage media includes both 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, as known to those skilled in the art. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital Versatile Disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can be accessed by a computer. Furthermore, as is well known to those of ordinary skill in the art, communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media.
The preferred embodiments of the present application have been described above with reference to the accompanying drawings, and thus do not limit the scope of the claims of the present application. Any modifications, equivalent substitutions and improvements made by those skilled in the art without departing from the scope and spirit of the present application shall fall within the scope of the appended claims.

Claims (4)

1. The method for realizing interface switching of the wearable device, wherein the wearable device comprises a bracelet/a watch, is characterized in that the wearable device comprises an interface for display, and comprises the following steps:
Acquiring an Android application resource manager object;
Acquiring an Android installation package in the plug-in through the resource manager object, and creating an interface resource object;
classifying interface resources and naming the interface resource names to be standard;
analyzing file names representing interface contents from the interface resources, and loading the interface resources;
The method further comprises the steps of:
The interface resource of the Android installation package in the plug-in carries a script describing dynamic behavior, and the script is loaded to complete dynamic interface replacement;
the interface resource of the Android installation package in the plug-in carries a script describing dynamic behavior, and loading the script to complete dynamic interface replacement specifically comprises the following steps:
using a script parser to parse and obtain the script, and completing the replacement of the dynamic interface;
loading the plug-in through the plug-in packaging class, and inquiring the components and the scripts in the plug-in according to the codes;
the loading plug-in through the plug-in packaging class and inquiring the components and the scripts in the plug-in according to the codes specifically comprises the following steps:
the plug-in packaging class comprises the script parser, and the control semantics are transmitted to the plug-in packaging class through a control program;
The script is a custom script; after the step of transferring the manipulation semantics to the package class of the plug-in through the control program, the method further includes:
The plug-in package class executes different actions, sets the corresponding components, or executes a certain section of the custom script.
2. The method for implementing interface switching of a wearable device according to claim 1, wherein the classifying the interface resources, and the naming convention of the resource name specifically includes:
Classifying the interface resources into a time portion, a date portion, a weather portion, and an athletic health portion;
Defining the layout name of the plug-in as 'real_plate'; the time portion is defined by the names "hour".
3. Wearable device, its characterized in that, wearable device includes:
A memory, a processor, and a computer program stored on the memory and executable on the processor;
the computer program implementing the steps of the method according to any of claims 1 to 2 when executed by the processor.
4. Computer readable storage medium, characterized in that a wearable device interface switching implementation program of a wearable device is stored on the computer readable storage medium, and the wearable device interface switching implementation program of the wearable device, when executed by a processor, implements the steps of the wearable device interface switching implementation method of the wearable device according to any one of claims 1 to 2.
CN201910694453.1A 2019-07-30 2019-07-30 Wearable device, interface switching implementation method thereof and computer readable storage medium Active CN110399196B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910694453.1A CN110399196B (en) 2019-07-30 2019-07-30 Wearable device, interface switching implementation method thereof and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910694453.1A CN110399196B (en) 2019-07-30 2019-07-30 Wearable device, interface switching implementation method thereof and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN110399196A CN110399196A (en) 2019-11-01
CN110399196B true CN110399196B (en) 2024-04-23

Family

ID=68326607

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910694453.1A Active CN110399196B (en) 2019-07-30 2019-07-30 Wearable device, interface switching implementation method thereof and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN110399196B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113535179B (en) * 2020-04-22 2023-03-28 Oppo(重庆)智能科技有限公司 Control method, wearable device and storage medium
CN115314588B (en) * 2021-04-21 2024-05-17 Oppo广东移动通信有限公司 Background synchronization method, device, terminal, equipment, system and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104360884A (en) * 2014-11-18 2015-02-18 久邦计算机技术(广州)有限公司 Plug-in resource packet loading method based on Android system
CN105630518A (en) * 2014-10-28 2016-06-01 北京娜迦信息科技发展有限公司 Method and device for updating resources of Android application software
CN106802794A (en) * 2016-12-20 2017-06-06 智车优行科技(北京)有限公司 Method for switching theme, device, vehicle and system
CN109996119A (en) * 2017-12-29 2019-07-09 深圳Tcl新技术有限公司 Support method, smart television and the storage medium of multiple user interfaces style

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060041879A1 (en) * 2004-08-19 2006-02-23 Bower Shelley K System and method for changing defined user interface elements in a previously compiled program

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105630518A (en) * 2014-10-28 2016-06-01 北京娜迦信息科技发展有限公司 Method and device for updating resources of Android application software
CN104360884A (en) * 2014-11-18 2015-02-18 久邦计算机技术(广州)有限公司 Plug-in resource packet loading method based on Android system
CN106802794A (en) * 2016-12-20 2017-06-06 智车优行科技(北京)有限公司 Method for switching theme, device, vehicle and system
CN109996119A (en) * 2017-12-29 2019-07-09 深圳Tcl新技术有限公司 Support method, smart television and the storage medium of multiple user interfaces style

Also Published As

Publication number Publication date
CN110399196A (en) 2019-11-01

Similar Documents

Publication Publication Date Title
CN109982179B (en) Audio signal output method and device, wearable device and storage medium
CN109947249B (en) Interaction method of wearable device, wearable device and computer storage medium
CN110013260B (en) Emotion theme regulation and control method, equipment and computer-readable storage medium
CN110109725A (en) A kind of interface color method of adjustment and wearable device
CN110399195B (en) Desktop icon dynamic replacement method, equipment and computer readable storage medium
CN109995938A (en) A kind of notice display methods, mobile phone, wearable device and calculate readable storage medium storing program for executing
CN110399196B (en) Wearable device, interface switching implementation method thereof and computer readable storage medium
CN109933294B (en) Data processing method and device, wearable device and storage medium
CN109933400B (en) Display interface layout method, wearable device and computer readable storage medium
CN110098845B (en) Message processing method, wearable device, mobile terminal and readable storage medium
CN110139270B (en) Wearable device pairing method, wearable device and computer readable storage medium
CN110086930A (en) A kind of voice interactive method, wearable device and computer readable storage medium
CN110175066A (en) Wearable device, interaction control method and computer readable storage medium
CN110083289A (en) A kind of button display methods, wearable device and computer readable storage medium
CN110069193B (en) Interface switching method of wearable device, wearable device and storage medium
CN109933187B (en) Wearing equipment operation control method, wearing equipment and computer readable storage medium
CN109874165B (en) Method for timely closing sensor of wearable device, wearable device and storage medium
CN110069200B (en) Wearable device input control method, wearable device and storage medium
CN110213442A (en) Speech playing method, terminal and computer readable storage medium
CN110086929A (en) Breath screen display methods, mobile phone, wearable device and computer readable storage medium
CN110138965B (en) Wearable device, number formatting method and device thereof, and storage medium
CN110187950B (en) Method for adjusting picture display position, wearable device and storage medium
CN110083427B (en) Application program interaction control method, device and computer readable storage medium
CN110096150B (en) Search interaction control method, equipment and computer readable storage medium
CN110058918B (en) Picture processing method, wearable device and computer readable 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