ARDeviceController.java : Where is it


#1

Product: [Bebop/Bebop2]
Product version: [X.X.X]
SDK version: [X.X.X]
Use of libARController: [YES/NO] (Only for ARSDK)
SDK platform: [iOS/Android/Unix/Python…]
Reproductible with the official app: [YES/NO/Not tried]

When investigating parrot bebop sdk (in https://github.com/Parrot-Developers) I’ve seen a lot of references to ARDeviceController. But I cannot find such a java class. Maybe somebody know were is it? Because many classes create objects (or reference to objects) with ARDeviceController type.

PS Also in https://developer.parrot.com/docs/SDK3/#discover-the-drones link “strarted” references to another topic, not “#start_device_controller”. Maybe some peace of this site is missing?


#2

Hi,

You won’t find the ARDeviceController.java source code on github, because this file is generated at build time.

If you use the prebuilt SDK, the class will be available in the provided AAR. This is the easiest way to include the SDK in your app, as it does not require you to download all the required build tools.

If you build the SDK locally, the generated files will be located in the <SDK>/out/arsdk-android/gradle/libARController/generated/arsdk/gen/JNI/java/com/parrot/arsdk/arcontroller folder.

Regards,
Nicolas.


#3

Nicolas, thanks for the answer.
I’ve build the SDK locally, but folder /out/arsdk-android/gradle/ didn’t appear ( while /out/arsdk-android/ appeared, with inner folders: arm64-v8a,armeabi,armeabi-v7a, jni, mips, x86). Where should I find ARDeviceController.java (or library with this class)?

If I understand correctly, for using prebuild SDK I should run ./build.sh -p arsdk-native -t build-sdk -j (I did it, and in folder /out appeared folder arsdk-native with inner folders: build, build-host, staging, staging-host). Where is located native libraries to import them in java (in order not to throw exception with java.library.path)?


#5

Hi,

In order to use the prebuilt SDK, you just have to add a few lines into your app build.gradle file (see SDK Doc). Gradle will then automatically download the SDK and embed it into your app so you can use it.
There is no need to build the SDK yourself.

Regards,
Nicolas.


#6

Nicolas, thank you for the answer. I’m new to gradle (maybe you know good guide for Eclipse Buildship plugin for Gradle) and I have a question again. I’ve build a gradle project jar (build.gradle was the same as mentioned in SDK doc). The build was successful. If I understand correctly, now I should add this gradle project jar into build path as an external jar. I’ve modified build path in eclipse, adding the gradle project jar, but command ARSDK.loadSDKLibs(); is underlining and eclipse is writing ‘ARSK cannot be resolved’ and not offering any import. Where I’m wrong?


#7

My build.gradle file looks like:
apply plugin: ‘java-library’
apply plugin: ‘eclipse’

repositories {
maven { url “https://maven.google.com” }
jcenter()
google()
}

dependencies {
compile fileTree(dir: ‘libs’, include: [’*.jar’])
testCompile ‘junit:junit:4.12’
compile ‘com.android.support:appcompat-v7:24.2.0’
compile ‘com.parrot:arsdk:3.13.1’
// This dependency is exported to consumers, that is to say found on their compile classpath.
api ‘org.apache.commons:commons-math3:3.6.1’
implementation ‘com.google.guava:guava:23.0’
testImplementation ‘junit:junit:4.12’
}