Skip to content

Commit

Permalink
update 4.16.1
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel.chen committed Mar 18, 2022
1 parent eded3b7 commit b1b88da
Show file tree
Hide file tree
Showing 23 changed files with 961 additions and 923 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,21 @@ Declare dependency via Maven:
<dependency>
<groupId>com.dji</groupId>
<artifactId>dji-sdk</artifactId>
<version>4.16</version>
<version>4.16.1</version>
</dependency>

<dependency>
<groupId>com.dji</groupId>
<artifactId>dji-sdk-provided</artifactId>
<version>4.16</version>
<version>4.16.1</version>
</dependency>
~~~

or Gradle:

~~~groovy
compile 'com.dji:dji-sdk:4.16'
provided 'com.dji:dji-sdk-provided:4.16'
compile 'com.dji:dji-sdk:4.16.1'
provided 'com.dji:dji-sdk-provided:4.16.1'
~~~

For further detail on how to integrate the DJI Android SDK into your Android Studio project, please check the [Integrate SDK into Application](http://developer.dji.com/mobile-sdk/documentation/application-development-workflow/workflow-integrate.html#import-maven-dependency) tutorial.
Expand Down
12 changes: 6 additions & 6 deletions Sample Code/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ repositories {
}

android {
compileSdkVersion 30
buildToolsVersion '30.0.2'
compileSdkVersion 31
buildToolsVersion '31.0.0'
useLibrary 'org.apache.http.legacy'

defaultConfig {
applicationId "com.dji.sdk.sample"
minSdkVersion 23
targetSdkVersion 30
targetSdkVersion 31
multiDexEnabled true
versionCode 1
ndk {
Expand Down Expand Up @@ -77,7 +77,7 @@ android {
dependencies {
implementation 'androidx.multidex:multidex:2.0.0'
implementation 'com.squareup:otto:1.3.8'
implementation('com.dji:dji-sdk:4.16', {
implementation('com.dji:dji-sdk:4.16.1', {
/**
* 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 @@ -87,7 +87,7 @@ dependencies {
exclude module: 'library-anti-distortion'
//exclude module: 'fly-safe-database'
})
compileOnly 'com.dji:dji-sdk-provided:4.16'
compileOnly 'com.dji:dji-sdk-provided:4.16.1'

implementation 'androidx.appcompat:appcompat:1.0.0'
implementation 'androidx.core:core:1.0.0'
Expand Down Expand Up @@ -115,4 +115,4 @@ dependencies {
implementation 'com.davemorrissey.labs:subsampling-scale-image-view:3.10.0'
implementation 'io.reactivex.rxjava2:rxjava:2.2.4'
implementation 'io.reactivex.rxjava2:rxandroid:2.1.0'
}
}
4 changes: 3 additions & 1 deletion Sample Code/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
android:supportsRtl="true"
android:theme="@style/AppTheme"
android:extractNativeLibs="true"
tools:replace="label"
tools:ignore="AllowBackup,GoogleAppIndexingWarning">

<uses-library android:name="org.apache.http.legacy" android:required="false" />
Expand All @@ -55,7 +56,8 @@
android:screenOrientation="portrait"
android:launchMode="singleTop"
android:configChanges="orientation|keyboardHidden|screenSize"
android:theme="@style/AppTheme">
android:theme="@style/AppTheme"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,21 +26,13 @@

public class UTMISSActivity extends AppCompatActivity {

@BindView(R.id.txt_db_path)
TextView mTvDbPath;
@BindView(R.id.txt_status)
TextView mTvStatus;
@BindView(R.id.txt_info)
TextView mTvInfo;

@BindView(R.id.edt_token_key)
EditText mEdtTokenKey;
@BindView(R.id.edt_manufactureId)
EditText mEdtManufactureId;
@BindView(R.id.edt_uasId)
EditText mEdtUasId;

@BindView(R.id.btn_start)
Button mBtnInit;

String dbPath;
Expand All @@ -50,6 +42,17 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_utmiss);
ButterKnife.bind(this);
initUI();
}

private void initUI(){
mTvDbPath = findViewById(R.id.txt_db_path);
mTvStatus = findViewById(R.id.txt_status);
mTvInfo = findViewById(R.id.txt_info);
mEdtTokenKey = findViewById(R.id.edt_token_key);
mEdtManufactureId = findViewById(R.id.edt_manufactureId);
mEdtUasId = findViewById(R.id.edt_uasId);
mBtnInit = findViewById(R.id.btn_start);
init();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ public class MainContent extends RelativeLayout {
Manifest.permission.RECORD_AUDIO // Speaker accessory
};
private static final int REQUEST_PERMISSION_CODE = 12345;
private List<String> missingPermission = new ArrayList<>();
private AtomicBoolean isRegistrationInProgress = new AtomicBoolean(false);
private int lastProcess = -1;
private Handler mHander = new Handler();
Expand Down Expand Up @@ -465,6 +464,7 @@ public void onFailure(DJIError djiError) {
*/
private void checkAndRequestPermissions() {
// Check for permissions
List<String> missingPermission = new ArrayList<>();
for (String eachPermission : REQUIRED_PERMISSION_LIST) {
if (ContextCompat.checkSelfPermission(mContext, eachPermission) != PackageManager.PERMISSION_GRANTED) {
missingPermission.add(eachPermission);
Expand Down Expand Up @@ -665,7 +665,7 @@ public void onFailure(DJIError djiError) {
}
});
}
},1000);
},5000);
}

private void hideProcess(){
Expand Down
2 changes: 1 addition & 1 deletion docs/API Reference/BaseClasses/DJIBaseProduct.html

Large diffs are not rendered by default.

0 comments on commit b1b88da

Please sign in to comment.