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
64 stars 81 forks source link

No getProductInstance() and getCameraInstance() #18

Open adityajain07 opened 7 years ago

adityajain07 commented 7 years ago

capture

There is no getProductInstance() and getCameraInstance() defined in MainActivity.Java.

So one will need to add below in Mainactivity.java: public static synchronized DJIBaseProduct getProductInstance() { if (null == mProduct) { mProduct = DJISDKManager.getInstance().getDJIProduct(); } return mProduct; }

public DJICamera getCameraInstance() {
    return (DJICamera)this.mComponentMap.get(DJIBaseProduct.DJIComponentKey.Camera);
}

PS: Please let me know, if I am wrong anywhere :)

oliverou commented 7 years ago

Hi @adityajain07 , these two methods have been defined in the FPVDemoApplication already, you can use them directly as shown in the sample code. Why you need to define them again?