0

I use the ACTION_VIDEO_CAPTURE intent to capture videos with the default Camera app. But the slow motion button gets disabled (gray) when the app open. Yet, it works perfectly when I launch manually the app.

Intent takeVideoIntent = new Intent(MediaStore.ACTION_VIDEO_CAPTURE);
takeVideoIntent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(mediaFile));
takeVideoIntent.putExtra(MediaStore.EXTRA_VIDEO_QUALITY, 1);
takeVideoIntent.putExtra(MediaStore.EXTRA_DURATION_LIMIT, TIME_CAPTURE);
startActivityForResult(takeVideoIntent, REQUEST_VIDEO_CAPTURE);

I tested it on Galaxy S4. How could I activate the slow motion button? Does anyone have been able to call the default camera app with the slow motion activated?

Thanks :)

1 Answers1

0

But the slow motion button gets disabled (gray) when the app open.

There are thousands of Android device models. These ship with hundreds of different "default Camera apps". And, your ACTION_VIDEO_CAPTURE request might be handled by a user's chosen camera app installed from an app distribution channel. There is no single "default Camera app" in the world of Android.

There is nothing in the ACTION_VIDEO_CAPTURE protocol for you to request that slow motion capture be available or used. No camera app has to offer slow motion video recording.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
  • Thanks for rapidly answer :) It's an application for a single client use. He has a Galaxy S4 which has a Camera app with slow motion (default installed) . It works when lauching manually but not when calling from the code. – Jugali Lakota Jun 04 '16 at 20:44
  • @JugaliLakota: That does not change the fact that there is no documented way, in an `ACTION_VIDEO_CAPTURE` `Intent`, to tell a camera app to offer slow motion recording. Either it does or it doesn't. You might consider experimenting with other camera apps, to see which ones offer slow motion recording and what subset of those offer it via `ACTION_VIDEO_CAPTURE`. – CommonsWare Jun 04 '16 at 20:46
  • Thanks. Hummmm. So are you saying that the camera app has decide to disable it when it is called from an Intent? How can the app do that? Else, do you know an application with slow motion which will handle the Intent wisely. EDIT : finally, I understand why the app can do that. It's sad :( . ok (y) . I can't lauch directly his class to because it will not return to the app after capture. Thanks – Jugali Lakota Jun 04 '16 at 20:50