Reputation: 748
I'm currently using the code given below to record video from the default camera app on an android device. It works perfectly and gives me low quality video output on stock android 4.2.2. However, when i test this out on a Samsung based Touchwiz ROM the default camera app ignores the intent extra for low video quality and produces large sized videos which is not something I want. How do I make sure this intent extra works in all camera apps regardless of the android skin the device is running on?
Intent takeVideoIntent = new Intent(MediaStore.ACTION_VIDEO_CAPTURE);
takeVideoIntent.putExtra(MediaStore.EXTRA_VIDEO_QUALITY,1);
startActivityForResult(takeVideoIntent,ACTION_TAKE_VIDEO);
PS: I do not wish to create my own camera activity as the user will lose out on a lot of other capturing options, plus, it will be tedious and time consuming. Thanks.
Upvotes: 0
Views: 773
Reputation: 1007544
How do I make sure this intent extra works in all camera apps regardless of the android skin the device is running on?
You can't. You are not in control; the app that the user chooses to handle the ACTION_VIDEO_CAPTURE
request is in control. That does not have to be tied to whatever you think an "android skin" is -- the app could be a third-party app that the user has installed.
Your extras are requests for behavior. They are not commands. An app is welcome to ignore them as desired. Ideally, apps won't ignore those, but, then again, ideally, I'd have hair.
I do not wish to create my own camera activity as the user will lose out on a lot of other capturing options, plus, it will be tedious and time consuming
Then do not complain when other apps do what those apps' authors wanted to, which may include ignoring some of the requests you made via the extras.
Upvotes: 1