├── .gitignore ├── .gradle ├── 5.4.1 │ ├── executionHistory │ │ ├── executionHistory.bin │ │ └── executionHistory.lock │ ├── fileChanges │ │ └── last-build.bin │ ├── fileContent │ │ └── fileContent.lock │ ├── fileHashes │ │ ├── fileHashes.bin │ │ ├── fileHashes.lock │ │ └── resourceHashesCache.bin │ ├── gc.properties │ └── javaCompile │ │ ├── classAnalysis.bin │ │ ├── javaCompile.lock │ │ └── taskHistory.bin ├── buildOutputCleanup │ ├── buildOutputCleanup.lock │ ├── cache.properties │ └── outputFiles.bin └── vcs-1 │ └── gc.properties ├── .idea ├── .gitignore ├── caches │ └── build_file_checksums.ser ├── codeStyles │ └── Project.xml ├── gradle.xml ├── jarRepositories.xml ├── libraries │ ├── Gradle___libqxwz_release_v1_1_0__aar.xml │ ├── Gradle__com_android_support_animated_vector_drawable_25_3_1_aar.xml │ ├── Gradle__com_android_support_appcompat_v7_25_3_1_aar.xml │ ├── Gradle__com_android_support_constraint_constraint_layout_1_0_2_aar.xml │ ├── Gradle__com_android_support_multidex_1_0_1_aar.xml │ ├── Gradle__com_android_support_multidex_1_0_2_aar.xml │ ├── Gradle__com_android_support_recyclerview_v7_25_3_1_aar.xml │ ├── Gradle__com_android_support_support_compat_25_3_1_aar.xml │ ├── Gradle__com_android_support_support_core_ui_25_3_1_aar.xml │ ├── Gradle__com_android_support_support_core_utils_25_3_1_aar.xml │ ├── Gradle__com_android_support_support_fragment_25_3_1_aar.xml │ ├── Gradle__com_android_support_support_media_compat_25_3_1_aar.xml │ ├── Gradle__com_android_support_support_v4_25_3_1_aar.xml │ ├── Gradle__com_android_support_support_vector_drawable_25_3_1_aar.xml │ ├── Gradle__com_google_android_gms_play_services_base_10_2_0_aar.xml │ ├── Gradle__com_google_android_gms_play_services_basement_10_2_0_aar.xml │ ├── Gradle__com_google_android_gms_play_services_maps_10_2_0_aar.xml │ ├── Gradle__com_google_android_gms_play_services_tasks_10_2_0_aar.xml │ └── Gradle__io_reactivex_rxjava2_rxandroid_2_0_1_aar.xml ├── misc.xml ├── modules │ ├── AndroidSample.iml │ └── app │ │ └── app.iml └── vcs.xml ├── README.md ├── README_CN.md ├── app ├── .gitignore ├── build.gradle ├── libs │ ├── autel-sdk-release.aar │ └── libqxwz_release_v1.1.0.aar ├── platform.keystore ├── proguard-rules.pro └── src │ ├── androidTest │ └── java │ │ └── com │ │ └── autel │ │ └── sdk │ │ └── sdksample │ │ └── ExampleInstrumentedTest.java │ ├── main │ ├── AndroidManifest.xml │ ├── java │ │ └── com │ │ │ └── autel │ │ │ └── sdksample │ │ │ ├── ProductActivity.java │ │ │ ├── TestApplication.java │ │ │ ├── UsbBroadCastReceiver.java │ │ │ ├── base │ │ │ ├── BaseActivity.java │ │ │ ├── BatteryActivity.java │ │ │ ├── CodecActivity.java │ │ │ ├── CodecViewActivity.java │ │ │ ├── DspActivity.java │ │ │ ├── FlyControllerActivity.java │ │ │ ├── RemoteControllerActivity.java │ │ │ ├── adapter │ │ │ │ └── SelectorAdapter.java │ │ │ ├── album │ │ │ │ ├── AlbumActivity.java │ │ │ │ └── adapter │ │ │ │ │ ├── LocalVideoListAdapter.java │ │ │ │ │ └── MediaListAdapter.java │ │ │ ├── camera │ │ │ │ ├── CameraActivity.java │ │ │ │ └── fragment │ │ │ │ │ ├── CameraBaseFragment.java │ │ │ │ │ ├── CameraNotConnectFragment.java │ │ │ │ │ ├── CameraR12Fragment.java │ │ │ │ │ ├── CameraXB015Fragment.java │ │ │ │ │ ├── CameraXT701Fragment.java │ │ │ │ │ ├── CameraXT705Fragment.java │ │ │ │ │ ├── CameraXT706Fragment.java │ │ │ │ │ ├── CameraXT709Fragment.java │ │ │ │ │ └── adapter │ │ │ │ │ ├── AntiFlickerAdapter.java │ │ │ │ │ ├── AspectRatioAdapter.java │ │ │ │ │ ├── AutoExposureLockStateAdapter.java │ │ │ │ │ ├── BooleanTypeAdapter.java │ │ │ │ │ ├── CameraApertureAdapter.java │ │ │ │ │ ├── ColorStyleAdapter.java │ │ │ │ │ ├── ExposureModeAdapter.java │ │ │ │ │ ├── ExposureValueAdapter.java │ │ │ │ │ ├── FocusModeAdapter.java │ │ │ │ │ ├── ISOValueAdapter.java │ │ │ │ │ ├── IrColorStyleAdapter.java │ │ │ │ │ ├── ModelcAspectRatioAdapter.java │ │ │ │ │ ├── ModelcColorStyleAdapter.java │ │ │ │ │ ├── ModelcExposureModeAdapter.java │ │ │ │ │ ├── PIVModeAdapter.java │ │ │ │ │ ├── PanoramicTypeeAdapter.java │ │ │ │ │ ├── PhotoAEBCountAdapter.java │ │ │ │ │ ├── PhotoBurstAdapter.java │ │ │ │ │ ├── PhotoFormatAdapter.java │ │ │ │ │ ├── PhotoStyleAdapter.java │ │ │ │ │ ├── PhotoTimelapseIntervalAdapter.java │ │ │ │ │ ├── RealTimeResolutionAdapter.java │ │ │ │ │ ├── RtkCoordinateAdapter.java │ │ │ │ │ ├── ShutterSpeedAdapter.java │ │ │ │ │ ├── VideoEncodeAdapter.java │ │ │ │ │ ├── VideoFormatAdapter.java │ │ │ │ │ ├── VideoResolutionFpsAdapter.java │ │ │ │ │ ├── VideoSnapshotTimeIntervalAdapter.java │ │ │ │ │ ├── VideoStandardAdapter.java │ │ │ │ │ └── WhiteBalanceTypeAdapter.java │ │ │ ├── gimbal │ │ │ │ ├── GimbalActivity.java │ │ │ │ └── adapter │ │ │ │ │ ├── GimbalModeAdapter.java │ │ │ │ │ └── RollAdjustAdapter.java │ │ │ ├── mission │ │ │ │ ├── AMapMissionActivity.java │ │ │ │ ├── AutelLatLng.java │ │ │ │ ├── GMapMissionActivity.java │ │ │ │ ├── MapActivity.java │ │ │ │ ├── MapOperator.java │ │ │ │ ├── MapRectifyUtil.java │ │ │ │ ├── MissionActivity.java │ │ │ │ ├── MissionType.java │ │ │ │ ├── adapter │ │ │ │ │ ├── FollowFinishActionAdapter.java │ │ │ │ │ ├── OrbitFinishActionAdapter.java │ │ │ │ │ └── WaypointFinishActionAdapter.java │ │ │ │ ├── fragment │ │ │ │ │ ├── MissionFragment.java │ │ │ │ │ ├── MissionOperatorFragment.java │ │ │ │ │ ├── OrbitMissionFragment.java │ │ │ │ │ └── WaypointMissionFragment.java │ │ │ │ └── widget │ │ │ │ │ └── WaypointSettingDialog.java │ │ │ └── util │ │ │ │ ├── CameraFlirTest.java │ │ │ │ ├── CameraTestXb008.java │ │ │ │ └── FileUtils.java │ │ │ ├── evo │ │ │ ├── G2BatteryActivity.java │ │ │ ├── G2DspActivity.java │ │ │ ├── G2FlyControllerActivity.java │ │ │ ├── G2GimbalActivity.java │ │ │ ├── G2Layout.java │ │ │ ├── G2RemoteControllerActivity.java │ │ │ ├── adapter │ │ │ │ ├── BandModeAdapter.java │ │ │ │ ├── BandwidthAdapter.java │ │ │ │ ├── GimbalAxisAdapter.java │ │ │ │ ├── TransferModeAdapter.java │ │ │ │ └── VisualSettingSwitchBladeAdapter.java │ │ │ └── mission │ │ │ │ ├── adapter │ │ │ │ ├── EvoEntryDirectionAdapter.java │ │ │ │ ├── EvoHeadingDirectionAdapter.java │ │ │ │ ├── EvoRotateDirectionAdapter.java │ │ │ │ └── EvoWaypointFinishActionAdapter.java │ │ │ │ ├── bean │ │ │ │ ├── AdvancedItemEnum.java │ │ │ │ ├── AutelGPSLatLng.java │ │ │ │ ├── ListItemDecoration.java │ │ │ │ ├── MapConstant.java │ │ │ │ ├── MissionConstant.java │ │ │ │ ├── MissionFileBean.java │ │ │ │ ├── MissionOrbitdBean.java │ │ │ │ ├── MissionWaypointBean.java │ │ │ │ ├── OrbitAdvanceDataBean.java │ │ │ │ ├── PhoneGPS.java │ │ │ │ └── WaypointAdvanceDataBean.java │ │ │ │ ├── fragment │ │ │ │ ├── EvoFollowMissionFragment.java │ │ │ │ ├── EvoOrbitMissionFragment.java │ │ │ │ ├── EvoWaypointFragment.java │ │ │ │ ├── MapFragment.java │ │ │ │ └── OrbitFragment.java │ │ │ │ ├── util │ │ │ │ ├── AMapModel.java │ │ │ │ ├── AmapViewUtilImpl.java │ │ │ │ ├── AutelConfigManager.java │ │ │ │ ├── DistanceUtils.java │ │ │ │ ├── GMapModel.java │ │ │ │ ├── GmapViewUtilImpl.java │ │ │ │ ├── MapImageUtil.java │ │ │ │ ├── MapMarkerIconUtil.java │ │ │ │ ├── MapModelImpl.java │ │ │ │ ├── MapViewUtilFactory.java │ │ │ │ ├── MapViewUtilImpl.java │ │ │ │ ├── MathUtil.java │ │ │ │ ├── PolyUtil.java │ │ │ │ ├── SphericalUtil.java │ │ │ │ └── TransformUtils.java │ │ │ │ ├── view │ │ │ │ ├── FollowExecuteView.java │ │ │ │ ├── FollowStartView.java │ │ │ │ ├── OrbitDataSetView.java │ │ │ │ ├── OrbitExecuteView.java │ │ │ │ ├── OrbitPositionSetView.java │ │ │ │ ├── WaypointAllSelectView.java │ │ │ │ ├── WaypointCreateOrLoadView.java │ │ │ │ ├── WaypointExecuteView.java │ │ │ │ ├── WaypointLoadView.java │ │ │ │ └── WaypointSetView.java │ │ │ │ └── widge │ │ │ │ ├── AutelCustomGestureOverlayView.java │ │ │ │ ├── AutelRadioButton.java │ │ │ │ ├── AutelSegmentedGroup.java │ │ │ │ ├── GestureCallbacks.java │ │ │ │ ├── MissionDropSelectView.java │ │ │ │ ├── MissionDropViewAdapter.java │ │ │ │ ├── SwipeMenuLayout.java │ │ │ │ ├── VisualDialogToast.java │ │ │ │ └── WaypointLoadAdapter.java │ │ │ ├── evo2 │ │ │ ├── EVO2Layout.java │ │ │ ├── Evo2BatteryActivity.java │ │ │ ├── Evo2DspActivity.java │ │ │ ├── Evo2FlyControllerActivity.java │ │ │ ├── Evo2GimbalActivity.java │ │ │ ├── LivePushActivity.java │ │ │ └── mission │ │ │ │ ├── Evo2MissionActivity.java │ │ │ │ └── Evo2WayPointActivity.java │ │ │ ├── premium │ │ │ ├── XStarPremiumBatteryActivity.java │ │ │ ├── XStarPremiumDspActivity.java │ │ │ ├── XStarPremiumFlyControllerActivity.java │ │ │ ├── XStarPremiumGimbalActivity.java │ │ │ ├── XStarPremiumLayout.java │ │ │ └── XStarPremiumRemoteControllerActivity.java │ │ │ ├── rtk │ │ │ ├── Evo2RTKActivity.java │ │ │ └── RtkBaseActivity.java │ │ │ ├── util │ │ │ ├── CameraFlirTest.java │ │ │ ├── CameraTestXb008.java │ │ │ ├── FileUtils.java │ │ │ └── ThreadUtils.java │ │ │ ├── utils │ │ │ ├── EdgeBoxOverlay.kt │ │ │ └── TrackingUtils.kt │ │ │ └── xstar │ │ │ ├── XStarBatteryActivity.java │ │ │ ├── XStarDspActivity.java │ │ │ ├── XStarFlyControllerActivity.java │ │ │ ├── XStarGimbalActivity.java │ │ │ ├── XStarLayout.java │ │ │ ├── XStarRemoteControllerActivity.java │ │ │ └── mission │ │ │ ├── XStarFollowMissionFragment.java │ │ │ ├── XStarOrbitMissionFragment.java │ │ │ └── XStarWaypointFragment.java │ └── res │ │ ├── color │ │ └── text_click_background.xml │ │ ├── drawable │ │ ├── avoid_drawable_four.xml │ │ ├── avoid_drawable_one.xml │ │ ├── avoid_drawable_three.xml │ │ ├── avoid_drawable_two.xml │ │ ├── layer_list_seekbar_horizontal.xml │ │ ├── mission_bottom_bg.xml │ │ ├── mission_btn_bg.xml │ │ ├── mission_btn_bg_press.xml │ │ ├── mission_operator_show_bottom_bg.xml │ │ ├── mission_pop_bg.xml │ │ ├── mission_title_bg.xml │ │ ├── selector_mission_btn.xml │ │ ├── selector_mission_close_icon.xml │ │ ├── selector_seekbar_dot.xml │ │ ├── selector_text_black_white.xml │ │ ├── selector_white_gray.xml │ │ ├── shape_aircraft_setting_divider.xml │ │ ├── shape_gray_empty_progress.xml │ │ ├── shape_radio_checked.xml │ │ ├── shape_radio_unchecked.xml │ │ ├── shape_tracking_gray_bg.xml │ │ ├── shape_tracking_white_bg.xml │ │ ├── text_background.xml │ │ ├── text_pressed.xml │ │ ├── text_unpressed.xml │ │ └── waypoint_checkbox_icon.xml │ │ ├── layout │ │ ├── ac_album.xml │ │ ├── ac_avoid.xml │ │ ├── ac_base.xml │ │ ├── ac_base_battery.xml │ │ ├── ac_base_dsp.xml │ │ ├── ac_base_fc.xml │ │ ├── ac_base_gimbal.xml │ │ ├── ac_base_gimbal_items.xml │ │ ├── ac_camera.xml │ │ ├── ac_camera20.xml │ │ ├── ac_camera_base.xml │ │ ├── ac_camera_not_connect.xml │ │ ├── ac_camera_params.xml │ │ ├── ac_camera_test.xml │ │ ├── ac_codec.xml │ │ ├── ac_codecview.xml │ │ ├── ac_connect_exception.xml │ │ ├── ac_dsp.xml │ │ ├── ac_fc.xml │ │ ├── ac_firmware.xml │ │ ├── ac_fly_controller.xml │ │ ├── ac_main.xml │ │ ├── ac_mission.xml │ │ ├── ac_mission_amap.xml │ │ ├── ac_mission_evo2.xml │ │ ├── ac_mission_gmap.xml │ │ ├── ac_mission_map.xml │ │ ├── activity_camera_flir.xml │ │ ├── activity_camera_flir_r.xml │ │ ├── activity_camera_r12.xml │ │ ├── activity_camera_xb008.xml │ │ ├── activity_camera_xb015.xml │ │ ├── activity_camera_xb016.xml │ │ ├── activity_camera_xb04.xml │ │ ├── activity_camera_xb08.xml │ │ ├── activity_camera_xt701.xml │ │ ├── activity_camera_xt705.xml │ │ ├── activity_camera_xt706.xml │ │ ├── activity_evo2.xml │ │ ├── activity_evo2_waypoint.xml │ │ ├── activity_g2_battery.xml │ │ ├── activity_g2_dsp.xml │ │ ├── activity_g2_fc.xml │ │ ├── activity_g2_gimbal.xml │ │ ├── activity_live_push.xml │ │ ├── activity_product.xml │ │ ├── activity_rc.xml │ │ ├── activity_rtk.xml │ │ ├── activity_test.xml │ │ ├── activity_upgrade.xml │ │ ├── activity_visual.xml │ │ ├── activity_visual_show_info.xml │ │ ├── activity_visual_track.xml │ │ ├── activity_xstar.xml │ │ ├── activity_xstar_battery.xml │ │ ├── activity_xstar_dsp.xml │ │ ├── activity_xstar_fc.xml │ │ ├── activity_xstar_gimbal.xml │ │ ├── activity_zte_log.xml │ │ ├── album_item.xml │ │ ├── avoid_img_layout.xml │ │ ├── common_mission_bottom.xml │ │ ├── common_mission_bottom_two_btn.xml │ │ ├── common_mission_seekbar.xml │ │ ├── common_mission_title_close_with_text.xml │ │ ├── common_mission_title_with_close.xml │ │ ├── common_mission_title_with_hide.xml │ │ ├── dialog_waypoint_setting.xml │ │ ├── evo_mission_activity.xml │ │ ├── follow_execute_view.xml │ │ ├── follow_start_view.xml │ │ ├── fragment_gps_follow_content.xml │ │ ├── fragment_map.xml │ │ ├── fragment_mission_container.xml │ │ ├── fragment_mission_menu.xml │ │ ├── fragment_mission_menu_follow.xml │ │ ├── fragment_mission_menu_orbit.xml │ │ ├── fragment_mission_menu_waypoint.xml │ │ ├── fragment_orbit_content.xml │ │ ├── fragment_waypoint_content.xml │ │ ├── mission_drop_item_view.xml │ │ ├── mission_drop_press_view.xml │ │ ├── mission_drop_unpress_view.xml │ │ ├── orbit_data_set_advance_content.xml │ │ ├── orbit_data_set_advance_seekbar_item.xml │ │ ├── orbit_data_set_base_content.xml │ │ ├── orbit_data_set_content.xml │ │ ├── orbit_position_set_content.xml │ │ ├── orbit_remote_layout.xml │ │ ├── oribit_execute_content.xml │ │ ├── product_item.xml │ │ ├── spinner_item.xml │ │ ├── spinner_item__rf_hz.xml │ │ ├── visual_view_toast.xml │ │ ├── waypoint_all_select_content.xml │ │ ├── waypoint_checkbox_title.xml │ │ ├── waypoint_create_view_content.xml │ │ ├── waypoint_execute_content.xml │ │ ├── waypoint_file_load_container.xml │ │ ├── waypoint_file_system_no_data_layout.xml │ │ ├── waypoint_load_item.xml │ │ ├── waypoint_load_view.xml │ │ ├── waypoint_set_bottom.xml │ │ ├── waypoint_set_content.xml │ │ ├── waypoint_set_view_advance_content.xml │ │ └── waypoint_set_view_basic_content.xml │ │ ├── mipmap-hdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-mdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxhdpi │ │ ├── avoid_img_1_1.png │ │ ├── avoid_img_1_2.png │ │ ├── avoid_img_1_3.png │ │ ├── avoid_img_1_4.png │ │ ├── avoid_img_1_5.png │ │ ├── avoid_img_1_6.png │ │ ├── avoid_img_1_7.png │ │ ├── avoid_img_2_1.png │ │ ├── avoid_img_2_2.png │ │ ├── avoid_img_2_3.png │ │ ├── avoid_img_2_4.png │ │ ├── avoid_img_2_5.png │ │ ├── avoid_img_2_6.png │ │ ├── avoid_img_2_7.png │ │ ├── avoid_img_3_1.png │ │ ├── avoid_img_3_2.png │ │ ├── avoid_img_3_3.png │ │ ├── avoid_img_3_4.png │ │ ├── avoid_img_3_5.png │ │ ├── avoid_img_3_6.png │ │ ├── avoid_img_3_7.png │ │ ├── avoid_img_4_1.png │ │ ├── avoid_img_4_2.png │ │ ├── avoid_img_4_3.png │ │ ├── avoid_img_4_4.png │ │ ├── avoid_img_4_5.png │ │ ├── avoid_img_4_6.png │ │ ├── avoid_img_4_7.png │ │ ├── ccw_img.png │ │ ├── cover_handheld.png │ │ ├── cover_kestrel.png │ │ ├── cover_xstar_main.png │ │ ├── cover_xstar_pre.png │ │ ├── cw_img.png │ │ ├── drone_location_icon.png │ │ ├── expo2560.jpg │ │ ├── favor_marker_icon_unable.png │ │ ├── favor_marker_point.png │ │ ├── follow_indicate_image.png │ │ ├── home_location_icon.png │ │ ├── ic_launcher.png │ │ ├── ic_launcher_round.png │ │ ├── marker_point.png │ │ ├── marker_point_invalid.png │ │ ├── mision_seekbar_minus.png │ │ ├── mission_close_icon_press.png │ │ ├── mission_close_icon_unpress.png │ │ ├── mission_drop_arrow_press.png │ │ ├── mission_drop_arrow_unpress.png │ │ ├── mission_pause_icon.png │ │ ├── mission_seekbar_add.png │ │ ├── orbit_indicate_image.png │ │ ├── remote_img.png │ │ ├── seekbar_dot_press.png │ │ ├── seekbar_dot_unpress.png │ │ ├── waypoint_add_icon.png │ │ ├── waypoint_delete_icon.png │ │ ├── waypoint_file_check.png │ │ ├── waypoint_file_delete_icon.png │ │ ├── waypoint_file_edit_icon.png │ │ ├── waypoint_file_uncheck.png │ │ ├── waypoint_indicate_image.png │ │ ├── waypoint_last_icon.png │ │ └── waypoint_next_icon.png │ │ ├── mipmap-xxxhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── values-w820dp │ │ └── dimens.xml │ │ ├── values-zh-rCN │ │ └── strings.xml │ │ ├── values │ │ ├── array.xml │ │ ├── attrs.xml │ │ ├── colors.xml │ │ ├── dimens.xml │ │ ├── strings.xml │ │ ├── strings_aircraft_mission.xml │ │ └── styles.xml │ │ └── xml │ │ └── network_security_config.xml │ └── test │ └── java │ └── com │ └── autel │ └── sdk │ └── sdksample │ └── ExampleUnitTest.java ├── build.gradle ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── local.properties └── settings.gradle /.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | /gradle 3 | /.idea 4 | 5 | -------------------------------------------------------------------------------- /.gradle/5.4.1/executionHistory/executionHistory.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AutelSDK/AndroidSample/fa17e6be217bfa411f634e09fb64bdb00f460318/.gradle/5.4.1/executionHistory/executionHistory.bin -------------------------------------------------------------------------------- /.gradle/5.4.1/executionHistory/executionHistory.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AutelSDK/AndroidSample/fa17e6be217bfa411f634e09fb64bdb00f460318/.gradle/5.4.1/executionHistory/executionHistory.lock -------------------------------------------------------------------------------- /.gradle/5.4.1/fileChanges/last-build.bin: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.gradle/5.4.1/fileContent/fileContent.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AutelSDK/AndroidSample/fa17e6be217bfa411f634e09fb64bdb00f460318/.gradle/5.4.1/fileContent/fileContent.lock -------------------------------------------------------------------------------- /.gradle/5.4.1/fileHashes/fileHashes.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AutelSDK/AndroidSample/fa17e6be217bfa411f634e09fb64bdb00f460318/.gradle/5.4.1/fileHashes/fileHashes.bin -------------------------------------------------------------------------------- /.gradle/5.4.1/fileHashes/fileHashes.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AutelSDK/AndroidSample/fa17e6be217bfa411f634e09fb64bdb00f460318/.gradle/5.4.1/fileHashes/fileHashes.lock -------------------------------------------------------------------------------- /.gradle/5.4.1/fileHashes/resourceHashesCache.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AutelSDK/AndroidSample/fa17e6be217bfa411f634e09fb64bdb00f460318/.gradle/5.4.1/fileHashes/resourceHashesCache.bin -------------------------------------------------------------------------------- /.gradle/5.4.1/gc.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AutelSDK/AndroidSample/fa17e6be217bfa411f634e09fb64bdb00f460318/.gradle/5.4.1/gc.properties -------------------------------------------------------------------------------- /.gradle/5.4.1/javaCompile/classAnalysis.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AutelSDK/AndroidSample/fa17e6be217bfa411f634e09fb64bdb00f460318/.gradle/5.4.1/javaCompile/classAnalysis.bin -------------------------------------------------------------------------------- /.gradle/5.4.1/javaCompile/javaCompile.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AutelSDK/AndroidSample/fa17e6be217bfa411f634e09fb64bdb00f460318/.gradle/5.4.1/javaCompile/javaCompile.lock -------------------------------------------------------------------------------- /.gradle/5.4.1/javaCompile/taskHistory.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AutelSDK/AndroidSample/fa17e6be217bfa411f634e09fb64bdb00f460318/.gradle/5.4.1/javaCompile/taskHistory.bin -------------------------------------------------------------------------------- /.gradle/buildOutputCleanup/buildOutputCleanup.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AutelSDK/AndroidSample/fa17e6be217bfa411f634e09fb64bdb00f460318/.gradle/buildOutputCleanup/buildOutputCleanup.lock -------------------------------------------------------------------------------- /.gradle/buildOutputCleanup/cache.properties: -------------------------------------------------------------------------------- 1 | #Tue Mar 15 18:14:30 CST 2022 2 | gradle.version=5.4.1 3 | -------------------------------------------------------------------------------- /.gradle/buildOutputCleanup/outputFiles.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AutelSDK/AndroidSample/fa17e6be217bfa411f634e09fb64bdb00f460318/.gradle/buildOutputCleanup/outputFiles.bin -------------------------------------------------------------------------------- /.gradle/vcs-1/gc.properties: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /.idea/.gitignore: -------------------------------------------------------------------------------- 1 | # Default ignored files 2 | /workspace.xml -------------------------------------------------------------------------------- /.idea/caches/build_file_checksums.ser: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AutelSDK/AndroidSample/fa17e6be217bfa411f634e09fb64bdb00f460318/.idea/caches/build_file_checksums.ser -------------------------------------------------------------------------------- /.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 19 | 20 | -------------------------------------------------------------------------------- /.idea/jarRepositories.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 9 | 10 | 14 | 15 | 19 | 20 | 24 | 25 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle___libqxwz_release_v1_1_0__aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__com_android_support_animated_vector_drawable_25_3_1_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__com_android_support_appcompat_v7_25_3_1_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__com_android_support_constraint_constraint_layout_1_0_2_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__com_android_support_multidex_1_0_1_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__com_android_support_multidex_1_0_2_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__com_android_support_recyclerview_v7_25_3_1_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__com_android_support_support_compat_25_3_1_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__com_android_support_support_core_ui_25_3_1_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__com_android_support_support_core_utils_25_3_1_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__com_android_support_support_fragment_25_3_1_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__com_android_support_support_media_compat_25_3_1_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__com_android_support_support_v4_25_3_1_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__com_android_support_support_vector_drawable_25_3_1_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__com_google_android_gms_play_services_base_10_2_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__com_google_android_gms_play_services_basement_10_2_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__com_google_android_gms_play_services_maps_10_2_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__com_google_android_gms_play_services_tasks_10_2_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__io_reactivex_rxjava2_rxandroid_2_0_1_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 22 | 23 | 29 | 30 | 31 | 32 | 37 | 38 | 39 | 41 | -------------------------------------------------------------------------------- /.idea/modules/AndroidSample.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /.idea/modules/app/app.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 10 | 11 | 12 | 13 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /README_CN.md: -------------------------------------------------------------------------------- 1 | ## Mobile SDK功能 2 | 3 | 定制专属移动 APP,为无人机用户提供你想要的一切 ! 4 | 5 | 通过 Autel Mobile SDK,开发者可以实现自主飞行,控制相机和云台,接收实时视频图传和传感器数据,下载媒体文件,以及实现多种智能任务等等。 6 | 7 | [Autel开发者平台](https://develop.autelrobotics.cn) 为开发者提供Mobile SDK软件开发工具包,入门文档,API说明文档,教程文档,沟通平台等功能; 8 | 9 | ## 支持产品列表和固件版本 10 | 11 | | 产品列表 | 固件版本 | 12 | | ---------------- | ------------------- | 13 | | EVO II V1 Series | V2.7.35 | 14 | | EVO II V2 Series | V2.3.23
V2.1.77 | 15 | 16 | 17 | ## 编译注意事项 18 | 19 | Follow the steps below to add “SDK package” to the project. (Note: this is currently supported only in the Android Studio environment): 20 | 1. Add “url https://dl.bintray.com/auteloss/android” to the application-level build.gradle file 21 | 22 | ## Android MSDK 正式版发布记录 23 | 24 | ### 发布日期 25 | 2022.05.04 26 | 27 | ### 更新说明 28 | 29 | 1. 白名单添加以及问题修复 30 | 31 | ### 发布日期 32 | 2022.04.25 33 | 34 | ### 更新说明 35 | 36 | 1. 增加全景相片拍照接口和demo 37 | 38 | 2022.04.24 39 | 40 | ### 更新说明 41 | 42 | 1. 修复key激活和验证的bug 43 | 44 | 2022.04.08 45 | 46 | ### 更新说明 47 | 48 | 1. 解决UDP端口抢占的问题 49 | 50 | 2022.10.10 51 | 52 | ### 更新说明 53 | 54 | 1. 增加YUV的码流回调接口,并提供对应的sample 55 | 56 | ### 发布日期 57 | 58 | 2022.10.9 59 | 60 | ### 更新说明 61 | 62 | 1. add whitelist and android target api modify to 31 63 | 64 | ### 发布日期 65 | 66 | 2022.09.22 67 | 68 | ### 更新说明 69 | 70 | 1、sdk 更新,增加appkey二次鉴权能力 71 | 72 | ### 发布日期 73 | 74 | 2022.09.17 75 | 76 | ### 更新说明 77 | 78 | 1. [Autel开发者平台](https://develop.autelrobotics.cn)已上线,为开发者提供Mobile SDK软件开发工具包,入门文档,API说明文档,教程文档,沟通平台等功能; 79 | 80 | 2. 已知问题修复和优化; 81 | 82 | 83 | -------------------------------------------------------------------------------- /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | 3 | -------------------------------------------------------------------------------- /app/libs/autel-sdk-release.aar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AutelSDK/AndroidSample/fa17e6be217bfa411f634e09fb64bdb00f460318/app/libs/autel-sdk-release.aar -------------------------------------------------------------------------------- /app/libs/libqxwz_release_v1.1.0.aar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AutelSDK/AndroidSample/fa17e6be217bfa411f634e09fb64bdb00f460318/app/libs/libqxwz_release_v1.1.0.aar -------------------------------------------------------------------------------- /app/platform.keystore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AutelSDK/AndroidSample/fa17e6be217bfa411f634e09fb64bdb00f460318/app/platform.keystore -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in D:\program\android\sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | 19 | # Uncomment this to preserve the line number information for 20 | # debugging stack traces. 21 | #-keepattributes SourceFile,LineNumberTable 22 | 23 | # If you keep the line number information, uncomment this to 24 | # hide the original source file name. 25 | #-renamesourcefileattribute SourceFile 26 | -------------------------------------------------------------------------------- /app/src/androidTest/java/com/autel/sdk/sdksample/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | package com.autel.sdk.sdksample; 2 | 3 | import android.content.Context; 4 | import android.support.test.InstrumentationRegistry; 5 | import android.support.test.runner.AndroidJUnit4; 6 | 7 | import org.junit.Test; 8 | import org.junit.runner.RunWith; 9 | 10 | import static org.junit.Assert.*; 11 | 12 | /** 13 | * Instrumentation test, which will execute on an Android device. 14 | * 15 | * @see Testing documentation 16 | */ 17 | @RunWith(AndroidJUnit4.class) 18 | public class ExampleInstrumentedTest { 19 | @Test 20 | public void useAppContext() throws Exception { 21 | // Context of the app under test. 22 | Context appContext = InstrumentationRegistry.getTargetContext(); 23 | 24 | assertEquals("com.autel.sdk.sdksample", appContext.getPackageName()); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /app/src/main/java/com/autel/sdksample/UsbBroadCastReceiver.java: -------------------------------------------------------------------------------- 1 | package com.autel.sdksample; 2 | 3 | import android.content.BroadcastReceiver; 4 | import android.content.Context; 5 | import android.content.Intent; 6 | import android.util.Log; 7 | 8 | /** 9 | * 监听USB连接设备的广播 10 | */ 11 | public class UsbBroadCastReceiver extends BroadcastReceiver { 12 | final String TAG = getClass().getSimpleName(); 13 | 14 | @Override 15 | public void onReceive(Context context, Intent intent) { 16 | /** 17 | * 只会监听由USB连接到设备的广播,接收到连接到设备的广播后启动主页 18 | */ 19 | Log.v(TAG, "action " + intent.getAction()); 20 | ProductActivity.receiveUsbStartCommand(context); 21 | } 22 | } 23 | 24 | -------------------------------------------------------------------------------- /app/src/main/java/com/autel/sdksample/base/CodecViewActivity.java: -------------------------------------------------------------------------------- 1 | package com.autel.sdksample.base; 2 | 3 | import android.app.Activity; 4 | import android.os.Bundle; 5 | 6 | import com.autel.sdksample.R; 7 | 8 | /** 9 | * Created by A15556 on 2017/9/12. 10 | */ 11 | 12 | public class CodecViewActivity extends Activity { 13 | 14 | @Override 15 | protected void onCreate(Bundle savedInstanceState) { 16 | super.onCreate(savedInstanceState); 17 | setContentView(R.layout.ac_codecview); 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /app/src/main/java/com/autel/sdksample/base/adapter/SelectorAdapter.java: -------------------------------------------------------------------------------- 1 | package com.autel.sdksample.base.adapter; 2 | 3 | import android.content.Context; 4 | import android.view.View; 5 | import android.view.ViewGroup; 6 | import android.widget.BaseAdapter; 7 | import android.widget.TextView; 8 | 9 | import com.autel.sdksample.R; 10 | 11 | import java.util.ArrayList; 12 | import java.util.List; 13 | 14 | public class SelectorAdapter extends BaseAdapter { 15 | protected List elementList = new ArrayList<>(); 16 | protected Context mContext; 17 | 18 | public SelectorAdapter(Context context) { 19 | mContext = context; 20 | } 21 | 22 | public void setData(List elementList) { 23 | this.elementList = elementList; 24 | notifyDataSetInvalidated(); 25 | } 26 | 27 | @Override 28 | public int getCount() { 29 | return null == elementList ? 0 : elementList.size(); 30 | } 31 | 32 | @Override 33 | public Object getItem(int position) { 34 | return elementList.get(position); 35 | } 36 | 37 | @Override 38 | public long getItemId(int position) { 39 | return position; 40 | } 41 | 42 | @Override 43 | public View getView(int position, View convertView, ViewGroup parent) { 44 | TextView textView = null; 45 | if (null == convertView) { 46 | convertView = View.inflate(mContext, R.layout.spinner_item, null); 47 | 48 | } 49 | textView = (TextView) convertView.findViewById(R.id.spinner_item_text); 50 | 51 | if (position < elementList.size() && position >= 0) { 52 | textView.setText(elementList.get(position).toString()); 53 | } 54 | return convertView; 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /app/src/main/java/com/autel/sdksample/base/album/adapter/LocalVideoListAdapter.java: -------------------------------------------------------------------------------- 1 | package com.autel.sdksample.base.album.adapter; 2 | 3 | import android.content.Context; 4 | import android.view.View; 5 | import android.view.ViewGroup; 6 | import android.widget.BaseAdapter; 7 | import android.widget.TextView; 8 | 9 | import com.autel.sdksample.R; 10 | 11 | import java.io.File; 12 | import java.util.ArrayList; 13 | import java.util.List; 14 | 15 | public class LocalVideoListAdapter extends BaseAdapter { 16 | private List mediaInfos = new ArrayList<>(); 17 | private Context mContext; 18 | 19 | 20 | public LocalVideoListAdapter(Context context) { 21 | mContext = context; 22 | } 23 | 24 | 25 | public void setRfData(List data) { 26 | this.mediaInfos = data; 27 | notifyDataSetInvalidated(); 28 | } 29 | 30 | @Override 31 | public int getCount() { 32 | return null == mediaInfos ? 0 : mediaInfos.size(); 33 | } 34 | 35 | @Override 36 | public Object getItem(int position) { 37 | return mediaInfos.get(position); 38 | } 39 | 40 | @Override 41 | public long getItemId(int position) { 42 | return position; 43 | } 44 | 45 | @Override 46 | public View getView(int position, View convertView, ViewGroup parent) { 47 | TextView textView = null; 48 | if (null == convertView) { 49 | convertView = View.inflate(mContext, R.layout.spinner_item, null); 50 | } 51 | textView = (TextView) convertView.findViewById(R.id.spinner_item_text); 52 | 53 | if (position < mediaInfos.size() && position >= 0) { 54 | textView.setText(mediaInfos.get(position).getAbsolutePath()); 55 | } 56 | 57 | return convertView; 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /app/src/main/java/com/autel/sdksample/base/camera/fragment/CameraNotConnectFragment.java: -------------------------------------------------------------------------------- 1 | package com.autel.sdksample.base.camera.fragment; 2 | 3 | import android.os.Bundle; 4 | import android.view.LayoutInflater; 5 | import android.view.View; 6 | import android.view.ViewGroup; 7 | 8 | import com.autel.sdksample.R; 9 | 10 | 11 | public class CameraNotConnectFragment extends CameraBaseFragment { 12 | 13 | @Override 14 | public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { 15 | View view = inflater.inflate(R.layout.ac_camera_not_connect, null); 16 | logOut(getString(R.string.camera_no_connect)); 17 | return view; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /app/src/main/java/com/autel/sdksample/base/camera/fragment/adapter/AntiFlickerAdapter.java: -------------------------------------------------------------------------------- 1 | package com.autel.sdksample.base.camera.fragment.adapter; 2 | 3 | import android.content.Context; 4 | 5 | import com.autel.common.camera.media.AntiFlicker; 6 | import com.autel.sdksample.base.adapter.SelectorAdapter; 7 | 8 | public class AntiFlickerAdapter extends SelectorAdapter { 9 | 10 | public AntiFlickerAdapter(Context context) { 11 | super(context); 12 | elementList.add(AntiFlicker.AUTO); 13 | elementList.add(AntiFlicker.ANTI_FLICKER_50HZ); 14 | elementList.add(AntiFlicker.ANTI_FLICKER_60HZ); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /app/src/main/java/com/autel/sdksample/base/camera/fragment/adapter/AspectRatioAdapter.java: -------------------------------------------------------------------------------- 1 | package com.autel.sdksample.base.camera.fragment.adapter; 2 | 3 | import android.content.Context; 4 | 5 | import com.autel.common.camera.media.PhotoAspectRatio; 6 | import com.autel.sdksample.base.adapter.SelectorAdapter; 7 | 8 | import java.util.List; 9 | 10 | public class AspectRatioAdapter extends SelectorAdapter { 11 | 12 | public AspectRatioAdapter(Context context) { 13 | super(context); 14 | } 15 | 16 | public AspectRatioAdapter(Context context, List list) { 17 | super(context); 18 | elementList = list; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /app/src/main/java/com/autel/sdksample/base/camera/fragment/adapter/AutoExposureLockStateAdapter.java: -------------------------------------------------------------------------------- 1 | package com.autel.sdksample.base.camera.fragment.adapter; 2 | 3 | import android.content.Context; 4 | 5 | import com.autel.common.camera.media.AutoExposureLockState; 6 | import com.autel.sdksample.base.adapter.SelectorAdapter; 7 | 8 | 9 | public class AutoExposureLockStateAdapter extends SelectorAdapter { 10 | 11 | public AutoExposureLockStateAdapter(Context context) { 12 | super(context); 13 | elementList.add(AutoExposureLockState.LOCK); 14 | elementList.add(AutoExposureLockState.UNLOCK); 15 | elementList.add(AutoExposureLockState.DISABLE); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /app/src/main/java/com/autel/sdksample/base/camera/fragment/adapter/BooleanTypeAdapter.java: -------------------------------------------------------------------------------- 1 | package com.autel.sdksample.base.camera.fragment.adapter; 2 | 3 | import android.content.Context; 4 | 5 | import com.autel.sdksample.base.adapter.SelectorAdapter; 6 | 7 | 8 | public class BooleanTypeAdapter extends SelectorAdapter { 9 | 10 | public BooleanTypeAdapter(Context context) { 11 | super(context); 12 | elementList.add(Boolean.FALSE); 13 | elementList.add(Boolean.TRUE); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /app/src/main/java/com/autel/sdksample/base/camera/fragment/adapter/CameraApertureAdapter.java: -------------------------------------------------------------------------------- 1 | package com.autel.sdksample.base.camera.fragment.adapter; 2 | 3 | import android.content.Context; 4 | 5 | import com.autel.common.camera.media.CameraAperture; 6 | import com.autel.sdksample.base.adapter.SelectorAdapter; 7 | 8 | 9 | public class CameraApertureAdapter extends SelectorAdapter { 10 | 11 | public CameraApertureAdapter(Context context) { 12 | super(context); 13 | elementList.add(CameraAperture.Aperture_2p8); 14 | elementList.add(CameraAperture.Aperture_3p2); 15 | elementList.add(CameraAperture.Aperture_3p5); 16 | elementList.add(CameraAperture.Aperture_4p0); 17 | elementList.add(CameraAperture.Aperture_4p5); 18 | elementList.add(CameraAperture.Aperture_5p0); 19 | elementList.add(CameraAperture.Aperture_5p6); 20 | elementList.add(CameraAperture.Aperture_6p3); 21 | elementList.add(CameraAperture.Aperture_7p1); 22 | elementList.add(CameraAperture.Aperture_8p0); 23 | elementList.add(CameraAperture.Aperture_9p0); 24 | elementList.add(CameraAperture.Aperture_10); 25 | elementList.add(CameraAperture.Aperture_11); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /app/src/main/java/com/autel/sdksample/base/camera/fragment/adapter/ColorStyleAdapter.java: -------------------------------------------------------------------------------- 1 | package com.autel.sdksample.base.camera.fragment.adapter; 2 | 3 | import android.content.Context; 4 | 5 | import com.autel.common.camera.media.ColorStyle; 6 | import com.autel.sdksample.base.adapter.SelectorAdapter; 7 | 8 | import static com.autel.common.camera.media.ColorStyle.Art; 9 | import static com.autel.common.camera.media.ColorStyle.Beach; 10 | import static com.autel.common.camera.media.ColorStyle.BlackAndWhite; 11 | import static com.autel.common.camera.media.ColorStyle.Classic; 12 | import static com.autel.common.camera.media.ColorStyle.Dream; 13 | import static com.autel.common.camera.media.ColorStyle.Film; 14 | import static com.autel.common.camera.media.ColorStyle.Log; 15 | import static com.autel.common.camera.media.ColorStyle.None; 16 | import static com.autel.common.camera.media.ColorStyle.Nostalgic; 17 | import static com.autel.common.camera.media.ColorStyle.Vivid; 18 | 19 | public class ColorStyleAdapter extends SelectorAdapter { 20 | 21 | public ColorStyleAdapter(Context context) { 22 | super(context); 23 | mContext = context; 24 | elementList.add(None); 25 | elementList.add(Vivid); 26 | elementList.add(BlackAndWhite); 27 | elementList.add(Art); 28 | elementList.add(Film); 29 | elementList.add(Beach); 30 | elementList.add(Dream); 31 | elementList.add(Classic); 32 | elementList.add(Log); 33 | elementList.add(Nostalgic); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /app/src/main/java/com/autel/sdksample/base/camera/fragment/adapter/ExposureModeAdapter.java: -------------------------------------------------------------------------------- 1 | package com.autel.sdksample.base.camera.fragment.adapter; 2 | 3 | import android.content.Context; 4 | 5 | import com.autel.common.camera.media.ExposureMode; 6 | import com.autel.sdksample.base.adapter.SelectorAdapter; 7 | 8 | import java.util.List; 9 | 10 | public class ExposureModeAdapter extends SelectorAdapter { 11 | public ExposureModeAdapter(Context context) { 12 | super(context); 13 | } 14 | 15 | public ExposureModeAdapter(Context context, List modes) { 16 | super(context); 17 | elementList = modes; 18 | 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /app/src/main/java/com/autel/sdksample/base/camera/fragment/adapter/ExposureValueAdapter.java: -------------------------------------------------------------------------------- 1 | package com.autel.sdksample.base.camera.fragment.adapter; 2 | 3 | import android.content.Context; 4 | 5 | import com.autel.common.camera.media.ExposureCompensation; 6 | import com.autel.sdksample.base.adapter.SelectorAdapter; 7 | 8 | public class ExposureValueAdapter extends SelectorAdapter { 9 | 10 | 11 | public ExposureValueAdapter(Context context) { 12 | super(context); 13 | elementList.add(ExposureCompensation.POSITIVE_3p0.getValue()); 14 | elementList.add(ExposureCompensation.POSITIVE_2p7.getValue()); 15 | elementList.add(ExposureCompensation.POSITIVE_2p3.getValue()); 16 | elementList.add(ExposureCompensation.POSITIVE_2p0.getValue()); 17 | elementList.add(ExposureCompensation.POSITIVE_1p7.getValue()); 18 | elementList.add(ExposureCompensation.POSITIVE_1p3.getValue()); 19 | elementList.add(ExposureCompensation.POSITIVE_1p0.getValue()); 20 | elementList.add(ExposureCompensation.POSITIVE_0p7.getValue()); 21 | elementList.add(ExposureCompensation.POSITIVE_0p3.getValue()); 22 | elementList.add(ExposureCompensation.POSITIVE_0.getValue()); 23 | elementList.add(ExposureCompensation.NEGATIVE_0p3.getValue()); 24 | elementList.add(ExposureCompensation.NEGATIVE_0p7.getValue()); 25 | elementList.add(ExposureCompensation.NEGATIVE_1p0.getValue()); 26 | elementList.add(ExposureCompensation.NEGATIVE_1p3.getValue()); 27 | elementList.add(ExposureCompensation.NEGATIVE_1p7.getValue()); 28 | elementList.add(ExposureCompensation.NEGATIVE_2p0.getValue()); 29 | elementList.add(ExposureCompensation.NEGATIVE_2p3.getValue()); 30 | elementList.add(ExposureCompensation.NEGATIVE_2p7.getValue()); 31 | elementList.add(ExposureCompensation.NEGATIVE_3p0.getValue()); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /app/src/main/java/com/autel/sdksample/base/camera/fragment/adapter/FocusModeAdapter.java: -------------------------------------------------------------------------------- 1 | package com.autel.sdksample.base.camera.fragment.adapter; 2 | 3 | import android.content.Context; 4 | 5 | import com.autel.common.camera.media.LensFocusMode; 6 | import com.autel.sdksample.base.adapter.SelectorAdapter; 7 | 8 | import java.util.Arrays; 9 | 10 | 11 | public class FocusModeAdapter extends SelectorAdapter { 12 | 13 | 14 | public FocusModeAdapter(Context context) { 15 | super(context); 16 | elementList.addAll(Arrays.asList(LensFocusMode.values())); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /app/src/main/java/com/autel/sdksample/base/camera/fragment/adapter/ISOValueAdapter.java: -------------------------------------------------------------------------------- 1 | package com.autel.sdksample.base.camera.fragment.adapter; 2 | 3 | import android.content.Context; 4 | 5 | import com.autel.common.camera.media.CameraISO; 6 | import com.autel.sdksample.base.adapter.SelectorAdapter; 7 | 8 | import java.util.List; 9 | 10 | public class ISOValueAdapter extends SelectorAdapter { 11 | public ISOValueAdapter(Context context) { 12 | super(context); 13 | } 14 | 15 | public ISOValueAdapter(Context context, List isoList) { 16 | super(context); 17 | elementList = isoList; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /app/src/main/java/com/autel/sdksample/base/camera/fragment/adapter/IrColorStyleAdapter.java: -------------------------------------------------------------------------------- 1 | package com.autel.sdksample.base.camera.fragment.adapter; 2 | 3 | import android.content.Context; 4 | 5 | import com.autel.common.camera.XT706.IrColor; 6 | import com.autel.sdksample.base.adapter.SelectorAdapter; 7 | 8 | 9 | public class IrColorStyleAdapter extends SelectorAdapter { 10 | 11 | public IrColorStyleAdapter(Context context) { 12 | super(context); 13 | mContext = context; 14 | elementList.add(IrColor.WhiteHot); 15 | elementList.add(IrColor.BlackHot); 16 | elementList.add(IrColor.RainBow); 17 | elementList.add(IrColor.RainHC); 18 | elementList.add(IrColor.IronBow); 19 | elementList.add(IrColor.Lava); 20 | elementList.add(IrColor.Arctic); 21 | elementList.add(IrColor.GlowBow); 22 | elementList.add(IrColor.GradedFire); 23 | elementList.add(IrColor.HotTest); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /app/src/main/java/com/autel/sdksample/base/camera/fragment/adapter/ModelcColorStyleAdapter.java: -------------------------------------------------------------------------------- 1 | package com.autel.sdksample.base.camera.fragment.adapter; 2 | 3 | import android.content.Context; 4 | 5 | import com.autel.common.camera.media.ColorStyle; 6 | import com.autel.sdksample.base.adapter.SelectorAdapter; 7 | 8 | import static com.autel.common.camera.media.ColorStyle.BlackAndWhite; 9 | import static com.autel.common.camera.media.ColorStyle.Log; 10 | import static com.autel.common.camera.media.ColorStyle.None; 11 | import static com.autel.common.camera.media.ColorStyle.Nostalgic; 12 | 13 | public class ModelcColorStyleAdapter extends SelectorAdapter { 14 | 15 | public ModelcColorStyleAdapter(Context context) { 16 | super(context); 17 | mContext = context; 18 | elementList.add(None); 19 | elementList.add(Log); 20 | elementList.add(BlackAndWhite); 21 | elementList.add(Nostalgic); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /app/src/main/java/com/autel/sdksample/base/camera/fragment/adapter/ModelcExposureModeAdapter.java: -------------------------------------------------------------------------------- 1 | package com.autel.sdksample.base.camera.fragment.adapter; 2 | 3 | import android.content.Context; 4 | 5 | import com.autel.common.camera.CameraProduct; 6 | import com.autel.common.camera.media.ExposureMode; 7 | import com.autel.sdksample.base.adapter.SelectorAdapter; 8 | 9 | public class ModelcExposureModeAdapter extends SelectorAdapter { 10 | public ModelcExposureModeAdapter(Context context) { 11 | super(context); 12 | } 13 | 14 | public void setData(CameraProduct camera) { 15 | switch (camera){ 16 | case XT701: 17 | case XT706:{ 18 | elementList.add(ExposureMode.Auto); 19 | elementList.add(ExposureMode.Manual); 20 | elementList.add(ExposureMode.ShutterPriority); 21 | } 22 | break; 23 | case XT705:{ 24 | elementList.add(ExposureMode.Auto); 25 | elementList.add(ExposureMode.Manual); 26 | elementList.add(ExposureMode.ShutterPriority); 27 | elementList.add(ExposureMode.AperturePriority); 28 | } 29 | break; 30 | 31 | default: 32 | } 33 | 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /app/src/main/java/com/autel/sdksample/base/camera/fragment/adapter/PIVModeAdapter.java: -------------------------------------------------------------------------------- 1 | package com.autel.sdksample.base.camera.fragment.adapter; 2 | 3 | import android.content.Context; 4 | 5 | import com.autel.common.camera.xb015.PIVMode; 6 | import com.autel.sdksample.base.adapter.SelectorAdapter; 7 | 8 | 9 | public class PIVModeAdapter extends SelectorAdapter { 10 | 11 | public PIVModeAdapter(Context context) { 12 | super(context); 13 | elementList.add(PIVMode.Manual); 14 | elementList.add(PIVMode.Auto); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /app/src/main/java/com/autel/sdksample/base/camera/fragment/adapter/PanoramicTypeeAdapter.java: -------------------------------------------------------------------------------- 1 | package com.autel.sdksample.base.camera.fragment.adapter; 2 | 3 | import android.content.Context; 4 | 5 | import com.autel.common.camera.media.PanoramicType; 6 | import com.autel.common.camera.media.PhotoBurstCount; 7 | import com.autel.sdksample.base.adapter.SelectorAdapter; 8 | 9 | 10 | public class PanoramicTypeeAdapter extends SelectorAdapter { 11 | 12 | public PanoramicTypeeAdapter(Context context) { 13 | super(context); 14 | elementList.add(PanoramicType.HORIZONTAL); 15 | elementList.add(PanoramicType.VERTICAL); 16 | elementList.add(PanoramicType.WIDE_ANGLE); 17 | elementList.add(PanoramicType.SPHERICAL); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /app/src/main/java/com/autel/sdksample/base/camera/fragment/adapter/PhotoAEBCountAdapter.java: -------------------------------------------------------------------------------- 1 | package com.autel.sdksample.base.camera.fragment.adapter; 2 | 3 | import android.content.Context; 4 | 5 | import com.autel.common.camera.media.PhotoAEBCount; 6 | import com.autel.sdksample.base.adapter.SelectorAdapter; 7 | 8 | 9 | public class PhotoAEBCountAdapter extends SelectorAdapter { 10 | 11 | public PhotoAEBCountAdapter(Context context) { 12 | super(context); 13 | elementList.add(PhotoAEBCount.CAPTURE_3); 14 | elementList.add(PhotoAEBCount.CAPTURE_5); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /app/src/main/java/com/autel/sdksample/base/camera/fragment/adapter/PhotoBurstAdapter.java: -------------------------------------------------------------------------------- 1 | package com.autel.sdksample.base.camera.fragment.adapter; 2 | 3 | import android.content.Context; 4 | 5 | import com.autel.common.camera.media.PhotoBurstCount; 6 | import com.autel.sdksample.base.adapter.SelectorAdapter; 7 | 8 | 9 | public class PhotoBurstAdapter extends SelectorAdapter { 10 | 11 | public PhotoBurstAdapter(Context context) { 12 | super(context); 13 | elementList.add(PhotoBurstCount.BURST_3); 14 | elementList.add(PhotoBurstCount.BURST_5); 15 | elementList.add(PhotoBurstCount.BURST_7); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /app/src/main/java/com/autel/sdksample/base/camera/fragment/adapter/PhotoFormatAdapter.java: -------------------------------------------------------------------------------- 1 | package com.autel.sdksample.base.camera.fragment.adapter; 2 | 3 | import android.content.Context; 4 | 5 | import com.autel.common.camera.base.PhotoFormat; 6 | import com.autel.sdksample.base.adapter.SelectorAdapter; 7 | 8 | 9 | public class PhotoFormatAdapter extends SelectorAdapter { 10 | 11 | public PhotoFormatAdapter(Context context) { 12 | super(context); 13 | elementList.add(PhotoFormat.JPEG); 14 | elementList.add(PhotoFormat.RAW); 15 | elementList.add(PhotoFormat.RawAndJPEG); 16 | } 17 | 18 | } 19 | -------------------------------------------------------------------------------- /app/src/main/java/com/autel/sdksample/base/camera/fragment/adapter/PhotoStyleAdapter.java: -------------------------------------------------------------------------------- 1 | package com.autel.sdksample.base.camera.fragment.adapter; 2 | 3 | import android.content.Context; 4 | 5 | import com.autel.common.camera.media.PhotoStyleType; 6 | import com.autel.sdksample.base.adapter.SelectorAdapter; 7 | 8 | 9 | public class PhotoStyleAdapter extends SelectorAdapter { 10 | 11 | public PhotoStyleAdapter(Context context) { 12 | super(context); 13 | elementList.add(PhotoStyleType.Standard); 14 | elementList.add(PhotoStyleType.Soft); 15 | elementList.add(PhotoStyleType.Landscape); 16 | elementList.add(PhotoStyleType.Custom); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /app/src/main/java/com/autel/sdksample/base/camera/fragment/adapter/PhotoTimelapseIntervalAdapter.java: -------------------------------------------------------------------------------- 1 | package com.autel.sdksample.base.camera.fragment.adapter; 2 | 3 | import android.content.Context; 4 | 5 | import com.autel.common.camera.media.PhotoTimelapseInterval; 6 | import com.autel.sdksample.base.adapter.SelectorAdapter; 7 | 8 | import java.util.List; 9 | 10 | 11 | public class PhotoTimelapseIntervalAdapter extends SelectorAdapter { 12 | 13 | public PhotoTimelapseIntervalAdapter(Context context, List data) { 14 | super(context); 15 | elementList.addAll(data); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /app/src/main/java/com/autel/sdksample/base/camera/fragment/adapter/RealTimeResolutionAdapter.java: -------------------------------------------------------------------------------- 1 | package com.autel.sdksample.base.camera.fragment.adapter; 2 | 3 | import android.content.Context; 4 | 5 | import com.autel.common.camera.xb015.RealTimeVideoResolution; 6 | import com.autel.sdksample.base.adapter.SelectorAdapter; 7 | 8 | 9 | public class RealTimeResolutionAdapter extends SelectorAdapter { 10 | 11 | public RealTimeResolutionAdapter(Context context) { 12 | super(context); 13 | elementList.add(RealTimeVideoResolution.P_1280X720); 14 | elementList.add(RealTimeVideoResolution.P_1920X1080); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /app/src/main/java/com/autel/sdksample/base/camera/fragment/adapter/RtkCoordinateAdapter.java: -------------------------------------------------------------------------------- 1 | package com.autel.sdksample.base.camera.fragment.adapter; 2 | 3 | import android.content.Context; 4 | 5 | import com.autel.common.camera.media.ExposureMode; 6 | import com.autel.common.camera.xb015.RealTimeVideoResolution; 7 | import com.autel.sdksample.base.adapter.SelectorAdapter; 8 | 9 | import java.util.List; 10 | 11 | public class RtkCoordinateAdapter extends SelectorAdapter { 12 | 13 | public RtkCoordinateAdapter(Context context,List mode) { 14 | super(context); 15 | elementList = mode; 16 | 17 | } 18 | 19 | public RtkCoordinateAdapter(Context context) { 20 | super(context); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /app/src/main/java/com/autel/sdksample/base/camera/fragment/adapter/ShutterSpeedAdapter.java: -------------------------------------------------------------------------------- 1 | package com.autel.sdksample.base.camera.fragment.adapter; 2 | 3 | import android.content.Context; 4 | 5 | import com.autel.common.camera.media.ShutterSpeed; 6 | import com.autel.sdksample.base.adapter.SelectorAdapter; 7 | 8 | import java.util.List; 9 | 10 | 11 | public class ShutterSpeedAdapter extends SelectorAdapter { 12 | 13 | public ShutterSpeedAdapter(Context context, List shutterSpeedList) { 14 | super(context); 15 | elementList = shutterSpeedList; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /app/src/main/java/com/autel/sdksample/base/camera/fragment/adapter/VideoEncodeAdapter.java: -------------------------------------------------------------------------------- 1 | package com.autel.sdksample.base.camera.fragment.adapter; 2 | 3 | import android.content.Context; 4 | 5 | import com.autel.common.camera.media.VideoEncodeFormat; 6 | import com.autel.sdksample.base.adapter.SelectorAdapter; 7 | 8 | 9 | public class VideoEncodeAdapter extends SelectorAdapter { 10 | 11 | public VideoEncodeAdapter(Context context) { 12 | super(context); 13 | elementList.add(VideoEncodeFormat.H264); 14 | elementList.add(VideoEncodeFormat.H265); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /app/src/main/java/com/autel/sdksample/base/camera/fragment/adapter/VideoFormatAdapter.java: -------------------------------------------------------------------------------- 1 | package com.autel.sdksample.base.camera.fragment.adapter; 2 | 3 | import android.content.Context; 4 | 5 | import com.autel.common.camera.media.VideoFormat; 6 | import com.autel.sdksample.base.adapter.SelectorAdapter; 7 | 8 | 9 | public class VideoFormatAdapter extends SelectorAdapter { 10 | 11 | public VideoFormatAdapter(Context context) { 12 | super(context); 13 | elementList.add(VideoFormat.MOV); 14 | elementList.add(VideoFormat.MP4); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /app/src/main/java/com/autel/sdksample/base/camera/fragment/adapter/VideoResolutionFpsAdapter.java: -------------------------------------------------------------------------------- 1 | package com.autel.sdksample.base.camera.fragment.adapter; 2 | 3 | import android.content.Context; 4 | 5 | import com.autel.common.camera.media.VideoResolutionAndFps; 6 | import com.autel.sdksample.base.adapter.SelectorAdapter; 7 | 8 | import java.util.List; 9 | 10 | 11 | public class VideoResolutionFpsAdapter extends SelectorAdapter { 12 | 13 | public VideoResolutionFpsAdapter(Context context) { 14 | super(context); 15 | } 16 | 17 | public VideoResolutionFpsAdapter(Context context, List list) { 18 | super(context); 19 | elementList = list; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /app/src/main/java/com/autel/sdksample/base/camera/fragment/adapter/VideoSnapshotTimeIntervalAdapter.java: -------------------------------------------------------------------------------- 1 | package com.autel.sdksample.base.camera.fragment.adapter; 2 | 3 | import android.content.Context; 4 | 5 | import com.autel.common.camera.media.VideoSnapshotTimelapseInterval; 6 | import com.autel.sdksample.base.adapter.SelectorAdapter; 7 | 8 | 9 | public class VideoSnapshotTimeIntervalAdapter extends SelectorAdapter { 10 | 11 | public VideoSnapshotTimeIntervalAdapter(Context context) { 12 | super(context); 13 | elementList.add(VideoSnapshotTimelapseInterval.SECOND_5); 14 | elementList.add(VideoSnapshotTimelapseInterval.SECOND_10); 15 | elementList.add(VideoSnapshotTimelapseInterval.SECOND_30); 16 | elementList.add(VideoSnapshotTimelapseInterval.SECOND_60); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /app/src/main/java/com/autel/sdksample/base/camera/fragment/adapter/VideoStandardAdapter.java: -------------------------------------------------------------------------------- 1 | package com.autel.sdksample.base.camera.fragment.adapter; 2 | 3 | import android.content.Context; 4 | 5 | import com.autel.common.camera.media.VideoStandard; 6 | import com.autel.sdksample.base.adapter.SelectorAdapter; 7 | 8 | 9 | public class VideoStandardAdapter extends SelectorAdapter { 10 | 11 | public VideoStandardAdapter(Context context) { 12 | super(context); 13 | elementList.add(VideoStandard.NTSC); 14 | elementList.add(VideoStandard.PAL); 15 | } 16 | 17 | } 18 | -------------------------------------------------------------------------------- /app/src/main/java/com/autel/sdksample/base/camera/fragment/adapter/WhiteBalanceTypeAdapter.java: -------------------------------------------------------------------------------- 1 | package com.autel.sdksample.base.camera.fragment.adapter; 2 | 3 | import android.content.Context; 4 | 5 | import com.autel.common.camera.media.WhiteBalanceType; 6 | import com.autel.sdksample.base.adapter.SelectorAdapter; 7 | 8 | import java.util.List; 9 | 10 | 11 | public class WhiteBalanceTypeAdapter extends SelectorAdapter { 12 | 13 | public WhiteBalanceTypeAdapter(Context context) { 14 | super(context); 15 | } 16 | 17 | public WhiteBalanceTypeAdapter(Context context, List list) { 18 | super(context); 19 | elementList = list; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /app/src/main/java/com/autel/sdksample/base/gimbal/adapter/GimbalModeAdapter.java: -------------------------------------------------------------------------------- 1 | package com.autel.sdksample.base.gimbal.adapter; 2 | 3 | import android.content.Context; 4 | 5 | import com.autel.common.gimbal.GimbalWorkMode; 6 | import com.autel.sdksample.base.adapter.SelectorAdapter; 7 | 8 | 9 | public class GimbalModeAdapter extends SelectorAdapter { 10 | 11 | public GimbalModeAdapter(Context context) { 12 | super(context); 13 | elementList.add(GimbalWorkMode.FPV); 14 | elementList.add(GimbalWorkMode.STABILIZED); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /app/src/main/java/com/autel/sdksample/base/gimbal/adapter/RollAdjustAdapter.java: -------------------------------------------------------------------------------- 1 | package com.autel.sdksample.base.gimbal.adapter; 2 | 3 | import android.content.Context; 4 | 5 | import com.autel.common.gimbal.GimbalRollAngleAdjust; 6 | import com.autel.sdksample.base.adapter.SelectorAdapter; 7 | 8 | 9 | public class RollAdjustAdapter extends SelectorAdapter { 10 | 11 | public RollAdjustAdapter(Context context) { 12 | super(context); 13 | elementList.add(GimbalRollAngleAdjust.MINUS); 14 | elementList.add(GimbalRollAngleAdjust.PLUS); 15 | elementList.add(GimbalRollAngleAdjust.QUERY); 16 | elementList.add(GimbalRollAngleAdjust.RESET); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /app/src/main/java/com/autel/sdksample/base/mission/AutelLatLng.java: -------------------------------------------------------------------------------- 1 | package com.autel.sdksample.base.mission; 2 | 3 | import java.io.Serializable; 4 | 5 | /* 6 | * autel的经纬度 7 | */ 8 | public class AutelLatLng implements Serializable { 9 | /** 10 | * 11 | */ 12 | public double latitude;// LatLng 经度 13 | public double longitude;// LatLng 纬度 14 | private float rotate = 0; 15 | private String time; 16 | 17 | public AutelLatLng(double latd, double longd) { 18 | set(latd,longd); 19 | } 20 | 21 | public AutelLatLng(AutelLatLng all){ 22 | set(all.latitude,all.longitude); 23 | } 24 | public void set(double latitude, double longitude){ 25 | this.latitude = latitude; 26 | this.longitude = longitude; 27 | } 28 | 29 | public double getLatitude() { 30 | return latitude; 31 | } 32 | 33 | public double getLongitude() { 34 | return longitude; 35 | } 36 | 37 | @Override 38 | public boolean equals(Object o) { 39 | if(o == null){ 40 | return false; 41 | } 42 | boolean isEqual = false; 43 | AutelLatLng all = (AutelLatLng) o; 44 | if(this.latitude == all.latitude && this.longitude == all.longitude){ 45 | isEqual = true; 46 | } 47 | return isEqual; 48 | } 49 | 50 | public void setRotate(float rotate){ 51 | 52 | this.rotate = rotate; 53 | 54 | } 55 | 56 | public float getRotate(){ 57 | 58 | return rotate; 59 | 60 | } 61 | 62 | public void setTime(String time){ 63 | 64 | this.time = time; 65 | 66 | } 67 | 68 | public String getTime(){ 69 | 70 | return time; 71 | 72 | } 73 | 74 | public static boolean isPointValid(AutelLatLng autelLatLng) { 75 | return autelLatLng != null && autelLatLng.getLatitude() != 0 && autelLatLng.getLongitude() != 0; 76 | } 77 | 78 | } 79 | -------------------------------------------------------------------------------- /app/src/main/java/com/autel/sdksample/base/mission/MapOperator.java: -------------------------------------------------------------------------------- 1 | package com.autel.sdksample.base.mission; 2 | 3 | /** 4 | * 5 | */ 6 | 7 | public interface MapOperator { 8 | void updateOrbit(double lat, double lot); 9 | void resetMap(); 10 | void addWayPointMarker(double lat, double lot); 11 | void setLocationChangeListener(MapActivity.LocationChangeListener locationChangeListener); 12 | } 13 | -------------------------------------------------------------------------------- /app/src/main/java/com/autel/sdksample/base/mission/MissionActivity.java: -------------------------------------------------------------------------------- 1 | package com.autel.sdksample.base.mission; 2 | 3 | import android.content.Intent; 4 | import android.content.pm.PackageManager; 5 | import android.os.Bundle; 6 | import android.support.v7.app.AppCompatActivity; 7 | import android.view.View; 8 | 9 | import com.autel.sdksample.R; 10 | import com.google.android.gms.common.ConnectionResult; 11 | import com.google.android.gms.common.GooglePlayServicesUtil; 12 | 13 | 14 | public class MissionActivity extends AppCompatActivity { 15 | final String TAG = getClass().getSimpleName(); 16 | 17 | @Override 18 | protected void onCreate(Bundle savedInstanceState) { 19 | setTitle("Mission"); 20 | super.onCreate(savedInstanceState); 21 | setContentView(R.layout.ac_mission); 22 | findViewById(R.id.GMap).setVisibility(isGoogleMapValidate() ? View.VISIBLE : View.GONE); 23 | } 24 | 25 | public void gMap(View view) { 26 | startActivity(new Intent(this, GMapMissionActivity.class)); 27 | } 28 | 29 | public void aMap(View view) { 30 | startActivity(new Intent(this, AMapMissionActivity.class)); 31 | } 32 | 33 | private boolean isGoogleMapValidate() { 34 | int playStatus = GooglePlayServicesUtil.isGooglePlayServicesAvailable(this); 35 | String googleServices = GooglePlayServicesUtil.GOOGLE_PLAY_SERVICES_PACKAGE; 36 | try { 37 | getPackageManager().getPackageInfo(googleServices, 0); 38 | return playStatus == ConnectionResult.SUCCESS; 39 | } catch (PackageManager.NameNotFoundException e) { 40 | e.printStackTrace(); 41 | } 42 | return false; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /app/src/main/java/com/autel/sdksample/base/mission/MissionType.java: -------------------------------------------------------------------------------- 1 | package com.autel.sdksample.base.mission; 2 | 3 | public enum MissionType { 4 | WAYPOINT(0), 5 | ORBIT(1), 6 | FOLLOW(2); 7 | int value; 8 | 9 | MissionType(int value) { 10 | this.value = value; 11 | } 12 | 13 | public static MissionType find(int value) { 14 | if (value == WAYPOINT.value) { 15 | return WAYPOINT; 16 | } 17 | if (value == ORBIT.value) { 18 | return ORBIT; 19 | } 20 | if (value == FOLLOW.value) { 21 | return FOLLOW; 22 | } 23 | return WAYPOINT; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /app/src/main/java/com/autel/sdksample/base/mission/adapter/FollowFinishActionAdapter.java: -------------------------------------------------------------------------------- 1 | package com.autel.sdksample.base.mission.adapter; 2 | 3 | import android.content.Context; 4 | 5 | import com.autel.common.mission.FollowFinishedAction; 6 | import com.autel.sdksample.base.adapter.SelectorAdapter; 7 | 8 | public class FollowFinishActionAdapter extends SelectorAdapter { 9 | 10 | public FollowFinishActionAdapter(Context context) { 11 | super(context); 12 | elementList.add(FollowFinishedAction.RETURN_HOME); 13 | elementList.add(FollowFinishedAction.RETURN_TO_MY_LOCATION); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /app/src/main/java/com/autel/sdksample/base/mission/adapter/OrbitFinishActionAdapter.java: -------------------------------------------------------------------------------- 1 | package com.autel.sdksample.base.mission.adapter; 2 | 3 | import android.content.Context; 4 | 5 | import com.autel.common.mission.OrbitFinishedAction; 6 | import com.autel.sdksample.base.adapter.SelectorAdapter; 7 | 8 | public class OrbitFinishActionAdapter extends SelectorAdapter { 9 | 10 | public OrbitFinishActionAdapter(Context context) { 11 | super(context); 12 | elementList.add(OrbitFinishedAction.HOVER); 13 | elementList.add(OrbitFinishedAction.RETURN_HOME); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /app/src/main/java/com/autel/sdksample/base/mission/adapter/WaypointFinishActionAdapter.java: -------------------------------------------------------------------------------- 1 | package com.autel.sdksample.base.mission.adapter; 2 | 3 | import android.content.Context; 4 | 5 | import com.autel.common.mission.xstar.WaypointFinishedAction; 6 | import com.autel.sdksample.base.adapter.SelectorAdapter; 7 | 8 | public class WaypointFinishActionAdapter extends SelectorAdapter { 9 | 10 | public WaypointFinishActionAdapter(Context context) { 11 | super(context); 12 | elementList.add(WaypointFinishedAction.HOVER); 13 | elementList.add(WaypointFinishedAction.RETURN_HOME); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /app/src/main/java/com/autel/sdksample/base/mission/fragment/MissionFragment.java: -------------------------------------------------------------------------------- 1 | package com.autel.sdksample.base.mission.fragment; 2 | 3 | import android.os.Bundle; 4 | import android.support.annotation.LayoutRes; 5 | import android.support.annotation.Nullable; 6 | import android.support.v4.app.Fragment; 7 | import android.view.LayoutInflater; 8 | import android.view.View; 9 | import android.view.ViewGroup; 10 | 11 | import com.autel.common.mission.AutelMission; 12 | import com.autel.sdksample.R; 13 | import com.autel.sdksample.base.mission.MapActivity; 14 | import com.autel.sdksample.base.mission.MapOperator; 15 | 16 | 17 | public abstract class MissionFragment extends Fragment { 18 | protected MapOperator mMapOperator; 19 | 20 | public MissionFragment() { 21 | } 22 | public MissionFragment(MapOperator mMapOperator) { 23 | super(); 24 | this.mMapOperator = mMapOperator; 25 | } 26 | 27 | @Override 28 | public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { 29 | View view = createView(R.layout.fragment_mission_menu); 30 | return view; 31 | } 32 | 33 | 34 | protected View createView(@LayoutRes int resource) { 35 | View view = View.inflate(getContext(), resource, null); 36 | initUi(view); 37 | return view; 38 | } 39 | 40 | private void initUi(View view) { 41 | if (getActivity() != null) { 42 | ((MapActivity) getActivity()).updateMissionInfo("Mission state : "); 43 | ((MapActivity) getActivity()).updateLogInfo("RealTimeInfo : "); 44 | } 45 | } 46 | 47 | public abstract AutelMission createAutelMission(); 48 | 49 | public abstract void onMapClick(double lat, double lot); 50 | public abstract void onMarkerClick(int position); 51 | 52 | public void onDestroy() { 53 | super.onDestroy(); 54 | } 55 | protected boolean isEmpty(String value) { 56 | return null == value || "".equals(value); 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /app/src/main/java/com/autel/sdksample/base/mission/fragment/OrbitMissionFragment.java: -------------------------------------------------------------------------------- 1 | package com.autel.sdksample.base.mission.fragment; 2 | 3 | import com.autel.sdksample.base.mission.AutelLatLng; 4 | import com.autel.sdksample.base.mission.MapOperator; 5 | import com.autel.sdksample.base.mission.MapRectifyUtil; 6 | 7 | public abstract class OrbitMissionFragment extends MissionFragment { 8 | public OrbitMissionFragment(){ 9 | super(); 10 | } 11 | 12 | public OrbitMissionFragment(MapOperator mMapOperator){ 13 | super(mMapOperator); 14 | } 15 | @Override 16 | public void onMapClick(double lat, double lot) { 17 | autelLatLng = new AutelLatLng(lat, lot); 18 | mMapOperator.updateOrbit(lat,lot); 19 | } 20 | 21 | AutelLatLng autelLatLng = null; 22 | 23 | public AutelLatLng getOrbitPoint() { 24 | AutelLatLng latLng = MapRectifyUtil.gcj2wgs(autelLatLng); 25 | return latLng; 26 | } 27 | 28 | @Override 29 | public void onDestroy() { 30 | super.onDestroy(); 31 | autelLatLng = null; 32 | } 33 | 34 | @Override 35 | public void onMarkerClick(int position) { 36 | 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /app/src/main/java/com/autel/sdksample/base/mission/fragment/WaypointMissionFragment.java: -------------------------------------------------------------------------------- 1 | package com.autel.sdksample.base.mission.fragment; 2 | 3 | import android.annotation.SuppressLint; 4 | 5 | import com.autel.common.mission.xstar.Waypoint; 6 | import com.autel.sdksample.base.mission.AutelLatLng; 7 | import com.autel.sdksample.base.mission.MapOperator; 8 | import com.autel.sdksample.base.mission.MapRectifyUtil; 9 | import com.autel.sdksample.base.mission.widget.WaypointSettingDialog; 10 | 11 | 12 | public abstract class WaypointMissionFragment extends MissionFragment { 13 | 14 | @SuppressLint("ValidFragment") 15 | public WaypointMissionFragment(MapOperator mMapOperator) { 16 | super(mMapOperator); 17 | } 18 | 19 | public WaypointMissionFragment() { 20 | } 21 | 22 | 23 | @Override 24 | public void onMapClick(double lat, double lot) { 25 | AutelLatLng latLng = MapRectifyUtil.gcj2wgs(new AutelLatLng(lat, lot)); 26 | mMapOperator.addWayPointMarker(lat, lot); 27 | waypointAdded(latLng); 28 | } 29 | 30 | @Override 31 | public void onMarkerClick(int position) { 32 | Waypoint waypoint = getWaypoint(position); 33 | if(null == waypoint){ 34 | return; 35 | } 36 | 37 | WaypointSettingDialog waypointSettingDialog = new WaypointSettingDialog(this.getActivity(), position, waypoint); 38 | waypointSettingDialog.showDialog(); 39 | } 40 | 41 | protected abstract Waypoint getWaypoint(int index); 42 | 43 | protected abstract void waypointAdded(AutelLatLng latLng); 44 | } 45 | -------------------------------------------------------------------------------- /app/src/main/java/com/autel/sdksample/base/util/FileUtils.java: -------------------------------------------------------------------------------- 1 | package com.autel.sdksample.base.util; 2 | 3 | import android.content.Context; 4 | import android.content.res.AssetManager; 5 | 6 | import java.io.BufferedOutputStream; 7 | import java.io.File; 8 | import java.io.FileOutputStream; 9 | import java.io.IOException; 10 | import java.io.InputStream; 11 | 12 | /** 13 | * Created by A13087 on 2017/5/19. 14 | */ 15 | 16 | public class FileUtils { 17 | 18 | public static void Initialize(Context context, String path, String fileName){ 19 | File modelFile = new File(path); 20 | if(!modelFile.exists()) { 21 | try { 22 | if(!modelFile.getParentFile().exists()){ 23 | modelFile.getParentFile().mkdirs(); 24 | } 25 | modelFile.createNewFile(); 26 | } catch (IOException e) { 27 | e.printStackTrace(); 28 | } 29 | } 30 | 31 | byte[] buffer = new byte[2048]; 32 | AssetManager assets = context.getAssets(); 33 | InputStream modelStream = null; 34 | BufferedOutputStream outputStream = null; 35 | 36 | try { 37 | modelStream = assets.open(fileName); 38 | outputStream = new BufferedOutputStream(new FileOutputStream(modelFile)); 39 | 40 | int count; 41 | while((count = modelStream.read(buffer)) != -1){ 42 | outputStream.write(buffer, 0, count); 43 | } 44 | } catch (IOException e) { 45 | e.printStackTrace(); 46 | }finally { 47 | if(modelStream != null){ 48 | try { 49 | modelStream.close(); 50 | } catch (IOException e) { 51 | e.printStackTrace(); 52 | } 53 | } 54 | 55 | if(outputStream != null){ 56 | try { 57 | outputStream.close(); 58 | } catch (IOException e) { 59 | e.printStackTrace(); 60 | } 61 | } 62 | } 63 | 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /app/src/main/java/com/autel/sdksample/evo/G2BatteryActivity.java: -------------------------------------------------------------------------------- 1 | package com.autel.sdksample.evo; 2 | 3 | import android.os.Bundle; 4 | import android.view.View; 5 | 6 | import com.autel.common.CallbackWithOneParam; 7 | import com.autel.common.battery.evo.EvoBatteryInfo; 8 | import com.autel.common.error.AutelError; 9 | import com.autel.sdk.battery.AutelBattery; 10 | import com.autel.sdk.battery.EvoBattery; 11 | import com.autel.sdk.product.BaseProduct; 12 | import com.autel.sdk.product.EvoAircraft; 13 | import com.autel.sdksample.R; 14 | import com.autel.sdksample.base.BatteryActivity; 15 | 16 | 17 | public class G2BatteryActivity extends BatteryActivity { 18 | private EvoBattery mXStarEvoBattery; 19 | 20 | @Override 21 | protected void onCreate(Bundle savedInstanceState) { 22 | super.onCreate(savedInstanceState); 23 | setTitle("Battery"); 24 | } 25 | 26 | @Override 27 | protected AutelBattery initController(BaseProduct product) { 28 | mXStarEvoBattery = ((EvoAircraft) product).getBattery(); 29 | return mXStarEvoBattery; 30 | } 31 | 32 | @Override 33 | protected int getCustomViewResId() { 34 | return R.layout.activity_g2_battery; 35 | } 36 | 37 | @Override 38 | protected void initUi() { 39 | super.initUi(); 40 | findViewById(R.id.setBatteryRealTimeDataListener).setOnClickListener(new View.OnClickListener() { 41 | @Override 42 | public void onClick(View v) { 43 | mXStarEvoBattery.setBatteryStateListener(new CallbackWithOneParam() { 44 | @Override 45 | public void onFailure(AutelError error) { 46 | logOut("setBatteryStateListener error : " + error.getDescription()); 47 | } 48 | 49 | @Override 50 | public void onSuccess(EvoBatteryInfo data) { 51 | logOut("setBatteryStateListener data current battery : " + data.toString()); 52 | } 53 | }); 54 | } 55 | }); 56 | 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /app/src/main/java/com/autel/sdksample/evo/G2RemoteControllerActivity.java: -------------------------------------------------------------------------------- 1 | package com.autel.sdksample.evo; 2 | 3 | import com.autel.sdk.product.BaseProduct; 4 | import com.autel.sdk.remotecontroller.AutelRemoteController; 5 | import com.autel.sdksample.R; 6 | import com.autel.sdksample.base.RemoteControllerActivity; 7 | 8 | 9 | public class G2RemoteControllerActivity extends RemoteControllerActivity { 10 | 11 | 12 | @Override 13 | protected AutelRemoteController initController(BaseProduct product) { 14 | return product.getRemoteController(); 15 | } 16 | 17 | @Override 18 | protected int getCustomViewResId() { 19 | return R.layout.activity_rc; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /app/src/main/java/com/autel/sdksample/evo/adapter/BandModeAdapter.java: -------------------------------------------------------------------------------- 1 | package com.autel.sdksample.evo.adapter; 2 | 3 | import android.content.Context; 4 | 5 | import com.autel.common.dsp.evo.BandMode; 6 | import com.autel.sdksample.base.adapter.SelectorAdapter; 7 | 8 | public class BandModeAdapter extends SelectorAdapter { 9 | 10 | public BandModeAdapter(Context context) { 11 | super(context); 12 | elementList.add(BandMode.MODE_1_4G); 13 | elementList.add(BandMode.MODE_2_4G); 14 | elementList.add(BandMode.MODE_2_4G_900M); 15 | elementList.add(BandMode.MODE_900M); 16 | elementList.add(BandMode.UNKNOWN); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /app/src/main/java/com/autel/sdksample/evo/adapter/BandwidthAdapter.java: -------------------------------------------------------------------------------- 1 | package com.autel.sdksample.evo.adapter; 2 | 3 | import android.content.Context; 4 | 5 | import com.autel.common.dsp.evo.Bandwidth; 6 | import com.autel.sdksample.base.adapter.SelectorAdapter; 7 | 8 | public class BandwidthAdapter extends SelectorAdapter { 9 | 10 | public BandwidthAdapter(Context context) { 11 | super(context); 12 | elementList.add(Bandwidth.WIDTH_3M); 13 | elementList.add(Bandwidth.WIDTH_5M); 14 | elementList.add(Bandwidth.WIDTH_10M); 15 | elementList.add(Bandwidth.WIDTH_20M); 16 | elementList.add(Bandwidth.UNKNOWN); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /app/src/main/java/com/autel/sdksample/evo/adapter/GimbalAxisAdapter.java: -------------------------------------------------------------------------------- 1 | package com.autel.sdksample.evo.adapter; 2 | 3 | import android.content.Context; 4 | 5 | import com.autel.common.gimbal.GimbalAxisType; 6 | import com.autel.sdksample.base.adapter.SelectorAdapter; 7 | 8 | public class GimbalAxisAdapter extends SelectorAdapter { 9 | 10 | public GimbalAxisAdapter(Context context) { 11 | super(context); 12 | elementList.add(GimbalAxisType.ROLL); 13 | elementList.add(GimbalAxisType.PITCH); 14 | elementList.add(GimbalAxisType.YAW); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /app/src/main/java/com/autel/sdksample/evo/adapter/TransferModeAdapter.java: -------------------------------------------------------------------------------- 1 | package com.autel.sdksample.evo.adapter; 2 | 3 | import android.content.Context; 4 | 5 | import com.autel.common.dsp.evo.TransferMode; 6 | import com.autel.sdksample.base.adapter.SelectorAdapter; 7 | 8 | public class TransferModeAdapter extends SelectorAdapter { 9 | 10 | public TransferModeAdapter(Context context) { 11 | super(context); 12 | elementList.add(TransferMode.FLUENCY); 13 | elementList.add(TransferMode.HIGH_DEFINITION); 14 | elementList.add(TransferMode.NORMAL); 15 | elementList.add(TransferMode.UNKNOWN); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /app/src/main/java/com/autel/sdksample/evo/adapter/VisualSettingSwitchBladeAdapter.java: -------------------------------------------------------------------------------- 1 | package com.autel.sdksample.evo.adapter; 2 | 3 | import android.content.Context; 4 | 5 | import com.autel.common.flycontroller.visual.VisualSettingSwitchblade; 6 | import com.autel.sdksample.base.adapter.SelectorAdapter; 7 | 8 | import java.util.Arrays; 9 | 10 | public class VisualSettingSwitchBladeAdapter extends SelectorAdapter { 11 | 12 | public VisualSettingSwitchBladeAdapter(Context context) { 13 | super(context); 14 | elementList.addAll(Arrays.asList(VisualSettingSwitchblade.values())); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /app/src/main/java/com/autel/sdksample/evo/mission/adapter/EvoEntryDirectionAdapter.java: -------------------------------------------------------------------------------- 1 | package com.autel.sdksample.evo.mission.adapter; 2 | 3 | import android.content.Context; 4 | 5 | import com.autel.common.mission.evo.OrbitEntryDirection; 6 | import com.autel.sdksample.base.adapter.SelectorAdapter; 7 | 8 | public class EvoEntryDirectionAdapter extends SelectorAdapter { 9 | 10 | public EvoEntryDirectionAdapter(Context context) { 11 | super(context); 12 | elementList.add(OrbitEntryDirection.EAST); 13 | elementList.add(OrbitEntryDirection.NEAREST); 14 | elementList.add(OrbitEntryDirection.NORTH); 15 | elementList.add(OrbitEntryDirection.SOUTH); 16 | elementList.add(OrbitEntryDirection.WEST); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /app/src/main/java/com/autel/sdksample/evo/mission/adapter/EvoHeadingDirectionAdapter.java: -------------------------------------------------------------------------------- 1 | package com.autel.sdksample.evo.mission.adapter; 2 | 3 | import android.content.Context; 4 | 5 | import com.autel.common.mission.evo.OrbitHeadingDirection; 6 | import com.autel.sdksample.base.adapter.SelectorAdapter; 7 | 8 | public class EvoHeadingDirectionAdapter extends SelectorAdapter { 9 | 10 | public EvoHeadingDirectionAdapter(Context context) { 11 | super(context); 12 | elementList.add(OrbitHeadingDirection.BACKWARD); 13 | elementList.add(OrbitHeadingDirection.CUSTOM); 14 | elementList.add(OrbitHeadingDirection.FACE_TO_POI); 15 | elementList.add(OrbitHeadingDirection.FORWARD); 16 | elementList.add(OrbitHeadingDirection.OUTWARD); 17 | 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /app/src/main/java/com/autel/sdksample/evo/mission/adapter/EvoRotateDirectionAdapter.java: -------------------------------------------------------------------------------- 1 | package com.autel.sdksample.evo.mission.adapter; 2 | 3 | import android.content.Context; 4 | 5 | import com.autel.common.mission.evo.OrbitRotateDirection; 6 | import com.autel.sdksample.base.adapter.SelectorAdapter; 7 | 8 | public class EvoRotateDirectionAdapter extends SelectorAdapter { 9 | 10 | public EvoRotateDirectionAdapter(Context context) { 11 | super(context); 12 | elementList.add(OrbitRotateDirection.Clockwise); 13 | elementList.add(OrbitRotateDirection.Counterclockwise); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /app/src/main/java/com/autel/sdksample/evo/mission/adapter/EvoWaypointFinishActionAdapter.java: -------------------------------------------------------------------------------- 1 | package com.autel.sdksample.evo.mission.adapter; 2 | 3 | import android.content.Context; 4 | 5 | import com.autel.common.mission.evo.EvoWaypointFinishedAction; 6 | import com.autel.sdksample.base.adapter.SelectorAdapter; 7 | 8 | public class EvoWaypointFinishActionAdapter extends SelectorAdapter { 9 | 10 | public EvoWaypointFinishActionAdapter(Context context) { 11 | super(context); 12 | elementList.add(EvoWaypointFinishedAction.KEEP_ON_LAST_POINT); 13 | elementList.add(EvoWaypointFinishedAction.LAND_ON_LAST_POINT); 14 | elementList.add(EvoWaypointFinishedAction.RETURN_HOME); 15 | elementList.add(EvoWaypointFinishedAction.RETURN_TO_FIRST_POINT); 16 | elementList.add(EvoWaypointFinishedAction.STOP_ON_LAST_POINT); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /app/src/main/java/com/autel/sdksample/evo/mission/bean/AdvancedItemEnum.java: -------------------------------------------------------------------------------- 1 | package com.autel.sdksample.evo.mission.bean; 2 | 3 | /** 4 | * Created by autel on 17/11/28. 5 | */ 6 | 7 | public enum AdvancedItemEnum { 8 | 9 | ORBIT_FLIGHT_DIRECTION("orbit_flight_direction"), 10 | ORBIT_HEADING("orbit_heading"), 11 | ORBIT_ENTRY_POINT("orbit_entry_point"), 12 | ORBIT_COMPLETION("orbit_completion"), 13 | WAYPOINT_HEADING("waypoint_heading"), 14 | WAYPOINT_FINISH_ACTION("waypoint_finish_action"), 15 | WAYPOINT_AVOID("waypoint_avoid"), 16 | WAYPOINT_CREATE_CHOICE("waypoint_create_choice"), 17 | WAYPOINT_MISSION("waypoint_mission"), 18 | DEFAULT("default"); 19 | 20 | private final String value; 21 | 22 | AdvancedItemEnum(String value) { 23 | this.value = value; 24 | } 25 | 26 | public String value() { 27 | return this.value; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /app/src/main/java/com/autel/sdksample/evo/mission/bean/MissionFileBean.java: -------------------------------------------------------------------------------- 1 | package com.autel.sdksample.evo.mission.bean; 2 | 3 | /** 4 | * Created by A15387 on 2017/11/21. 5 | */ 6 | 7 | public class MissionFileBean { 8 | 9 | private String name; 10 | private boolean checkState; 11 | 12 | public String getName() { 13 | return name; 14 | } 15 | 16 | public void setName(String name) { 17 | this.name = name; 18 | } 19 | 20 | public boolean isCheckState() { 21 | return checkState; 22 | } 23 | 24 | public void setCheckState(boolean checkState) { 25 | this.checkState = checkState; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /app/src/main/java/com/autel/sdksample/evo/mission/bean/PhoneGPS.java: -------------------------------------------------------------------------------- 1 | package com.autel.sdksample.evo.mission.bean; 2 | 3 | import android.content.Context; 4 | import android.location.Location; 5 | import android.location.LocationManager; 6 | 7 | 8 | /** 9 | * Created by A15387 on 2016/5/30. 10 | */ 11 | @SuppressWarnings("DefaultFileTemplate") 12 | public class PhoneGPS { 13 | 14 | private static Location mLocation; 15 | 16 | public static void setPhoneGPS(Location location){ 17 | mLocation = location; 18 | } 19 | 20 | public static Location getLocation(){ 21 | return mLocation; 22 | } 23 | 24 | /** 25 | * 判断手机GPS是否打开 26 | * @param context 27 | * @return 28 | */ 29 | public static boolean checkPhoneGpsIsValid(Context context){ 30 | LocationManager locationManager = (LocationManager) context.getSystemService(Context.LOCATION_SERVICE); 31 | if(locationManager == null){ 32 | return false; 33 | } 34 | try { 35 | return locationManager.isProviderEnabled(LocationManager.GPS_PROVIDER) || locationManager.isProviderEnabled(LocationManager.NETWORK_PROVIDER); 36 | }catch (Exception e){ 37 | e.printStackTrace(); 38 | return false; 39 | } 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /app/src/main/java/com/autel/sdksample/evo/mission/util/AmapViewUtilImpl.java: -------------------------------------------------------------------------------- 1 | package com.autel.sdksample.evo.mission.util; 2 | 3 | import android.content.Context; 4 | import android.os.Bundle; 5 | import android.view.View; 6 | 7 | import com.amap.api.maps.AMap; 8 | import com.amap.api.maps.AMapOptions; 9 | import com.amap.api.maps.MapView; 10 | import com.amap.api.maps.UiSettings; 11 | import com.autel.sdksample.evo.mission.fragment.MapFragment; 12 | 13 | /** 14 | * Created by A15387 on 2017/9/1. 15 | */ 16 | 17 | @SuppressWarnings("DefaultFileTemplate") 18 | public class AmapViewUtilImpl implements MapViewUtilImpl { 19 | 20 | 21 | private final MapView mapView; 22 | private AMap aMap; 23 | private MapModelImpl mapModel; 24 | 25 | public AmapViewUtilImpl(Context mContext) { 26 | mapView = new MapView(mContext); 27 | } 28 | 29 | @Override 30 | public void initMap(MapFragment.OnMapReadyCallBack onMapReadyCallBack) { 31 | aMap = mapView.getMap(); 32 | aMap.setMapType(AMap.MAP_TYPE_SATELLITE); 33 | UiSettings amapSettings = aMap.getUiSettings(); 34 | amapSettings.setZoomControlsEnabled(false); 35 | amapSettings.setRotateGesturesEnabled(false); 36 | amapSettings.setCompassEnabled(false); 37 | amapSettings.setScaleControlsEnabled(true); 38 | amapSettings.setLogoPosition(AMapOptions.LOGO_POSITION_BOTTOM_RIGHT); 39 | mapModel = new AMapModel(aMap); 40 | onMapReadyCallBack.onMapReady(); 41 | } 42 | 43 | @Override 44 | public MapModelImpl getMapModel() { 45 | return mapModel; 46 | } 47 | 48 | @Override 49 | public void onCreate(Bundle savedInstanceState) { 50 | mapView.onCreate(savedInstanceState); 51 | } 52 | 53 | @Override 54 | public void onResume() { 55 | mapView.onResume(); 56 | } 57 | 58 | @Override 59 | public void onPause() { 60 | mapView.onPause(); 61 | } 62 | 63 | @Override 64 | public void onDestroy() { 65 | mapView.onDestroy(); 66 | } 67 | 68 | @Override 69 | public View getMapView() { 70 | return mapView; 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /app/src/main/java/com/autel/sdksample/evo/mission/util/AutelConfigManager.java: -------------------------------------------------------------------------------- 1 | package com.autel.sdksample.evo.mission.util; 2 | 3 | 4 | import android.content.Context; 5 | 6 | /** 7 | * Created by A16343 on 2016/7/5. 8 | */ 9 | @SuppressWarnings("DefaultFileTemplate") 10 | public class AutelConfigManager { 11 | private static AutelConfigManager autelConfigManager; 12 | 13 | private AutelConfigManager() { 14 | 15 | } 16 | 17 | public static AutelConfigManager instance() { 18 | if (null == autelConfigManager) { 19 | synchronized (AutelConfigManager.class) { 20 | if (null == autelConfigManager) { 21 | autelConfigManager = new AutelConfigManager(); 22 | } 23 | } 24 | } 25 | return autelConfigManager; 26 | } 27 | private Context mContext; 28 | 29 | private void initManager(Context context) { 30 | this.mContext = context; 31 | } 32 | 33 | public static void init(Context context) { 34 | instance().initManager(context); 35 | } 36 | 37 | public Context getAppContext() { 38 | return mContext; 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /app/src/main/java/com/autel/sdksample/evo/mission/util/DistanceUtils.java: -------------------------------------------------------------------------------- 1 | package com.autel.sdksample.evo.mission.util; 2 | 3 | import android.location.Location; 4 | 5 | /** 6 | * Created by A13087 on 2016/5/25. 7 | */ 8 | @SuppressWarnings("DefaultFileTemplate") 9 | public class DistanceUtils { 10 | 11 | public static int distanceBetweenPoints(double startLat, double startLng, double endLat, double endLng) { 12 | 13 | float[] results = new float[3]; 14 | Location.distanceBetween(startLat, startLng, endLat, endLng, results); 15 | return (int) results[0]; 16 | } 17 | 18 | public static float distanceBetweenPointsAsFloat(double startLat, double startLng, double endLat, double endLng) { 19 | float[] results = new float[3]; 20 | Location.distanceBetween(startLat, startLng, endLat, endLng, results); 21 | return results[0]; 22 | } 23 | 24 | 25 | } -------------------------------------------------------------------------------- /app/src/main/java/com/autel/sdksample/evo/mission/util/MapImageUtil.java: -------------------------------------------------------------------------------- 1 | package com.autel.sdksample.evo.mission.util; 2 | 3 | import android.graphics.Bitmap; 4 | import android.graphics.BitmapFactory; 5 | 6 | 7 | /** 8 | * Created by A15387 on 2016/5/17. 9 | */ 10 | public class MapImageUtil { 11 | 12 | public static Bitmap drawableToBitmap(int imgId) { 13 | //get the bitmap from drawable 14 | return BitmapFactory.decodeResource(AutelConfigManager.instance().getAppContext().getResources(), 15 | imgId); 16 | } 17 | 18 | public static Bitmap getDroneCombineBitmap(Bitmap drone,Bitmap droneDir){ 19 | return Bitmap.createBitmap(drone.getWidth(),drone.getHeight()+droneDir.getHeight(),Bitmap.Config.ARGB_8888); 20 | } 21 | 22 | public static float dip2px(float paramFloat) { 23 | return (int)(0.5F + paramFloat * AutelConfigManager.instance().getAppContext().getResources().getDisplayMetrics().density); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /app/src/main/java/com/autel/sdksample/evo/mission/util/MapViewUtilFactory.java: -------------------------------------------------------------------------------- 1 | package com.autel.sdksample.evo.mission.util; 2 | 3 | import android.content.Context; 4 | import android.content.pm.PackageManager; 5 | 6 | import com.autel.internal.sdk.util.AutelSharedPreferencesUtils; 7 | import com.autel.sdksample.evo.mission.bean.MapConstant; 8 | import com.google.android.gms.common.ConnectionResult; 9 | import com.google.android.gms.common.GoogleApiAvailability; 10 | 11 | /** 12 | * Created by A15387 on 2017/9/1. 13 | */ 14 | 15 | @SuppressWarnings("DefaultFileTemplate") 16 | public class MapViewUtilFactory { 17 | 18 | 19 | public static MapViewUtilImpl instanceMapViewUtil(Context mContext){ 20 | final int playStatus = GoogleApiAvailability.getInstance().isGooglePlayServicesAvailable(mContext); 21 | final boolean isValid = playStatus == ConnectionResult.SUCCESS; 22 | boolean isUseAmap = AutelSharedPreferencesUtils.getSpValueForBoolean(mContext, MapConstant.USE_AMAP_SP_KEY,false); 23 | final String googleServices = GoogleApiAvailability.GOOGLE_PLAY_SERVICES_PACKAGE; 24 | if (isApkInstalled(mContext, googleServices) && isValid && !isUseAmap) { 25 | return new GmapViewUtilImpl(mContext); 26 | } else { 27 | return new AmapViewUtilImpl(mContext); 28 | } 29 | } 30 | 31 | 32 | /** 33 | * 34 | * 判断是否安装是否安装 35 | * 36 | * @param context 37 | * @param appName 38 | * 应用的包名。 39 | * @return true 安装 false 未安装 40 | */ 41 | public static boolean isApkInstalled(Context context, String appName) { 42 | 43 | try { 44 | context.getPackageManager ().getPackageInfo (appName, 0); 45 | return true; 46 | } catch (PackageManager.NameNotFoundException e) { 47 | return false; 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /app/src/main/java/com/autel/sdksample/evo/mission/util/MapViewUtilImpl.java: -------------------------------------------------------------------------------- 1 | package com.autel.sdksample.evo.mission.util; 2 | 3 | import android.os.Bundle; 4 | import android.view.View; 5 | 6 | import com.autel.sdksample.evo.mission.fragment.MapFragment; 7 | 8 | 9 | /** 10 | * Created by A15387 on 2017/9/1. 11 | */ 12 | 13 | @SuppressWarnings("DefaultFileTemplate") 14 | public interface MapViewUtilImpl { 15 | 16 | void initMap(MapFragment.OnMapReadyCallBack onMapReadyCallback); 17 | MapModelImpl getMapModel(); 18 | void onCreate(Bundle savedInstanceState); 19 | void onResume(); 20 | void onPause(); 21 | void onDestroy(); 22 | View getMapView(); 23 | 24 | } 25 | -------------------------------------------------------------------------------- /app/src/main/java/com/autel/sdksample/evo/mission/widge/AutelRadioButton.java: -------------------------------------------------------------------------------- 1 | package com.autel.sdksample.evo.mission.widge; 2 | 3 | import android.content.Context; 4 | import android.content.res.AssetManager; 5 | import android.graphics.Typeface; 6 | import android.util.AttributeSet; 7 | 8 | /** 9 | * Created by A17164 on 2017/11/29. 10 | */ 11 | 12 | public class AutelRadioButton extends android.support.v7.widget.AppCompatRadioButton { 13 | private Typeface bold_Typeface; 14 | 15 | public AutelRadioButton(Context context) { 16 | super(context); 17 | init(context); 18 | } 19 | 20 | public AutelRadioButton(Context context, AttributeSet attrs) { 21 | super(context, attrs); 22 | init(context); 23 | } 24 | 25 | public AutelRadioButton(Context context, AttributeSet attrs, int defStyleAttr) { 26 | super(context, attrs, defStyleAttr); 27 | init(context); 28 | } 29 | 30 | private void init(Context context) { 31 | AssetManager regular_manager = context.getAssets(); 32 | setTypeface(bold_Typeface); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /app/src/main/java/com/autel/sdksample/evo/mission/widge/GestureCallbacks.java: -------------------------------------------------------------------------------- 1 | package com.autel.sdksample.evo.mission.widge; 2 | 3 | 4 | import com.autel.sdksample.evo.mission.bean.AutelGPSLatLng; 5 | 6 | import java.util.List; 7 | 8 | public interface GestureCallbacks { 9 | 10 | void projectMarker(List path); 11 | 12 | int getRemainMax(); 13 | } -------------------------------------------------------------------------------- /app/src/main/java/com/autel/sdksample/evo2/Evo2BatteryActivity.java: -------------------------------------------------------------------------------- 1 | package com.autel.sdksample.evo2; 2 | 3 | import android.os.Bundle; 4 | import android.view.View; 5 | 6 | import com.autel.common.CallbackWithOneParam; 7 | import com.autel.common.battery.evo.EvoBatteryInfo; 8 | import com.autel.common.error.AutelError; 9 | import com.autel.sdk.battery.AutelBattery; 10 | import com.autel.sdk.battery.EvoBattery; 11 | import com.autel.sdk.product.BaseProduct; 12 | import com.autel.sdk.product.Evo2Aircraft; 13 | import com.autel.sdksample.R; 14 | import com.autel.sdksample.base.BatteryActivity; 15 | 16 | 17 | public class Evo2BatteryActivity extends BatteryActivity { 18 | private EvoBattery mXStarEvoBattery; 19 | 20 | @Override 21 | protected void onCreate(Bundle savedInstanceState) { 22 | super.onCreate(savedInstanceState); 23 | setTitle("Battery"); 24 | } 25 | 26 | @Override 27 | protected AutelBattery initController(BaseProduct product) { 28 | mXStarEvoBattery = ((Evo2Aircraft) product).getBattery(); 29 | return mXStarEvoBattery; 30 | } 31 | 32 | @Override 33 | protected int getCustomViewResId() { 34 | return R.layout.activity_g2_battery; 35 | } 36 | 37 | @Override 38 | protected void initUi() { 39 | super.initUi(); 40 | findViewById(R.id.setBatteryRealTimeDataListener).setOnClickListener(new View.OnClickListener() { 41 | @Override 42 | public void onClick(View v) { 43 | mXStarEvoBattery.setBatteryStateListener(new CallbackWithOneParam() { 44 | @Override 45 | public void onFailure(AutelError error) { 46 | logOut("setBatteryStateListener error : " + error.getDescription()); 47 | } 48 | 49 | @Override 50 | public void onSuccess(EvoBatteryInfo data) { 51 | logOut("setBatteryStateListener data current battery : " + data.toString()); 52 | } 53 | }); 54 | } 55 | }); 56 | 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /app/src/main/java/com/autel/sdksample/evo2/mission/Evo2MissionActivity.java: -------------------------------------------------------------------------------- 1 | package com.autel.sdksample.evo2.mission; 2 | 3 | import android.content.Intent; 4 | import android.os.Bundle; 5 | import android.support.v7.app.AppCompatActivity; 6 | import android.view.View; 7 | 8 | import com.autel.sdksample.R; 9 | 10 | 11 | public class Evo2MissionActivity extends AppCompatActivity { 12 | final String TAG = getClass().getSimpleName(); 13 | 14 | @Override 15 | protected void onCreate(Bundle savedInstanceState) { 16 | setTitle("Evo2 Mission"); 17 | super.onCreate(savedInstanceState); 18 | setContentView(R.layout.ac_mission_evo2); 19 | findViewById(R.id.WayPoint).setOnClickListener(new View.OnClickListener() { 20 | @Override 21 | public void onClick(View view) { 22 | startActivity(new Intent(Evo2MissionActivity.this, Evo2WayPointActivity.class)); 23 | } 24 | }); 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /app/src/main/java/com/autel/sdksample/premium/XStarPremiumBatteryActivity.java: -------------------------------------------------------------------------------- 1 | package com.autel.sdksample.premium; 2 | 3 | import com.autel.sdk.battery.AutelBattery; 4 | import com.autel.sdk.product.BaseProduct; 5 | import com.autel.sdk.product.XStarPremiumAircraft; 6 | import com.autel.sdksample.xstar.XStarBatteryActivity; 7 | 8 | 9 | public class XStarPremiumBatteryActivity extends XStarBatteryActivity { 10 | 11 | @Override 12 | protected AutelBattery initController(BaseProduct product) { 13 | mXStarBattery = ((XStarPremiumAircraft) product).getBattery(); 14 | return mXStarBattery; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /app/src/main/java/com/autel/sdksample/premium/XStarPremiumDspActivity.java: -------------------------------------------------------------------------------- 1 | package com.autel.sdksample.premium; 2 | 3 | import android.view.View; 4 | 5 | import com.autel.sdk.dsp.AutelDsp; 6 | import com.autel.sdk.dsp.XStarDsp; 7 | import com.autel.sdk.product.BaseProduct; 8 | import com.autel.sdk.product.XStarPremiumAircraft; 9 | import com.autel.sdksample.R; 10 | import com.autel.sdksample.xstar.XStarDspActivity; 11 | 12 | /** 13 | * Created by A16343 on 2017/9/12. 14 | */ 15 | 16 | public class XStarPremiumDspActivity extends XStarDspActivity { 17 | XStarDsp mXStarDsp; 18 | 19 | @Override 20 | protected AutelDsp initController(BaseProduct product) { 21 | mXStarDsp = ((XStarPremiumAircraft) product).getDsp(); 22 | return mXStarDsp; 23 | } 24 | 25 | @Override 26 | protected void initUi() { 27 | super.initUi(); 28 | boolean usbEnable = mXStarDsp.isUSBEnable(); 29 | findViewById(R.id.updateSSIDLayout).setVisibility(usbEnable ? View.GONE : View.VISIBLE); 30 | findViewById(R.id.getCurrentSSIDInfo).setVisibility(usbEnable ? View.GONE : View.VISIBLE); 31 | findViewById(R.id.resetWifi).setVisibility(usbEnable ? View.GONE : View.VISIBLE); 32 | findViewById(R.id.setCurrentRFLayout).setVisibility(usbEnable ? View.VISIBLE : View.GONE); 33 | findViewById(R.id.getCurrentRFLayout).setVisibility(usbEnable ? View.VISIBLE : View.GONE); 34 | findViewById(R.id.scanRFLayout).setVisibility(usbEnable ? View.VISIBLE : View.GONE); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /app/src/main/java/com/autel/sdksample/premium/XStarPremiumFlyControllerActivity.java: -------------------------------------------------------------------------------- 1 | package com.autel.sdksample.premium; 2 | 3 | import com.autel.sdk.flycontroller.AutelFlyController; 4 | import com.autel.sdk.product.BaseProduct; 5 | import com.autel.sdk.product.XStarPremiumAircraft; 6 | import com.autel.sdksample.xstar.XStarFlyControllerActivity; 7 | 8 | /** 9 | * Created by A16343 on 2017/9/6. 10 | */ 11 | 12 | public class XStarPremiumFlyControllerActivity extends XStarFlyControllerActivity { 13 | @Override 14 | protected AutelFlyController initController(BaseProduct product) { 15 | mXStarFlyController = ((XStarPremiumAircraft) product).getFlyController(); 16 | return mXStarFlyController; 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /app/src/main/java/com/autel/sdksample/premium/XStarPremiumGimbalActivity.java: -------------------------------------------------------------------------------- 1 | package com.autel.sdksample.premium; 2 | 3 | import android.view.View; 4 | 5 | import com.autel.common.CallbackWithOneParam; 6 | import com.autel.common.error.AutelError; 7 | import com.autel.sdk.gimbal.AutelGimbal; 8 | import com.autel.sdk.gimbal.XStarGimbal; 9 | import com.autel.sdk.product.BaseProduct; 10 | import com.autel.sdk.product.XStarPremiumAircraft; 11 | import com.autel.sdksample.R; 12 | import com.autel.sdksample.base.gimbal.GimbalActivity; 13 | 14 | /** 15 | * Created by A16343 on 2017/9/6. 16 | */ 17 | 18 | public class XStarPremiumGimbalActivity extends GimbalActivity { 19 | private XStarGimbal mXStarGimbal; 20 | @Override 21 | protected AutelGimbal initController(BaseProduct product) { 22 | mXStarGimbal = ((XStarPremiumAircraft) product).getGimbal(); 23 | return mXStarGimbal; 24 | } 25 | 26 | @Override 27 | protected int getCustomViewResId() { 28 | return R.layout.activity_xstar_gimbal; 29 | } 30 | 31 | @Override 32 | protected void initUi() { 33 | super.initUi(); 34 | findViewById(R.id.setGimbalAngleListener).setOnClickListener(new View.OnClickListener() { 35 | @Override 36 | public void onClick(View v) { 37 | mXStarGimbal.setAngleListener(new CallbackWithOneParam() { 38 | 39 | @Override 40 | public void onSuccess(Integer integer) { 41 | logOut("setAngleListener onSuccess " + integer); 42 | } 43 | 44 | @Override 45 | public void onFailure(AutelError autelError) { 46 | logOut("setAngleListener error " + autelError.getDescription()); 47 | } 48 | }); 49 | } 50 | }); 51 | findViewById(R.id.resetGimbalAngleListener).setOnClickListener(new View.OnClickListener() { 52 | @Override 53 | public void onClick(View v) { 54 | mXStarGimbal.setAngleListener(null); 55 | } 56 | }); 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /app/src/main/java/com/autel/sdksample/premium/XStarPremiumRemoteControllerActivity.java: -------------------------------------------------------------------------------- 1 | package com.autel.sdksample.premium; 2 | 3 | import com.autel.sdk.product.BaseProduct; 4 | import com.autel.sdk.remotecontroller.AutelRemoteController; 5 | import com.autel.sdksample.R; 6 | import com.autel.sdksample.base.RemoteControllerActivity; 7 | 8 | 9 | public class XStarPremiumRemoteControllerActivity extends RemoteControllerActivity { 10 | 11 | @Override 12 | protected AutelRemoteController initController(BaseProduct product) { 13 | return product.getRemoteController(); 14 | } 15 | 16 | @Override 17 | protected int getCustomViewResId() { 18 | return R.layout.activity_rc; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /app/src/main/java/com/autel/sdksample/rtk/RtkBaseActivity.java: -------------------------------------------------------------------------------- 1 | package com.autel.sdksample.rtk; 2 | 3 | import android.os.Bundle; 4 | 5 | import com.autel.common.CallbackWithOneParam; 6 | import com.autel.common.error.AutelError; 7 | import com.autel.common.flycontroller.AuthInfo; 8 | import com.autel.sdk.flycontroller.AutelFlyController; 9 | import com.autel.sdk.flycontroller.Evo2FlyController; 10 | import com.autel.sdk.product.BaseProduct; 11 | import com.autel.sdk.product.Evo2Aircraft; 12 | import com.autel.sdksample.base.BaseActivity; 13 | import com.autel.util.log.AutelLog; 14 | 15 | 16 | public abstract class RtkBaseActivity extends BaseActivity { 17 | protected final String TAG = getClass().getSimpleName(); 18 | protected Evo2FlyController flyController; 19 | protected AuthInfo authInfo; 20 | public String GGA = "$GPGGA,000001,3112.518576,N,12127.901251,E,1,8,1,0,M,-32,M,3,0*4B"; 21 | 22 | @Override 23 | protected AutelFlyController initController(BaseProduct product) { 24 | flyController = ((Evo2Aircraft) product).getFlyController(); 25 | getGGA(); 26 | return flyController; 27 | } 28 | 29 | 30 | @Override 31 | protected void onCreate(Bundle savedInstanceState) { 32 | super.onCreate(savedInstanceState); 33 | setTitle("RTK测试"); 34 | } 35 | 36 | void getGGA(){ 37 | if(null != flyController) 38 | flyController.setRtkGGAListener( new CallbackWithOneParam() { 39 | @Override 40 | public void onSuccess(byte[] bytes) { 41 | GGA = new String(bytes); 42 | AutelLog.debug_i("RTK", "onSuccess data.len:" + GGA); 43 | // GGA = "$GPGGA,054514.000,2338.5260,N,11501.9686,E,1,7,1.27,89.2,M,-2.3,M,,*7F"; 44 | } 45 | 46 | @Override 47 | public void onFailure(AutelError autelError) { 48 | 49 | } 50 | }); 51 | } 52 | 53 | 54 | @Override 55 | protected void onDestroy() { 56 | super.onDestroy(); 57 | if(null != flyController) 58 | flyController.setRtkGGAListener(null); 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /app/src/main/java/com/autel/sdksample/util/FileUtils.java: -------------------------------------------------------------------------------- 1 | package com.autel.sdksample.util; 2 | 3 | import android.content.Context; 4 | import android.content.res.AssetManager; 5 | 6 | import java.io.BufferedOutputStream; 7 | import java.io.File; 8 | import java.io.FileOutputStream; 9 | import java.io.IOException; 10 | import java.io.InputStream; 11 | 12 | /** 13 | * Created by A13087 on 2017/5/19. 14 | */ 15 | 16 | public class FileUtils { 17 | 18 | public static void Initialize(Context context, String path, String fileName){ 19 | File modelFile = new File(path); 20 | if(!modelFile.exists()) { 21 | try { 22 | if(!modelFile.getParentFile().exists()){ 23 | modelFile.getParentFile().mkdirs(); 24 | } 25 | modelFile.createNewFile(); 26 | } catch (IOException e) { 27 | e.printStackTrace(); 28 | } 29 | } 30 | 31 | byte[] buffer = new byte[2048]; 32 | AssetManager assets = context.getAssets(); 33 | InputStream modelStream = null; 34 | BufferedOutputStream outputStream = null; 35 | 36 | try { 37 | modelStream = assets.open(fileName); 38 | outputStream = new BufferedOutputStream(new FileOutputStream(modelFile)); 39 | 40 | int count; 41 | while((count = modelStream.read(buffer)) != -1){ 42 | outputStream.write(buffer, 0, count); 43 | } 44 | } catch (IOException e) { 45 | e.printStackTrace(); 46 | }finally { 47 | if(modelStream != null){ 48 | try { 49 | modelStream.close(); 50 | } catch (IOException e) { 51 | e.printStackTrace(); 52 | } 53 | } 54 | 55 | if(outputStream != null){ 56 | try { 57 | outputStream.close(); 58 | } catch (IOException e) { 59 | e.printStackTrace(); 60 | } 61 | } 62 | } 63 | 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /app/src/main/java/com/autel/sdksample/util/ThreadUtils.java: -------------------------------------------------------------------------------- 1 | package com.autel.sdksample.util; 2 | 3 | import android.os.Handler; 4 | import android.os.Looper; 5 | 6 | import java.util.concurrent.Callable; 7 | import java.util.concurrent.ExecutorService; 8 | import java.util.concurrent.Executors; 9 | import java.util.concurrent.Future; 10 | 11 | 12 | public class ThreadUtils { 13 | 14 | private static ExecutorService threadPool = Executors.newCachedThreadPool(); 15 | 16 | private static Handler sMainHandler = new Handler(Looper.getMainLooper()); 17 | 18 | /** 19 | * 非UI线程执行 20 | * @param runnable 21 | */ 22 | public static void runOnNonUIthread(Runnable runnable) { 23 | threadPool.submit(runnable); 24 | } 25 | 26 | /** 27 | * UI线程执行 28 | * @param runnable 29 | */ 30 | public static void runOnUiThread(Runnable runnable) { 31 | sMainHandler.post(runnable); 32 | } 33 | 34 | 35 | public static void postDelayedOnUiThread(Runnable runnable, long delayMillis) { 36 | sMainHandler.postDelayed(runnable, delayMillis); 37 | } 38 | 39 | public static boolean isMainThread(){ 40 | return Looper.myLooper() == Looper.getMainLooper(); 41 | } 42 | 43 | /** 44 | * 获取当前线程名称 45 | * @return 46 | */ 47 | public static String getCurrentThreadName() { 48 | String result = "UNKNOWN"; 49 | Looper looper = Looper.myLooper(); 50 | if (looper != null) { 51 | result = looper.getThread().getName(); 52 | } 53 | return result; 54 | } 55 | /** 56 | * 返回 Future 57 | * Future.get()可获得返回结果 58 | * 59 | * @return 60 | */ 61 | @SuppressWarnings({"unchecked", "rawtypes"}) 62 | public static Future submit(Callable t) { 63 | return threadPool.submit(t); 64 | } 65 | 66 | 67 | public static final Handler getMainHander() { 68 | return sMainHandler; 69 | } 70 | 71 | public static void removeCallbacks(){ 72 | getMainHander().removeCallbacksAndMessages(null); 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /app/src/main/java/com/autel/sdksample/utils/TrackingUtils.kt: -------------------------------------------------------------------------------- 1 | package com.autel.sdksample.visual.utils 2 | 3 | /** 4 | * Created by A13087 on 2017/7/26. 5 | */ 6 | object TrackingUtils { 7 | 8 | fun checkValidValue(value: Float): Boolean { 9 | return value > 0 && value < 1 10 | } 11 | 12 | 13 | } -------------------------------------------------------------------------------- /app/src/main/java/com/autel/sdksample/xstar/XStarDspActivity.java: -------------------------------------------------------------------------------- 1 | package com.autel.sdksample.xstar; 2 | 3 | import com.autel.sdk.dsp.AutelDsp; 4 | import com.autel.sdk.product.BaseProduct; 5 | import com.autel.sdk.product.XStarAircraft; 6 | import com.autel.sdksample.R; 7 | import com.autel.sdksample.base.DspActivity; 8 | 9 | /** 10 | * Created by A16343 on 2017/9/12. 11 | */ 12 | 13 | public class XStarDspActivity extends DspActivity { 14 | @Override 15 | protected AutelDsp initController(BaseProduct product) { 16 | return ((XStarAircraft) product).getDsp(); 17 | } 18 | 19 | @Override 20 | protected int getCustomViewResId() { 21 | return R.layout.activity_xstar_dsp; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /app/src/main/java/com/autel/sdksample/xstar/XStarRemoteControllerActivity.java: -------------------------------------------------------------------------------- 1 | package com.autel.sdksample.xstar; 2 | 3 | import com.autel.sdk.product.BaseProduct; 4 | import com.autel.sdk.remotecontroller.AutelRemoteController; 5 | import com.autel.sdksample.R; 6 | import com.autel.sdksample.base.RemoteControllerActivity; 7 | 8 | 9 | public class XStarRemoteControllerActivity extends RemoteControllerActivity { 10 | 11 | @Override 12 | protected AutelRemoteController initController(BaseProduct product) { 13 | return product.getRemoteController(); 14 | } 15 | 16 | @Override 17 | protected int getCustomViewResId() { 18 | return R.layout.activity_rc; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /app/src/main/res/color/text_click_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/avoid_drawable_four.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/avoid_drawable_one.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/avoid_drawable_three.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/avoid_drawable_two.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/layer_list_seekbar_horizontal.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/mission_bottom_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/mission_btn_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/mission_btn_bg_press.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/mission_operator_show_bottom_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/mission_pop_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/mission_title_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/selector_mission_btn.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/selector_mission_close_icon.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/selector_seekbar_dot.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/selector_text_black_white.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/selector_white_gray.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/shape_aircraft_setting_divider.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/shape_gray_empty_progress.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/shape_radio_checked.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/shape_radio_unchecked.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/shape_tracking_gray_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/shape_tracking_white_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/text_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/text_pressed.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/text_unpressed.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/waypoint_checkbox_icon.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/layout/ac_avoid.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/layout/ac_base.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 19 | 20 | -------------------------------------------------------------------------------- /app/src/main/res/layout/ac_base_gimbal.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 12 | 13 | 17 | 18 | 22 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /app/src/main/res/layout/ac_base_gimbal_items.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 13 | 14 |