向内置摄像头应用发送命令 [英] Sending command to the in-built camera app
问题描述
如何向内置(默认)相机应用发送拍照命令?
How can I send take a picture command to the in-built (default) camera app?
假设摄像头应用正在前台运行.现在,我不想点击屏幕上的摄像头按钮,而是希望我的后台服务要求摄像头应用程序拍照.如何实现?
我了解向相机应用发送意图的可能性,但是这需要点击屏幕上的按钮来拍照,或者创建自己的自定义相机应用,然后可以对其进行控制.但是我正在寻找一种方法(法律或黑客手段),使内置摄像头应用程序可以接受我的拍照命令.
I understand the possibility of sending an intent to the camera app, but that would then need a tap on the on-screen button to take a picture, or creating my own custom camera app which can then be controlled. But I am looking for a way (legal or hack) to make the in-built camera app receptive to my take a picture command.
我们为这些手机配备了物理摄像头按钮,按下这些按钮会触发某物,并向摄像头应用传达消息以进行拍照.我可以通过我的后台服务以某种方式触发某事吗?
We have these phones with physical camera buttons, pressing which triggers something and convey a message to the camera app to take a picture. Can I somehow trigger that something from my background service?
推荐答案
如何将拍照命令发送到内置(默认)相机应用程序?
How can I send take a picture command to the in-built (default) camera app?
有数十个内置(默认)相机应用程序".设备制造商通常会自己运送.
There are dozens of "in-built (default) camera apps". Device manufacturers usually ship their own.
我该如何实现?
How can I achieve this?
不要求任何相机应用程序(更不用说内置"应用程序)都支持允许第三方应用程序控制相机行为的任何类型的API,更不用说提供您要描述的特定访问权限了.
There is no requirement that any camera app, let alone an "in-built" one, support any sort of API that allows third-party apps to control the camera behavior, let alone offer the specific access that you are describing.
这篇关于向内置摄像头应用发送命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!