question

fib25 avatar image
fib25 asked

Kindle Fire (1st Gen) and Unity - Unity thinks the Kindle Fire has a cam!?

Hi there. I have been working on porting our Unity game to the Kindle Fire. Unity has a method that returns an array of available camera devices. I have noticed that when built and run on the Kindle Fire (which has no camera), Unity's WebCamTexture.devices method returns 1 camera. A typical logcat of this is as shown: I/Unity ( 4158): WebcamTexture.devies: 1 I/Unity ( 4158): deviceName Camera 0 D/CameraHardwareStub( 1292): initHeapLocked: preview size=320x240 E/Camera ( 4158): Invalid range list string=null E/Unity ( 4158): Camera failed to open: null I/Unity ( 4158): webcamTexture.isPlaying: True As I would like to disable the camera feature in the game by detecting whether on not the device possesses a camera, this is problematic. I am quite sure that this is not a Unity API bug as the method only returns what the system thinks it has. It is evident to me that this is probably a bug. I'd like to know if anyone else has experienced this sort of behaviour either within Unity or perhaps when using the Android SDK PackageManager classes's hasSystemFeature() method and if so, is it intended? Thanks.
fire tablet
10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

fib25 avatar image
fib25 answered
I contacted the tech support team via the Contact Us form and got this in response. Running on the Kindle Fire this is what is returned > from the standard Android function "getSystemAvailableFeatures": > > 10-02 17:22:00.929: V/DUMP_FEATURES(22382): android.hardware.wifi > 10-02 17:22:00.929: V/DUMP_FEATURES(22382): android.hardware.touchscreen.multitouch.distinct > 10-02 17:22:00.929: V/DUMP_FEATURES(22382): android.hardware.touchscreen.multitouch > 10-02 17:22:00.929: V/DUMP_FEATURES(22382): android.hardware.sensor.accelerometer > 10-02 17:22:00.929: V/DUMP_FEATURES(22382): android.hardware.touchscreen > 10-02 17:22:00.929: V/DUMP_FEATURES(22382): android.software.live_wallpaper > 10-02 17:22:00.929: V/DUMP_FEATURES(22382): android.hardware.sensor.light This seems to indicate it is in fact a problem with Unity's API. I have filed a bug report to them and am awaiting to hear back (I somehow doubt they'll be as quick and the support team here). Just thought I'd update the post for anyone who might come across this.
10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Samuel@Amazon avatar image
Samuel@Amazon answered
Thanks for the update :)
10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

fib25 avatar image
fib25 answered
Last update. I received an e-mail from the Unity bug support team. They were able to reproduced the bug and have assigned it to their developers to fix. So it should be fixed in the next Unity update or so.
10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Samuel@Amazon avatar image
Samuel@Amazon answered
That's great to know. Thank you for following up on this.
10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.