Android detect record event of camera - android

Is there a way to detect whether recording has started or not in android camera video?
Intent intent = new Intent(MediaStore.ACTION_VIDEO_CAPTURE);
startActivityForResult(intent, CAPTURE_VIDEO_ACTIVITY_REQUEST_CODE);

Not for that Intent structure.
If you include EXTRA_OUTPUT, indicating where the video should be recorded, in theory you could watch to see when bytes are starting to get written to that file.

Related

What is the difference between ACTION_VIDEO_CAPTURE and INTENT_ACTION_VIDEO_CAMERA?

I am working on the Camera API and am confused between the following two Intents:
ACTION_VIDEO_CAPTURE
> added in API level 3
String ACTION_VIDEO_CAPTURE
Standard Intent action that can be sent to have the camera application
capture a video and return it.
The caller may pass in an extra EXTRA_VIDEO_QUALITY to control the
video quality.
The caller may pass in an extra EXTRA_OUTPUT to control where the
video is written. If EXTRA_OUTPUT is not present the video will be
written to the standard location for videos, and the Uri of that
location will be returned in the data field of the Uri. As of
LOLLIPOP, this uri can also be supplied through setClipData(ClipData).
If using this approach, you still must supply the uri through the
EXTRA_OUTPUT field for compatibility with old applications. If you
don't set a ClipData, it will be copied there for you when calling
startActivity(Intent).
INTENT_ACTION_VIDEO_CAMERA
added in API level 3
String INTENT_ACTION_VIDEO_CAMERA
The name of the Intent action used to launch a camera in video mode.
Constant Value: "android.media.action.VIDEO_CAMERA"
If I want to capture a Video from a Camera App, I would of course launch the Camera in the Video mode but both Intents seems to do that. How are they different?
There are two major differences.
With ACTION_VIDEO_CAPTURE, you can specify a destination folder.
With ACTION_VIDEO_CAPTURE, your user can't change the camera mode other than the video camera mode.
And, also, if I recall correctly, your activity can receive the onActivityResult callback only with ACTION_VIDEO_CAPTURE.

How to use inbuilt Equalizer by intent

I am working in a media player project but for equalizer .I want to call the inbuilt equalizer in my app but How to open an equalizer using intent ,I am able to open gallery but How I can open an equalizer?
I am following these Open gallery app by Intent,Open gallery app
I am able to open the media player equalizer by the following way
Intent intent = new Intent();
intent.setAction("android.media.action.DISPLAY_AUDIO_EFFECT_CONTROL_PANEL");
startActivityForResult(intent, 1);
Hope it will help some one.

How to start inbuilt voice recorder application?

I have to attach voice recorded file as attachment to my android application. I have created a separate activity for voice recording without using inbuilt voice recorder application and it's working fine.
I thought of using the inbuilt application 'Voice Recorder' instead of using the activity which I have created.
I know that using Intent we should start the new activity. But I'm not able to find out how to start inbuilt voice recorder application and how it should be opened from my application?
Kindly let me know if anyone has experience in handling this scenario.
Thanks in advance!
You can try this
public static final int ACTIVITY_RECORD_SOUND = 0;
Intent intent = new Intent(MediaStore.Audio.Media.RECORD_SOUND_ACTION);
startActivityForResult(intent, ACTIVITY_RECORD_SOUND);

Android stock camera access

I'm writing an app that uses the camera however I'm currently using the code:
Intent intent = new Intent("android.media.action.IMAGE_CAPTURE");
startActivity(intent);
Which opens the camera but not the stock android camera app. Is there a way to do that? I want to use the stock camera so that I don't have to deal with saving photos/videos, or exception handling myself.

RECORD_SOUND_ACTION intent, go straight to recordings list

I have an application that fires the intent for the voice recorder (RECORD_SOUND_ACTION), but I want it to go straight to the listing of recordings. Is there a putExtra I can add to get this result?
I assume you have an HTC phone--I believe Voice Recorder is a stock HTC app, not an Android standard app. If that's the case, if you can find the apk, you might be able to reverse engineer an intent using AppXplore--though this would only work for people that have HTC devices and/or a compatible version of Voice Recorder. I wouldn't recommend it.
Alternately, you could without too much effort call ACTION_PICK and subsequently launch an audio player on the returned file. To call an audio file chooser:
Intent intent = new Intent(Intent.ACTION_PICK,
android.provider.MediaStore.Audio.Media.EXTERNAL_CONTENT_URI);
startActivityForResult(Intent.createChooser(intent, "Gallery"), reqCode);
Or alternately,
Intent intent = new Intent();
intent.setType("audio/*");
intent.setAction(Intent.ACTION_GET_CONTENT);
startActivityForResult(Intent.createChooser(intent,"Select Audio "), reqCode);

Categories

Resources