Method for sharing screen projection data by multiple applications in Android system

By configuring and encapsulating the parameters of multiple screen projection technologies in the Android system, the method of sharing screen projection data for multiple applications is realized, solving the limitations of single-application screen projection in the existing technology, and improving user experience and development efficiency.

CN119166385APending Publication Date: 2024-12-20NANJING DUOWEIXINLIAN TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411206923.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-30
Publication Date
2024-12-20

Smart Images

  • Figure CN119166385A_ABST
    Figure CN119166385A_ABST
Patent Text Reader

Abstract

The invention discloses a method for sharing screen projection data by multiple applications in an Android system, which belongs to the technical field of screen projection data processing and comprises the following steps of: configuring parameters adaptive to multiple screen projection technologies in an Android system underlying service of a screen projection receiving end; packaging the common characteristics of the screen projection services of the multiple screen projection technologies of the screen projection receiving end into an AIDL IPC interface in a unified manner; the screen projection sending end sends screen projection data to the AIDL IPC interface of the screen projection receiving end; and the server side of the AIDL IPC interface of the projection screen receiving end receives the Surface Graphics Buffer Producer (graphic data) transmitted by the application program of the projection screen sending end. By means of the mode, the screen projection technology such as AirPlay, Google Case and Miracast is packaged into a unified Android underlying service, and a unified AIDL IPC interface is provided for different application programs to use.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of screen projection data processing, and in particular to a method for sharing screen projection data among multiple applications in an Android system. Background Art

[0002] With the popularity of mobile devices and the development of wireless network technology, screen projection technology has been widely used in home entertainment, education, corporate meetings and other fields. In the Android system, many applications may need to use screen projection related technologies, such as AirPlay, Google Cast and Miracast:

[0003] 1. AirPlay is a wireless technology developed by Apple that can transmit pictures, audio, video, etc. on iOS devices to AirPlay-supported devices such as Apple TV and smart TVs via Wi-Fi. AirPlay has the advantages of ease of use, good stability, and strong compatibility, but it can only be used for Apple devices, and devices that support AirPlay are required to receive screen projection data.

[0004] 2. Google Cast is a wireless screen projection technology developed by Google that can transfer content on Android devices or Chrome browsers to devices that support Google Cast, such as smart TVs, speakers, etc. Google Cast has the advantages of strong compatibility, fast transmission speed, and good stability, but it requires devices and applications to support Google Cast before it can be used.

[0005] 3. Miracast is a wireless display standard protocol developed by the Wi-Fi Alliance, which can transfer content on Miracast-supported devices to other Miracast-supported devices, such as TVs, projectors, etc. Miracast has the advantages of no need to install software, no need to connect to the network, and fast transmission speed, but its compatibility is poor, and there may be connection problems between different devices.

[0006] However, the existing Android system screen projection technology is usually targeted at a single application. Each application that needs to use screen projection related technology needs to implement the relevant logic separately, and multiple applications cannot share screen projection data.

[0007] Based on this, the present invention designs a method for sharing screen projection data among multiple applications in an Android system to solve the above-mentioned problem. Summary of the invention

[0008] In view of the above-mentioned shortcomings of the prior art, the present invention provides a method for multiple applications in an Android system to share screen projection data.

[0009] To achieve the above objectives, the present invention is implemented through the following technical solutions:

[0010] A method for sharing screen projection data among multiple applications in an Android system comprises the following steps:

[0011] Step 1: Configure parameters for adapting to multiple screen projection technologies in the underlying service of the Android system at the screen projection receiving end;

[0012] Step 2: Encapsulate the common features of the screen projection services of various screen projection technologies at the screen projection receiving end into an AIDLIPC interface;

[0013] Step 3: The screen projection sender sends the projection data to the AIDL IPC interface of the screen projection receiver;

[0014] Step 4: The server of the AIDL IPC interface of the screen projection receiving end receives the Surface GraphicBufferProducer (graphics data) transmitted from the screen projection sending end application;

[0015] Step 5: Convert the screen projection data received by various screen projection technologies into graphic data that can be recognized by the screen projection receiving end application Surface (graphic display);

[0016] Step six: pass the graphic data to the corresponding screen projection receiving application through the cross-process communication mechanism of GraphicBuffer (graphic data buffer).

