Skip to content

Commit

Permalink
Merge pull request #2 from dji-sdk/adding-beta2-code
Browse files Browse the repository at this point in the history
Adding beta 2 code
  • Loading branch information
dji-dev committed Oct 19, 2019
2 parents a40b771 + 17faff5 commit 561cc4e
Show file tree
Hide file tree
Showing 301 changed files with 25,231 additions and 1,880 deletions.
7 changes: 7 additions & 0 deletions LICENSE.txt
Expand Up @@ -19,3 +19,10 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

====================================================================================

Mobile-UXSDK-Beta-Android uses several unmodified libraries which are listed along
with their licenses in the `dependencyLicenses.txt` file.

====================================================================================
10 changes: 6 additions & 4 deletions README.md
Expand Up @@ -4,7 +4,7 @@

The DJI UX SDK speeds up development time by providing UI elements for all core functionalities, and by using it in conjunction with the [DJI Mobile SDK](https://developer.dji.com/mobile-sdk/) you can create a customized mobile app to unlock the full potential of your DJI aerial platform. Using the default UX SDK, an application can be created with no additional lines of code; you can also pick and choose which elements you want to use for maximum UI flexibility.

With the UX SDK 5 Beta 1 version we are introducing an easy way to customize all the UI elements, as well as extend the base classes to build your own custom widgets. For more details, see the [UX SDK 5.0 overview](https://github.com/dji-sdk/Mobile-UXSDK-Beta-Android/wiki/UX-SDK-5.0-Overview).
With the UX SDK 5.0 version we are introducing an easy way to customize all the UI elements, as well as extend the base classes to build your own custom widgets. For more details, see the [UX SDK 5.0 overview](https://github.com/dji-sdk/Mobile-UXSDK-Beta-Android/wiki/UX-SDK-5.0-Overview).

Check out our sample app code in this repository with instructions on how to get started [here](https://github.com/dji-sdk/Mobile-UXSDK-Beta-Android/wiki/Sample-Application-Tutorial).

Expand All @@ -23,12 +23,14 @@ You can find the UX SDK documentation on the [wiki](https://github.com/dji-sdk/M

## How to Contribute

As always, the DJI Dev Team is committed to improving your developer experience. Please follow our guidelines on the [How to Contribute](https://github.com/dji-sdk/Mobile-UXSDK-Beta-Android/wiki/How-to-Contribute) page on our wiki for filling out any bugs or feature requests, or contributing to the code base. If you have any other questions, please send an email to dev@dji.com. We recommend frequently checking the Github repositories for changes and new releases.
As always, the DJI Dev Team is committed to improving your developer experience. Please follow our guidelines on the [How to Contribute](https://github.com/dji-sdk/Mobile-UXSDK-Beta-Android/wiki/How-to-Contribute) page on our wiki for filling out any bugs or feature requests, or contributing to the code base.
If you have any other questions, please send an email to dev@dji.com. We recommend frequently checking the Github repositories for changes and new releases.

## License

Mobile-UXSDK-Beta-Android is available under the the MIT license. Please see the `LICENSE.txt` file for more info.

## Future Plans
This Beta 1 release only contains a small subset of UX SDK elements. We are eager to give you a sneak peek, and are very interested in receiving your feedback and suggestions. Please refer to the wiki or the release notes for the full list of elements that the Beta 1 version makes available.

Our long-term plan is for this framework to reach feature parity with the UX SDK 4.10 release. The core team is currently working on porting the remaining widgets and other APIs to the new architecture and we will open source them in additional future Beta releases as they are completed. We welcome your feedback on the architecture and your ideas for addional widgets, including those not included in prior UX SDK releases, as well as your contributions and PRs for any ***currently open-sourced features***.
We are eager to give you a sneak peek, and are very interested in receiving your feedback and suggestions. Please refer to the wiki or the release notes for the full list of elements that the Beta 2 version makes available.
Our long-term plan is for this framework to reach feature parity with the UX SDK 4.11 release. The core team is currently working on porting the remaining widgets and other APIs to the new architecture and we will open source them in additional future Beta releases as they are completed. We welcome your feedback on the architecture and your ideas for additional widgets, including those not included in prior UX SDK releases, as well as your contributions and PRs for any ***currently open-sourced features***.
2 changes: 1 addition & 1 deletion android-uxsdk-beta-sample/.gitignore
@@ -1,2 +1,2 @@
/build

/src/main/res/values/keystrings.xml
56 changes: 36 additions & 20 deletions android-uxsdk-beta-sample/build.gradle
Expand Up @@ -23,11 +23,12 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 27
compileSdkVersion 28
useLibrary 'org.apache.http.legacy'
defaultConfig {
applicationId "com.dji.ux.beta.sample"
minSdkVersion 16
targetSdkVersion 27
targetSdkVersion 28
multiDexEnabled true
vectorDrawables.useSupportLibrary = true
ndk {
Expand Down Expand Up @@ -61,6 +62,10 @@ android {
doNotStrip "*/*/libDJIFlySafeCore.so"
doNotStrip "*/*/libdjifs_jni.so"
doNotStrip "*/*/libsfjni.so"
doNotStrip "*/*/libDJICommonJNI.so"
doNotStrip "*/*/libDJICSDKCommon.so"
doNotStrip "*/*/libDJIUpgradeCore.so"
doNotStrip "*/*/libDJIUpgradeJNI.so"

pickFirst 'lib/*/libstlport_shared.so'
pickFirst 'lib/*/libRoadLineRebuildAPI.so'
Expand All @@ -78,35 +83,46 @@ android {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
buildToolsVersion = '28.0.3'
configurations.all {
resolutionStrategy.force 'com.android.support:support-annotations:27.0.0'
}
}

dependencies {
implementation ('com.dji:dji-uxsdk:4.10')
implementation ('com.dji:dji-sdk:4.10', {
// Uncomment the following line if your app does not need Anti Distortion for
// Mavic 2 Pro and Mavic 2 Zoom. It will greatly reducing the size of the APK:
// exclude module: 'library-anti-distortion'
implementation ('com.dji:dji-uxsdk:4.11')
implementation ('com.dji:dji-sdk:4.11', {
/**
* 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 your need smaller apk for release, we will download it when DJISDKManager.getInstance().registerApp
* is called, and it won't register success without fly-safe-database.
* Both will greatly reducing the size of the APK.
*/
exclude module: 'library-anti-distortion'
exclude module: 'fly-safe-database'
})
compileOnly ('com.dji:dji-sdk-provided:4.10')
compileOnly ('com.dji:dji-sdk-provided:4.11')

implementation 'com.android.support:appcompat-v7:27.0.0'
implementation 'com.android.support:support-v4:27.0.0'
implementation 'com.android.support:recyclerview-v7:27.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
implementation 'com.android.support:support-annotations:27.0.0'
implementation 'androidx.appcompat:appcompat:1.0.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.recyclerview:recyclerview:1.0.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'androidx.annotation:annotation:1.0.0'
implementation 'androidx.core:core:1.0.0'

implementation 'com.jakewharton:butterknife:8.8.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
implementation 'com.amap.api:map2d:5.2.0'
implementation 'com.jakewharton:butterknife:10.0.0'
annotationProcessor 'com.jakewharton:butterknife-compiler:10.0.0'

//AMaps
implementation 'com.amap.api:3dmap:5.5.0'
implementation 'com.amap.api:search:5.5.0'
implementation 'com.amap.api:location:3.6.1'
//HERE maps
implementation files('libs/HERE-sdk-3.8.0.aar')

implementation project(":android-uxsdk-beta")
implementation 'android.arch.lifecycle:extensions:1.1.0'

implementation 'androidx.lifecycle:lifecycle-extensions:2.0.0-rc01'
api 'com.google.android.gms:play-services-base:16.0.0'
api 'com.google.android.gms:play-services-maps:16.0.0'
api 'com.mapbox.mapboxsdk:mapbox-android-sdk:5.5.1'
Expand All @@ -117,8 +133,8 @@ dependencies {
testImplementation 'junit:junit:4.12'
testImplementation 'org.mockito:mockito-core:2.18.3'
androidTestImplementation 'org.mockito:mockito-android:2.6.2'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
androidTestImplementation 'com.android.support.test:rules:1.0.2'
androidTestImplementation 'androidx.test:runner:1.1.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'
androidTestImplementation 'androidx.test:rules:1.1.0'
testImplementation 'org.robolectric:robolectric:3.8'
}
39 changes: 18 additions & 21 deletions android-uxsdk-beta-sample/src/main/AndroidManifest.xml
Expand Up @@ -19,32 +19,28 @@
~ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
~ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
~ SOFTWARE.
~
~
-->

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.dji.ux.beta.sample"
tools:ignore="GoogleAppIndexingWarning">
package="com.dji.ux.beta.sample">

<!-- DJI SDK needs these permissions -->
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />

<uses-feature android:name="android.hardware.camera" />
<uses-feature android:name="android.hardware.camera.autofocus" />
<uses-feature
android:name="android.hardware.usb.host"
android:required="false" />
Expand All @@ -59,9 +55,13 @@
android:label="@string/dji_ux_sample_app_name"
tools:replace="android:label"
android:supportsRtl="true"
android:theme="@style/AppTheme">
android:theme="@style/AppTheme"
tools:ignore="AllowBackup,GoogleAppIndexingWarning">

<!-- DJI SDK -->
<uses-library android:name="org.apache.http.legacy" android:required="false"/>
<uses-library android:name="com.android.future.usb.accessory" />

<meta-data
android:name="com.dji.sdk.API_KEY"
android:value="@string/dji_ux_sample_dji_sdk_api_key" />
Expand Down Expand Up @@ -97,7 +97,7 @@
android:value="@string/dji_ux_sample_amaps_api_key" />

<activity
android:name="com.dji.ux.beta.sample.MainActivity"
android:name=".MainActivity"
android:launchMode="singleTop"
android:screenOrientation="sensorLandscape">
<intent-filter>
Expand All @@ -108,17 +108,23 @@
</activity>

<activity
android:name="com.dji.ux.beta.sample.widgetlist.WidgetsActivity"
android:name=".widgetlist.WidgetsActivity"
android:screenOrientation="sensorLandscape" />

<activity
android:name="com.dji.ux.beta.sample.MapWidgetActivity"
android:name=".DefaultLayoutActivity"
android:screenOrientation="sensorLandscape"
android:theme="@style/DefaultLayoutTheme" />

<activity
android:name=".MapWidgetActivity"
android:label="Map Widget"
android:launchMode="singleTop"
android:screenOrientation="sensorLandscape"
android:theme="@style/MapTheme" />

<activity
android:name="com.dji.ux.beta.sample.DJIConnectionControlActivity"
android:name=".DJIConnectionControlActivity"
android:theme="@android:style/Theme.Translucent">
<intent-filter>
<action android:name="android.hardware.usb.action.USB_ACCESSORY_ATTACHED" />
Expand All @@ -128,15 +134,6 @@
android:name="android.hardware.usb.action.USB_ACCESSORY_ATTACHED"
android:resource="@xml/accessory_filter" />
</activity>

<receiver
android:name="com.dji.ux.beta.sample.OnDJIUSBAttachedReceiver"
android:enabled="true"
android:exported="true">
<intent-filter>
<action android:name="com.dji.ux.beta.sample.ACCESSORY_ATTACHED" />
</intent-filter>
</receiver>
</application>

</manifest>

0 comments on commit 561cc4e

Please sign in to comment.