Android device camera remote calling method based on virtualization
Through virtualization technology, virtualization of cameras of other Android devices to local devices solves the problem that the Android system cannot use cameras of other devices, and realizes indiscriminate API calls and remote camera use.
Patent Information
- Application Number
- CN202310971288.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-03
- Publication Date
- 2025-02-14
AI Technical Summary
Existing Android systems cannot use cameras from other devices, making it difficult for developers to achieve compatibility and unified API calls between different devices.
Through virtualization technology, the cameras of other Android devices are virtualized to local devices and remotely called through WIFI to achieve indiscriminate API calls. Specific steps include device discovery and pairing, obtaining remote camera information, showing virtual cameras as real cameras on local devices, and setting up applications or services on remote devices for real-time image capture and transmission.
It implements virtualizing the cameras of other Android devices to the local area and provides an indiscriminate API call interface, allowing applications to use the cameras of remote devices, providing the same API call interface as local devices.
Smart Images

Figure CN119450193A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of Android, and in particular relates to a virtualization-based Android device camera remote calling method. Background Art
[0002] With the popularity of smartphones and other mobile devices, the importance of cameras in applications is increasing. Many applications rely on the device's camera to capture photos, record videos, and make real-time video calls. However, due to hardware limitations and device differences, developers often face challenges in compatibility and unified application programming interface (API) calls when using cameras on different devices. At the same time, the current situation of the Android system is that only the local camera can be used, and the cameras of other devices cannot be used. Summary of the invention
[0003] In view of the above problems, the present invention provides a virtualized Android device camera remote calling method, which virtualizes the cameras of other Android devices to the local and realizes indiscriminate API calling.
[0004] In order to solve the above technical problems, the present invention adopts the following technical solutions:
[0005] A virtualization-based Android device camera remote calling method comprises the following steps:
[0006] S10, in the local area network, the local device and the remote device are discovered and paired via WIFI, the local device is the active discoverer, and the remote device is the discovered device;
[0007] S20, the active discovery end obtains the camera information of the discovered end through scanning and authentication;
[0008] S30, presenting the camera of the discovery end as a real camera on the active discovery end;
[0009] S40, remotely setting a corresponding application or service on the discovered end to realize the capture and transmission of real-time camera images, establishing a data transmission channel, and the discovered end securely transmits the image data to the active discovered end.
[0010] In a possible implementation, S10 specifically includes: the Camera Hal module of the active discovery end transmits the remote camera information of the discovery end read by the underlying driver to the camera service of the Framework layer of the active discovery end.
[0011] In a possible implementation, the camera information includes a camera ID array, a camera type, a camera front and rear status, all resolutions supported by a corresponding camera sensor, and data collected by taking photos.
[0012] In a possible implementation, in S40, the data transmission channel is established by using the SSL protocol to establish a secure link, wherein the discovered end serves as the SSL server and the active discovered end serves as the SSL client.
[0013] The present invention has the following beneficial effects: the camera of other Android devices can be virtualized to the local device and non-differentiated API calls can be implemented. Moreover, by establishing a remote connection and data transmission, the application can use the camera of the remote device and provide the same API calling interface as the local device camera. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] Figure 1 The present invention is a flowchart of the steps of a method for remotely calling a camera of an Android device based on virtualization according to an embodiment of the present invention. DETAILED DESCRIPTION
[0015] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions 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.
[0016] Reference Figure 1 , shown is a flowchart of a method for remotely calling a camera of an Android device based on virtualization according to an embodiment of the present invention, comprising the following steps:
[0017] S10, in the local area network, the local device and the remote device are discovered and paired via WIFI, the local device is the active discoverer, and the remote device is the discovered device;
[0018] S20, the active discovery end obtains the camera information of the discovered end through scanning and authentication;
[0019] S30, the camera of the discovery end is presented as a real camera on the active discovery end, so that there is no difference between using the own camera and the remote camera on the active discovery end.
[0020] S40, remotely setting a corresponding application or service on the discovered end to realize the capture and transmission of real-time camera images, establishing a data transmission channel, and the discovered end securely transmits the image data to the active discovered end.
[0021] In one embodiment of the present invention, S10 specifically includes: the Camera Hal module of the active discovery end transmits the remote camera information of the discovered end read by the underlying driver to the camera service of the Framework layer of the active discovery end. When the Framework accesses the virtual camera through the CameraService, the Camera Hal module requests to access the camera of the remote device by establishing a remote connection. At this time, Android Camera Hal acts as a bridge between the Android framework layer camera service and the underlying camera driver and hardware connection, and controls and manages the workflow of the remote camera through the camera pipeline. The camera information includes the camera ID array (the effective array length corresponds to the number of cameras connected to the device), the camera type, the front and rear camera status, all resolutions supported by the corresponding camera sensor, and the data collected by taking pictures.
[0022] In one embodiment of the present invention, in S40, the data transmission channel is established using the SSL protocol to establish a secure link, wherein the discovered end is the SSL server and the active discovered end is the SSL client. The SSL protocol can ensure that the connection between the local device and the remote device is secure. The Framework accesses the Camera Hal through the CameraService, and the Camera Hal controls the remote camera through the established link to achieve real-time camera image capture and transmission.
[0023] Through the above-set virtualization-based Android device camera remote call method, the camera of other Android devices can be virtualized to the local device and the API call can be implemented without distinction. And by establishing a remote connection and data transmission, the application can use the camera of the remote device and provide the same API call interface as the local device camera.
[0024] It should be understood that the exemplary embodiments described herein are illustrative rather than restrictive. Although one or more embodiments of the present invention have been described in conjunction with the accompanying drawings, it should be understood by those skilled in the art that various changes in form and detail may be made without departing from the spirit and scope of the present invention as defined by the appended claims.
Claims
1. A virtualized Android device camera remote calling method, characterized in that: The following steps are involved: S10, in the local area network, the local device and the remote device are discovered and paired via WIFI, the local device is the active discoverer, and the remote device is the discovered device; S20, the active discovery end obtains the camera information of the discovered end through scanning and authentication; S30, presenting the camera of the discovery end as a real camera on the active discovery end; S40, remotely setting a corresponding application or service on the discovered end to realize the capture and transmission of real-time camera images, establishing a data transmission channel, and the discovered end securely transmits the image data to the active discovered end.
2. The method for remotely calling a camera of an Android device based on virtualization as claimed in claim 1, characterized in that: S10 specifically includes: the Camera Hal module of the active discovery end transmits the remote camera information of the discovery end read by the underlying driver to the camera service of the Framework layer of the active discovery end.
3. The method for remotely calling a camera of an Android device based on virtualization as claimed in claim 2, characterized in that: The camera information includes the camera ID array, camera type, camera front and rear status, all resolutions supported by the corresponding camera sensor, and data collected by taking pictures.
4. The method for remotely calling a camera of an Android device based on virtualization as described in claim 1 is characterized in that: In S40, a data transmission channel is established using the SSL protocol to establish a secure link, wherein the discovered end serves as the SSL server and the active discovered end serves as the SSL client.