The invention belongs to the field of the
software technical application, and discloses a method and
system for simultaneously calling a camera by
multiple applications based on a broadcast mechanism.The method comprises the following steps: S1, receiving a command, which is sent by an application program A, of calling the camera to
shoot, and generating a first command serial number,
broadcasting the command, which is sent by the application program A, of calling the camera to
shoot and the first command serial number; the method further comprises the step S2: receiving a command, which is sent by an application program, of accomplishing the shooting, and generating a second command serial number, and
broadcasting the command, which is sent by an application program, of accomplishing theshooting and the second command serial number, wherein the application program B is the application program occupying camera hardware resource, and the
system is the
system adopting the above method.Through the method disclosed by the invention, the function of simultaneously occupying the camera by
multiple applications can be realized when one application program does not understand a shootinginterface of other application program and does not
expose the own shooting interface to other application program.