It seems that most Android devices, even if they support slow motion recording, do not expose these settings via the official API.
On newer Samsung phones you can enable a slow-motion preview via CameraParameter
parms.set("fast-fps-mode", 1);
parms.setPreviewFpsRange(60000, 60000);
How to support all other vendors?
Related
Okay, I just got a new Moto z2 play and decided to try and learn the Android Camera2 api using it... The phone is not rooted, and the stock camera app has the option to record slow motion videos and have manual focus during photos... But when I probe the CameraCharacteristics using the Camera2 api, it shows me a LEGACY hardware level device, with no support for high fps recording nor manual sensor control... I've read in the internet that build.prop can be edited so that the device reports the full supported capabilities... But to my understanding, if those capabilities were not supported by default, it wouldn't be possible for stock camera app to show them, right...? So, what's going on? Is there some caveat I'm missing?
The stock camera app likely has custom interfaces to use those features, built on top of the legacy camera HAL.
Unfortunately, the standard camera2 API cannot run on top of the legacy HAL besides in LEGACY mode, because there's no way to automatically hook into custom OEM additions to the legacy HAL.
So there's likely nothing you can do here to enable these features in your own app; Motorola would have to update their entire camera stack to expose a modern camera HAL for camera2 to work better.
I would like to disable the Camera on Android devices(Ignoring rooted devices). So far successfully using Android device administration to disable Camera. However, camera in containers such as Android for Work is able to bypass the policy (Samsung Secure Folder as well, but that can be disabled using KNOX). Are there other ways to enforce disable camera other then device administration?
For Samsung devices, cameras can be disabled entirely using KNOX. But other android devices such as Sony and LG does not have such capability. Does this mean there are no way to enforce camera disable?
I'm wondering if the Sony Camera API has parts that are only supported by certain versions of Android.
I have the latest firmware (1.04) on my a6500 and running Android 7 on LineageOS (successor of CyanogenMod) for the Samsung S5 (KLTE version). This is what I get in my Play Memories app:
The shutter button works and images download to the phone. But that's it.
Additionally, when I use another app called DSLRDashboard, the settings show up and can be changed on the app, but they don't get changed or applied on the camera, and this is in full manual mode on the camera. Other modes don't work either.
What could be causing this? What would need to be added into a 3rd party ROM like LineageOS to get this working?
Really hoping that the official Sony developers that roam this site will be able to chime in.
So, a bit of a snafu on my part.
It's not enough to update just the firmware on the Sony camera. The Remote Control app installed in the camera must also be updated as well, which means hooking the camera up to WiFi and downloading the updates for that app. With that done, all the settings appear in the phone app and can the changed.
I am using Camera2 to turn on the Flash Light on my Android phone with the following :
camManager.setTorchMode(cameraId, true);
But the thing is it's really slow (like half a second to open), compared to the iOS flashlight. I can't find any instantaneous flashlight, is it a hardware issue..?
Thanks in advance!
It's a hardware issue.
If the underlying hardware directly supports a enable-torch call at the HAL (hardware abstraction layer) interface, turning the flash on and off is very fast.
But if it doesn't, the Android OS has to actually open a camera device and turn on the flash via the full camera API. And unfortunately, powering on and off the camera is not a quick (or power-efficient) operation.
The needed HAL interfaces for this were added in Android 6.0 along with the setTorchMode API, but since the backwards compatibility code exists in the OS, not all manufacturers have added the necessary HAL implementation for fast flash control.
Can I emulate camera flash with Android emulator? I wasn't able to find anything flash-related in the settings.
Flash is manipulated via camera object by setting flash mode before taking picture
or preview. Emulator will allow you to do this. But I found flash behaviour extremely inconsistent across different devices.
Real camera applications use undocumented native apis which are specific for phone and camera models.