Skip to content

Commit

Permalink
Added code for beta release 4 (#12)
Browse files Browse the repository at this point in the history
* Added code for beta release 4
  • Loading branch information
siddutgikar authored Jul 31, 2020
1 parent 356c73c commit 38675c4
Show file tree
Hide file tree
Showing 638 changed files with 20,213 additions and 4,715 deletions.
7 changes: 4 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ sudo: required
env:
global:
- ANDROID_API_LEVEL=29
- ANDROID_BUILD_TOOLS_VERSION=29.0.1
- ANDROID_BUILD_TOOLS_VERSION=29.0.3
- ANDROID_ABI=armeabi-v7a

android:
Expand All @@ -21,7 +21,8 @@ android:
before_install:
- touch $HOME/.android/repositories.cfg
- yes | sdkmanager "platforms;android-29"
- yes | sdkmanager "build-tools;29.0.1"
- yes | sdkmanager "build-tools;29.0.3"


before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
Expand All @@ -41,4 +42,4 @@ script:
- ./gradlew test

after_success:
- bash <(curl -s https://codecov.io/bash)
- bash <(curl -s https://codecov.io/bash)
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,13 @@ You can find the UX SDK documentation on the [wiki](https://github.com/dji-sdk/M

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 [email protected]. We recommend frequently checking the Github repositories for changes and new releases.
You can also post questions, keep up to date on DJI developer news and contribute to the community by visiting [DJI's Developer Forum](https://forum.dji.com/forum-139-1.html?from=developer)

## License

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

## Future Plans

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 3 version makes available.
Our long-term plan is for this framework to reach feature parity with the UX SDK 4.12 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***.
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 4 version makes available.
Our long-term plan is for this framework to reach feature parity with the UX SDK 4.13 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***.
7 changes: 4 additions & 3 deletions android-uxsdk-beta-cameracore/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
* 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.
*
*/

apply plugin: 'com.android.library'
Expand All @@ -28,7 +29,7 @@ android {
abortOnError = false
}
compileSdkVersion 29
buildToolsVersion "29.0.1"
buildToolsVersion "29.0.3"
publishNonDefault true
resourcePrefix "uxsdk_"
defaultConfig {
Expand Down Expand Up @@ -68,7 +69,7 @@ android {
dependencies {
api project(path: ':android-uxsdk-beta-core')

implementation ('com.dji:dji-sdk:4.12', {
implementation ('com.dji:dji-sdk:4.13', {
/**
* Comment the "library-anti-distortion" if your app needs Anti Distortion for Mavic 2 Pro
* and Mavic 2 Zoom.
Expand All @@ -80,7 +81,7 @@ dependencies {
exclude module: 'library-anti-distortion'
exclude module: 'fly-safe-database'
})
compileOnly ('com.dji:dji-sdk-provided:4.12')
compileOnly ('com.dji:dji-sdk-provided:4.13')

implementation 'androidx.multidex:multidex:2.0.0'
implementation 'androidx.appcompat:appcompat:1.0.0'
Expand Down
21 changes: 21 additions & 0 deletions android-uxsdk-beta-cameracore/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}

# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
2 changes: 1 addition & 1 deletion android-uxsdk-beta-cameracore/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@
~ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
~ SOFTWARE.
~
~
-->

<manifest package="dji.ux.beta.cameracore" />
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
* 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.
*
*/

package dji.ux.beta.cameracore.ui;
Expand Down Expand Up @@ -124,6 +125,17 @@ protected void onDraw(Canvas canvas) {
canvas.drawArc(boundaries, 0, 360, false, paint);
}

public void setRingColor(@ColorInt int color) {
ringColor = color;
paint.setColor(color);
initProgressGradient(width, height);
invalidate();
}

public boolean isIndeterminate() {
return indeterminate;
}

public void setIndeterminate(boolean indeterminate) {
if (indeterminate == this.indeterminate) return;

Expand All @@ -137,17 +149,6 @@ public void setIndeterminate(boolean indeterminate) {
}
}

public void setRingColor(@ColorInt int color) {
ringColor = color;
paint.setColor(color);
initProgressGradient(width, height);
invalidate();
}

public boolean isIndeterminate() {
return indeterminate;
}

private void initProgressGradient(int w, int h) {
progressGradient = null;
float cx = w / 2f;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
* 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.
*
*/

package dji.ux.beta.cameracore.util;
Expand Down Expand Up @@ -155,6 +156,23 @@ public enum ShutterSoundCount {
this.value = value;
}

/**
* Returns the enum constant of this type with the input integer value.
*
* @param value The input integer value
* @return The enum constant of this type
*/
public static ShutterSoundCount find(int value) {
ShutterSoundCount result = UNKNOWN;
for (int i = 0; i < values().length; i++) {
if (values()[i]._equals(value)) {
result = values()[i];
break;
}
}
return result;
}

/**
* Returns the real value of an enum value.
*
Expand All @@ -174,23 +192,6 @@ private boolean _equals(int b) {
return value == b;
}

/**
* Returns the enum constant of this type with the input integer value.
*
* @param value The input integer value
* @return The enum constant of this type
*/
public static ShutterSoundCount find(int value) {
ShutterSoundCount result = UNKNOWN;
for (int i = 0; i < values().length; i++) {
if (values()[i]._equals(value)) {
result = values()[i];
break;
}
}
return result;
}

}
}

Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
* 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.
*
*/

package dji.ux.beta.cameracore.util;
Expand Down Expand Up @@ -97,18 +98,15 @@ public static int getPhotoModeImgResId(final int mode, final int value) {
} else if (PhotoPanoramaMode.PANORAMA_MODE_3X3.value() == value) {
return R.drawable.uxsdk_ic_photo_mode_pano_3x3;
} else if (PhotoPanoramaMode.PANORAMA_MODE_SUPER_RESOLUTION.value() == value) {
//TODO add correct image
return R.drawable.uxsdk_ic_photo_mode_nor;
} else if (PhotoPanoramaMode.PANORAMA_MODE_SPHERE.value() == value) {
return R.drawable.uxsdk_ic_photo_mode_pano_sphere;
} else {
return R.drawable.uxsdk_ic_photo_mode_pano_180;
}
} else if (ShootPhotoMode.EHDR.value() == mode) {
//TODO add correct image
return R.drawable.uxsdk_ic_photo_mode_nor;
} else if (ShootPhotoMode.HYPER_LIGHT.value() == mode) {
//TODO add correct image
return R.drawable.uxsdk_ic_photo_mode_nor;
} else {
return R.drawable.uxsdk_ic_photo_mode_nor;
Expand Down
Loading

0 comments on commit 38675c4

Please sign in to comment.