[0017] Furthermore, the parameters of the various screen projection technologies configured in the underlying service of the Android system at the screen projection receiving end include system version, hardware requirements, discovery protocol rules, and data negotiation process.

[0018] Furthermore, the common features of the various screen projection services encapsulate the settings of a unified AIDL IPC interface including: service on / off, setting the service name, and setting the surface graphics buffer generator.

[0019] Furthermore, an independent screen projection service process is started in the underlying service of the Android system on the screen projection receiving end, and the AIDL IPC Service of the screen projection receiving end is registered in the ServiceManager (service manager) of the Android system on the screen projection receiving end.

[0020] Furthermore, when the screen projection receiving end receives valid screen projection data of multiple screen projection technologies, it converts it into readable data that can be decoded using relevant algorithms based on the characteristics and rules of the screen projection data.

[0021] Furthermore, by calling the Android system on the screen projection receiving end to release the buffer data of the decoded readable data, and informing the Android system that the buffer data needs to be rendered to the Surface (drawing surface) delivered by the corresponding application of the screen projection receiving end through MediaCodec (media decoder), MediaCodec (media decoder) relies on the internal SoftwareRenderer (software renderer) to parse the buffer data through the queueBuffer function to the mGraphicBufferProducer corresponding to the Surface (drawing surface) delivered by the application of the screen projection receiving end, and the mGraphicBufferProducer is delivered to the SurfaceFlinger (display engine) of the Android system on the screen projection receiving end, and the SurfaceFlinger (display engine) displays it on the corresponding Surfaceview / Textureview (view) of the Surface (drawing surface) of the application.

[0022] The present invention has the following technical effects:

[0023] The present invention realizes that by encapsulating screen projection technologies such as AirPlay, Google Cast and Miracast into a unified Android underlying service, and providing a unified AIDL IPC interface for use by different applications. Multiple applications can simply obtain screen projection data using a unified interface. This method improves the user experience and efficiency of screen projection, and reduces the development cost of screen projection. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0025] Figure 1 A block diagram of a method for multiple applications to share screen projection data in an Android system of the present invention. DETAILED DESCRIPTION

[0026] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0027] The present invention will be further described below in conjunction with the embodiments.

[0028] Example 1

[0029] Please refer to the instruction manual Figure 1 , a method for sharing screen projection data among multiple applications in an Android system, comprising the following steps:

[0030] Step 1: Configure parameters for adapting to multiple screen projection technologies in the underlying service of the Android system at the screen projection receiving end;

[0031] Step 2: Encapsulate the common features of the screen projection services of various screen projection technologies at the screen projection receiving end into an AIDLIPC interface;

[0032] Step 3: The screen projection sender sends the projection data to the AIDL IPC interface of the screen projection receiver;

[0033] Step 4: The server of the AIDL IPC interface of the screen projection receiving end receives the Surface GraphicBufferProducer (graphics data) transmitted from the screen projection sending end application;

[0034] Step 5: Convert the screen projection data received by various screen projection technologies into graphic data that can be recognized by the screen projection receiving end application Surface (graphic display);

[0035] Step six: pass the graphic data to the corresponding screen projection receiving application through the cross-process communication mechanism of GraphicBuffer (graphic data buffer).

[0036] Example 2

[0037] like Figure 1 As shown, as a preferred embodiment of the present invention, the parameters of the various screen projection technologies configured in the underlying service of the Android system at the screen projection receiving end include system version, hardware requirements, discovery protocol rules, and data negotiation process.

[0038] The common features of the various screen projection services encapsulate the settings of a unified AIDL IPC interface, including: service on / off, setting the service name, and setting the surface graphics buffer generator.

[0039] An independent screen projection service process is started in the underlying service of the Android system on the screen projection receiving end, and the AIDL IPC Service of the screen projection receiving end is registered in the ServiceManager (service manager) of the Android system on the screen projection receiving end.

[0040] When the screen projection receiving end receives valid screen projection data from multiple screen projection technologies, it uses relevant algorithms to convert it into readable data that can be decoded based on the characteristics and rules of the screen projection data.

