I'm using hardware.Camera component in my application but there is a capture button missing. Is it possible to use default capture button, the same as when we start camera as activity from Intent?
There is no "default capture button". When "we start camera as activity from Intent", the activity that appears will be one from hundreds, if not thousands, of available camera apps. This includes both apps pre-installed on Android devices and apps that are installed by users.
Related
I am working on the app that uses camera and mic in background mode. Obviously, when my app is active other camera apps (like Camera) will not work as the camera is held by my app.
Is there any way to get notified when the other app tries to open camera (if the camera is held by my app)?
I want my app to show some popup or notification when any other app tries to get camera (I think it will be more user-friendly to show some notice then to rely on other app's error messages)
I have a button in my app. With an OnClick event to the button I launch the default camera app.
public void startrec(View v) {
Intent intent = new Intent(MediaStore.INTENT_ACTION_VIDEO_CAMERA);
startActivity(intent);
}
This works fine. Now is it possible that the camera starts recording automatically without I have to press the record button in the camera application? So I mean... I press my button in my app -> the camera app starts -> the record starts immediately
How can I do that?
How can I do that?
Record the video yourself, using classes like MediaRecorder.
Your existing code is asking a third-party app to take a video on your behalf. There are hundreds, perhaps thousands, of such apps. The behavior of each of those is up to the developer of those apps. There are no documented extras for your chosen Intent action, let alone one for your desired feature. And even if it existed, not every camera app would honor it.
I would like to learn more about how the camera can launch over the secure lock-screen (PIN).
My goal is to have a user select either their default camera app or another camera app (like Google Camera). I would then like to invoke or launch the camera without the user being required to enter their pin code, etc.
I have read that this is possible starting with Android 4.2.
Here is the post:
Launch camera activity over lock screen
Currently in my test build the camera app launches, but the user my first unlock the device.
Any help is appreciated.
Thank you.
The Google glass contains a camera button at the top. By default it invokes the default Google camera app and captures the picture in a single click.
If my app is running, I can receive the camera button pressed event by overriding onKeyDown() in my app.
My question is, how can I make the camera button to start my app at first hand?
Also how does the Google camera app gets started when the camera button is pressed and how is the event again passed to onKeyDown()?
There is currently no way for a Glassware other than the built-in Camera to get started when the camera button is pressed on the timeline.
If you would like such a feature, please file a feature request in our issues tracker and explain your use-case so we can properly triage and prioritize.
I want to write application on Android that starts in background when user launches a built-in camera (it is important: build-in camera, not an application) and do some actions after user makes a photo.
Is it real? If yes, how to implement this?
I doubt if this is possible. There is no mechanism which android provides that causes a broadcast to the system that Camera has been launched. Plus, you cannot modify the contents shown on the screen as the Camera application is in command. The only way out is to have a MediaScanner and FileObserver to check when a new picture is created in DCIM/Camera/ folder and make your app act accordingly