With an effort, I wrote a demo which can record a h264/aac video successfully. I use MediaCodec and MediaMuxer which are both available since api-18. To avoid that the color formats for the camera output and the MediaCodec encoder input are different, I chose the color format "MediaCodecInfo.CodecCapabilities.COLOR_FormatSurface" according to the continous capture activity of grafika. But I am worrying about one thing, there are so many kinds of Android phones, Can my demo record video successfully on any android mobile phone with api-18 or higher.
Asked
Active
Viewed 790 times
-2
-
I am almost sure that some of the AOSP-based devices released with KitKat or Lollipop will not run your app. I would recommend to release your demo on PlayStore and analyze crashes, failures, and user reviews. You can ask people to download your app on XDA forums, on Google+ Android Dev community, and elsewhere, and often lots of volunteers with all kinds of exotic devices and use cases enjoy giving a hand. – Alex Cohn Jun 29 '15 at 11:19
1 Answers
1
There are few guarantees in life, but the Android CTS tests attempt to ensure that all devices correctly perform certain actions. It sounds like what you're doing makes use of features covered by CTS, so the chances of success are very good, but there can always be exceptions.
For this or any app, it's good to test on as many different devices as possible.

fadden
- 51,356
- 5
- 116
- 166