0

On Android things that is running on Raspberry-Pi

I tried to check if the camera available.. And it return false.

I use a camera device with a usb plug.(Camera has a usb port that can connect to the board)

I already put these in the manifest

 <uses-feature android:name="android.hardware.camera" android:required="true" />
 <uses-permission android:name="android.permission.CAMERA" />

The code to check the camera

getApplication().getPackageManager().hasSystemFeature(PackageManager.FEATURE_CAMERA) // return false

I tried to access the camera with this...

Camera c = Camera.open() // return null

In the setting, there is a camera preview that allow us to see the video that is being captured from the camera and I can see it.

Now how can I access the camera?

EDIT

I tried using a camera with CSI-2 interface, but it still doesn't work.

O.Chounry
  • 304
  • 4
  • 16
  • Possible duplicate of [USB camera (not RPi camera) isn't working on Android Things Preview 2](https://stackoverflow.com/questions/42400687/usb-camera-not-rpi-camera-isnt-working-on-android-things-preview-2) – Andrii Omelchenko Sep 25 '19 at 10:40
  • nope... I tested it. it doesn't work – O.Chounry Sep 26 '19 at 01:31
  • It definitely works. Try this https://github.com/androidthings/doorbell or that https://github.com/BilalAndroidDev/AndroidThingsCamera or this https://github.com/harshithdwivedi/CameraDemoForAndroidThings as prototype. – Andrii Omelchenko Sep 26 '19 at 05:06

0 Answers0