[0041] By calling the Android system on the screen projection receiving end to release the buffer data of the decoded readable data, and informing the Android system that the buffer data needs to be rendered to the Surface (drawing surface) delivered by the corresponding application of the screen projection receiving end through MediaCodec (media decoder), MediaCodec (media decoder) relies on the internal SoftwareRenderer (software renderer) to parse the buffer data through the queueBuffer function to the mGraphicBufferProducer corresponding to the Surface (drawing surface) delivered by the application of the screen projection receiving end, and the mGraphicBufferProducer is delivered to the SurfaceFlinger (display engine) of the Android system on the screen projection receiving end, and the SurfaceFlinger (display engine) displays it on the corresponding Surfaceview / Textureview (view) of the Surface (drawing surface) of the application.

[0042] The multiple screen projection technologies include AirPlay, Google Cast and Miracast.

[0043] Example 3

[0044] like Figure 1 As shown, as a preferred embodiment of the present invention, when the screen projection receiving end receives effective screen projection data of multiple screen projection technologies, such as: receiving encrypted data of Airplay, data of Google Cast, and MPEG2-TS data of Miracast; according to the characteristics and rules of the screen projection data, the relevant algorithms are used to convert it into decodable readable data. For example: Airplay data is converted into H264 / PCM data, Google Cast data is converted into VP8 / PCM data, Miracast is converted into H264 / AAC data, and then decoded into data that can be recognized by Surface through MediaCoder.

[0045] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements will not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for sharing screen projection data among multiple applications in an Android system, characterized by: The following steps are involved: Step 1: Configure parameters for adapting to multiple screen projection technologies in the underlying service of the Android system at the screen projection receiving end; Step 2: Encapsulate the common features of the screen projection services of various screen projection technologies at the screen projection receiving end into an AIDL IPC interface; Step 3: The screen projection sender sends the projection data to the AIDL IPC interface of the screen projection receiver; Step 4: The server of the AIDLIPC interface of the screen projection receiving end receives the Surface GraphicBufferProducer (graphics data) transmitted from the screen projection sending end application; Step 5: Convert the screen projection data received by various screen projection technologies into graphic data that can be recognized by the screen projection receiving end application Surface (graphic display); Step six: pass the graphic data to the corresponding screen projection receiving application through the cross-process communication mechanism of GraphicBuffer (graphic data buffer).

2. The method for sharing screen projection data among multiple applications in an Android system according to claim 1, characterized in that: The parameters of the various screen projection technologies configured in the underlying service of the Android system at the screen projection receiving end include system version, hardware requirements, discovery protocol rules, and data negotiation process.

3. The method for sharing screen projection data among multiple applications in an Android system according to claim 2, characterized in that: The common features of the various screen projection services encapsulate the settings of the unified AIDLIPC interface, including: service on / off, setting the service name, and setting the surface graphics buffer generator.

4. The method for sharing screen projection data among multiple applications in an Android system according to claim 3, characterized in that: An independent screen projection service process is started in the underlying service of the Android system on the screen projection receiving end, and the AIDL IPCService service of the screen projection receiving end is registered in the ServiceManager (service manager) of the Android system on the screen projection receiving end.

5. The method for sharing screen projection data among multiple applications in an Android system according to claim 4, characterized in that: When the screen projection receiving end receives valid screen projection data from multiple screen projection technologies, it uses relevant algorithms to convert it into readable data that can be decoded based on the characteristics and rules of the screen projection data.

6. The method for sharing screen projection data among multiple applications in an Android system according to claim 5, characterized in that: By calling the Android system on the screen projection receiving end to release the buffer data of the decoded readable data, and informing the Android system that the buffer data needs to be rendered to the Surface (drawing surface) delivered by the corresponding application of the screen projection receiving end through MediaCodec (media decoder), MediaCodec (media decoder) relies on the internal SoftwareRenderer (software renderer) to parse the buffer data through the queueBuffer function to the mGraphicBufferProducer corresponding to the Surface (drawing surface) delivered by the application of the screen projection receiving end, and the mGraphicBufferProducer is delivered to the SurfaceFlinger (display engine) of the Android system on the screen projection receiving end, and the SurfaceFlinger (display engine) displays it on the corresponding Surfaceview / Textureview (view) of the Surface (drawing surface) of the application.