Can I emulate camera flash with Android emulator? - android

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.

Related

connecting USB UVC camera with CameraX

I'm trying to make an android app that preview a stream from an external USB camera.
I can see the camera using UsbManager but for some reason, the CameraX doesn't list it in the connected camera list.
Does anyone have an idea how to fix this?
Also, I've downloaded for my android device some random app that allows streaming from a USB camera and it worked so I don't think it is a problem that the camera isn't compatible to work with an android device or something like that.
afaik CameraX doesn't support UVC cameras yet/still and Android doesn't provide a driver... for Android system UVC camera is just "some USB" device (as you noticed - handled by UsbManager) and you need to provide a driver by self...
so you can use some other libraries for getting UVC video, probably currently best is AndroidUSBCamera by jiangdongguo

moto z2 play camera2 wrong capabilities?

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.

Android device administration not enforcing for apps in Android for work

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?

Flashlight crashes systems Camera App

I am making a Flashlight app, currently its widget.
I was wondering how would I emulate functionality of samsungs assistive light widget (http://www.youtube.com/watch?v=PYR9jqo0vvc&feature=player_embedded#!)?
If I turn my light on, the camera app is not going to work, however with this widget, samsung made it somehow work. I have no idea at all, for all I know Camera.open() locks the camera to the process, so Camera app cannot access it.
Thanks.
The standard Android camera API does not allow for setting the flash to torch mode, and then allowing some other application to use the camera. If the Flashlight app does not release the camera, then the standard camera app cannot work. If the Flashlight app does release the camera, then the flash will turn off.
Samsung must have extended the Android APIs with a custom feature to enable/disable the torch mode without requiring locking the camera. If they wish, they could document this additional capability, but presumably the added APIs only exist on the Galaxy S3 or other similar Samsung devices; it would not allow you to write code that works on all Android devices.

Accessing the mobile camera of an Android tablet using flash

A while ago I developed a flash app that takes pictures from the users webcam, I recently bought a android tablet device (flash capable), but the flash app do not find the camera of the tablet, any way I can modify my flash app in order to "see" the tablet's camera?
are you using Flash of Flash Builder?
For Flash Builder: if you want to access a mobile camera, you need flash builder 4.5 at least. There you can call for CameraUI instead of Camera. I don't know if this is actually a feature of Flash Builder or if it is also available in Flash, since i am not using Flash Builder 4.5 just yet.
look at this link to find a coded example of CameraUI and the implementation of it.

Categories

Resources