Skip to content

Commit

Permalink
adding support for DJI Mini, Mini 2, Mini SE
Browse files Browse the repository at this point in the history
  • Loading branch information
roguestarslade committed Dec 28, 2022
1 parent 05a5043 commit fe6fa10
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 4 deletions.
6 changes: 3 additions & 3 deletions android-videostreamdecodingsample/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ android {

defaultConfig {
applicationId "com.dji.videostreamdecodingsample"
minSdkVersion 19
minSdkVersion 21
targetSdkVersion 30
multiDexEnabled true
ndk {
Expand Down Expand Up @@ -80,7 +80,7 @@ android {
dependencies {
implementation 'androidx.multidex:multidex:2.0.0'
implementation 'com.squareup:otto:1.3.8'
implementation('com.dji:dji-sdk:4.15.1', {
implementation('com.dji:dji-sdk:4.16.4', {
/**
* Uncomment the "library-anti-distortion" if your app does not need Anti Distortion for Mavic 2 Pro and Mavic 2 Zoom.
* Uncomment the "fly-safe-database" if you need database for release, or we will download it when DJISDKManager.getInstance().registerApp
Expand All @@ -90,7 +90,7 @@ dependencies {
exclude module: 'library-anti-distortion'
//exclude module: 'fly-safe-database'
})
compileOnly 'com.dji:dji-sdk-provided:4.15.1'
compileOnly 'com.dji:dji-sdk-provided:4.16.4'

implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.core:core:1.3.2'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

<meta-data
android:name="com.dji.sdk.API_KEY"
android:value="Please enter your App Key here."/>
android:value=""/>

<activity
android:name=".ConnectionActivity"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -485,6 +485,25 @@ public int getIframeRawId(Model pModel, int width) {
case MAVIC_2_ENTERPRISE_ADVANCED:
break;

case MAVIC_MINI:
case DJI_MINI_SE:
case DJI_MINI_2:
switch (width) {
case 1280:
iframeId = dji.midware.R.raw.iframe_1280x720_wm160;
DJILog.i(TAG, "Selected Iframe=iframe_1280x720_wm160");
break;
case 960:
iframeId = dji.midware.R.raw.iframe_960x720_wm160;
DJILog.i(TAG, "Selected Iframe=iframe_960x720_wm160");
break;
}
if (iframeId == -1 && height == 1080) {
iframeId = dji.midware.R.raw.dji1080gdriframe;
DJILog.i(TAG, "Selected Iframe=iframe_1080p_wm160");
}
break;

default: //for P3P, Inspire1, etc/
iframeId = R.raw.iframe_1280x720_ins;
break;
Expand Down

0 comments on commit fe6fa10

Please sign in to comment.