WO2023165413A1 - 一种应用开发***、方法及设备 - Google Patents
一种应用开发***、方法及设备 Download PDFInfo
- Publication number
- WO2023165413A1 WO2023165413A1 PCT/CN2023/077966 CN2023077966W WO2023165413A1 WO 2023165413 A1 WO2023165413 A1 WO 2023165413A1 CN 2023077966 W CN2023077966 W CN 2023077966W WO 2023165413 A1 WO2023165413 A1 WO 2023165413A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- installation package
- electronic device
- server
- information
- target
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 83
- 238000011161 development Methods 0.000 title claims abstract description 48
- 238000009434 installation Methods 0.000 claims abstract description 384
- 230000006870 function Effects 0.000 claims description 109
- 238000004590 computer program Methods 0.000 claims description 27
- 238000013461 design Methods 0.000 description 34
- 238000010586 diagram Methods 0.000 description 32
- 238000004891 communication Methods 0.000 description 18
- 238000012545 processing Methods 0.000 description 17
- 238000007726 management method Methods 0.000 description 13
- 238000010295 mobile communication Methods 0.000 description 10
- 238000005516 engineering process Methods 0.000 description 8
- 229920001621 AMOLED Polymers 0.000 description 4
- 230000008569 process Effects 0.000 description 4
- 238000012986 modification Methods 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 230000001133 acceleration Effects 0.000 description 2
- 238000013528 artificial neural network Methods 0.000 description 2
- 230000003190 augmentative effect Effects 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 230000007774 longterm Effects 0.000 description 2
- 230000006855 networking Effects 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 239000002096 quantum dot Substances 0.000 description 2
- 230000005855 radiation Effects 0.000 description 2
- 230000000007 visual effect Effects 0.000 description 2
- 101150009243 HAP1 gene Proteins 0.000 description 1
- 230000003416 augmentation Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 230000000295 complement effect Effects 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 230000005611 electricity Effects 0.000 description 1
- 230000004927 fusion Effects 0.000 description 1
- 230000014509 gene expression Effects 0.000 description 1
- 230000005484 gravity Effects 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 238000009877 rendering Methods 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 239000002699 waste material Substances 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
Definitions
- the present application relates to the field of terminal technology, and in particular to an application development system, method and device.
- a user may have a smart phone and a smart watch at the same time, wherein both the smart phone and the smart watch can install applications, and the user can use the functions provided by the application through the smart phone, and can also use the functions provided by the application through the smart watch.
- the present application provides an application development system, method and device, which are used to reduce application development costs and flexibly realize application development, download and installation.
- the present application provides an application development system, where the application development system includes a first electronic device, a second electronic device, a third electronic device, and a server;
- the first electronic device is configured to send an original installation package of a target application to the server, where the original installation package of the target application is used to indicate a function corresponding to at least one type of device information, and/or at least one type of device information
- the corresponding page layout
- the server is configured to receive the original installation package of the target application sent by the first electronic device, and determine at least one target installation package according to the original installation package, wherein the at least one target installation package is the same as the at least one A one-to-one correspondence of device information, each target installation package has a function and/or page layout corresponding to a device information; receiving the first download request sent by the second electronic device, the first download request is used to request Downloading the installation package of the target application; sending a first installation package to the second electronic device, the first installation package being the target installation package corresponding to the device information of the second electronic device in the at least one target installation package package; receive a second download request sent by the third electronic device, the second download request is used to request to download the installation package of the target application; send a second installation package to the third electronic device, the second download request
- the second installation package is a target installation package corresponding to the device information of the third electronic device in the at least one target installation package;
- the second electronic device is configured to send the first download request to the server; receive the first installation package sent by the server;
- the third electronic device is configured to send the second download request to the server; and receive the second installation package sent by the server.
- the application developer can upload the original installation package to the server through the first electronic device, and the server can generate at least one target installation package according to the original installation package, and each target installation package corresponds to a device information, so that the developer does not need to Multiple installation packages of the same application can be released at one time, reducing development costs and improving the efficiency of application development.
- electronic devices with different device information request different target installation packages from the server, so that the target installation packages downloaded by the electronic device can be applied to the electronic device, ensuring that the electronic device can operate normally The target application does not need to download data irrelevant to the electronic device, saving storage resources of the electronic device.
- the first installation package and the second installation package meet at least one of the following conditions: the data size of the first installation package is different from the data size of the second installation package; The package name of the first installation package is different from the package name of the second installation package; the function files in the first installation package are different from the function files in the second installation package; the first installation package The layout file in is different from the layout file in the second installation package.
- the second electronic device is further configured to: send the device information of the second electronic device to the server before sending the first download request to the server, and receive the device information sent by the server.
- the third electronic device is further configured to: send the device information of the third electronic device to the server before sending the second download request to the server, and receive the support information of the third electronic device sent by the server.
- Information about running applications displaying information about running applications supported by the third electronic device;
- the server is further configured to: receive the device information of the second electronic device sent by the second electronic device, and send to the second electronic device information about applications supported by the second electronic device; receive the The device information of the third electronic device sent by the third electronic device is to send, to the third electronic device, information about applications supported by the third electronic device.
- the electronic device can send its own device information to the server, receive the information of the applications supported by the electronic device returned by the server, and display the information of the applications supported by the electronic device. Select the target application from the application to download.
- the server is specifically configured to: split and compile the original installation package according to syntax tags in the original installation package to obtain the at least one target installation package.
- the server can split the original installation package without the need for developers to upload multiple installation packages to the server, reducing development costs and improving the efficiency of application development.
- the first installation package includes a function file corresponding to the device information of the second electronic device and/or a layout file corresponding to the device information of the second electronic device
- the second The layout file corresponding to the device information of the electronic device includes the display resource corresponding to the device information of the second electronic device
- the second installation package includes the function file corresponding to the device information of the third electronic device and/or the A layout file corresponding to the device information of the third electronic device, where the layout file corresponding to the device information of the third electronic device includes a display resource corresponding to the device information of the third electronic device.
- the installation package obtained by the electronic device includes the function file and/or layout file corresponding to the device information of the electronic device, and the layout file may include the display resource corresponding to the device information of the electronic device, so that the electronic device downloads And after installing the installation package of the target application, the user can be provided with the functions supported by the electronic device, and can display Display a display interface matching the electronic device.
- the device information includes at least one of device type and screen parameters.
- the screen parameters include at least one of screen shape, screen size and screen resolution.
- developers can design installation packages corresponding to different device types or screen parameters, so that the server can be split to obtain installation packages corresponding to various device information, which facilitates the promotion of target applications and reduces development costs.
- the second electronic device is further configured to: download the first installation package after receiving the first installation package sent by the server, and download the first installation package according to the first installation package. installing the target application on the second electronic device; or after receiving the first installation package sent by the server, downloading the first installation package, and according to the first installation package in the A service card of the target application is displayed on the second electronic device;
- the third electronic device is further configured to: download the second installation package after receiving the second installation package sent by the server, and install the second installation package on the third electronic device according to the second installation package. Install the target application on the computer; or after receiving the second installation package sent by the server, download the second installation package, and display it on the third electronic device according to the second installation package The service card of the target application.
- the electronic device can install the target application on the electronic device according to the acquired installation package of the target application, and can also display the service card of the target application according to the installation package of the target application, so as to provide users with various application experiences.
- the second electronic device is any one of a smart terminal device, a smart wearable device, a light smart wearable device, an Internet of Things device, and a smart vehicle-mounted device;
- the third electronic device is a smart terminal Any of the equipment, smart wearable devices, light smart wearable devices, Internet of Things devices, and smart vehicle-mounted devices.
- the smart wearable device may be, for example, a smart watch
- the light smart wearable device may be, for example, a sports watch.
- the present application provides an application development method applied to an electronic device, the method comprising: sending a first download request to a server, where the first download request is used to request to download an installation package of a target application; receiving the The first installation package sent by the server, the first installation package is a target installation package corresponding to the device information of the electronic device, and the target installation package is determined by the server according to the original installation package of the target application.
- the method before sending the first download request to the server, the method further includes: sending the device information of the electronic device to the server, and receiving the electronic device support information sent by the server. Information about running applications; displaying information about running applications supported by the electronic device.
- the first installation package includes a function file corresponding to the device information of the electronic device and/or a layout file corresponding to the device information of the electronic device, and the device information of the electronic device corresponds to
- the layout file includes display resources corresponding to the device information of the electronic device.
- the device information includes at least one of device type and screen parameters.
- the screen parameters include at least one of screen shape, screen size and screen resolution.
- the method further includes: downloading the first installation package, and installing the first installation package on the electronic device according to the first installation package or download the first installation package, and display the service card of the target application on the electronic device according to the first installation package.
- the present application provides an application development method, which is applied to a server, and the method includes: receiving a first The original installation package of the target application sent by the electronic device, the original installation package of the target application is used to indicate at least one function corresponding to the device information, and/or, at least one page layout corresponding to the device information; according to the The original installation package determines at least one target installation package, wherein the at least one target installation package corresponds to the at least one type of device information, and each target installation package has a function and/or page layout corresponding to one type of device information; receiving a first download request sent by a second electronic device, where the first download request is used to request to download an installation package of the target application; sending a first installation package to the second electronic device, where the first installation package is The target installation package corresponding to the device information of the second electronic device in the at least one target installation package; receiving a second download request sent by a third electronic device, the second download request is used to request downloading of the target application An installation package; sending a second
- the first installation package and the second installation package meet at least one of the following conditions: the data size of the first installation package is different from the data size of the second installation package; The package name of the first installation package is different from the package name of the second installation package; the function files in the first installation package are different from the function files in the second installation package; the first installation package The layout file in is different from the layout file in the second installation package.
- the method further includes: receiving the device information of the second electronic device sent by the second electronic device, and sending to the second electronic device information about the supported operation of the second electronic device.
- Application information receiving the device information of the third electronic device sent by the third electronic device, and sending information of the applications supported by the third electronic device to the third electronic device.
- the determining at least one target installation package according to the original installation package includes: splitting and compiling the original installation package according to syntax tags in the original installation package to obtain the At least one target installation package.
- the first installation package includes a function file corresponding to the device information of the second electronic device and/or a layout file corresponding to the device information of the second electronic device
- the second The layout file corresponding to the device information of the electronic device includes the display resource corresponding to the device information of the second electronic device
- the second installation package includes the function file corresponding to the device information of the third electronic device and/or the A layout file corresponding to the device information of the third electronic device, where the layout file corresponding to the device information of the third electronic device includes a display resource corresponding to the device information of the third electronic device.
- the device information includes at least one of device type and screen parameters.
- the screen parameters include at least one of screen shape, screen size and screen resolution.
- the present application provides an electronic device, the electronic device includes a plurality of functional modules; the plurality of functional modules interact to realize the second electronic device or the third electronic The method implemented by the device.
- the multiple functional modules can be implemented based on software, hardware or a combination of software and hardware, and the multiple functional modules can be combined or divided arbitrarily based on specific implementations.
- the present application provides an electronic device, including at least one processor and at least one memory, where computer program instructions are stored in the at least one memory, and when the electronic device is running, the at least one processor executes any of the above-mentioned Aspects and methods executed by the second electronic device or the third electronic device in various implementation manners thereof.
- the present application provides a server, where the server includes multiple functional modules; the multiple functional modules interact to implement the method executed by the server in any one of the above aspects and implementations thereof.
- the multiple functional modules can be implemented based on software, hardware or a combination of software and hardware, and the multiple functional modules can be combined or divided arbitrarily based on specific implementations.
- the present application provides a server, including at least one processor and at least one memory, where computer program instructions are stored in the at least one memory, and when the server is running, the at least one processor executes any of the above aspects and The method executed by the server in each embodiment.
- the present application also provides a computer program, which, when the computer program is run on a computer, enables the computer to execute the second electronic device, the third electronic device or the server in any of the above aspects and various implementation manners thereof. method of execution.
- the present application also provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a computer, the computer executes any one of the above-mentioned aspects and its Methods executed by the second electronic device, the third electronic device or the server in each implementation manner.
- the present application also provides a chip, the chip is used to read the computer program stored in the memory, and execute the program executed by the second electronic device, the third electronic device or the server in any one of the above-mentioned aspects and its various implementation manners. method.
- the present application further provides a chip system
- the chip system includes a processor, and is used to support the computer device to implement any of the above aspects and the implementation of the second electronic device, the third electronic device or the server in each implementation manner. method.
- the chip system further includes a memory, and the memory is used to store necessary programs and data of the computer device.
- the system-on-a-chip may consist of chips, or may include chips and other discrete devices.
- FIG. 1 is a schematic diagram of a scene of putting on shelves and downloading an application installation package applicable to the embodiment of the present application;
- FIG. 2 is a schematic diagram of different dial shapes and resolutions provided by the embodiment of the present application.
- FIG. 3 is a schematic interface diagram of a service card provided by an embodiment of the present application.
- FIG. 4 is a schematic diagram of an interface displaying a service card in a smart watch provided by an embodiment of the present application
- Fig. 5 is a schematic diagram of a display interface of a circular watch displaying square display resources
- FIG. 6 is a schematic structural diagram of an electronic device provided in an embodiment of the present application.
- FIG. 7 is a software structural block diagram of an electronic device provided in an embodiment of the present application.
- FIG. 8 is a schematic structural diagram of an original installation package of a target application provided in an embodiment of the present application.
- FIG. 9 is a schematic diagram of a method of generating a target installation package provided by an embodiment of the present application.
- FIG. 10A is a functional schematic diagram of a music application provided by an embodiment of the present application.
- FIG. 10B is a schematic diagram of a resolution corresponding to a display resource of a music application provided in an embodiment of the present application.
- FIG. 11 is a schematic diagram of determining at least one target installation package by a server provided in an embodiment of the present application.
- FIG. 12 is a schematic diagram of a server determining at least one target installation package according to an embodiment of the present application.
- FIG. 13 is a schematic diagram of a weather service card displayed on a smart phone and a smart watch according to an embodiment of the present application
- FIG. 14 is a flow chart of an application development method provided by an embodiment of the present application.
- At least one in the embodiments of the present application refers to one or more, and “multiple” refers to two or more.
- “And/or” describes the association relationship of associated objects, indicating that there may be three types of relationships, for example, A and/or B, which can mean: A exists alone, A and B exist simultaneously, and B exists alone, where A, B can be singular or plural.
- the character “/” generally indicates that the contextual objects are an “or” relationship.
- At least one (item) of the following” or similar expressions refer to any combination of these items, including any combination of single item(s) or plural item(s).
- At least one item (unit) of a, b or c can represent: a, b, c, a and b, a and c, b and c, or a, b and c, wherein a, b, c Can be single or multiple.
- the Hongmeng system is a distributed operating system for all scenarios.
- the Hongmeng system can support electronic devices such as mobile phones, computers, tablets, TVs, industrial automation control equipment, driverless equipment, car equipment, and smart wearable equipment.
- the application market can be installed on the electronic device.
- the application market is a platform for displaying and downloading applications.
- the application market can be used by developers to upload the installation package of the developed application program, and for users to download and install the application program on the electronic device.
- the application program in this embodiment of the present application may also be referred to as application for short.
- FIG. 1 is a schematic diagram of an application installation package uploading and downloading scenario provided by an embodiment of the present application.
- the application developer can send the installation package of the application to the server through the first electronic device in the scenario shown in FIG. 1 , and the server can push the application to the application market client.
- the user may operate the second electronic device to search for an application in an application market client installed on the second electronic device.
- the second electronic device can download and install the installation package of the application.
- the functions it can support may also be different, and the shape or size of the display screen may also be different, so the application developer needs to design different installation packages for different types of electronic devices, And put multiple installation packages of the same application on the application market multiple times. It can be seen that the application development cost required by this method is relatively high, and the development operation is cumbersome.
- FIG. 2 is a schematic diagram of different dial shapes and resolutions provided by the embodiment of the present application.
- electronic devices have a variety of screen shapes and resolutions, so developers need to develop application installation packages for each dial shape and resolution, and put them on the application market multiple times.
- FIG. 3 is a schematic interface diagram of a service card provided in the embodiment of the present application.
- service cards of multiple applications can be displayed.
- the interface shown in FIG. 3 includes service cards of weather application, service card of query express application, service card of video player and so on.
- important information or operations of the application can be displayed, so that users can view messages or perform operations, so as to achieve direct service and reduce the user experience level.
- the user can operate the service card to add an application on the display interface of the electronic device. If the application is not installed in the electronic device, the electronic device can request the server to download the installation package of the application.
- the application installation package displays the service card of the application on the display screen of the electronic device.
- FIG. 4 is a schematic diagram of an interface displaying a service card in a smart watch provided by an embodiment of the present application. Referring to Figure 4, when the smart watch displays the service card of the weather application, it needs to display a circular service card. Therefore, application developers need to set corresponding service cards for the screen shape and screen resolution of each electronic device, and include the service card as a display resource in the application installation package, so that various electronic devices can display images that match the screen. Service card.
- the application installation package may include display resources or logic code blocks corresponding to multiple device types, such as adding macro controls in the installation package to distinguish display resources or logic corresponding to different device types code block.
- the macro control may be an operating system supporting different device types, for example, the macro control may be a TV operating system, a smart wearable operating system, a terminal operating system, and the like.
- the application installation package downloaded by the electronic device includes display resources and logic code blocks corresponding to its own device type, and also includes display resources and logic code blocks corresponding to other device types, resulting in waste of storage resources.
- this embodiment requires the electronic device to have a relatively large storage space, and is not suitable for electronic devices with limited storage space.
- the server may create multiple installation packages based on various screen sizes or screen resolutions, and each installation package is suitable for a specific application. Screen size or screen resolution.
- the second electronic device needs to support flexible layout and display vector graphics.
- the second electronic device supports displaying display resources in multiple shapes, the second electronic device needs to download multiple installation packages, otherwise display exceptions will occur.
- FIG. 5 is a schematic diagram of a display interface of a round watch displaying a square display resource. Referring to Figure 5, when a round watch displays a square display resource, it will block the display resource and affect user experience.
- downloading multiple installation packages by the second electronic device will also result in more resources required by the second electronic device to run the application, which cannot be applied to devices with limited storage space.
- an embodiment of the present application provides an application development method. This method can be applied to the scenario shown in FIG. 1 .
- the server receives the original installation package of the target application uploaded by the first electronic device, and the original installation package of the target application is used to indicate at least one function corresponding to the device information, and/or, at least A page layout corresponding to device information.
- the server determines at least one target installation package according to the original installation package of the target application, the at least one target installation package corresponds to at least one kind of device information, and each target installation package has a function and/or page layout corresponding to a kind of device information.
- the server receives the first download request sent by the second electronic device, and the server sends the first installation package to the second electronic device, and the first installation package is a target installation package corresponding to the device information of the second electronic device in at least one target installation package.
- the server may also receive the second download request sent by the third electronic device, the server sends the second installation package to the third electronic device, the second installation package is the target installation package corresponding to the device information of the third electronic device in at least one target installation package .
- the application developer can upload the original installation package containing various functional parameters and layout files to the server, and the server can generate at least one target installation package according to the original installation package, and each target installation package corresponds to One device information, so that developers do not need to put multiple installation packages of the same application on the shelves, reducing development costs and improving the efficiency of application development.
- electronic devices with different device information request different target installation packages from the server, so that the target installation packages downloaded by the electronic device can be applied to the electronic device, ensuring that the electronic device can operate normally The target application does not need to download data irrelevant to the electronic device, saving storage resources of the electronic device.
- the server may be a cloud server in an application market, or a server provided by an electronic device manufacturer, which is not limited in this embodiment of the present application.
- the electronic device in the embodiment of the present application can be, for example, a tablet computer, a mobile phone, a vehicle-mounted device, an augmented reality (augmented reality, AR)/virtual reality (virtual reality, VR) device, a notebook computer, an ultra-mobile personal computer (ultra-mobile personal computer) , UMPC), netbook, personal digital assistant (personal digital assistant, PDA), wearable device, Internet of things (internet of thing, IoT) device, car machine, etc.
- the embodiment of the present application does not make any restrictions on the specific type of electronic device.
- FIG. 6 is a schematic structural diagram of an electronic device 100 provided by an embodiment of the present application.
- the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (universal serial bus, USB) interface 130, a charging management module 140, a power management module 141, and a battery 142 , antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, earphone jack 170D, sensor module 180, button 190, motor 191, indicator 192, camera 193 , a display screen 194, and a subscriber identification module (subscriber identification module, SIM) card interface 195, etc.
- SIM subscriber identification module
- the processor 110 may include one or more processing units, for example: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processing unit (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), controller, memory, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural network processor (neural-network processing unit, NPU), etc. . Wherein, different processing units may be independent devices, or may be integrated in one or more processors. Wherein, the controller may be the nerve center and command center of the electronic device 100 . The controller can generate an operation control signal according to the instruction opcode and timing signal, and complete the control of fetching and executing the instruction.
- a memory may also be provided in the processor 110 for storing instructions and data.
- the memory in processor 110 is a cache memory.
- the memory may hold instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to use the instruction or data again, it can be called directly from the memory. Repeated access is avoided, and the waiting time of the processor 110 is reduced, thereby improving the efficiency of the system.
- the USB interface 130 is an interface conforming to the USB standard specification, specifically, it can be a Mini USB interface, a Micro USB interface, a USB Type C interface, and the like.
- the USB interface 130 can be used to connect a charger to charge the electronic device 100 , and can also be used to transmit data between the electronic device 100 and peripheral devices.
- the charging management module 140 is configured to receive a charging input from a charger.
- the power management module 141 is used for connecting the battery 142 , the charging management module 140 and the processor 110 .
- the power management module 141 receives the input from the battery 142 and/or the charging management module 140 to provide power for the processor 110 , the internal memory 121 , the external memory, the display screen 194 , the camera 193 , and the wireless communication module 160 .
- the wireless communication function of the electronic device 100 can be realized by the antenna 1 , the antenna 2 , the mobile communication module 150 , the wireless communication module 160 , a modem processor, a baseband processor, and the like.
- Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals.
- Each antenna in electronic device 100 may be used to cover single or multiple communication frequency bands. Different antennas can also be multiplexed to improve the utilization of the antennas.
- Antenna 1 can be multiplexed as a diversity antenna of a wireless local area network.
- the antenna may be used in conjunction with a tuning switch.
- the mobile communication module 150 can provide wireless communication solutions including 2G/3G/4G/5G applied on the electronic device 100 .
- the mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (low noise amplifier, LNA) and the like.
- the mobile communication module 150 can receive electromagnetic waves through the antenna 1, filter and amplify the received electromagnetic waves, and send them to the modem processor for demodulation.
- the mobile communication module 150 also The signal modulated by the modem processor can be amplified, and converted into electromagnetic waves by the antenna 1 for radiation.
- at least part of the functional modules of the mobile communication module 150 may be set in the processor 110 .
- at least part of the functional modules of the mobile communication module 150 and at least part of the modules of the processor 110 may be set in the same device.
- the wireless communication module 160 can provide wireless local area networks (wireless local area networks, WLAN) (such as wireless fidelity (Wireless Fidelity, Wi-Fi) network), bluetooth (bluetooth, BT), global navigation satellite, etc. applied on the electronic device 100.
- System global navigation satellite system, GNSS
- frequency modulation frequency modulation, FM
- near field communication technology near field communication, NFC
- infrared technology infrared, IR
- the wireless communication module 160 may be one or more devices integrating at least one communication processing module.
- the wireless communication module 160 receives electromagnetic waves via the antenna 2 , frequency-modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110 .
- the wireless communication module 160 can also receive the signal to be sent from the processor 110 , frequency-modulate it, amplify it, and convert it into electromagnetic waves through the antenna 2 for radiation.
- the antenna 1 of the electronic device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology.
- the wireless communication technology may include global system for mobile communications (GSM), general packet radio service (general packet radio service, GPRS), code division multiple access (code division multiple access, CDMA), broadband Code division multiple access (wideband code division multiple access, WCDMA), time division code division multiple access (time-division code division multiple access, TD-SCDMA), long term evolution (long term evolution, LTE), BT, GNSS, WLAN, NFC , FM, and/or IR techniques, etc.
- GSM global system for mobile communications
- GPRS general packet radio service
- code division multiple access code division multiple access
- CDMA broadband Code division multiple access
- WCDMA wideband code division multiple access
- time division code division multiple access time-division code division multiple access
- TD-SCDMA time-division code division multiple access
- the GNSS may include a global positioning system (global positioning system, GPS), a global navigation satellite system (global navigation satellite system, GLONASS), a Beidou navigation satellite system (beidou navigation satellite system, BDS), a quasi-zenith satellite system (quasi -zenith satellite system (QZSS) and/or satellite based augmentation systems (SBAS).
- GPS global positioning system
- GLONASS global navigation satellite system
- Beidou navigation satellite system beidou navigation satellite system
- BDS Beidou navigation satellite system
- QZSS quasi-zenith satellite system
- SBAS satellite based augmentation systems
- the display screen 194 is used for displaying a display interface of an application, for example, displaying a display page of an application installed on the electronic device 100 .
- the display screen 194 includes a display panel.
- the display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active matrix organic light emitting diode or an active matrix organic light emitting diode (active-matrix organic light emitting diode, AMOLED), flexible light-emitting diode (flex light-emitting diode, FLED), Miniled, MicroLed, Micro-oLed, quantum dot light emitting diodes (quantum dot light emitting diodes, QLED), etc.
- the electronic device 100 may include 1 or N display screens 194 , where N is a positive integer greater than 1.
- Camera 193 is used to capture still images or video.
- the object generates an optical image through the lens and projects it to the photosensitive element.
- the photosensitive element may be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor.
- CMOS complementary metal-oxide-semiconductor
- the photosensitive element converts the light signal into an electrical signal, and then transmits the electrical signal to the ISP to convert it into a digital image signal.
- the ISP outputs the digital image signal to the DSP for processing.
- DSP converts digital image signals into standard RGB, YUV and other image signals.
- the electronic device 100 may include 1 or N cameras 193 , where N is a positive integer greater than 1.
- the internal memory 121 may be used to store computer-executable program codes including instructions.
- the processor 110 executes various functional applications and data processing of the electronic device 100 by executing instructions stored in the internal memory 121 .
- the internal memory 121 may include an area for storing programs and an area for storing data.
- the storage program area can store an operating system, software codes of at least one application program, and the like.
- the storage data area can store the electronic device 100 Data generated during use (such as captured images, recorded videos, etc.), etc.
- the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, flash memory device, universal flash storage (universal flash storage, UFS) and the like.
- the external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device.
- the external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, save pictures, videos and other files in the external memory card.
- the electronic device 100 can implement audio functions through the audio module 170 , the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, and the application processor. Such as music playback, recording, etc.
- the sensor module 180 may include a pressure sensor 180A, an acceleration sensor 180B, a touch sensor 180C and the like.
- the pressure sensor 180A is used to sense the pressure signal and convert the pressure signal into an electrical signal.
- pressure sensor 180A may be disposed on display screen 194 .
- the touch sensor 180C is also called “touch panel”.
- the touch sensor 180C can be disposed on the display screen 194, and the touch sensor 180C and the display screen 194 form a touch screen, also called “touch screen”.
- the touch sensor 180C is used to detect a touch operation on or near it.
- the touch sensor can pass the detected touch operation to the application processor to determine the type of touch event.
- Visual output related to the touch operation can be provided through the display screen 194 .
- the touch sensor 180C may also be disposed on the surface of the electronic device 100 , which is different from the position of the display screen 194 .
- the keys 190 include a power key, a volume key and the like.
- the key 190 may be a mechanical key. It can also be a touch button.
- the electronic device 100 may receive key input and generate key signal input related to user settings and function control of the electronic device 100 .
- the motor 191 can generate a vibrating reminder.
- the motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. For example, touch operations applied to different applications (such as taking pictures, playing audio, etc.) may correspond to different vibration feedback effects.
- the touch vibration feedback effect can also support customization.
- the indicator 192 can be an indicator light, and can be used to indicate charging status, power change, and can also be used to indicate messages, missed calls, notifications, and the like.
- the SIM card interface 195 is used for connecting a SIM card. The SIM card can be connected and separated from the electronic device 100 by inserting it into the SIM card interface 195 or pulling it out from the SIM card interface 195 .
- FIG. 6 do not constitute a specific limitation on the electronic device 100, and the electronic device may also include more or fewer components than shown in the figure, or combine some components, or split some components , or different component arrangements.
- the combination/connection relationship between the components in FIG. 6 can also be adjusted and modified.
- FIG. 7 is a software structural block diagram of an electronic device provided by an embodiment of the present application.
- the software structure of the electronic device may be a layered architecture, for example, the software may be divided into several layers, and each layer has a clear role and division of labor. Layers communicate through software interfaces.
- the operating system is divided into four layers, which are application program layer, application program framework layer (framework, FWK), runtime (runtime) and system library, and kernel layer from top to bottom.
- the application layer can include a series of application packages.
- the application program layer may include camera, settings, skin module, user interface (user interface, UI), three-party application programs, and the like.
- the three-party application may include gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message and so on.
- the application layer may include a target installation package of a target application that the electronic device requests to download from the server, and the function files and layout files in the target installation package are adapted to the electronic device.
- the application framework layer provides an application programming interface (application programming interface) for applications in the application layer. interface, API) and programming framework.
- the application framework layer can include some predefined functions. As shown in Figure 7, the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, and a notification manager.
- a window manager is used to manage window programs.
- the window manager can get the size of the display screen, determine whether there is a status bar, lock the screen, capture the screen, etc.
- Content providers are used to store and retrieve data and make it accessible to applications. Said data may include video, images, audio, calls made and received, browsing history and bookmarks, phonebook, etc.
- the view system includes visual controls, such as controls for displaying text, controls for displaying pictures, and so on.
- the view system can be used to build applications.
- a display interface can consist of one or more views.
- a display interface including a text message notification icon may include a view for displaying text and a view for displaying pictures.
- the phone manager is used to provide communication functions of electronic devices. For example, the management of call status (including connected, hung up, etc.).
- the resource manager provides various resources for the application, such as localized strings, icons, pictures, layout files, video files, and so on.
- the notification manager enables the application to display notification information in the status bar, which can be used to convey notification-type messages, and can automatically disappear after a short stay without user interaction.
- the notification manager is used to notify the download completion, message reminder, etc.
- the notification manager can also be a notification that appears on the top status bar of the system in the form of a chart or scroll bar text, such as a notification of an application running in the background, or a notification that appears on the screen in the form of a dialog window.
- prompting text information in the status bar issuing a prompt sound, vibrating the electronic device, and flashing the indicator light, etc.
- the runtime includes the core library and virtual machine.
- the runtime is responsible for the scheduling and management of the operating system.
- the core library consists of two parts: one part is the functions that the iava language needs to call, and the other part is the core library of the operating system.
- the application layer and the application framework layer run in virtual machines.
- the virtual machine executes the iava files of the application program layer and the application program framework layer as binary files.
- the virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.
- a system library can include multiple function modules. For example: surface manager (surface manager), media library (media libraries), 3D graphics processing library (eg: OpenGL ES), 2D graphics engine (eg: SGL), image processing library, etc.
- surface manager surface manager
- media library media libraries
- 3D graphics processing library eg: OpenGL ES
- 2D graphics engine eg: SGL
- image processing library etc.
- the surface manager is used to manage the display subsystem and provides the fusion of 2D and 3D layers for multiple applications.
- the media library supports playback and recording of various commonly used audio and video formats, as well as still image files, etc.
- the media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
- the 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing, etc.
- 2D graphics engine is a drawing engine for 2D drawing.
- the kernel layer is the layer between hardware and software.
- the kernel layer includes at least a display driver, a camera driver, an audio driver, and a sensor driver.
- the hardware layer may include various sensors, such as acceleration sensors, gravity sensors, touch sensors, and the like.
- the structure shown in Figure 6 and Figure 7 is only an example of the electronic device provided by the embodiment of the present application, and cannot limit the electronic device provided by the embodiment of the present application.
- the electronic device can There are more or fewer devices or modules than in the structure shown in FIG. 6 or FIG. 7 .
- the first electronic device may be a front-end development device used by developers, and the second electronic device An electronic device that can be used by a user.
- the server may be a cloud server in the application market.
- the first electronic device may send the original installation package of the target application to the server, so as to put the target application on the application market.
- the original installation package of the target application is used to indicate the function corresponding to at least one kind of device information, and/or, the page layout corresponding to at least one kind of device information, for example, the original installation package of the target application may include functions corresponding to various kinds of device information Layout files corresponding to parameters and/or various types of device information.
- the device information may include device type, screen parameters, etc.
- the screen parameters may include at least one of parameters such as screen shape, screen size, and screen resolution of the electronic device.
- FIG. 8 is a schematic structural diagram of an original installation package of a target application provided by an embodiment of the present application.
- the original installation package of the target application may include function parameters corresponding to various device types. If the device type includes sports watch and smart watch, the original installation package includes the functional parameters corresponding to the sports watch and the functional parameters corresponding to the smart watch.
- the original installation package of the target application may also include layout files corresponding to various screen parameters, and the layout files may also include display resources.
- the original installation package of the target application includes layout files corresponding to circular screens and layout files corresponding to square screens, and the layout files of the target application may also include display resources corresponding to different screen resolutions.
- the layout file of the target application includes display resources for a circular screen with a resolution of 466*466, display resources for a square screen with a resolution of 280*456, and display resources for a square screen with a resolution of 336*480.
- the functional parameters corresponding to various types of device information included in the original installation package of the target application may be code logic blocks corresponding to various types of device information, and the code logic block is a computer instruction/computer program executable by the electronic device. After the server grammatically marks, dynamically splits and compiles the code logic blocks, it can generate function files.
- the code logic block corresponding to the device information can be defined in the original installation package.
- the environment variable is declared in the original installation package, for example, the sports watch is LITE_WEARABLE, and the smart watch is WEARABLE, then the function parameters of the device type as LITE_WEARABLE are defined in the original installation package, and the device Function parameters whose type is WEARABLE, so as to distinguish the function parameters corresponding to different device types.
- the original installation package of the target application also includes layout files corresponding to various device information, and the server can invoke the layout files by calling functions.
- the server After the server receives the original installation package of the target application sent by the first electronic device, it dynamically splits and compiles the original installation package according to the grammatical tags in the original installation package to obtain at least one target installation package, and the at least one target installation package and There is a one-to-one correspondence of at least one kind of device information, and each target installation package has a function and/or page layout corresponding to one kind of device information.
- each target installation package determined by the server may include function files and/or layout files.
- the layout file may also include display resources of the target application.
- the server may determine the function parameters corresponding to each type of device information according to the grammar tags in the original installation package. For example, the server can enable the Tree shaking function in webpack, which can automatically optimize the parameters other than the function parameters corresponding to the target device information, and package the obtained function parameters corresponding to the target device information to generate the target device The function file corresponding to the information.
- the server may also call a layout file corresponding to the target device information by calling a function, and package the obtained function file and layout file corresponding to the target device information to generate a target installation package corresponding to the target device information.
- the layout file corresponding to each device information can be defined in the original installation package.
- different device information corresponds to different targets, and different layout files are defined under each target.
- the layout file can be cascading style sheets (cascading style sheets, CSS ) file/Hypertext Mark-up Language (HTML) file.
- the server When generating the target installation package, the server generates different config.json files for different targets, and the server can call Use ace-loader multiple times to pass different config.json files to generate target installation packages corresponding to different device information.
- the same electronic device may support layout files corresponding to multiple screen resolutions
- the target installation package corresponding to the device information of the electronic device may include layout files corresponding to multiple screen resolutions, as shown in Figure 9
- Figure 9 It is a schematic diagram of a method for generating a target installation package provided by the embodiment of this application.
- the screen parameters in the device information include two screen shapes, circular and square, and the circular screen shape includes two resolutions of 454*454 and 456*456, and the square
- the screen includes 454*454 resolution.
- the server generates target1 for a circular screen, and generates a circle Config.json file for target1, and the server generates target2 for a square screen, and generates a rect Config.json file for target2.
- a target installation package corresponding to the device information is generated according to the function file and the layout file corresponding to the device information. Referring to Figure 9, the target installation package corresponding to the device information contains three hap packages.
- the hap1 package includes the function file ModlueA, the layout file target1, and the display resources corresponding to the circular screen with a resolution of 454*454;
- the hap2 package includes The function file ModlueA, the layout file target1, and the display resources corresponding to the circular screen with a resolution of 456*456;
- the hap3 package includes the function file ModlueA, the layout file target2, and the display resources corresponding to the square screen with a resolution of 454*454.
- the user can trigger the second electronic device to run the application market client.
- the second electronic device may send the device information of the second electronic device to the server, and the server may determine the information of the applications that the second electronic device supports to run according to the device information of the second electronic device, and assign the information that the second electronic device supports to run
- the information of the application is sent to the second electronic device, and the second electronic device can display the information of the application supported by the second electronic device on the application market client.
- the information of the application can include the installation package name of the application, the application icon, the application Introduction and other information.
- the user can operate the second electronic device to search for the target application in the application market client installed on the second electronic device, and the second electronic device can send a first download request to the server, and the first download request is used to request to download the installation package of the target application .
- the server may determine the first installation package according to the device information of the second electronic device, where the first installation package is a target installation package corresponding to the device information of the second electronic device.
- the server sends the first installation package to the second electronic device.
- the second electronic device After receiving the first installation package sent by the server, the second electronic device can download and install the first installation package, so that the second electronic device locally installs the target application, or the second electronic device displays the target application according to the first installation package. Service card.
- the server may also receive the device information of the third electronic device sent by the third electronic device, and send the information of the applications supported by the third electronic device to run to the third electronic device.
- the user may trigger the third electronic device to send a second download request to the server, where the second download request is used to request to download the installation package of the target application.
- the server determines the second installation package according to the device information of the third electronic device, and the second installation package is a target installation package corresponding to the device information of the third electronic device.
- the server sends the second installation package to the third electronic device. It can be seen from the foregoing introduction that the first installation package is different from the second installation package.
- the difference between the first installation package and the second installation package may include at least one of the following situations: the data volume size of the first installation package is different from the data volume size of the second installation package; the function files or layouts contained in the first installation package The file is different from the function file or layout file included in the second installation package, for example, the display resources in the layout file included in the first installation package are different from the display resources in the layout file included in the second installation package; the first installation package The package name of the package is different from the package name of the second installation package.
- the developer can directly upload the original installation package of the target application to the server through the first electronic device, and the server will split and compile the original installation package to generate information corresponding to each device.
- the target installation package reduces development costs and realizes the application development method of one-time development and multi-device deployment.
- the server may send the target installation package corresponding to the device information of the second electronic device to the second electronic device, so that the target installation package of the target application obtained by the second electronic device is
- the application installation package matching the second electronic device the target installation package only contains the function files and layout files corresponding to the device information of the second electronic device, so as to avoid wasting the storage resources of the second electronic device, thus making the storage space limited
- the lightweight device can also download and run the target application normally, which is conducive to the ecological development of the operating system.
- the developer may design corresponding functions and display resources for various types of devices.
- a music application that can support two types of devices, a sports watch and a smart watch.
- both the sports watch and the smart watch can support function A: play music locally and control smart phone to play music.
- the smart watch also supports function B: display user accounts, support playing private radio stations, and support program classification.
- the display resources of the music application include: a circular dial resource with a resolution of 466*466, a square dial resource with a resolution of 280*456, and a square dial resource with a resolution of 336*480.
- FIG. 11 is a schematic diagram of a server determining at least one target installation package according to an embodiment of the present application.
- the original installation package of the music application includes: function parameters corresponding to function A of the music application, function parameters corresponding to function B, a circular dial layout file, a square dial layout file, and a circular dial with a resolution of 466*466.
- the server dynamically splits and compiles the original installation package to obtain four target installation packages as shown in FIG. 11 : installation package 1 to installation package 4 .
- the installation package 1 includes the function file corresponding to function A, the circular dial layout file and the circular dial display resource with a resolution of 466*466
- the installation package 2 includes the function file corresponding to function A, the function file corresponding to function B, Circular dial layout files and circular dial display resources with a resolution of 466*466
- installation package 3 includes function files corresponding to function A, square dial layout files, and square dial display resources with a resolution of 280*456
- installation package 4 Including the function file corresponding to function A, the square dial layout file, and the square dial display resource with a resolution of 336*480.
- the server can receive the device information sent by each electronic device, and send the information of the applications supported by each electronic device to each electronic device according to the device information of each electronic device, so as to realize the application market of pushing music applications to different devices client.
- the user can operate the second electronic device to trigger the download of the music application on the application market client, the second electronic device sends a download request to the server, and the server sends the target installation package corresponding to the device information of the second electronic device to the second electronic device, and the second electronic device sends a download request to the server.
- the electronic device downloads and installs the target installation package of the music application applicable to the second electronic device.
- the target installation package of the music application downloaded by the circular sports watch with a screen resolution of 466*466 is installation package 1; the target installation package of the music application downloaded by the circular smart watch with a screen resolution of 466*466 is installation package 2; the target installation package of the music application downloaded by the square sports watch with a screen resolution of 280*456 is installation package 3; the target installation package of the music application downloaded by the square sports watch with a screen resolution of 336*480 is installation Pack 4.
- a developer developing a weather application service card when designing the installation package of the weather application service card, the developer can design corresponding functions and display resources for various types of devices.
- a developer can design a service card that supports both a smartphone and a smartwatch.
- smartphones and smart watches support function A at the same time: root According to the positioning information, the weather conditions of the day are displayed; the smartphone also supports function B: displaying the weather conditions of the next week.
- Smartphones support displaying 4*4 display resources
- smart watches support circular dial display resources with a display resolution of 466*466.
- FIG. 12 is a schematic diagram of a server determining at least one target installation package according to an embodiment of the present application.
- the original installation package of the weather application service card includes: function parameters corresponding to function A, function parameters corresponding to function B, circular dial layout files, square layout files, and circular dials with a resolution of 466*466 Display resources, 4*4 square display resources.
- the server dynamically splits and compiles the original installation package to obtain two target installation packages as shown in FIG.
- the installation package 1 includes the function file corresponding to function A, the circular dial layout file and the circular dial display resource with a resolution of 466*466;
- the installation package 2 includes the function file corresponding to function A, the function file corresponding to function B, Square layout files and 4*4 square display resources.
- the smart phone or smart watch When the user adds a weather service card on the smart phone or smart watch, the smart phone or smart watch sends a download request to the server.
- the download request may include device information of the device sending the download request, or the smart phone or smart watch may send the device information to the server in advance.
- the server may determine the target installation package corresponding to the device information according to the device information, and return the target installation package to the device sending the download request.
- the smart phone or smart watch downloads and installs the target installation package, and displays the weather service card on the screen.
- FIG. 13 is a schematic diagram of a weather service card displayed on a smart phone and a smart watch according to an embodiment of the present application.
- the weather service card displayed on the smart phone is square and can display the weather conditions of the current day and the next week in the area where it is located.
- the weather service card displayed on the smart watch is circular and can display the weather conditions of the current day in the area where it is located.
- FIG. 14 is a flow chart of an application development method provided by an embodiment of the present application. Referring to Figure 14, the method comprises the following steps:
- S1401 The first electronic device sends the original installation package of the target application to the server.
- the original installation package of the target application is used to indicate the function corresponding to at least one kind of device information, and/or, the page layout corresponding to at least one kind of device information.
- S1402 The server determines at least one target installation package according to the original installation package of the target application.
- At least one target installation package is in one-to-one correspondence with at least one kind of device information, and each target installation package has a function and/or page layout corresponding to one kind of device information.
- S1403 The second electronic device sends a first download request to the server.
- the first download request is used to request to download the installation package of the target application.
- S1404 The server sends the first installation package to the second electronic device.
- the first installation package is a target installation package corresponding to the device information of the second electronic device in at least one target installation package.
- S1405 The third electronic device sends a second download request to the server.
- the second download request is used to request to download the installation package of the target application.
- S1406 The server sends the second installation package to the third electronic device.
- the second installation package is a target installation package corresponding to the device information of the third electronic device in at least one target installation package.
- the present application also provides an electronic device, the electronic device includes multiple functional modules; the multiple functional modules interact to implement the second electronic device or the first electronic device in each method described in the embodiments of the present application. 3. Functions performed by electronic devices. For example, execute S1403 executed by the second electronic device in the embodiment shown in FIG. 14 , or execute S1405 executed by the third electronic device in the embodiment shown in FIG. 14 .
- the multiple functional modules can be implemented based on software, hardware or a combination of software and hardware, and the multiple functional modules can be combined or divided arbitrarily based on specific implementations.
- the present application also provides an electronic device, which includes at least one processor and at least one memory, where computer program instructions are stored in the at least one memory, and when the electronic device is running, the at least one processing
- the device executes the functions executed by the second electronic device or the third electronic device in the methods described in the embodiments of the present application. For example, execute S1403 executed by the second electronic device in the embodiment shown in FIG. 14 , or execute S1405 executed by the third electronic device in the embodiment shown in FIG. 14 .
- the present application further provides a server, the server includes multiple functional modules; the multiple functional modules interact to implement the functions performed by the server in the methods described in the embodiments of the present application. Such as executing S1402, S1404, and S1406 performed by the server in the embodiment shown in FIG. 14 .
- the multiple functional modules can be implemented based on software, hardware or a combination of software and hardware, and the multiple functional modules can be combined or divided arbitrarily based on specific implementations.
- the present application also provides a server, the server includes at least one processor and at least one memory, the at least one memory stores computer program instructions, and when the server is running, the at least one processor executes this The functions performed by the server in the methods described in the embodiments of the application. Such as executing S1402, S1404, and S1406 performed by the server in the embodiment shown in FIG. 14 .
- the present application further provides a computer program that, when the computer program is run on a computer, causes the computer to execute the methods described in the embodiments of the present application.
- the present application also provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a computer, the computer executes the computer program described in the embodiments of the present application. methods described.
- the present application also provides a chip, the chip is used to read the computer program stored in the memory, and implement the methods described in the embodiments of the present application.
- the present application provides a system-on-a-chip, where the system-on-a-chip includes a processor, configured to support a computer device to implement the methods described in the embodiments of the present application.
- the chip system further includes a memory, and the memory is used to store necessary programs and data of the computer device.
- the system-on-a-chip may consist of chips, or may include chips and other discrete devices.
- the embodiments of the present application may be provided as methods, systems, or computer program products. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
- computer-usable storage media including but not limited to disk storage, CD-ROM, optical storage, etc.
- These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing apparatus to operate in a specific manner, such that the instructions stored in the computer-readable memory produce an article of manufacture comprising instruction means, the instructions
- the device realizes the function specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
Abstract
本申请提供一种应用开发***、方法及设备。在该应用开发***中,第一电子设备向服务器发送目标应用的原始安装包,目标应用的原始安装包用于指示至少一种设备信息对应的功能和/或页面布局。服务器根据原始安装包确定至少一个目标安装包,至少一个目标安装包与至少一种设备信息一一对应。服务器接收第二电子设备发送的第一下载请求,向第二电子设备发送第一安装包,第一安装包为第二电子设备的设备信息对应的目标安装包;服务器接收第三电子设备发送的第二下载请求,向第三电子设备发送第二安装包,第二安装包为第三电子设备的设备信息对应的目标安装包。基于上述应用开发***,无需多次上架同一应用的多种安装包,减少开发成本。
Description
相关申请的交叉引用
本申请要求在2022年03月01日提交中华人民共和国知识产权局、申请号为202210195864.8、发明名称为“一种应用开发***、方法及设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本申请涉及终端技术领域,尤其涉及一种应用开发***、方法及设备。
随着终端技术的发展,电子设备的种类趋于多样化,越来越多的智能电子设备得到广泛应用。如用户可能同时拥有智能手机和智能手表,其中,智能手机和智能手表上均可以安装应用程序,用户可以通过智能手机使用应用程序提供的功能,也可以通过智能手表使用应用程序提供的功能。
由于不同类型的电子设备所支持的功能不同,且不同电子设备的显示屏幕也可能具有不同尺寸或形状,则应用程序开发者需要对不同类型的电子设备设计不同的安装包,并将同一应用程序的多个安装包多次上架应用商城。
发明内容
本申请提供一种应用开发***、方法及设备,用以降低应用开发成本,灵活实现应用的开发与下载安装。
第一方面,本申请提供一种应用开发***,所述应用开发***包括第一电子设备、第二电子设备、第三电子设备以及服务器;
所述第一电子设备,用于向所述服务器发送目标应用的原始安装包,所述目标应用的原始安装包用于指示至少一种设备信息对应的功能,和/或,至少一种设备信息对应的页面布局;
所述服务器,用于接收所述第一电子设备发送的所述目标应用的原始安装包,根据所述原始安装包确定至少一个目标安装包,其中,所述至少一个目标安装包与所述至少一种设备信息一一对应,每个目标安装包具有一种设备信息对应的功能和/或页面布局;接收所述第二电子设备发送的第一下载请求,所述第一下载请求用于请求下载所述目标应用的安装包;向所述第二电子设备发送第一安装包,所述第一安装包为所述至少一个目标安装包中所述第二电子设备的设备信息对应的目标安装包;接收所述第三电子设备发送的第二下载请求,所述第二下载请求用于请求下载所述目标应用的安装包;向所述第三电子设备发送第二安装包,所述第二安装包为所述至少一个目标安装包中所述第三电子设备的设备信息对应的目标安装包;
所述第二电子设备,用于向所述服务器发送所述第一下载请求;接收所述服务器发送的所述第一安装包;
所述第三电子设备,用于向所述服务器发送所述第二下载请求;接收所述服务器发送的所述第二安装包。
基于上述应用开发***,应用开发者可以通过第一电子设备上传原始安装包到服务器,服务器可以根据原始安装包生成至少一个目标安装包,每个目标安装包对应一个设备信息,从而开发者无需多次上架同一应用的多种安装包,减少开发成本,提高应用开发的效率。并且,本申请提供的应用开发方法中,具有不同设备信息的电子设备向服务器请求下载的目标安装包不同,从而电子设备下载到的目标安装包可以适用于该电子设备,保证电子设备可以正常运行目标应用,且无需下载与电子设备无关的数据,节省电子设备的存储资源。
在一种可能的设计中,所述第一安装包与所述第二安装包满足以下至少一个条件:所述第一安装包的数据量大小与所述第二安装包的数据量大小不同;所述第一安装包的包名与所述第二安装包的包名不同;所述第一安装包中的功能文件与所述第二安装包中的功能文件不同;所述第一安装包中的布局文件与所述第二安装包中的布局文件不同。
通过该设计,不同的电子设备向服务器请求下载的安装包不同,每个电子设备获取到的安装包都是适配于该电子设备的目标应用的安装包,保证目标应用可以正常运行。
在一种可能的设计中,所述第二电子设备还用于:在向所述服务器发送第一下载请求之前,向所述服务器发送所述第二电子设备的设备信息,接收所述服务器发送的所述第二电子设备支持运行的应用的信息;显示所述第二电子设备支持运行的应用的信息;
所述第三电子设备还用于:在向所述服务器发送第二下载请求之前,向所述服务器发送所述第三电子设备的设备信息,接收所述服务器发送的所述第三电子设备支持运行的应用的信息;显示所述第三电子设备支持运行的应用的信息;
所述服务器还用于:接收所述第二电子设备发送的所述第二电子设备的设备信息,向所述第二电子设备发送所述第二电子设备支持运行的应用的信息;接收所述第三电子设备发送的所述第三电子设备的设备信息,向所述第三电子设备发送所述第三电子设备支持运行的应用的信息。
通过该设计,电子设备可以将自身的设备信息发送给服务器,并接收服务器返回的电子设备支持运行的应用的信息,并显示电子设备支持运行的应用的信息,从而可以便于用户在电子设备支持运行的应用中选择目标应用进行下载。
在一种可能的设计中,所述服务器具体用于:根据所述原始安装包中的语法标记对所述原始安装包进行拆分并编译,得到所述至少一个目标安装包。
通过该设计,服务器可以对原始安装包进行拆分,而无需开发者向服务器上传多个安装包,降低开发成本,提升应用开发的效率。
在一种可能的设计中,所述第一安装包中包括所述第二电子设备的设备信息对应的功能文件和/或所述第二电子设备的设备信息对应的布局文件,所述第二电子设备的设备信息对应的布局文件包括所述第二电子设备的设备信息对应的显示资源;所述第二安装包中包括所述第三电子设备的设备信息对应的功能文件和/或所述第三电子设备的设备信息对应的布局文件,所述第三电子设备的设备信息对应的布局文件包括所述第三电子设备的设备信息对应的显示资源。
通过该设计,电子设备获取到的安装包中包括该电子设备的设备信息对应的功能文件和/或布局文件,布局文件中可以包括该电子设备的设备信息对应的显示资源,从而电子设备在下载并安装目标应用的安装包后,可以为用户提供该电子设备支持的功能,并能够显
示与该电子设备匹配的显示界面。
在一种可能的设计中,所述设备信息包括设备类型、屏幕参数中的至少一项。
在一种可能的设计中,所述屏幕参数包括屏幕形状、屏幕尺寸和屏幕分辨率中的至少一项。
通过该设计,开发者可以设计不同设备类型或屏幕参数对应的安装包,使得服务器可以拆分得到多种设备信息对应的安装包,便于目标应用的推广,同时降低开发成本。
在一种可能的设计中,所述第二电子设备还用于:在所述接收所述服务器发送的所述第一安装包之后,下载所述第一安装包,并根据所述第一安装包在所述第二电子设备上安装所述目标应用;或者在所述接收所述服务器发送的所述第一安装包之后,下载所述第一安装包,并根据所述第一安装包在所述第二电子设备上显示所述目标应用的服务卡片;
所述第三电子设备还用于:在所述接收所述服务器发送的所述第二安装包之后,下载所述第二安装包,并根据所述第二安装包在所述第三电子设备上安装所述目标应用;或者在所述接收所述服务器发送的所述第二安装包之后,下载所述第二安装包,并根据所述第二安装包在所述第三电子设备上显示所述目标应用的服务卡片。
通过该设计,电子设备可以根据获取到的目标应用的安装包在电子设备上安装目标应用,还可以根据目标应用的安装包显示目标应用的服务卡片,为用户提供多样的应用体验。
在一种可能的设计中,所述第二电子设备为智能终端设备、智能穿戴设备、轻智能穿戴设备、物联网设备、智能车载设备中的任一项;所述第三电子设备为智能终端设备、智能穿戴设备、轻智能穿戴设备、物联网设备、智能车载设备中的任一项。
其中,智能穿戴设备例如可以为智能手表,轻智能穿戴设备例如可以为运动手表。
第二方面,本申请提供一种应用开发方法,应用于电子设备,所述方法包括:向服务器发送第一下载请求,所述第一下载请求用于请求下载目标应用的安装包;接收所述服务器发送的第一安装包,所述第一安装包为所述电子设备的设备信息对应的目标安装包,所述目标安装包为所述服务器根据所述目标应用的原始安装包确定的。
在一种可能的设计中,在向所述服务器发送第一下载请求之前,所述方法还包括:向所述服务器发送所述电子设备的设备信息,接收所述服务器发送的所述电子设备支持运行的应用的信息;显示所述电子设备支持运行的应用的信息。
在一种可能的设计中,所述第一安装包中包括所述电子设备的设备信息对应的功能文件和/或所述电子设备的设备信息对应的布局文件,所述电子设备的设备信息对应的布局文件包括所述电子设备的设备信息对应的显示资源。
在一种可能的设计中,所述设备信息包括设备类型、屏幕参数中的至少一项。
在一种可能的设计中,所述屏幕参数包括屏幕形状、屏幕尺寸和屏幕分辨率中的至少一项。
在一种可能的设计中,在所述接收所述服务器发送的第一安装包之后,所述方法还包括:下载所述第一安装包,并根据所述第一安装包在所述电子设备上安装所述目标应用;或者下载所述第一安装包,并根据所述第一安装包在所述电子设备上显示所述目标应用的服务卡片。
第三方面,本申请提供一种应用开发方法,应用于服务器,所述方法包括:接收第一
电子设备发送的所述目标应用的原始安装包,所述目标应用的原始安装包用于指示至少一种设备信息对应的功能,和/或,至少一种设备信息对应的页面布局;根据所述原始安装包确定至少一个目标安装包,其中,所述至少一个目标安装包与所述至少一种设备信息一一对应,每个目标安装包具有一种设备信息对应的功能和/或页面布局;接收第二电子设备发送的第一下载请求,所述第一下载请求用于请求下载所述目标应用的安装包;向所述第二电子设备发送第一安装包,所述第一安装包为所述至少一个目标安装包中所述第二电子设备的设备信息对应的目标安装包;接收第三电子设备发送的第二下载请求,所述第二下载请求用于请求下载所述目标应用的安装包;向所述第三电子设备发送第二安装包,所述第二安装包为所述至少一个目标安装包中所述第三电子设备的设备信息对应的目标安装包。
在一种可能的设计中,所述第一安装包与所述第二安装包满足以下至少一个条件:所述第一安装包的数据量大小与所述第二安装包的数据量大小不同;所述第一安装包的包名与所述第二安装包的包名不同;所述第一安装包中的功能文件与所述第二安装包中的功能文件不同;所述第一安装包中的布局文件与所述第二安装包中的布局文件不同。
在一种可能的设计中,所述方法还包括:接收所述第二电子设备发送的所述第二电子设备的设备信息,向所述第二电子设备发送所述第二电子设备支持运行的应用的信息;接收所述第三电子设备发送的所述第三电子设备的设备信息,向所述第三电子设备发送所述第三电子设备支持运行的应用的信息。
在一种可能的设计中,所述根据所述原始安装包确定至少一个目标安装包,包括:根据所述原始安装包中的语法标记对所述原始安装包进行拆分并编译,得到所述至少一个目标安装包。
在一种可能的设计中,所述第一安装包中包括所述第二电子设备的设备信息对应的功能文件和/或所述第二电子设备的设备信息对应的布局文件,所述第二电子设备的设备信息对应的布局文件包括所述第二电子设备的设备信息对应的显示资源;所述第二安装包中包括所述第三电子设备的设备信息对应的功能文件和/或所述第三电子设备的设备信息对应的布局文件,所述第三电子设备的设备信息对应的布局文件包括所述第三电子设备的设备信息对应的显示资源。
在一种可能的设计中,所述设备信息包括设备类型、屏幕参数中的至少一项。
在一种可能的设计中,所述屏幕参数包括屏幕形状、屏幕尺寸和屏幕分辨率中的至少一项。
第四方面,本申请提供一种电子设备,所述电子设备包括多个功能模块;所述多个功能模块相互作用,实现上述任一方面及其各实施方式中第二电子设备或第三电子设备所执行的方法。所述多个功能模块可以基于软件、硬件或软件和硬件的结合实现,且所述多个功能模块可以基于具体实现进行任意组合或分割。
第五方面,本申请提供一种电子设备,包括至少一个处理器和至少一个存储器,所述至少一个存储器中存储计算机程序指令,所述电子设备运行时,所述至少一个处理器执行上述任一方面及其各实施方式中第二电子设备或第三电子设备执行的方法。
第六方面,本申请提供一种服务器,所述服务器包括多个功能模块;所述多个功能模块相互作用,实现上述任一方面及其各实施方式中服务器所执行的方法。所述多个功能模块可以基于软件、硬件或软件和硬件的结合实现,且所述多个功能模块可以基于具体实现进行任意组合或分割。
第七方面,本申请提供一种服务器,包括至少一个处理器和至少一个存储器,所述至少一个存储器中存储计算机程序指令,所述服务器运行时,所述至少一个处理器执行上述任一方面及其各实施方式中服务器执行的方法。
第八方面,本申请还提供一种计算机程序,当所述计算机程序在计算机上运行时,使得所述计算机执行上述任一方面及其各实施方式中第二电子设备、第三电子设备或服务器执行的方法。
第九方面,本申请还提供一种计算机可读存储介质,所述计算机可读存储介质中存储有计算机程序,当所述计算机程序被计算机执行时,使得所述计算机执行上述任一方面及其各实施方式中第二电子设备、第三电子设备或服务器执行的方法。
第十方面,本申请还提供一种芯片,所述芯片用于读取存储器中存储的计算机程序,执行上述任一方面及其各实施方式中第二电子设备、第三电子设备或服务器执行的方法。
第十一方面,本申请还提供一种芯片***,该芯片***包括处理器,用于支持计算机装置实现上述任一方面及其各实施方式中第二电子设备、第三电子设备或服务器执行的方法。在一种可能的设计中,所述芯片***还包括存储器,所述存储器用于保存该计算机装置必要的程序和数据。该芯片***可以由芯片构成,也可以包含芯片和其他分立器件。
图1为本申请实施例适用的一种应用安装包的上架与下载场景示意图;
图2为本申请实施例提供的一种不同表盘形状与分辨率的示意图;
图3为本申请实施例提供的一种服务卡片的界面示意图;
图4为本申请实施例提供的一种智能手表中显示服务卡片的界面示意图;
图5为一种圆形手表显示方形显示资源的显示界面示意图;
图6为本申请实施例提供的一种电子设备的结构示意图;
图7为本申请实施例提供的一种电子设备的软件结构框图;
图8为本申请实施例提供的一种目标应用的原始安装包的结构示意图;
图9为本申请实施例提供的一种生成目标安装包的方式示意图;
图10A为本申请实施例提供的一种音乐应用的功能示意图;
图10B为本申请实施例提供的一种音乐应用的显示资源对应的分辨率示意图;
图11为本申请实施例提供的一种服务器确定至少一个目标安装包的示意图;
图12为本申请实施例提供的一种服务器确定至少一个目标安装包的示意图;
图13为本申请实施例提供的一种智能手机和智能手表显示的天气服务卡片示意图;
图14为本申请实施例提供的一种应用开发方法的流程图。
为了使本申请实施例的目的、技术方案和优点更加清楚,下面将结合附图对本申请实施例作进一步地详细描述。其中,在本申请实施例的描述中,以下,术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个该特征。
应理解,本申请实施例中“至少一个”是指一个或者多个,“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B的情况,其中A、B可以是单数或者复数。字符“/”一般表示前后关联对象是一种“或”的关系。“以下至少一(项)个”或其类似表达,是指的这些项中的任意组合,包括单项(个)或复数项(个)的任意组合。例如,a、b或c中的至少一项(个),可以表示:a,b,c,a和b,a和c,b和c,或a、b和c,其中a、b、c可以是单个,也可以是多个。
随着终端技术的发展,电子设备的种类趋于多样化,越来越多的智能电子设备得到广泛应用。同一操作***可以支持的电子设备的类型的增多,使得操作***的生态得到快速发展和繁荣。例如,鸿蒙***为面向全场景的分布式操作***,鸿蒙***可以支持手机、电脑、平板、电视、工业自动化控制设备、无人驾驶设备、车机设备、智能穿戴设备等电子设备。
电子设备上可以安装应用市场,应用市场为用于展示、下载应用程序的平台,应用市场可供开发者上传开发的应用程序的安装包,并且供用户在电子设备上下载并安装应用程序。为便于描述,本申请实施例中应用程序也可以简称为应用。
下面对本申请实施例适用的场景进行介绍。
图1为本申请实施例提供的一种应用安装包的上架与下载场景示意图。参考图1,应用开发者在设计完成应用后,可以通过图1所示场景中的第一电子设备将应用的安装包发送给服务器,服务器可以将应用推送至应用市场客户端。用户可以操作第二电子设备,在第二电子设备上安装的应用市场客户端中查找应用。第二电子设备可以下载并安装应用的安装包。参考图1,第二电子设备的类型不同时,所能支持的功能也可能不同,且显示屏的形状或尺寸也可能不同,则应用开发者需要对不同类型的电子设备设计不同的安装包,并将同一应用的多个安装包多次上架应用市场。可见,该方式所需的应用开发成本较高,且开发操作繁琐。
例如,鸿蒙***支持的两种智能穿戴设备:运动表和智能表。运动表和智能表面向开发者开放的能力差异较大,比如,智能表支持联网能力开放,运动表不支持联网能力开放。则应用如果要支持这两种设备,需要开发者分别针对每种设备设计应用安装包,并两次上架到应用市场。
另外,运动表和智能表的表盘形状与分辨率不同,如图2为本申请实施例提供的一种不同表盘形状与分辨率的示意图。由图2可以看出,电子设备具有多种屏幕形状及分辨率,导致开发者需要针对每种表盘形状和分辨率分别开发应用安装包,并多次上架应用市场。
在本申请实施例提供的又一应用场景中,操作***可以提供一种用于显示各个应用界面的服务卡片的界面显示形式。例如,图3为本申请实施例提供的一种服务卡片的界面示意图。在图3所示的界面中,可以显示多个应用的服务卡片,如图3所示界面中包括天气应用的服务卡片、查询快件应用的服务卡片、视频播放器的服务卡片等等。在每个应用的服务卡片中,可以显示该应用的重要信息或操作,便于用户查看消息或进行操作,以实现服务直达、减少用户体验层级的效果。可选地,用户可以操作在电子设备显示界面中添加应用的服务卡片,若电子设备中未安装该应用,电子设备可以向服务器请求下载该应用的安装包,在下载应用安装包后,可以根据应用安装包在电子设备的显示屏幕中显示该应用的服务卡片。
由于不同电子设备的屏幕形状以及屏幕分辨率可能不同,若不同类型的电子设备显示同一个服务卡片,则有可能出现有些电子设备无法显示完全服务卡片,而给用户带来异样的体验。例如,以天气应用为例,在图3所示的界面中,天气应用的服务卡片的形状为方形。图4为本申请实施例提供的一种智能手表中显示服务卡片的界面示意图。参考图4,智能手表显示天气应用的服务卡片时,需要显示圆形服务卡片。因此,应用开发者需要针对每种电子设备的屏幕形状以及屏幕分辨率设对应的服务卡片,并将服务卡片作为显示资源包含在应用安装包中,以使各类电子设备可以显示与屏幕匹配的服务卡片。
一种可选的实施方式中,应用的安装包中可以包括多种设备类型对应的显示资源或逻辑代码块,如在安装包中通过增加宏控制以区分不同的设备类型对应的显示资源或逻辑代码块。其中,宏控制可以为支持不同设备类型的操作***,如宏控制可以为电视操作***、智能穿戴操作***、终端操作***等。当电子设备中安装应用后,可以根据电子设备的设备类型选择性地启用安装包中该设备类型对应的显示资源或逻辑代码块,并在显示界面中进行资源显示,或实现逻辑代码块对应的功能。在该实施方式中,电子设备下载的应用安装包中包括自身设备类型对应的显示资源和逻辑代码块,同时也包括其它设备类型对应的显示资源和逻辑代码块,从而造成存储资源的浪费。并且,该实施方式需要电子设备具有较大的存储空间,并不适用于存储空间有限的电子设备。
另一种可选的实施方式中,第二电子设备在向服务器请求下载应用的安装包时,服务器可以基于多种屏幕尺寸或屏幕分辨率创建多个安装包,每个安装包适用于特定的屏幕尺寸或屏幕分辨率。但该实施方式中第二电子设备需要支持灵活布局,并支持显示矢量图形。当第二电子设备支持显示多种形状的显示资源时,第二电子设备需要下载多个安装包,否则会出现显示异常。例如,图5为一种圆形手表显示方形显示资源的显示界面示意图。参考图5,当圆形手表显示方形显示资源时,会对显示资源产生遮挡,影响用户体验。而第二电子设备下载多个安装包还会导致第二电子设备运行应用所需的资源较多,无法适用于存储空间有限的设备。
基于以上问题,本申请实施例提供一种应用开发方法。该方法可以适用于图1所示场景。在本申请实施例提供的应用开发方法中,服务器接收第一电子设备上传的目标应用的原始安装包,目标应用的原始安装包用于指示至少一种设备信息对应的功能,和/或,至少一种设备信息对应的页面布局。服务器根据该目标应用的原始安装包确定至少一个目标安装包,至少一个目标安装包与至少一种设备信息一一对应,每个目标安装包具有一种设备信息对应的功能和/或页面布局。服务器接收第二电子设备发送的第一下载请求,服务器向第二电子设备发送第一安装包,第一安装包为至少一个目标安装包中第二电子设备的设备信息对应的目标安装包。服务器还可以接收第三电子设备发送的第二下载请求,服务器向第三电子设备发送第二安装包,第二安装包为至少一个目标安装包中第三电子设备的设备信息对应的目标安装包。通过本申请实施例提供的应用开发方法,应用开发者可以上传包含多种功能参数和布局文件的原始安装包到服务器,服务器可以根据原始安装包生成至少一个目标安装包,每个目标安装包对应一个设备信息,从而开发者无需多次上架同一应用的多种安装包,减少开发成本,提高应用开发的效率。并且,本申请提供的应用开发方法中,具有不同设备信息的电子设备向服务器请求下载的目标安装包不同,从而电子设备下载到的目标安装包可以适用于该电子设备,保证电子设备可以正常运行目标应用,且无需下载与电子设备无关的数据,节省电子设备的存储资源。
需要说明的是,在图1所示场景中,服务器可以为应用市场的云端服务器,也可以为电子设备厂商提供的服务器,本申请实施例对此不作限定。本申请实施例的电子设备例如可以为平板电脑、手机、车载设备、增强现实(augmented reality,AR)/虚拟现实(virtual reality,VR)设备、笔记本电脑、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本、个人数字助理(personal digital assistant,PDA)、可穿戴设备、物联网(internet of thing,IoT)设备、车机等,本申请实施例对电子设备的具体类型不作任何限制。
图6为本申请实施例提供的一种电子设备100的结构示意图。如图6所示,电子设备100可以包括处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口195等。
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,存储器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processingunit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。其中,控制器可以是电子设备100的神经中枢和指挥中心。控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了***的效率。
USB接口130是符合USB标准规范的接口,具体可以是Mini USB接口,Micro USB接口,USB Type C接口等。USB接口130可以用于连接充电器为电子设备100充电,也可以用于电子设备100与***设备之间传输数据。充电管理模块140用于从充电器接收充电输入。电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理模块141接收电池142和/或充电管理模块140的输入,为处理器110,内部存储器121,外部存储器,显示屏194,摄像头193,和无线通信模块160等供电。
电子设备100的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。天线1和天线2用于发射和接收电磁波信号。电子设备100中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。
移动通信模块150可以提供应用在电子设备100上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块150可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还
可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块150的至少部分功能模块可以被设置于处理器110中。在一些实施例中,移动通信模块150的至少部分功能模块可以与处理器110的至少部分模块被设置在同一个器件中。
无线通信模块160可以提供应用在电子设备100上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星***(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。无线通信模块160可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块160经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器110。无线通信模块160还可以从处理器110接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。
在一些实施例中,电子设备100的天线1和移动通信模块150耦合,天线2和无线通信模块160耦合,使得电子设备100可以通过无线通信技术与网络以及其他设备通信。所述无线通信技术可以包括全球移动通讯***(global system for mobile communications,GSM),通用分组无线服务(general packet radio service,GPRS),码分多址接入(code division multiple access,CDMA),宽带码分多址(wideband code division multiple access,WCDMA),时分码分多址(time-division code division multiple access,TD-SCDMA),长期演进(long term evolution,LTE),BT,GNSS,WLAN,NFC,FM,和/或IR技术等。所述GNSS可以包括全球卫星定位***(global positioning system,GPS),全球导航卫星***(global navigation satellite system,GLONASS),北斗卫星导航***(beidou navigation satellite system,BDS),准天顶卫星***(quasi-zenith satellite system,QZSS)和/或星基增强***(satellite based augmentation systems,SBAS)。
显示屏194用于显示应用的显示界面,例如显示电子设备100上安装的应用的显示页面等。显示屏194包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emitting diode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode的,AMOLED),柔性发光二极管(flex light-emitting diode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot light emitting diodes,QLED)等。在一些实施例中,电子设备100可以包括1个或N个显示屏194,N为大于1的正整数。
摄像头193用于捕获静态图像或视频。物体通过镜头生成光学图像投射到感光元件。感光元件可以是电荷耦合器件(charge coupled device,CCD)或互补金属氧化物半导体(complementary metal-oxide-semiconductor,CMOS)光电晶体管。感光元件把光信号转换成电信号,之后将电信号传递给ISP转换成数字图像信号。ISP将数字图像信号输出到DSP加工处理。DSP将数字图像信号转换成标准的RGB,YUV等格式的图像信号。在一些实施例中,电子设备100可以包括1个或N个摄像头193,N为大于1的正整数。
内部存储器121可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。处理器110通过运行存储在内部存储器121的指令,从而执行电子设备100的各种功能应用以及数据处理。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作***,以及至少一个应用程序的软件代码等。存储数据区可存储电子设备100
使用过程中所产生的数据(例如拍摄的图像、录制的视频等)等。此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。
外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展电子设备的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将图片,视频等文件保存在外部存储卡中。
电子设备100可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,以及应用处理器等实现音频功能。例如音乐播放,录音等。
其中,传感器模块180可以包括压力传感器180A,加速度传感器180B,触摸传感器180C等。
压力传感器180A用于感受压力信号,可以将压力信号转换成电信号。在一些实施例中,压力传感器180A可以设置于显示屏194。
触摸传感器180C,也称“触控面板”。触摸传感器180C可以设置于显示屏194,由触摸传感器180C与显示屏194组成触摸屏,也称“触控屏”。触摸传感器180C用于检测作用于其上或附近的触摸操作。触摸传感器可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型。可以通过显示屏194提供与触摸操作相关的视觉输出。在另一些实施例中,触摸传感器180C也可以设置于电子设备100的表面,与显示屏194所处的位置不同。
按键190包括开机键,音量键等。按键190可以是机械按键。也可以是触摸式按键。电子设备100可以接收按键输入,产生与电子设备100的用户设置以及功能控制有关的键信号输入。马达191可以产生振动提示。马达191可以用于来电振动提示,也可以用于触摸振动反馈。例如,作用于不同应用(例如拍照,音频播放等)的触摸操作,可以对应不同的振动反馈效果。触摸振动反馈效果还可以支持自定义。指示器192可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。SIM卡接口195用于连接SIM卡。SIM卡可以通过***SIM卡接口195,或从SIM卡接口195拔出,实现与电子设备100的接触和分离。
可以理解的是,图6所示的部件并不构成对电子设备100的具体限定,电子设备还可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。此外,图6中的部件之间的组合/连接关系也是可以调整修改的。
图7为本申请实施例提供的一种电子设备的软件结构框图。如图7所示,电子设备的软件结构可以是分层架构,例如可以将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实施例中,将操作***分为四层,从上至下分别为应用程序层,应用程序框架层(framework,FWK),运行时(runtime)和***库,以及内核层。
应用程序层可以包括一系列应用程序包(application package)。如图7所示,应用程序层可以包括相机、设置、皮肤模块、用户界面(user interface,UI)、三方应用程序等。其中,三方应用程序可以包括图库,日历,通话,地图,导航,WLAN,蓝牙,音乐,视频,短信息等。在本申请实施例中,应用程序层可以包括电子设备从服务器请求下载的目标应用的目标安装包,该目标安装包中的功能文件和布局文件适配于电子设备。
应用程序框架层为应用程序层的应用程序提供应用编程接口(application programming
interface,API)和编程框架。应用程序框架层可以包括一些预先定义的函数。如图7所示,应用程序框架层可以包括窗口管理器,内容提供器,视图***,电话管理器,资源管理器,通知管理器。
窗口管理器用于管理窗口程序。窗口管理器可以获取显示屏大小,判断是否有状态栏,锁定屏幕,截取屏幕等。内容提供器用来存放和获取数据,并使这些数据可以被应用程序访问。所述数据可以包括视频,图像,音频,拔打和接听的电话,浏览历史和书签,电话簿等。
视图***包括可视控件,例如显示文字的控件,显示图片的控件等。视图***可用于构建应用程序。显示界面可以由一个或多个视图组成的。例如,包括短信通知图标的显示界面,可以包括显示文字的视图以及显示图片的视图。
电话管理器用于提供电子设备的通信功能。例如通话状态的管理(包括接通,挂断等)。
资源管理器为应用程序提供各种资源,比如本地化字符串,图标,图片,布局文件,视频文件等等。
通知管理器使应用程序可以在状态栏中显示通知信息,可以用于传达告知类型的消息,可以短暂停留后自动消失,无需用户交互。比如通知管理器被用于告知下载完成,消息提醒等。通知管理器还可以是以图表或者滚动条文本形式出现在***顶部状态栏的通知,例如后台运行的应用程序的通知,还可以是以对话窗口形式出现在屏幕上的通知。例如在状态栏提示文本信息,发出提示音,电子设备振动,指示灯闪烁等。
运行时包括核心库和虚拟机。运行时负责操作***的调度和管理。
核心库包含两部分:一部分是iava语言需要调用的功能函数,另一部分是操作***的核心库。应用程序层和应用程序框架层运行在虚拟机中。虚拟机将应用程序层和应用程序框架层的iava文件执行为二进制文件。虚拟机用于执行对象生命周期的管理,堆栈管理,线程管理,安全和异常的管理,以及垃圾回收等功能。
***库可以包括多个功能模块。例如:表面管理器(surface manager),媒体库(media libraries),三维图形处理库(例如:OpenGL ES),二维图形引擎(例如:SGL)、图像处理库等。
表面管理器用于对显示子***进行管理,并且为多个应用程序提供了2D和3D图层的融合。
媒体库支持多种常用的音频,视频格式回放和录制,以及静态图像文件等。媒体库可以支持多种音视频编码格式,例如:MPEG4,H.264,MP3,AAC,AMR,JPG,PNG等。
三维图形处理库用于实现三维图形绘图,图像渲染,合成,和图层处理等。
2D图形引擎是2D绘图的绘图引擎。
内核层是硬件和软件之间的层。内核层至少包含显示驱动,摄像头驱动,音频驱动,传感器驱动。
硬件层可以包括各类传感器,例如加速度传感器、重力传感器、触摸传感器等。
需要说明的是,图6和图7所示的结构仅作为本申请实施例提供的电子设备的一种示例,并不能对本申请实施例提供的电子设备进行任何限定,具体实施中,电子设备可以具有比图6或图7所示的结构中更多或更少的器件或模块。
下面对本申请实施例提供的应用开发方法进行介绍。
在本申请实施例中,第一电子设备可以为开发者使用的前端开发设备,第二电子设备
可以为用户使用的电子设备。服务器可以为应用市场的云端服务器。
第一电子设备可以将目标应用的原始安装包发送给服务器,以实现在应用市场上架目标应用。其中,目标应用的原始安装包用于指示至少一种设备信息对应的功能,和/或,至少一种设备信息对应的页面布局,例如目标应用的原始安装包可以包括多种设备信息对应的功能参数和/或多种设备信息对应的布局文件,设备信息可以包括设备类型、屏幕参数等。屏幕参数可以包括电子设备的屏幕形状、屏幕尺寸以及屏幕分辨率等参数中的至少一项。
举例来说,图8为本申请实施例提供的一种目标应用的原始安装包的结构示意图。参考图8,目标应用的原始安装包可以包括多种设备类型对应的功能参数。如设备类型包括运动手表和智能手表两种类型,则原始安装包中包括运动手表对应的功能参数和智能手表对应的功能参数。
另外,参考图8,目标应用的原始安装包还可以包括多种屏幕参数对应的布局文件,布局文件中还可以包括显示资源。如图8中,目标应用的原始安装包中包括圆形屏幕对应的布局文件和方形屏幕对应的布局文件,目标应用的布局文件中还可以包括不同屏幕分辨率对应的显示资源。如目标应用的布局文件中包括分辨率为466*466的圆形屏幕的显示资源、分辨为280*456的方形屏幕的显示资源以及分辨率为336*480的方形屏幕的显示资源。
需要说明的是,目标应用的原始安装包中包括的多种设备信息对应的功能参数可以为多种设备信息对应的代码逻辑块,该代码逻辑块为电子设备可执行的计算机指令/计算机程序,服务器对代码逻辑块进行语法标记、动态拆分并编译后,可以生成功能文件。原始安装包中可以对设备信息对应的代码逻辑块进行定义。例如,以设备类型为运动表和智能表为例,原始安装包中声明环境变量,例如运动表为LITE_WEARABLE,智能表为WEARABLE,则在原始安装包中定义设备类型为LITE_WEARABLE的功能参数,以及设备类型为WEARABLE的功能参数,从而对不同设备类型对应的功能参数进行区分。
另外,目标应用的原始安装包中还包括多种设备信息对应的布局文件,服务器可以通过调用函数调用布局文件。
服务器在接收到第一电子设备发送的目标应用的原始安装包后,根据原始安装包中的语法标记对原始安装包进行动态拆分并编译,得到至少一个目标安装包,至少一个目标安装包与至少一种设备信息一一对应,每个目标安装包具有一种设备信息对应的功能和/或页面布局。
在本申请一些实施例中,服务器确定出的每个目标安装包可以包括功能文件和/布局文件。可选地,布局文件中还可以包括目标应用的显示资源。
一种可选的实施方式中,服务器可以根据原始安装包中的语法标记确定每种设备信息对应的功能参数。例如,服务器可以在webpack中开启Tree shaking功能,该Tree shaking功能可以自动优化掉目标设备信息对应的功能参数以外的参数,并对获取到的目标设备信息对应的功能参数进行打包处理,生成目标设备信息对应的功能文件。
服务器还可以通过调用函数调用目标设备信息对应的布局文件,并对获取到的目标设备信息对应的功能文件和布局文件进行打包处理,生成目标设备信息对应的目标安装包。
例如,原始安装包中可以定义每种设备信息对应的布局文件,如不同的设备信息对应不同的target,每个target下定义不同布局文件,如布局文件可以为层叠样式表(cascading style sheets,CSS)文件/超文本标记语言(hypertext mark-up language,HTML)文件。在生成目标安装包时,服务器对不同target生成不同的config.json文件,并且服务器可以调
用多次ace-loader,分别传递不同的config.json文件,以生成不同设备信息对应的目标安装包。
在本申请实施例中,同一电子设备可能支持多种屏幕分辨率对应的布局文件,则该电子设备的设备信息对应的目标安装包中可以包括多种屏幕分辨率对应的布局文件,如图9为本申请实施例提供的一种生成目标安装包的方式示意图。参考图9,假设该设备信息对应的功能文件为ModlueA,该设备信息中屏幕参数包括圆形和方形两种屏幕形状,且圆形屏幕形状包括454*454和456*456两种分辨率,方形屏幕包括454*454分辨率。服务器对圆形屏幕生成target1,并对target1生成circle Config.json文件,服务器对方形屏幕生成target2,并对target2生成rect Config.json文件。根据该设备信息对应的功能文件和布局文件生成该设备信息对应的目标安装包。参考图9,该设备信息对应的目标安装包中包含三个hap包,hap1包中包括功能文件ModlueA、布局文件target1以及分辨率为454*454的圆形屏幕对应的显示资源;hap2包中包括功能文件ModlueA、布局文件target1以及分辨率为456*456的圆形屏幕对应的显示资源;hap3包中包括功能文件ModlueA、布局文件target2以及分辨率为454*454的方形屏幕对应的显示资源。
用户可以触发第二电子设备运行应用市场客户端。可选地,第二电子设备可以向服务器发送第二电子设备的设备信息,服务器可以根据第二电子设备的设备信息确定第二电子设备支持运行的应用的信息,并将第二电子设备支持运行的应用的信息发送给第二电子设备,第二电子设备可以在应用市场客户端显示第二电子设备支持运行的应用的信息,如应用的信息可以包括应用的安装包包名、应用图标、应用简介等信息。用户可以操作第二电子设备,在第二电子设备安装的应用市场客户端中查找目标应用,第二电子设备可以向服务器发送第一下载请求,第一下载请求用于请求下载目标应用的安装包。
服务器在接收到第二电子设备发送的第一下载请求后,可以根据第二电子设备的设备信息确定第一安装包,第一安装包为第二电子设备的设备信息对应的目标安装包。服务器将第一安装包发送给第二电子设备。
第二电子设备在接收到服务器发送的第一安装包后,可以下载并安装第一安装包,从而第二电子设备在本地安装目标应用,或者第二电子设备根据第一安装包显示目标应用的服务卡片。
可选地,服务器还可以接收第三电子设备发送的第三电子设备的设备信息,并将第三电子设备支持运行的应用的信息发送给第三电子设备。用户可以触发第三电子设备向服务器发送第二下载请求,第二下载请求用于请求下载目标应用的安装包。服务器根据第三电子设备的设备信息确定第二安装包,第二安装包为第三电子设备的设备信息对应的目标安装包。服务器将第二安装包发送给第三电子设备。通过前述介绍可知,第一安装包与第二安装包不同。其中,第一安装包与第二安装包不同可以包含以下至少一种情况:第一安装包的数据量大小与第二安装包的数据量大小不同;第一安装包中包含的功能文件或布局文件与第二安装包中包含的功能文件或布局文件不同,如第一安装包所包含的布局文件中的显示资源和第二安装包所包含的布局文件中的显示资源不同;第一安装包的包名与第二安装包的包名不同。
通过本申请实施例提供的应用开发方法,开发者可以通过第一电子设备将目标应用的原始安装包直接上传至服务器,由服务器对原始安装包进行拆分与编译,以生成每种设备信息对应的目标安装包,减少开发成本,实现一次开发多端部署的应用开发方法。第二电
子设备在向服务器请求下载目标应用时,服务器可以将第二电子设备的设备信息对应的目标安装包发送给第二电子设备,从而第二电子设备所获取到的目标应用的目标安装包即为与第二电子设备匹配的应用安装包,该目标安装包中仅包含第二电子设备的设备信息对应的功能文件和布局文件,避免对第二电子设备的存储资源造成浪费,从而使得存储空间有限的轻量级设备也可以正常下载并运行目标应用,有利于操作***的生态发展。
下面以两个具体示例对本申请实施例提供的应用开发方法进行进一步介绍。
示例1
以开发者开发音乐应用为例,开发者在设计音乐应用时,可以对各种类型的设备设计对应的功能以及显示资源。例如,以音乐应用可以支持运动表和智能表两种设备为例。参考图10A,运动表和智能表均可以支持功能A:本地播放音乐和控制智能手机播放音乐。智能表还支持功能B:显示用户账户,支持播放私人电台,支持节目分类。参考图10B,音乐应用的显示资源包括:分辨率为466*466的圆形表盘资源、分辨率为280*456的方形表盘资源以及分辨率为336*480的方形表盘资源。
开发者使用第一电子设备将音乐应用的原始安装包发送给服务器,服务器可以根据音乐应用的原始安装包确定至少一个目标安装包,每个目标安装包对应一个设备信息。例如,图11为本申请实施例提供的一种服务器确定至少一个目标安装包的示意图。参考图11,音乐应用的原始安装包中包括:音乐应用的功能A对应的功能参数、功能B对应的功能参数、圆形表盘布局文件、方形表盘布局文件、分辨率为466*466的圆形表盘显示资源、分辨率为280*456的方形表盘显示资源、分辨率为336*480的方形表盘显示资源。服务器对原始安装包进行动态拆分并编译,如得到图11所示的四种目标安装包:安装包1~安装包4。其中,安装包1包括功能A对应的功能文件、圆形表盘布局文件以及分辨率为466*466的圆形表盘显示资源;安装包2包括功能A对应的功能文件、功能B对应的功能文件、圆形表盘布局文件以及分辨率为466*466的圆形表盘显示资源;安装包3包括功能A对应的功能文件、方形表盘布局文件以及分辨率为280*456的方形表盘显示资源;安装包4包括功能A对应的功能文件、方形表盘布局文件以及分辨率为336*480的方形表盘显示资源。
服务器可以接收各个电子设备发送的设备信息,并根据各个电子设备的设备信息将每个电子设备支持运行的应用的信息分别发送给每个电子设备,从而实现将音乐应用推送到不同设备的应用市场客户端。用户可以操作第二电子设备在应用市场客户端触发下载音乐应用,第二电子设备向服务器发送下载请求,服务器将第二电子设备的设备信息对应的目标安装包发送给第二电子设备,第二电子设备下载并安装第二电子设备适用的音乐应用的目标安装包。如图11中,屏幕分辨率为466*466的圆形运动表下载的音乐应用的目标安装包为安装包1;屏幕分辨率为466*466的圆形智能表下载的音乐应用的目标安装包为安装包2;屏幕分辨率为280*456的方形运动表下载的音乐应用的目标安装包为安装包3;屏幕分辨率为336*480的方形运动表下载的音乐应用的目标安装包为安装包4。
示例2
以开发者开发天气应用的服务卡片为例,开发者在设计天气应用的服务卡片的安装包时,可以对各种类型的设备设计对应的功能以及显示资源。例如,开发者可以设计支持智能手机和智能手表两种设备的服务卡片。其中,智能手机和智能手表同时支持功能A:根
据定位信息显示当天天气情况;智能手机还支持功能B:显示未来一周的天气情况。智能手机支持显示4*4的显示资源,智能手表支持显示分辨率为466*466的圆形表盘显示资源。
开发者使用第一电子设备将天气应用的服务卡片的原始安装包发送给服务器,服务器可以根据该原始安装包确定至少一个目标安装包,每个目标安装包对应一个设备信息。例如,图12为本申请实施例提供的一种服务器确定至少一个目标安装包的示意图。参考图12,天气应用的服务卡片的原始安装包中包括:功能A对应的功能参数、功能B对应的功能参数、圆形表盘布局文件、方形布局文件、分辨率为466*466的圆形表盘显示资源、4*4方形显示资源。服务器对原始安装包进行动态拆分并编译,如得到图12所示的两种目标安装包:安装包1和安装包2。其中,安装包1包括功能A对应的功能文件、圆形表盘布局文件以及分辨率为466*466的圆形表盘显示资源;安装包2包括功能A对应的功能文件、功能B对应的功能文件、方形布局文件以及4*4方形显示资源。
用户在智能手机或智能手表中操作添加天气服务卡片时,智能手机或智能手表向服务器发送下载请求。可选地,下载请求中可以包括发送下载请求的设备的设备信息,或者智能手机或智能手表可以预先向服务器发送设备信息。服务器可以根据设备信息确定该设备信息对应的目标安装包,并将目标安装包返回给发送下载请求的设备。智能手机或智能手表在接收到服务器发送的目标安装包后,下载并安装目标安装包,并在屏幕中显示天气服务卡片。例如,图13为本申请实施例提供的一种智能手机和智能手表显示的天气服务卡片示意图。参考图13,智能手机显示的天气服务卡片为方形,并且可以显示所处地区当天以及未来一周的天气情况,智能手表显示的天气服务卡片为圆形,可以显示所处地区当天的天气情况。
基于以上实施例,本申请还提供一种应用开发方法,该应用开发方法可以应用于图1所示的应用开发***。图14为本申请实施例提供的一种应用开发方法的流程图。参考图14,该方法包括以下步骤:
S1401:第一电子设备向服务器发送目标应用的原始安装包。
其中,目标应用的原始安装包用于指示至少一种设备信息对应的功能,和/或,至少一种设备信息对应的页面布局。
S1402:服务器根据目标应用的原始安装包确定至少一个目标安装包。
其中,至少一个目标安装包与至少一种设备信息一一对应,每个目标安装包具有一种设备信息对应的功能和/或页面布局。
S1403:第二电子设备向服务器发送第一下载请求。
其中,第一下载请求用于请求下载目标应用的安装包。
S1404:服务器向第二电子设备发送第一安装包。
其中,第一安装包为至少一个目标安装包中第二电子设备的设备信息对应的目标安装包。
S1405:第三电子设备向服务器发送第二下载请求。
其中,第二下载请求用于请求下载目标应用的安装包。
S1406:服务器向第三电子设备发送第二安装包。
其中,第二安装包为至少一个目标安装包中第三电子设备的设备信息对应的目标安装包。
需要说明的是,本申请图14所示的应用开发方法在具体实施时可以参见本申请上述各实施例,重复之处不再赘述。
基于以上实施例,本申请还提供一种电子设备,所述电子设备包括多个功能模块;所述多个功能模块相互作用,实现本申请实施例所描述的各方法中第二电子设备或第三电子设备所执行的功能。如执行图14所示实施例中第二电子设备执行的S1403,或执行图14所示实施例中第三电子设备执行的S1405。所述多个功能模块可以基于软件、硬件或软件和硬件的结合实现,且所述多个功能模块可以基于具体实现进行任意组合或分割。
基于以上实施例,本申请还提供一种电子设备,该电子设备包括至少一个处理器和至少一个存储器,所述至少一个存储器中存储计算机程序指令,所述电子设备运行时,所述至少一个处理器执行本申请实施例所描述的各方法中第二电子设备或第三电子设备所执行的功能。如执行图14所示实施例中第二电子设备执行的S1403,或执行图14所示实施例中第三电子设备执行的S1405。
基于以上实施例,本申请还提供一种服务器,所述服务器包括多个功能模块;所述多个功能模块相互作用,实现本申请实施例所描述的各方法中服务器所执行的功能。如执行图14所示实施例中服务器执行的S1402、S1404、S1406。所述多个功能模块可以基于软件、硬件或软件和硬件的结合实现,且所述多个功能模块可以基于具体实现进行任意组合或分割。
基于以上实施例,本申请还提供一种服务器,该服务器包括至少一个处理器和至少一个存储器,所述至少一个存储器中存储计算机程序指令,所述服务器运行时,所述至少一个处理器执行本申请实施例所描述的各方法中服务器所执行的功能。如执行图14所示实施例中服务器执行的S1402、S1404、S1406。
基于以上实施例,本申请还提供一种计算机程序,当所述计算机程序在计算机上运行时,使得所述计算机执行本申请实施例所描述的各方法。
基于以上实施例,本申请还提供一种计算机可读存储介质,所述计算机可读存储介质中存储有计算机程序,当所述计算机程序被计算机执行时,使得所述计算机执行本申请实施例所描述的各方法。
基于以上实施例,本申请还提供了一种芯片,所述芯片用于读取存储器中存储的计算机程序,实现本申请实施例所描述的各方法。
基于以上实施例,本申请提供了一种芯片***,该芯片***包括处理器,用于支持计算机装置实现本申请实施例所描述的各方法。在一种可能的设计中,所述芯片***还包括存储器,所述存储器用于保存该计算机装置必要的程序和数据。该芯片***,可以由芯片构成,也可以包含芯片和其他分立器件。
本领域内的技术人员应明白,本申请的实施例可提供为方法、***、或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。
本申请是参照根据本申请的方法、设备(***)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/
或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
显然,本领域的技术人员可以对本申请进行各种改动和变型而不脱离本申请的保护范围。这样,倘若本申请的这些修改和变型属于本申请权利要求及其等同技术的范围之内,则本申请也意图包含这些改动和变型在内。
Claims (28)
- 一种应用开发***,其特征在于,所述应用开发***包括第一电子设备、第二电子设备、第三电子设备以及服务器;所述第一电子设备,用于向所述服务器发送目标应用的原始安装包,所述目标应用的原始安装包用于指示至少一种设备信息对应的功能,和/或,至少一种设备信息对应的页面布局;所述服务器,用于接收所述第一电子设备发送的所述目标应用的原始安装包,根据所述原始安装包确定至少一个目标安装包,其中,所述至少一个目标安装包与所述至少一种设备信息一一对应,每个目标安装包具有一种设备信息对应的功能和/或页面布局;接收所述第二电子设备发送的第一下载请求,所述第一下载请求用于请求下载所述目标应用的安装包;向所述第二电子设备发送第一安装包,所述第一安装包为所述至少一个目标安装包中所述第二电子设备的设备信息对应的目标安装包;接收所述第三电子设备发送的第二下载请求,所述第二下载请求用于请求下载所述目标应用的安装包;向所述第三电子设备发送第二安装包,所述第二安装包为所述至少一个目标安装包中所述第三电子设备的设备信息对应的目标安装包;所述第二电子设备,用于向所述服务器发送所述第一下载请求;接收所述服务器发送的所述第一安装包;所述第三电子设备,用于向所述服务器发送所述第二下载请求;接收所述服务器发送的所述第二安装包。
- 如权利要求1所述的***,其特征在于,所述第一安装包与所述第二安装包满足以下至少一个条件:所述第一安装包的数据量大小与所述第二安装包的数据量大小不同;所述第一安装包的包名与所述第二安装包的包名不同;所述第一安装包中的功能文件与所述第二安装包中的功能文件不同;所述第一安装包中的布局文件与所述第二安装包中的布局文件不同。
- 如权利要求1或2所述的***,其特征在于,所述第二电子设备还用于:在向所述服务器发送第一下载请求之前,向所述服务器发送所述第二电子设备的设备信息,接收所述服务器发送的所述第二电子设备支持运行的应用的信息;显示所述第二电子设备支持运行的应用的信息;所述第三电子设备还用于:在向所述服务器发送第二下载请求之前,向所述服务器发送所述第三电子设备的设备信息,接收所述服务器发送的所述第三电子设备支持运行的应用的信息;显示所述第三电子设备支持运行的应用的信息;所述服务器还用于:接收所述第二电子设备发送的所述第二电子设备的设备信息,向所述第二电子设备发送所述第二电子设备支持运行的应用的信息;接收所述第三电子设备发送的所述第三电子设备的设备信息,向所述第三电子设备发送所述第三电子设备支持运行的应用的信息。
- 如权利要求1-3任一项所述的***,其特征在于,所述服务器具体用于:根据所述原始安装包中的语法标记对所述原始安装包进行拆分并编译,得到所述至少一个目标安装包。
- 如权利要求4所述的***,其特征在于,所述第一安装包中包括所述第二电子设备的设备信息对应的功能文件和/或所述第二电子设备的设备信息对应的布局文件,所述第二电子设备的设备信息对应的布局文件包括所述第二电子设备的设备信息对应的显示资源;所述第二安装包中包括所述第三电子设备的设备信息对应的功能文件和/或所述第三电子设备的设备信息对应的布局文件,所述第三电子设备的设备信息对应的布局文件包括所述第三电子设备的设备信息对应的显示资源。
- 如权利要求1-5任一项所述的***,其特征在于,所述设备信息包括设备类型、屏幕参数中的至少一项。
- 如权利要求6所述的***,其特征在于,所述屏幕参数包括屏幕形状、屏幕尺寸和屏幕分辨率中的至少一项。
- 如权利要求1-7任一项所述的***,其特征在于,所述第二电子设备还用于:在所述接收所述服务器发送的所述第一安装包之后,下载所述第一安装包,并根据所述第一安装包在所述第二电子设备上安装所述目标应用;或者在所述接收所述服务器发送的所述第一安装包之后,下载所述第一安装包,并根据所述第一安装包在所述第二电子设备上显示所述目标应用的服务卡片;所述第三电子设备还用于:在所述接收所述服务器发送的所述第二安装包之后,下载所述第二安装包,并根据所述第二安装包在所述第三电子设备上安装所述目标应用;或者在所述接收所述服务器发送的所述第二安装包之后,下载所述第二安装包,并根据所述第二安装包在所述第三电子设备上显示所述目标应用的服务卡片。
- 如权利要求1-8任一项所述的***,其特征在于,所述第二电子设备为智能终端设备、智能穿戴设备、轻智能穿戴设备、物联网设备、智能车载设备中的任一项;所述第三电子设备为智能终端设备、智能穿戴设备、轻智能穿戴设备、物联网设备、智能车载设备中的任一项。
- 一种应用开发方法,其特征在于,应用于电子设备,所述方法包括:向服务器发送第一下载请求,所述第一下载请求用于请求下载目标应用的安装包;接收所述服务器发送的第一安装包,所述第一安装包为所述电子设备的设备信息对应的目标安装包,所述目标安装包为所述服务器根据所述目标应用的原始安装包确定的。
- 如权利要求10所述的方法,其特征在于,在向所述服务器发送第一下载请求之前,所述方法还包括:向所述服务器发送所述电子设备的设备信息,接收所述服务器发送的所述电子设备支持运行的应用的信息;显示所述电子设备支持运行的应用的信息。
- 如权利要求10或11所述的方法,其特征在于,所述第一安装包中包括所述电子设备的设备信息对应的功能文件和/或所述电子设备的设备信息对应的布局文件,所述电子设备的设备信息对应的布局文件包括所述电子设备的设备信息对应的显示资源。
- 如权利要求10-12任一项所述的方法,其特征在于,所述设备信息包括设备类型、 屏幕参数中的至少一项。
- 如权利要求13所述的方法,其特征在于,所述屏幕参数包括屏幕形状、屏幕尺寸和屏幕分辨率中的至少一项。
- 如权利要求10-14任一项所述的方法,其特征在于,在所述接收所述服务器发送的第一安装包之后,所述方法还包括:下载所述第一安装包,并根据所述第一安装包在所述电子设备上安装所述目标应用;或者下载所述第一安装包,并根据所述第一安装包在所述电子设备上显示所述目标应用的服务卡片。
- 一种应用开发方法,其特征在于,应用于服务器,所述方法包括:接收第一电子设备发送的所述目标应用的原始安装包,所述目标应用的原始安装包用于指示至少一种设备信息对应的功能,和/或,至少一种设备信息对应的页面布局;根据所述原始安装包确定至少一个目标安装包,其中,所述至少一个目标安装包与所述至少一种设备信息一一对应,每个目标安装包具有一种设备信息对应的功能和/或页面布局;接收第二电子设备发送的第一下载请求,所述第一下载请求用于请求下载所述目标应用的安装包;向所述第二电子设备发送第一安装包,所述第一安装包为所述至少一个目标安装包中所述第二电子设备的设备信息对应的目标安装包;接收第三电子设备发送的第二下载请求,所述第二下载请求用于请求下载所述目标应用的安装包;向所述第三电子设备发送第二安装包,所述第二安装包为所述至少一个目标安装包中所述第三电子设备的设备信息对应的目标安装包。
- 如权利要求16所述的方法,其特征在于,所述第一安装包与所述第二安装包满足以下至少一个条件:所述第一安装包的数据量大小与所述第二安装包的数据量大小不同;所述第一安装包的包名与所述第二安装包的包名不同;所述第一安装包中的功能文件与所述第二安装包中的功能文件不同;所述第一安装包中的布局文件与所述第二安装包中的布局文件不同。
- 如权利要求16或17所述的方法,其特征在于,所述方法还包括:接收所述第二电子设备发送的所述第二电子设备的设备信息,向所述第二电子设备发送所述第二电子设备支持运行的应用的信息;接收所述第三电子设备发送的所述第三电子设备的设备信息,向所述第三电子设备发送所述第三电子设备支持运行的应用的信息。
- 如权利要求16-17任一项所述的方法,其特征在于,所述根据所述原始安装包确定至少一个目标安装包,包括:根据所述原始安装包中的语法标记对所述原始安装包进行拆分并编译,得到所述至少一个目标安装包。
- 如权利要求19所述的方法,其特征在于,所述第一安装包中包括所述第二电子设备的设备信息对应的功能文件和/或所述第二电子设备的设备信息对应的布局文件,所述第二电子设备的设备信息对应的布局文件包括所述第二电子设备的设备信息对应的显示资源;所述第二安装包中包括所述第三电子设备的设备信息对应的功能文件和/或所述第三电子设备的设备信息对应的布局文件,所述第三电子设备的设备信息对应的布局文件包括所述第三电子设备的设备信息对应的显示资源。
- 如权利要求16-20任一项所述的方法,其特征在于,所述设备信息包括设备类型、屏幕参数中的至少一项。
- 如权利要求21所述的方法,其特征在于,所述屏幕参数包括屏幕形状、屏幕尺寸和屏幕分辨率中的至少一项。
- 一种电子设备,其特征在于,包括至少一个处理器,所述至少一个处理器与至少一个存储器耦合,所述至少一个处理器用于读取所述至少一个存储器所存储的计算机程序,以执行如权利要求10-15中任一所述的方法。
- 一种电子设备,其特征在于,包括多个功能模块;所述多个功能模块相互作用,实现如权利要求10-15中任一所述的方法。
- 一种服务器,其特征在于,包括至少一个处理器,所述至少一个处理器与至少一个存储器耦合,所述至少一个处理器用于读取所述至少一个存储器所存储的计算机程序,以执行如权利要求16-22中任一所述的方法。
- 一种服务器,其特征在于,包括多个功能模块;所述多个功能模块相互作用,实现如权利要求16-22中任一所述的方法。
- 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储有指令,当其在计算机上运行时,使得计算机执行如权利要求10-15中任一所述的方法,或执行如权利要求16-22中任一所述的方法。
- 一种计算机程序,其特征在于,当所述计算机程序在计算机上运行时,使得计算机执行如权利要求10-15中任一所述的方法,或执行如权利要求16-22中任一所述的方法。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210195864.8 | 2022-03-01 | ||
CN202210195864.8A CN116737123A (zh) | 2022-03-01 | 2022-03-01 | 一种应用开发***、方法及设备 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2023165413A1 true WO2023165413A1 (zh) | 2023-09-07 |
Family
ID=87882949
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2023/077966 WO2023165413A1 (zh) | 2022-03-01 | 2023-02-23 | 一种应用开发***、方法及设备 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN116737123A (zh) |
WO (1) | WO2023165413A1 (zh) |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104166576A (zh) * | 2014-08-27 | 2014-11-26 | 厦门美图之家科技有限公司 | 一种提供应用程序安装包的***平台 |
CN106484470A (zh) * | 2016-09-29 | 2017-03-08 | 努比亚技术有限公司 | 应用程序安装包的处理方法、装置及服务器 |
CN106598678A (zh) * | 2016-12-20 | 2017-04-26 | 北京小米移动软件有限公司 | 向终端设备提供应用程序安装包的方法及装置 |
CN106775838A (zh) * | 2016-11-29 | 2017-05-31 | 暴风集团股份有限公司 | 插件化下载应用程序安装包的方法及*** |
CN107809491A (zh) * | 2017-11-30 | 2018-03-16 | 北京小米移动软件有限公司 | 安装包的下载方法及装置 |
CN110502245A (zh) * | 2018-05-16 | 2019-11-26 | 华为技术有限公司 | 数据处理方法、终端、服务器以及应用开发设备 |
CN112947947A (zh) * | 2019-12-11 | 2021-06-11 | 华为终端有限公司 | 安装包的下载方法、分发方法、终端设备、服务器及*** |
-
2022
- 2022-03-01 CN CN202210195864.8A patent/CN116737123A/zh active Pending
-
2023
- 2023-02-23 WO PCT/CN2023/077966 patent/WO2023165413A1/zh unknown
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104166576A (zh) * | 2014-08-27 | 2014-11-26 | 厦门美图之家科技有限公司 | 一种提供应用程序安装包的***平台 |
CN106484470A (zh) * | 2016-09-29 | 2017-03-08 | 努比亚技术有限公司 | 应用程序安装包的处理方法、装置及服务器 |
CN106775838A (zh) * | 2016-11-29 | 2017-05-31 | 暴风集团股份有限公司 | 插件化下载应用程序安装包的方法及*** |
CN106598678A (zh) * | 2016-12-20 | 2017-04-26 | 北京小米移动软件有限公司 | 向终端设备提供应用程序安装包的方法及装置 |
CN107809491A (zh) * | 2017-11-30 | 2018-03-16 | 北京小米移动软件有限公司 | 安装包的下载方法及装置 |
CN110502245A (zh) * | 2018-05-16 | 2019-11-26 | 华为技术有限公司 | 数据处理方法、终端、服务器以及应用开发设备 |
CN112947947A (zh) * | 2019-12-11 | 2021-06-11 | 华为终端有限公司 | 安装包的下载方法、分发方法、终端设备、服务器及*** |
Also Published As
Publication number | Publication date |
---|---|
CN116737123A (zh) | 2023-09-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP4002108B1 (en) | Application start method and electronic device | |
CN112291764B (zh) | 一种内容接续*** | |
WO2022089207A1 (zh) | 一种跨设备应用交互方法、电子设备与服务器 | |
WO2021121052A1 (zh) | 一种多屏协同方法、***及电子设备 | |
WO2022078295A1 (zh) | 一种设备推荐方法及电子设备 | |
EP4390690A1 (en) | Notification processing method, chip, electronic device, and computer readable storage medium | |
US12032938B2 (en) | Plug-in installation method, apparatus, and storage medium | |
CN111949350A (zh) | 一种界面显示方法和设备 | |
CN113485709B (zh) | 应用优化方法、装置以及电子设备 | |
CN115941674B (zh) | 多设备应用接续方法、设备及存储介质 | |
WO2023005711A1 (zh) | 一种服务的推荐方法及电子设备 | |
WO2023165413A1 (zh) | 一种应用开发***、方法及设备 | |
WO2022052706A1 (zh) | 一种服务的分享方法、***及电子设备 | |
CN113835802A (zh) | 设备交互方法、***、设备及计算机可读存储介质 | |
US20230259346A1 (en) | Application Module Startup Method and Electronic Device | |
CN115840610A (zh) | 桌面动效显示方法及电子设备 | |
WO2024083114A1 (zh) | 一种软件分发方法、电子设备及*** | |
WO2024055875A1 (zh) | 服务卡片的添加方法、电子设备及计算机可读存储介质 | |
WO2022267786A1 (zh) | 一种快捷图标展示方法与终端设备 | |
WO2023020339A1 (zh) | 界面显示方法及电子设备 | |
WO2023045774A1 (zh) | 显示方法及电子设备 | |
WO2024051569A1 (zh) | 一种情景展示方法及电子设备 | |
CN115080967A (zh) | 一种检测方法与装置 | |
CN118227431A (zh) | 性能分析方法、可读存储介质、程序产品及电子设备 | |
CN118170966A (zh) | 一种推荐方法、电子设备及服务器 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 23762813 Country of ref document: EP Kind code of ref document: A1 |