DJI-Mobile-SDK-Tutorials / Android-FPVDemo

This demo shows how to create a simple FPV view and how to take photo and record video using DJI Mobile SDK.
MIT License
62 stars 81 forks source link

getCamera() returns null #34

Closed gduflo closed 5 years ago

gduflo commented 5 years ago

Hi, I am trying to apply this tutorial with a Matrice 210.

The RC well connects to the UAV, but on the view of the activity ConnectionActivity, no video is showing. After debugging, I noticed that the function FPVDemoApplication.getCameraInstance() returns null. It means that the method getCamera() called on mProduct in the class FPVDemoApplication returns null.

I don't understand why, and I therefore hope that you could help me.

Thanks for your help, Gabriel

gduflo commented 5 years ago

I found the solution. The camera already on the M210 cannot be returned by the method getCamera(). It has to be the camera that can be attached to the front of the UAV (position I). Then getCamera() well returns an instance of camera.