android.intent.action.CAMERA_BUTTON 的广播接收器
我有一个 Android 应用程序,可以在其中拍照。为此,我正在使用 SurfaceView 构建自己的相机。在应用程序的这种状态下,用户必须触摸屏幕/ surfaceview 以便拍照。
手机还有一个按钮,用户也可以打开相机,默认按钮......与我的应用程序无关。
我想知道 - 我是否有可能在我的 Android 应用程序中监听该硬件按钮并在那里自定义其行为!
我再说一遍,我所说的按钮是位于手机左侧边缘的硬件按钮
。
编辑:我知道这就是我正在寻找的 android.intent.action.CAMERA_BUTTON
。有人可以提供一个可靠的例子吗?
I have an android application in which I take a photo.For that I'm building my own camera using a surfaceview
.In this state of the application, the user has to touch the screen/surfaceview
in order to take a picture.
Also the phone has a button which also the user to open its camera, the default one...which has nothing to do with my app.
What I wonder- is there any posibility for me to have a listener to that hardware button in my android application and to customize its behaviour there!
I repeat-the button I'm talking about is the hardware button
that lies on the left edge of the phone.
EDIT:I understand that this is what I'm looking for android.intent.action.CAMERA_BUTTON
.Can someone provide a solid example?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
乔治看一下:
ACTION_CAMERA_BUTTON 的广播接收器永远不会被调用< /a>
和
Android 广播接收器和 Intent 过滤器
和
我的 BroadcastReceiver 未收到我的 N1 启动后的 BOOT_COMPLETED 意图。请帮忙!
你得到了图片 - 使用搜索:-)
基本上你需要一个:
George take a look at:
broadcast receiver for ACTION_CAMERA_BUTTON never gets called
and
Android-Broadcast Receiver and Intent Filter
and
My BroadcastReceiver is not receiving the BOOT_COMPLETED intent after my N1 boots. Help Please!
You get the picture - use the search :-)
Basically you need a: