Please select Into the mobile phone version | Continue to access the computer ver.
[Resolved] Separate Mobile SDK and Sample App
430 2 1-28 12:58
Uploading and Loding Picture ...(0/1)
o(^-^)o
mikeydoo
lvl.4
United States
Offline

Hi

In downloading the Mobile SDK

https://github.com/dji-sdk/Mobile-SDK-Android

it comes with Sample Code.

How can I extract the SDK only? If I don't need to do this, how do I use the SDK within it while using Android Studio 3.3 (this is appears to quite different that 3.0 which is used in the directions).

I am going through this Android exercise:
http://developer.dji.com/mobile-sdk/documentation/application-development-workflow/workflow-integrate.html#android-studio-project-integration


Thanks...


1-28 12:58
Use props
mikeydoo
lvl.4
United States
Offline

Figured it out. It's a Gradle thing. Going through the introductory exercise, it steps through the setup of Gradle (the preferred build system for Android now), Problem is, the tutorial lacks the necessary setup for the Classes used in the tutorial.

Tutorial is here:
https://developer.dji.com/mobile ... project-integration

The additions that need to be added to MainActivity.java to get it to work are:
import android.Manifest;
import android.os.Build;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.os.Handler;
import java.util.List;
import java.util.concurrent.atomic.AtomicBoolean;
import android.support.annotation.NonNull;
import android.os.Looper;
import android.support.v4.content.ContextCompat;
import android.content.pm.PackageManager;
import android.support.v4.app.ActivityCompat;
import android.os.AsyncTask;
import android.content.Intent;
import android.widget.Toast;
import java.util.ArrayList;
import android.util.Log;

import dji.sdk.base.BaseProduct;
import         dji.sdk.sdkmanager.DJISDKManager;
import dji.common.error.DJIError;
import dji.sdk.base.BaseComponent;
import dji.common.error.DJISDKError;

Once I tracked these down, the necessary dji elements are pulled through the use of Gradle the first time it is ran. I was able to then download it to my Samsung Galaxy S2 and it ran as expected. So now, next step is to start adding SDK elements to talk to the quads
1-29 10:38
Use props
mikeydoo
lvl.4
United States
Offline

mikeydoo Posted at 1-29 10:38
Figured it out. It's a Gradle thing. Going through the introductory exercise, it steps through the setup of Gradle (the preferred build system for Android now), Problem is, the tutorial lacks the necessary setup for the Classes used in the tutorial.

Tutorial is here:


Oh, one more thing, there is no need for the Sample App, Gradle does it all for you...
1-29 10:39
Use props
Advanced
You need to log in before you can reply Login | Register now

Credit Rules