From 7febf548d61206168400f940f30e73dadceb9f99 Mon Sep 17 00:00:00 2001 From: liumingming <mingmingsuper@gmail.com> Date: Mon, 4 Jan 2021 14:41:15 +0800 Subject: [PATCH] fix --- .gitignore | 12 ++++++++++++ app/.gitignore | 1 + app/build.gradle | 93 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ app/proguard-rules.pro | 244 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ app/src/main/AndroidManifest.xml | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ app/src/main/java/com/hhmedic/android/sdk/VideoSetting.java | 84 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ app/src/main/java/com/hhmedic/android/sdk/config/DeviceSetting.java | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ app/src/main/java/com/hhmedic/android/sdk/config/DeviceType.java | 13 +++++++++++++ app/src/main/java/com/hhmedic/android/sdk/config/DoctorType.java | 8 ++++++++ app/src/main/java/com/hhmedic/android/sdk/config/HHConfig.java | 276 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ app/src/main/java/com/hhmedic/android/sdk/config/HHPushConfig.java | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ app/src/main/java/com/hhmedic/android/sdk/config/HHSDKOptions.java | 219 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ app/src/main/java/com/hhmedic/android/sdk/config/MessageOptions.java | 11 +++++++++++ app/src/main/java/com/hhmedic/android/sdk/config/NetEnvironmental.java | 9 +++++++++ app/src/main/java/com/hhmedic/android/sdk/config/SystemSenderConfig.java | 30 ++++++++++++++++++++++++++++++ app/src/main/java/com/hhmedic/android/sdk/config/SystemSenderInfo.java | 9 +++++++++ app/src/main/java/com/hhmedic/android/sdk/config/Version.java | 39 +++++++++++++++++++++++++++++++++++++++ app/src/main/res/anim/hh_pop_enter.xml | 8 ++++++++ app/src/main/res/anim/hh_pop_exit.xml | 8 ++++++++ app/src/main/res/drawable-xxhdpi/hh_av_bottom_bg.png | Bin 0 -> 48322 bytes app/src/main/res/drawable-xxhdpi/hh_av_change_front_disable.png | Bin 0 -> 2331 bytes app/src/main/res/drawable-xxhdpi/hh_av_change_front_normal.png | Bin 0 -> 2627 bytes app/src/main/res/drawable-xxhdpi/hh_av_change_front_press.png | Bin 0 -> 2331 bytes app/src/main/res/drawable-xxhdpi/hh_av_chat_accept_bg_normal.png | Bin 0 -> 1728 bytes app/src/main/res/drawable-xxhdpi/hh_av_chat_accept_bg_press.png | Bin 0 -> 1723 bytes app/src/main/res/drawable-xxhdpi/hh_av_chat_change_doctor_icon.png | Bin 0 -> 4238 bytes app/src/main/res/drawable-xxhdpi/hh_av_chat_refuse_bg_normal.png | Bin 0 -> 1560 bytes app/src/main/res/drawable-xxhdpi/hh_av_chat_refuse_bg_press.png | Bin 0 -> 1581 bytes app/src/main/res/drawable-xxhdpi/hh_av_chat_voice.png | Bin 0 -> 2726 bytes app/src/main/res/drawable-xxhdpi/hh_av_chat_voice_press.png | Bin 0 -> 2116 bytes app/src/main/res/drawable-xxhdpi/hh_close_icon_white.png | Bin 0 -> 686 bytes app/src/main/res/drawable-xxhdpi/hh_list_item_bg_with_border_bottom.xml | 5 +++++ app/src/main/res/drawable-xxhdpi/hh_list_item_bg_with_border_bottom_pressed.xml | 5 +++++ app/src/main/res/drawable-xxhdpi/hh_sdk_error_red_icon.png | Bin 0 -> 2196 bytes app/src/main/res/drawable-xxhdpi/hp_avchat_tools_bg.png | Bin 0 -> 2168 bytes app/src/main/res/drawable-xxhdpi/hp_avchat_tools_more.png | Bin 0 -> 2322 bytes app/src/main/res/drawable-xxhdpi/hp_avchat_tools_more_open.png | Bin 0 -> 2396 bytes app/src/main/res/drawable-xxhdpi/hp_avchat_tools_start_bg.png | Bin 0 -> 1427 bytes app/src/main/res/drawable-xxhdpi/hp_call_default_loading.jpg | Bin 0 -> 11596 bytes app/src/main/res/drawable-xxhdpi/hp_doctor_job_icon.png | Bin 0 -> 2896 bytes app/src/main/res/drawable-xxhdpi/hp_flash_close.png | Bin 0 -> 2642 bytes app/src/main/res/drawable-xxhdpi/hp_flash_open.png | Bin 0 -> 1895 bytes app/src/main/res/drawable-xxhdpi/hp_line_up_image.jpg | Bin 0 -> 67595 bytes app/src/main/res/drawable/hh_av_accept_btn_bg.xml | 5 +++++ app/src/main/res/drawable/hh_av_btn_text_color.xml | 7 +++++++ app/src/main/res/drawable/hh_av_chat_change_camera_bg.xml | 6 ++++++ app/src/main/res/drawable/hh_av_chat_voice_bg.xml | 6 ++++++ app/src/main/res/drawable/hh_av_refuse_btn_bg.xml | 5 +++++ app/src/main/res/drawable/hh_av_tools_bg.xml | 9 +++++++++ app/src/main/res/drawable/hh_list_item_bg.xml | 9 +++++++++ app/src/main/res/drawable/hh_progress_bg.xml | 27 +++++++++++++++++++++++++++ app/src/main/res/drawable/hh_sdk_dialog_normal_bg.xml | 8 ++++++++ app/src/main/res/drawable/hhui_dialog_bg.xml | 5 +++++ app/src/main/res/drawable/hhui_tip_dialog_bg.xml | 6 ++++++ app/src/main/res/drawable/hp_black_bg.xml | 6 ++++++ app/src/main/res/drawable/hp_tips_bg.xml | 8 ++++++++ app/src/main/res/layout/activity_hh_avchat_layout.xml | 44 ++++++++++++++++++++++++++++++++++++++++++++ app/src/main/res/layout/activity_hh_browser_layout.xml | 28 ++++++++++++++++++++++++++++ app/src/main/res/layout/activity_hh_video_layout.xml | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ app/src/main/res/layout/hh_av_upload_photo_layout.xml | 77 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ app/src/main/res/layout/hh_bottom_sheet_list.xml | 23 +++++++++++++++++++++++ app/src/main/res/layout/hh_bottom_sheet_list_item.xml | 25 +++++++++++++++++++++++++ app/src/main/res/layout/hh_calling_layout.xml | 11 +++++++++++ app/src/main/res/layout/hh_certificate_layout.xml | 81 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ app/src/main/res/layout/hh_chat_mobile_controller_layout.xml | 170 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ app/src/main/res/layout/hh_chat_tip_layout.xml | 34 ++++++++++++++++++++++++++++++++++ app/src/main/res/layout/hh_chat_tools_layout.xml | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ app/src/main/res/layout/hh_chat_video_layout.xml | 30 ++++++++++++++++++++++++++++++ app/src/main/res/layout/hh_doctor_calling_layout.xml | 146 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ app/src/main/res/layout/hh_expert_calling_layout.xml | 100 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ app/src/main/res/layout/hh_line_up_calling_layout.xml | 71 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ app/src/main/res/layout/hh_system_toolbar_layout.xml | 22 ++++++++++++++++++++++ app/src/main/res/layout/hh_tips_dialog_layout.xml | 14 ++++++++++++++ app/src/main/res/menu/hh_menu_close.xml | 10 ++++++++++ app/src/main/res/raw/hangup.mp3 | Bin 0 -> 20062 bytes app/src/main/res/values/colors.xml | 4 ++++ app/src/main/res/values/hh_attrs.xml | 44 ++++++++++++++++++++++++++++++++++++++++++++ app/src/main/res/values/hh_colors.xml | 46 ++++++++++++++++++++++++++++++++++++++++++++++ app/src/main/res/values/hh_dimens.xml | 80 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ app/src/main/res/values/hh_strings.xml | 143 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ app/src/main/res/values/hh_styles.xml | 201 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ app/src/main/res/values/hh_themes_compat.xml | 32 ++++++++++++++++++++++++++++++++ app/src/main/res/values/strings.xml | 2 ++ app/src/main/res/values/styles.xml | 17 +++++++++++++++++ app/src/main/res/xml/hh_network_security_config.xml | 4 ++++ app/src/main/res/xml/provider_paths.xml | 16 ++++++++++++++++ build.gradle | 45 +++++++++++++++++++++++++++++++++++++++++++++ gradle.properties | 21 +++++++++++++++++++++ gradle/wrapper/gradle-wrapper.jar | Bin 0 -> 54329 bytes gradle/wrapper/gradle-wrapper.properties | 6 ++++++ gradlew | 172 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ gradlew.bat | 84 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ sdktest/.gitignore | 1 + sdktest/build.gradle | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ sdktest/proguard-rules.pro | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ sdktest/release/output.json | 1 + sdktest/release/sdktest-release.apk | Bin 0 -> 6878605 bytes sdktest/src/androidTest/java/com/hhmedic/android/sdktest/ExampleInstrumentedTest.java | 27 +++++++++++++++++++++++++++ sdktest/src/main/AndroidManifest.xml | 26 ++++++++++++++++++++++++++ sdktest/src/main/java/com/hhmedic/android/sdktest/ChatFrontPop.java | 40 ++++++++++++++++++++++++++++++++++++++++ sdktest/src/main/java/com/hhmedic/android/sdktest/MainActivity.java | 180 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ sdktest/src/main/java/com/hhmedic/android/sdktest/TestApp.java | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ sdktest/src/main/res/drawable-v24/ic_launcher_foreground.xml | 30 ++++++++++++++++++++++++++++++ sdktest/src/main/res/drawable/ic_launcher_background.xml | 170 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ sdktest/src/main/res/layout/activity_main.xml | 69 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ sdktest/src/main/res/layout/hh_chat_front_layout.xml | 16 ++++++++++++++++ sdktest/src/main/res/mipmap-anydpi-v26/ic_launcher.xml | 5 +++++ sdktest/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml | 5 +++++ sdktest/src/main/res/mipmap-hdpi/ic_launcher.png | Bin 0 -> 3593 bytes sdktest/src/main/res/mipmap-hdpi/ic_launcher_round.png | Bin 0 -> 5339 bytes sdktest/src/main/res/mipmap-mdpi/ic_launcher.png | Bin 0 -> 2636 bytes sdktest/src/main/res/mipmap-mdpi/ic_launcher_round.png | Bin 0 -> 3388 bytes sdktest/src/main/res/mipmap-xhdpi/ic_launcher.png | Bin 0 -> 4926 bytes sdktest/src/main/res/mipmap-xhdpi/ic_launcher_round.png | Bin 0 -> 7472 bytes sdktest/src/main/res/mipmap-xxhdpi/ic_launcher.png | Bin 0 -> 7909 bytes sdktest/src/main/res/mipmap-xxhdpi/ic_launcher_round.png | Bin 0 -> 11873 bytes sdktest/src/main/res/mipmap-xxxhdpi/ic_launcher.png | Bin 0 -> 10652 bytes sdktest/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png | Bin 0 -> 16570 bytes sdktest/src/main/res/values/colors.xml | 6 ++++++ sdktest/src/main/res/values/dimens.xml | 8 ++++++++ sdktest/src/main/res/values/strings.xml | 4 ++++ sdktest/src/main/res/values/styles.xml | 11 +++++++++++ sdktest/src/test/java/com/hhmedic/android/sdktest/ExampleUnitTest.java | 17 +++++++++++++++++ settings.gradle | 3 +++ 124 files changed, 4058 insertions(+), 0 deletions(-) create mode 100644 .gitignore create mode 100644 app/.gitignore create mode 100644 app/build.gradle create mode 100644 app/proguard-rules.pro create mode 100644 app/src/main/AndroidManifest.xml create mode 100644 app/src/main/java/com/hhmedic/android/sdk/VideoSetting.java create mode 100644 app/src/main/java/com/hhmedic/android/sdk/config/DeviceSetting.java create mode 100644 app/src/main/java/com/hhmedic/android/sdk/config/DeviceType.java create mode 100644 app/src/main/java/com/hhmedic/android/sdk/config/DoctorType.java create mode 100644 app/src/main/java/com/hhmedic/android/sdk/config/HHConfig.java create mode 100644 app/src/main/java/com/hhmedic/android/sdk/config/HHPushConfig.java create mode 100644 app/src/main/java/com/hhmedic/android/sdk/config/HHSDKOptions.java create mode 100644 app/src/main/java/com/hhmedic/android/sdk/config/MessageOptions.java create mode 100644 app/src/main/java/com/hhmedic/android/sdk/config/NetEnvironmental.java create mode 100644 app/src/main/java/com/hhmedic/android/sdk/config/SystemSenderConfig.java create mode 100644 app/src/main/java/com/hhmedic/android/sdk/config/SystemSenderInfo.java create mode 100644 app/src/main/java/com/hhmedic/android/sdk/config/Version.java create mode 100644 app/src/main/res/anim/hh_pop_enter.xml create mode 100644 app/src/main/res/anim/hh_pop_exit.xml create mode 100644 app/src/main/res/drawable-xxhdpi/hh_av_bottom_bg.png create mode 100644 app/src/main/res/drawable-xxhdpi/hh_av_change_front_disable.png create mode 100644 app/src/main/res/drawable-xxhdpi/hh_av_change_front_normal.png create mode 100644 app/src/main/res/drawable-xxhdpi/hh_av_change_front_press.png create mode 100644 app/src/main/res/drawable-xxhdpi/hh_av_chat_accept_bg_normal.png create mode 100644 app/src/main/res/drawable-xxhdpi/hh_av_chat_accept_bg_press.png create mode 100644 app/src/main/res/drawable-xxhdpi/hh_av_chat_change_doctor_icon.png create mode 100644 app/src/main/res/drawable-xxhdpi/hh_av_chat_refuse_bg_normal.png create mode 100644 app/src/main/res/drawable-xxhdpi/hh_av_chat_refuse_bg_press.png create mode 100644 app/src/main/res/drawable-xxhdpi/hh_av_chat_voice.png create mode 100644 app/src/main/res/drawable-xxhdpi/hh_av_chat_voice_press.png create mode 100644 app/src/main/res/drawable-xxhdpi/hh_close_icon_white.png create mode 100644 app/src/main/res/drawable-xxhdpi/hh_list_item_bg_with_border_bottom.xml create mode 100644 app/src/main/res/drawable-xxhdpi/hh_list_item_bg_with_border_bottom_pressed.xml create mode 100644 app/src/main/res/drawable-xxhdpi/hh_sdk_error_red_icon.png create mode 100644 app/src/main/res/drawable-xxhdpi/hp_avchat_tools_bg.png create mode 100644 app/src/main/res/drawable-xxhdpi/hp_avchat_tools_more.png create mode 100644 app/src/main/res/drawable-xxhdpi/hp_avchat_tools_more_open.png create mode 100644 app/src/main/res/drawable-xxhdpi/hp_avchat_tools_start_bg.png create mode 100644 app/src/main/res/drawable-xxhdpi/hp_call_default_loading.jpg create mode 100644 app/src/main/res/drawable-xxhdpi/hp_doctor_job_icon.png create mode 100644 app/src/main/res/drawable-xxhdpi/hp_flash_close.png create mode 100644 app/src/main/res/drawable-xxhdpi/hp_flash_open.png create mode 100644 app/src/main/res/drawable-xxhdpi/hp_line_up_image.jpg create mode 100644 app/src/main/res/drawable/hh_av_accept_btn_bg.xml create mode 100644 app/src/main/res/drawable/hh_av_btn_text_color.xml create mode 100644 app/src/main/res/drawable/hh_av_chat_change_camera_bg.xml create mode 100644 app/src/main/res/drawable/hh_av_chat_voice_bg.xml create mode 100644 app/src/main/res/drawable/hh_av_refuse_btn_bg.xml create mode 100644 app/src/main/res/drawable/hh_av_tools_bg.xml create mode 100644 app/src/main/res/drawable/hh_list_item_bg.xml create mode 100644 app/src/main/res/drawable/hh_progress_bg.xml create mode 100644 app/src/main/res/drawable/hh_sdk_dialog_normal_bg.xml create mode 100644 app/src/main/res/drawable/hhui_dialog_bg.xml create mode 100644 app/src/main/res/drawable/hhui_tip_dialog_bg.xml create mode 100644 app/src/main/res/drawable/hp_black_bg.xml create mode 100644 app/src/main/res/drawable/hp_tips_bg.xml create mode 100644 app/src/main/res/layout/activity_hh_avchat_layout.xml create mode 100644 app/src/main/res/layout/activity_hh_browser_layout.xml create mode 100644 app/src/main/res/layout/activity_hh_video_layout.xml create mode 100644 app/src/main/res/layout/hh_av_upload_photo_layout.xml create mode 100644 app/src/main/res/layout/hh_bottom_sheet_list.xml create mode 100644 app/src/main/res/layout/hh_bottom_sheet_list_item.xml create mode 100644 app/src/main/res/layout/hh_calling_layout.xml create mode 100644 app/src/main/res/layout/hh_certificate_layout.xml create mode 100644 app/src/main/res/layout/hh_chat_mobile_controller_layout.xml create mode 100644 app/src/main/res/layout/hh_chat_tip_layout.xml create mode 100644 app/src/main/res/layout/hh_chat_tools_layout.xml create mode 100644 app/src/main/res/layout/hh_chat_video_layout.xml create mode 100644 app/src/main/res/layout/hh_doctor_calling_layout.xml create mode 100644 app/src/main/res/layout/hh_expert_calling_layout.xml create mode 100644 app/src/main/res/layout/hh_line_up_calling_layout.xml create mode 100644 app/src/main/res/layout/hh_system_toolbar_layout.xml create mode 100644 app/src/main/res/layout/hh_tips_dialog_layout.xml create mode 100644 app/src/main/res/menu/hh_menu_close.xml create mode 100644 app/src/main/res/raw/hangup.mp3 create mode 100644 app/src/main/res/values/colors.xml create mode 100644 app/src/main/res/values/hh_attrs.xml create mode 100644 app/src/main/res/values/hh_colors.xml create mode 100644 app/src/main/res/values/hh_dimens.xml create mode 100644 app/src/main/res/values/hh_strings.xml create mode 100644 app/src/main/res/values/hh_styles.xml create mode 100644 app/src/main/res/values/hh_themes_compat.xml create mode 100644 app/src/main/res/values/strings.xml create mode 100644 app/src/main/res/values/styles.xml create mode 100644 app/src/main/res/xml/hh_network_security_config.xml create mode 100644 app/src/main/res/xml/provider_paths.xml create mode 100644 build.gradle create mode 100644 gradle.properties create mode 100644 gradle/wrapper/gradle-wrapper.jar create mode 100644 gradle/wrapper/gradle-wrapper.properties create mode 100644 gradlew create mode 100644 gradlew.bat create mode 100644 sdktest/.gitignore create mode 100644 sdktest/build.gradle create mode 100644 sdktest/proguard-rules.pro create mode 100644 sdktest/release/output.json create mode 100644 sdktest/release/sdktest-release.apk create mode 100644 sdktest/src/androidTest/java/com/hhmedic/android/sdktest/ExampleInstrumentedTest.java create mode 100644 sdktest/src/main/AndroidManifest.xml create mode 100644 sdktest/src/main/java/com/hhmedic/android/sdktest/ChatFrontPop.java create mode 100644 sdktest/src/main/java/com/hhmedic/android/sdktest/MainActivity.java create mode 100644 sdktest/src/main/java/com/hhmedic/android/sdktest/TestApp.java create mode 100644 sdktest/src/main/res/drawable-v24/ic_launcher_foreground.xml create mode 100644 sdktest/src/main/res/drawable/ic_launcher_background.xml create mode 100644 sdktest/src/main/res/layout/activity_main.xml create mode 100644 sdktest/src/main/res/layout/hh_chat_front_layout.xml create mode 100644 sdktest/src/main/res/mipmap-anydpi-v26/ic_launcher.xml create mode 100644 sdktest/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml create mode 100644 sdktest/src/main/res/mipmap-hdpi/ic_launcher.png create mode 100644 sdktest/src/main/res/mipmap-hdpi/ic_launcher_round.png create mode 100644 sdktest/src/main/res/mipmap-mdpi/ic_launcher.png create mode 100644 sdktest/src/main/res/mipmap-mdpi/ic_launcher_round.png create mode 100644 sdktest/src/main/res/mipmap-xhdpi/ic_launcher.png create mode 100644 sdktest/src/main/res/mipmap-xhdpi/ic_launcher_round.png create mode 100644 sdktest/src/main/res/mipmap-xxhdpi/ic_launcher.png create mode 100644 sdktest/src/main/res/mipmap-xxhdpi/ic_launcher_round.png create mode 100644 sdktest/src/main/res/mipmap-xxxhdpi/ic_launcher.png create mode 100644 sdktest/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png create mode 100644 sdktest/src/main/res/values/colors.xml create mode 100644 sdktest/src/main/res/values/dimens.xml create mode 100644 sdktest/src/main/res/values/strings.xml create mode 100644 sdktest/src/main/res/values/styles.xml create mode 100644 sdktest/src/test/java/com/hhmedic/android/sdktest/ExampleUnitTest.java create mode 100644 settings.gradle diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..2c26829 --- /dev/null +++ b/.gitignore @@ -0,0 +1,12 @@ +*.iml +.gradle +/local.properties +/.idea/workspace.xml +/.idea/libraries +.DS_Store +/build +.idea/* +../.idea +.idea/sonarlint/ +/captures +.externalNativeBuild \ No newline at end of file diff --git a/app/.gitignore b/app/.gitignore new file mode 100644 index 0000000..796b96d --- /dev/null +++ b/app/.gitignore @@ -0,0 +1 @@ +/build diff --git a/app/build.gradle b/app/build.gradle new file mode 100644 index 0000000..5b3f3b7 --- /dev/null +++ b/app/build.gradle @@ -0,0 +1,93 @@ +import java.text.SimpleDateFormat + +apply plugin: 'com.android.library' + + +def T_RTC_SDK = '7.9.9568' + +// versionCode按时间自增 +static def increasedVersionCode(){ + return (int)(System.currentTimeMillis()/1000/60) +} + +def baseVersion = rootProject.ext.sdkVersion + +static def buildTime() { + def df = new SimpleDateFormat("MMddHHmm") + return df.format(new Date()) +} + +def video = "2.0.2.12291101" + + +def videoName = "video_small" + +android { + compileSdkVersion 28 + + defaultConfig { + + useLibrary 'org.apache.http.legacy' + + minSdkVersion 17 + targetSdkVersion 28 + versionCode increasedVersionCode() + versionName "${baseVersion}.${buildTime()}" + + ndk { + //设置支持的SO库架构 + abiFilters "armeabi-v7a","armeabi","arm64-v8a"//, "x86","arm64-v8a","x86_64" + } + + consumerProguardFiles 'proguard-rules.pro' + } + + buildTypes { + + release { + minifyEnabled false +// proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' + buildConfigField('boolean',"PRINT_LOG","${rootProject.ext.isPrint}") + buildConfigField('boolean',"TV_MODEL","${rootProject.ext.isTV}") + buildConfigField('boolean',"SOUND_MODEL","${rootProject.ext.isSound}") + buildConfigField('String',"SDK_VERSION","\"${rootProject.ext.sdkVersion}\"") + } + debug{ + + minifyEnabled false +// proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' + buildConfigField('boolean',"PRINT_LOG","${rootProject.ext.isPrint}") + buildConfigField('boolean',"TV_MODEL","${rootProject.ext.isTV}") + buildConfigField('boolean',"SOUND_MODEL","${rootProject.ext.isSound}") + buildConfigField('String',"SDK_VERSION","\"${rootProject.ext.sdkVersion}\"") + } + } + + lintOptions + { + checkReleaseBuilds false + abortOnError false + } + + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } +} + +dependencies { + implementation fileTree(dir: 'libs', include: ['*.jar']) + + implementation 'androidx.appcompat:appcompat:1.2.0' + + implementation 'androidx.recyclerview:recyclerview:1.1.0' + + implementation 'com.github.bumptech.glide:glide:4.9.0' + + api 'com.hhmedic.android.sdk:okhttputils:1.0.0.12311516' + + implementation 'com.google.code.gson:gson:2.8.0' + + implementation "com.tencent.liteav:LiteAVSDK_TRTC:$T_RTC_SDK" + +} \ No newline at end of file diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro new file mode 100644 index 0000000..e0e4f37 --- /dev/null +++ b/app/proguard-rules.pro @@ -0,0 +1,244 @@ +# Add project specific ProGuard rules here. +# You can control the set of applied configuration files using the +# proguardFiles setting in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} + +# Uncomment this to preserve the line number information for +# debugging stack traces. +#-keepattributes SourceFile,LineNumberTable + +# If you keep the line number information, uncomment this to +# hide the original source file name. +#-renamesourcefileattribute SourceFile + +# Add project specific ProGuard rules here. +# You can control the set of applied configuration files using the +# proguardFiles setting in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} + +# Uncomment this to preserve the line number information for +# debugging stack traces. +#-keepattributes SourceFile,LineNumberTable + +# If you keep the line number information, uncomment this to +# hide the original source file name. +#-renamesourcefileattribute SourceFile + + +#-ignorewarnings +#-keepattributes *Annotation* +#-keepattributes Exceptions +#-keepattributes InnerClasses +#-keepattributes Signature +#-keepattributes SourceFile,LineNumberTable +# +# +##指定代码的压缩级别 +#-optimizationpasses 5 +# +##包明不混合大小写 +#-dontusemixedcaseclassnames +# +##不去忽略非公共的库类 +#-dontskipnonpubliclibraryclasses +# +# #优化 不优化输入的类文件 +#-dontoptimize +# +# #预校验 +#-dontpreverify +# +# #混淆时是否记录日志 +#-verbose +# +# # 混淆时所采用的算法 +#-optimizations !code/simplification/arithmetic,!field/*,!class/merging/* +# +##保护注解 +#-keepattributes *Annotation* + +# 保持哪些类不被混淆 +-keep public class * extends android.app.Fragment +-keep public class * extends android.app.Activity +-keep public class * extends android.app.Application +-keep public class * extends android.app.Service +-keep public class * extends android.content.BroadcastReceiver +-keep public class * extends android.content.ContentProvider +-keep public class * extends android.app.backup.BackupAgentHelper +-keep public class * extends android.preference.Preference +-keep public class com.android.vending.licensing.ILicensingService + +##记录生成的日志数据,gradle build时在本项目根目录输出## +#apk 包内所有 class 的内部结构 +#-dump proguard/class_files.txt +#未混淆的类和成员 +#-printseeds proguard/seeds.txt +#列出从 apk 中删除的代码 +#-printusage proguard/unused.txt +#混淆前后的映射 +#-printmapping proguard/mapping.txt +########记录生成的日志数据,gradle build时 在本项目根目录输出-end###### + + +#如果引用了v4或者v7包 +-dontwarn android.support.** + +####混淆保护自己项目的部分代码以及引用的第三方jar包library-end#### + + + +#保持 native 方法不被混淆 +-keepclasseswithmembernames class * { + native <methods>; +} + +#保持自定义控件类不被混淆 +-keepclasseswithmembers class * { + public <init>(android.content.Context, android.util.AttributeSet); +} + +#保持自定义控件类不被混淆 +-keepclassmembers class * extends android.app.Activity { + public void *(android.view.View); +} + +-keep public class * extends android.view.View { + public <init>(android.content.Context); + public <init>(android.content.Context, android.util.AttributeSet); + public <init>(android.content.Context, android.util.AttributeSet, int); + public void set*(...); +} + +#保持 Parcelable 不被混淆 +-keep class * implements android.os.Parcelable { + public static final android.os.Parcelable$Creator *; +} + +#保持 Serializable 不被混淆 +-keepnames class * implements java.io.Serializable + +#保持 Serializable 不被混淆并且enum 类也不被混淆 +-keepclassmembers class * implements java.io.Serializable { + static final long serialVersionUID; + private static final java.io.ObjectStreamField[] serialPersistentFields; + !static !transient <fields>; + !private <fields>; + !private <methods>; + private void writeObject(java.io.ObjectOutputStream); + private void readObject(java.io.ObjectInputStream); + java.lang.Object writeReplace(); + java.lang.Object readResolve(); +} + +#保持枚举 enum 类不被混淆 +-keepclassmembers enum * { + public static **[] values(); + public static ** valueOf(java.lang.String); +} + +-keepclassmembers class * { + public void *ButtonClicked(android.view.View); +} + +#不混淆资源类 +-keepclassmembers class **.R$* { + public static <fields>; +} + + + +-keep public class * extends android.app.Dialog + +-dontwarn com.bumptech.glide.** + +-dontwarn java.lang.invoke.** + +-dontnote org.apache.http.** +-dontnote android.net.http.** + +-dontnote android.os.** +-dontnote com.android.internal.** +-dontnote android.view.** + +-dontnote com.hhmedic.android.sdk.module.gesturesview.views.** + +-dontnote com.willy.ratingbar.ScaleRatingBar + + +-keep class com.hhmedic.android.sdk.HHDoctor {*;} +-keep class com.hhmedic.android.sdk.config.HHPushConfig {*;} +-keep class com.hhmedic.android.sdk.config.HHSDKOptions {*;} + +-keep class com.hhmedic.android.sdk.module.SDKRoute {*;} + + + +-keep class com.hhmedic.android.sdk.config.NetEnvironmental {*;} + + + +-dontwarn com.squareup.picasso.** +-dontwarn okio.** +-dontwarn com.bumptech.glide.** +-dontnote com.netease.nimlib.** +-keep class com.hhmedic.android.sdk.module.permission.**{*;} +-keep class okhttp3.**{*;} +-keep class okio.**{*;} +-keep class com.zhy.http.**{*;} +-keep class com.alexvasilkov.**{*;} +-keep class com.hhmedic.android.sdk.core.net.volley.**{*;} +-keep class com.bumptech.glide.**{*;} +-keep class android.arch.**{*;} +-keep class com.google.gson.**{*;} + +-dontnote com.bumptech.glide.** +-dontnote com.google.gson.** +-dontnote okhttp3.internal.** +-dontnote okhttp3.** +-dontnote okio.** + +-keepattributes *Annotation* +-keep @**annotation** class * {*;} + + +-keep class com.alibaba.sdk.android.**{*;} +-dontnote com.alibaba.** +-keep class com.ut.**{*;} +-keep class com.ta.**{*;} +-dontwarn com.zhihu.matisse.** +-dontnote com.ut.** +-dontnote android.net.** +-keep class com.hhmedic.android.sdk.uikit.widget.dialog.HHTipDialog.*{*;} +-keep class com.hhmedic.android.sdk.uikit.widget.dialog.HHTipDialog$*{*;} + +-keep class com.hhmedic.android.sdk.uikit.utils.HHStatusBarHelper{*;} + + +-keep class com.tencent.** { *; } +-keep class com.hhmedic.android.sdk.utils.HHFileProvider {*;} + + +-dontwarn com.netease.** +-dontwarn io.netty.** +-keep class com.netease.** {*;} +#如果 netty 使用的官方版本,它中间用到了反射,因此需要 keep。如果使用的是我们提供的版本,则不需要 keep +-keep class io.netty.** {*;} +-keep class com.netease.mobsecurity.** {*;} \ No newline at end of file diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000..3eabb61 --- /dev/null +++ b/app/src/main/AndroidManifest.xml @@ -0,0 +1,50 @@ +<?xml version="1.0" encoding="utf-8"?> +<manifest xmlns:android="http://schemas.android.com/apk/res/android" + package="com.hhmedic.android.sdk.lego"> + + + <uses-feature android:name="android.hardware.camera" /> + <uses-feature android:name="android.hardware.camera.autofocus" /> + + <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> + + <!-- 访问网络状态 --> + <uses-permission android:name="android.permission.INTERNET" /> + <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> + <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /> + <!-- 外置存储存取权限 --> + <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> + + <!-- 多媒体相关 --> + <uses-permission android:name="android.permission.CAMERA" /> + <uses-permission android:name="android.permission.RECORD_AUDIO" /> + + <!-- 如果需要实时音视频通话模块,下面的权限也是必须的。否则,可以不加 --> + <uses-permission android:name="android.permission.BLUETOOTH" /> + <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" /> + <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" /> + + <application android:networkSecurityConfig="@xml/hh_network_security_config" + > + + + <activity android:name="com.hhmedic.android.sdk.video.chat.RtcVideoAct" android:theme="@style/hh_video_chat_style"/> + + <provider + android:name="com.hhmedic.android.sdk.base.utils.HHFileProvider" + android:authorities="${applicationId}.hhprovider" + android:exported="false" + android:grantUriPermissions="true"> + <meta-data + android:name="android.support.FILE_PROVIDER_PATHS" + android:resource="@xml/provider_paths" /> + </provider> + + <activity android:name="com.hhmedic.android.sdk.module.video.player.HHVideoAct" android:theme="@style/HH_ChatTheme" android:screenOrientation="behind"/> + + <activity android:name="com.hhmedic.android.sdk.module.browser.HHBrowserAct" android:theme="@style/HH_Normal_Theme" android:screenOrientation="behind"/> + + + </application> + +</manifest> \ No newline at end of file diff --git a/app/src/main/java/com/hhmedic/android/sdk/VideoSetting.java b/app/src/main/java/com/hhmedic/android/sdk/VideoSetting.java new file mode 100644 index 0000000..661a0ae --- /dev/null +++ b/app/src/main/java/com/hhmedic/android/sdk/VideoSetting.java @@ -0,0 +1,84 @@ +package com.hhmedic.android.sdk; + +import androidx.annotation.IntDef; + +import com.tencent.trtc.TRTCCloudDef; + +public class VideoSetting { + + public static boolean enableGSENSORMode = true; + + public static int remoteRotation = TRTCCloudDef.TRTC_VIDEO_ROTATION_0; + + + @Deprecated + public static int videoResolutionMode = TRTCCloudDef.TRTC_VIDEO_RESOLUTION_MODE_PORTRAIT; + + + @IntDef(value = {TRTCCloudDef.TRTC_VIDEO_ROTATION_0,TRTCCloudDef.TRTC_VIDEO_ROTATION_90,TRTCCloudDef.TRTC_VIDEO_ROTATION_180,TRTCCloudDef.TRTC_VIDEO_ROTATION_270}) + public @interface RotationType { + + } + + @IntDef(value = {TRTCCloudDef.TRTC_VIDEO_RESOLUTION_MODE_PORTRAIT,TRTCCloudDef.TRTC_VIDEO_RESOLUTION_MODE_LANDSCAPE}) + public @interface VideoResolutionModeType { + + } + + /** + * 是否开启设备的重力感应 + * @param enable 是否开启 + */ + public static void setEnableGSENSORMode(boolean enable) { + enableGSENSORMode = enable; + } + + /** + * 设置远端视频在本地显示的旋转方向 + * @param rotation 旋转方向 + */ + public static void setRemoteRotation(@RotationType int rotation) { + remoteRotation = rotation; + } + + /** + * 设置方向 + * + * 建议使用 setVideoEncParam + * @param mode 方向 + */ + @Deprecated + public static void setVideoResolutionMode(@VideoResolutionModeType int mode) { + videoResolutionMode = mode; + } + + + + private static TRTCCloudDef.TRTCVideoEncParam mVideoEncParam; + + + public static TRTCCloudDef.TRTCVideoEncParam getVideoEncParamConfig(){ + + return mVideoEncParam; + } + + + /** + * 设置 TRTC 编码信息 + * + * 分辨率 码率,FPS等 + * + * 参考资料: https://cloud.tencent.com/document/product/647/32267 + * + * 码率 和分辨率 设置参考 https://cloud.tencent.com/document/product/647/32236#.E6.8E.A8.E8.8D.90.E7.9A.84.E9.85.8D.E7.BD.AE + * + * @param param TRTCVideoEncParam + * + * + */ + public static void setVideoEncParam(TRTCCloudDef.TRTCVideoEncParam param){ + + mVideoEncParam = param; + } + +} diff --git a/app/src/main/java/com/hhmedic/android/sdk/config/DeviceSetting.java b/app/src/main/java/com/hhmedic/android/sdk/config/DeviceSetting.java new file mode 100644 index 0000000..d5d09b9 --- /dev/null +++ b/app/src/main/java/com/hhmedic/android/sdk/config/DeviceSetting.java @@ -0,0 +1,53 @@ +package com.hhmedic.android.sdk.config; + +public class DeviceSetting { + + + /** + * 默认不开启音频采集通道16K和48K,默认使用32K + */ + public static void enableDefaultSamplerRate() { + HHConfig.useSampleRate48K_HZ = false; + HHConfig.useSampleRate16K_HZ = false; + } + + /** + * 默认音频采集通道使用16K + */ + public static void enableSampleRate16K_HZ() { + HHConfig.useSampleRate48K_HZ = false; + HHConfig.useSampleRate16K_HZ = true; + } + + /** + * 默认音频采集通道使用48K + */ + public static void enableSampleRate48K_HZ() { + HHConfig.useSampleRate48K_HZ = true; + HHConfig.useSampleRate16K_HZ = false; + } + + /** + * 设置是否开启铃声的Music通道 + * @param enable 是否开启 + */ + public static void enableRingTypeMusic(boolean enable) { + HHConfig.useSoundStreamMusic = enable; + } + + /** + * 是否开启高清语音模式,开启后会解决一些设备听不到医生声音的问题 + * @param enable 是否开启 + */ + public static void enableHighQualityMusic(boolean enable) { + HHConfig.enableHighQualityMusic = enable; + } + + /** + * 是否开启视频画面全屏显示,默认为不显示全屏 + * @param enable 是否显示全屏 + */ + public static void enableVideoFullScreen(boolean enable) { + HHConfig.enableVideoFullScreen = enable; + } +} diff --git a/app/src/main/java/com/hhmedic/android/sdk/config/DeviceType.java b/app/src/main/java/com/hhmedic/android/sdk/config/DeviceType.java new file mode 100644 index 0000000..d3edf96 --- /dev/null +++ b/app/src/main/java/com/hhmedic/android/sdk/config/DeviceType.java @@ -0,0 +1,13 @@ +package com.hhmedic.android.sdk.config; + +public enum DeviceType +{ + NORMAL, //正常设备 包括手机 PAD + + SOUND,//音响 + + + TV,//电视 + + +} diff --git a/app/src/main/java/com/hhmedic/android/sdk/config/DoctorType.java b/app/src/main/java/com/hhmedic/android/sdk/config/DoctorType.java new file mode 100644 index 0000000..edff6fa --- /dev/null +++ b/app/src/main/java/com/hhmedic/android/sdk/config/DoctorType.java @@ -0,0 +1,8 @@ +package com.hhmedic.android.sdk.config; + +public interface DoctorType +{ + String EXPERT = "zhuanke"; + + String FAM_DOCTOR = "quanke"; +} diff --git a/app/src/main/java/com/hhmedic/android/sdk/config/HHConfig.java b/app/src/main/java/com/hhmedic/android/sdk/config/HHConfig.java new file mode 100644 index 0000000..010b3ad --- /dev/null +++ b/app/src/main/java/com/hhmedic/android/sdk/config/HHConfig.java @@ -0,0 +1,276 @@ +package com.hhmedic.android.sdk.config; + +import android.content.pm.ActivityInfo; +import android.text.TextUtils; +import android.view.Surface; + + +/** + * Created by iOS on 2016/11/1. + * + * + */ + +public class HHConfig +{ + + + public static boolean DEBUG = false; + + private static boolean TEST_MODEL = false; + + public static boolean OPEN_CAMERA = true; + + public static boolean ENABLE_PUSH = true; + + //设置成true后可以使用接入方自己定义的铃声,不播放方SDK默认铃声 + public static boolean USE_CUSTOM_RING_SOUND = false; + + public static boolean VIDEO_DEFAULT_FRONT_CAMERA = true; + + private static final String SDK_VERSION = "2.8.0"; + + private static String PID = "3001"; + + + //请求扩展字段 第三方设置 + private static String ext = null; + + + public static MessageOptions mMessageOptions; + + + public static boolean isTest() + { + return TEST_MODEL; + } + + + public static String getExtString(){ + + return ext; + } + + + public static DeviceType DEVICE_TYPE = DeviceType.NORMAL; + + + public static int ORIENTATION = ActivityInfo.SCREEN_ORIENTATION_BEHIND; + + public static int deviceDefaultRotation = Surface.ROTATION_0; + + public static boolean enableVideoRotateInRending = true; + + public static boolean ENABLE_CALL_ERROR_TOAST = true; + + public static boolean isSkipEditMember = false; + + public static boolean useSampleRate16K_HZ = false; + + public static boolean useSampleRate48K_HZ = false; + + public static boolean useSoundStreamMusic = false; + + public static boolean enableHighQualityMusic = false; + + public static boolean enableEffectAcousticEchoCanceler = true; + + public static int localRenderRotation = 0; + /** + * 是否开启评价功能,在视频超过3分钟挂断的时候会弹出,如果不需要可以设置为false,建议开启评价功能 + */ + public static boolean isOpenEvaluation = true; + + public static String tabletSlogan; + + public static boolean canAddMember = true; + + public static String messageTitle; + + public static boolean canShowMultiCall = false; + + public static boolean enableVideoFullScreen = false; + + public static boolean enableActivate = true; + + public static boolean enableMedical = true; + + public static boolean enableCustomPreviewSize = false; + + public static boolean enableVipInfo = true; + + public static boolean enableAddMemberInDoc = true; + + public static boolean isSound() + { + if (DEVICE_TYPE == null) + { + DEVICE_TYPE = DeviceType.NORMAL; + } + + return DEVICE_TYPE == DeviceType.SOUND; + } + + + public static boolean isTV() + { + if (DEVICE_TYPE == null) + { + DEVICE_TYPE = DeviceType.NORMAL; + } + + return DEVICE_TYPE == DeviceType.TV; + } + + + public static DeviceType getDeviceType() + { + if (DEVICE_TYPE == null) + { + DEVICE_TYPE = DeviceType.NORMAL; + } + + return DEVICE_TYPE; + } + + public static void openTest() + { + TEST_MODEL = true; + } + + public static void closeTest() + { + TEST_MODEL = false; + } + + public static void setOpenEvaluation(boolean isOpen) { + isOpenEvaluation = isOpen; + } + + public static boolean getOpenEvaluation() { + + if (isTV()){ + return false; + } + + return isOpenEvaluation; + } + + + public static void setPid(String pid) + { + if (!TextUtils.isEmpty(pid)) + { + PID = pid; + } + } + + public static String getPid() + { + return PID; + } + + + public static String getSdkVersion() + { + return SDK_VERSION; + } + + + + + public static void initFromOption(HHSDKOptions options){ + + if (options.dev) { + HHConfig.openTest(); + } else { + HHConfig.closeTest(); + } + + HHConfig.setPid(options.getSdkProductId()); + + HHConfig.DEBUG = options.isDebug; + + if (options.mDeviceType != null) { + + HHConfig.DEVICE_TYPE = options.mDeviceType; + } + + HHConfig.ORIENTATION = options.mOrientation; + + HHConfig.OPEN_CAMERA = options.isOpenCamera; + + HHConfig.USE_CUSTOM_RING_SOUND = options.useCustomRingSound; + + HHConfig.setOpenEvaluation(options.isOpenEvaluation); + + HHConfig.VIDEO_DEFAULT_FRONT_CAMERA = options.videoDefaultFrontCamera; + + HHConfig.deviceDefaultRotation = options.deviceDefaultRotation; + + HHConfig.enableVideoRotateInRending = options.enableVideoRotateInRending; + + HHConfig.ENABLE_PUSH = options.enablePush; + + HHConfig.ENABLE_CALL_ERROR_TOAST = options.enableCallErrorToast; + + HHConfig.useSampleRate16K_HZ = options.useSampleRate16K_HZ; + + HHConfig.useSampleRate48K_HZ = options.useSampleRate48K_HZ; + + HHConfig.useSoundStreamMusic = options.useSoundStreamMusic; + + HHConfig.enableHighQualityMusic = options.enableHighQualityMusic; + + HHConfig.enableEffectAcousticEchoCanceler = options.enableEffectAcousticEchoCanceler; + + HHConfig.localRenderRotation = options.localRenderRotation; + + HHConfig.canAddMember = options.enableAddMember; + + HHConfig.canShowMultiCall = options.enableMultiCall; + + HHConfig.tabletSlogan = options.mCompanySloganTip; + + HHConfig.messageTitle = options.messageTitle; + + HHConfig.setExt(options.mExtensionString); + + HHConfig.enableVideoFullScreen = options.enableVideoFullScreen; + + HHConfig.enableActivate = options.enableActivate; + + HHConfig.enableMedical = options.enableMedical; + + HHConfig.mMessageOptions = options.messageOptions; + + HHConfig.enableCustomPreviewSize = options.enableCustomPreviewSize; + + HHConfig.enableVipInfo = options.enableVipInfo; + + HHConfig.enableAddMemberInDoc = options.enableAddMemberInDoc; + + if (options.mSenderConfig != null){ + + if (!TextUtils.isEmpty(options.mSenderConfig.getIcon())){ + + SystemSenderInfo.ICON = options.mSenderConfig.getIcon(); + } + + if (!TextUtils.isEmpty(options.mSenderConfig.getNickName())){ + + SystemSenderInfo.NAME = options.mSenderConfig.getNickName(); + } + + } + } + + + + public static void setExt(String ext){ + + HHConfig.ext = ext; + } + + +} diff --git a/app/src/main/java/com/hhmedic/android/sdk/config/HHPushConfig.java b/app/src/main/java/com/hhmedic/android/sdk/config/HHPushConfig.java new file mode 100644 index 0000000..02accc0 --- /dev/null +++ b/app/src/main/java/com/hhmedic/android/sdk/config/HHPushConfig.java @@ -0,0 +1,48 @@ +package com.hhmedic.android.sdk.config; + +import android.app.Activity; + +public class HHPushConfig +{ + + /** + * 通知栏提醒的响应intent的activity类型。<br> + * 可以为null。如果未提供,将使用包的launcher的入口intent的activity。 + */ + public Class<? extends Activity> notificationEntrance; + + /** + * 状态栏提醒的小图标的资源ID。<br> + * 如果不提供,使用app的icon + */ + public int notificationSmallIconId; + + + /** + * 小米推送 appId + */ + public String xmAppId; + + /** + * 小米推送 appKey + */ + public String xmAppKey; + + /** + * 小米推送证书,请在云信管理后台申请 + */ + public String xmCertificateName; + + /** + * 华为推送的AppId + */ + public String hwAppId; + + /** + * 华为推送 appId 请在 AndroidManifest.xml 文件中配置 + * 华为推送证书,请在云信管理后台申请 + */ + public String hwCertificateName; + + public String vivoCertificateName; +} diff --git a/app/src/main/java/com/hhmedic/android/sdk/config/HHSDKOptions.java b/app/src/main/java/com/hhmedic/android/sdk/config/HHSDKOptions.java new file mode 100644 index 0000000..c429544 --- /dev/null +++ b/app/src/main/java/com/hhmedic/android/sdk/config/HHSDKOptions.java @@ -0,0 +1,219 @@ +package com.hhmedic.android.sdk.config; + +import android.content.pm.ActivityInfo; +import android.view.Surface; + +/** + * SDK配置选项 + */ +public class HHSDKOptions { + + + /** + * 和缓分配的唯一id + */ + private String sdkProductId; + + + public HHSDKOptions(String sdkProductId) { + this.sdkProductId = sdkProductId; + } + + + public String getSdkProductId() { + return sdkProductId; + } + + /** + * 是否开启debug + */ + public boolean isDebug = false; + + /** + * 配置推送信息 + */ + public HHPushConfig pushConfig; + + + /** + * 视频过程中 是否要开启 拍照 + */ + public boolean isOpenCamera = true; + + + /** + * 设备类型,如果是音响 需要更改 DeviceType.SOUND + */ + public DeviceType mDeviceType; + + /** + * 设备序列号 音响设备需要传 + */ + public String mImei; + + + /** + * 屏幕方向 默认是更随上个界面的方向 + */ + public int mOrientation = ActivityInfo.SCREEN_ORIENTATION_BEHIND; + + + /** + * 开启测试环境 默认关闭 + */ + public boolean dev = false; + + + /** + * 设置关闭SDK默认呼叫铃声 + */ + public boolean useCustomRingSound = false; + + + /** + * 设置默认开启前置摄像头 + */ + public boolean videoDefaultFrontCamera = true; + + /** + * 设置是否开启push + */ + public boolean enablePush = true; + + + /** + * 是否在呼叫时候出错了弹Toast提示 + */ + public boolean enableCallErrorToast = true; + + /** + * coop id 渠道号 + */ + + public String mCoopId; + + /** + * 设备旋转角度,如果对方(医生端)看客户端角度不对可以用这个参数调整,调整方向是顺时针 + */ + public int deviceDefaultRotation = Surface.ROTATION_0; + + /** + * 是否开启视频绘制时自动旋转 + */ + public boolean enableVideoRotateInRending = true; + + + /** + * 是否使用16000 也可以叫做16k的音频通道 + */ + public boolean useSampleRate16K_HZ = false; + + /** + * 是否使用48000 也可以叫做16k的音频通道 + */ + public boolean useSampleRate48K_HZ = false; + + + /** + * 是否播放铃声使用Music通道 + */ + public boolean useSoundStreamMusic = false; + + /** + * 是否开启播放高清音乐模式 + * 在某些机器人接入的时候如果通话播放声音有问题可以设置这个试试 + */ + public boolean enableHighQualityMusic = false; + + /** + * 是否开启回声抑制 + */ + public boolean enableEffectAcousticEchoCanceler = true; + + + /** + * 本地预览以及传输给对方的画面旋转角度,在特定设备需要适配的时候需要设置 + */ + public int localRenderRotation = 0; + + /** + * 是否开启评价功能,在视频超过3分钟挂断的时候会弹出,如果不需要可以设置为false,建议开启评价功能 + */ + public boolean isOpenEvaluation = true; + + + /** + * 是否保留 添加成员入口 + */ + public boolean enableAddMember = true; + + + /** + * 是否保留 档案库中添加成员入口 + */ + public boolean enableAddMemberInDoc = true; + + /** + * 信息流系统发送者身份配置 + */ + public SystemSenderConfig mSenderConfig; + + /** + * 信息流 界面 设置 + */ + public MessageOptions messageOptions; + + /** + * 视频页面水印,如配置则在智能音箱或电视端视频时显示 + */ + public String mCompanySloganTip; + + /** + * 设置Message界面的标题 + */ + public String messageTitle; + + /** + * 是否开启多人呼叫入口 + */ + public boolean enableMultiCall = false; + + /** + * TV版本视频是否全屏显示 + */ + public boolean enableVideoFullScreen = false; + + /** + * 是否显示激活入口 + */ + public boolean enableActivate = true; + + /** + * sdk 扩展统计字段 + */ + public String mExtensionString; + + /** + * 是否开启档案库 + */ + public boolean enableMedical = true; + + /** + * 是否开启自定义预览窗口大小 + */ + public boolean enableCustomPreviewSize = false; + + + /** + * 是否开启显示会员日期 + */ + public boolean enableVipInfo = true; + + public static HHSDKOptions defaultSoundOption(String productId) { + HHSDKOptions options = new HHSDKOptions(productId); + options.isOpenCamera = false; + options.mOrientation = ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE; + options.mDeviceType = DeviceType.SOUND; + return options; + } +} diff --git a/app/src/main/java/com/hhmedic/android/sdk/config/MessageOptions.java b/app/src/main/java/com/hhmedic/android/sdk/config/MessageOptions.java new file mode 100644 index 0000000..93cd424 --- /dev/null +++ b/app/src/main/java/com/hhmedic/android/sdk/config/MessageOptions.java @@ -0,0 +1,11 @@ +package com.hhmedic.android.sdk.config; + +public class MessageOptions { + + + public boolean isFilterSummary; + + public boolean isFilterMedicinal; + + public boolean hideUserCenter; +} diff --git a/app/src/main/java/com/hhmedic/android/sdk/config/NetEnvironmental.java b/app/src/main/java/com/hhmedic/android/sdk/config/NetEnvironmental.java new file mode 100644 index 0000000..bb5cf9f --- /dev/null +++ b/app/src/main/java/com/hhmedic/android/sdk/config/NetEnvironmental.java @@ -0,0 +1,9 @@ +package com.hhmedic.android.sdk.config; + +public class NetEnvironmental +{ + public static boolean isTest() + { + return HHConfig.isTest(); + } +} diff --git a/app/src/main/java/com/hhmedic/android/sdk/config/SystemSenderConfig.java b/app/src/main/java/com/hhmedic/android/sdk/config/SystemSenderConfig.java new file mode 100644 index 0000000..67ca601 --- /dev/null +++ b/app/src/main/java/com/hhmedic/android/sdk/config/SystemSenderConfig.java @@ -0,0 +1,30 @@ +package com.hhmedic.android.sdk.config; + +public class SystemSenderConfig { + + + private String mIcon; + + private String mNickName; + + + public SystemSenderConfig(String nickName,String icon ){ + + this.mIcon = icon; + + this.mNickName = nickName; + + } + + + public String getNickName(){ + + return mNickName; + } + + + public String getIcon(){ + + return mIcon; + } +} diff --git a/app/src/main/java/com/hhmedic/android/sdk/config/SystemSenderInfo.java b/app/src/main/java/com/hhmedic/android/sdk/config/SystemSenderInfo.java new file mode 100644 index 0000000..1920954 --- /dev/null +++ b/app/src/main/java/com/hhmedic/android/sdk/config/SystemSenderInfo.java @@ -0,0 +1,9 @@ +package com.hhmedic.android.sdk.config; + +public class SystemSenderInfo { + + + public static String ICON = "https://imgs.hh-medic.com/photo/E2019042210511134518/069b07ef023a49a8a58d7efc3f99fbf5.jpg"; + + public static String NAME = "系统小助手"; +} diff --git a/app/src/main/java/com/hhmedic/android/sdk/config/Version.java b/app/src/main/java/com/hhmedic/android/sdk/config/Version.java new file mode 100644 index 0000000..06147d4 --- /dev/null +++ b/app/src/main/java/com/hhmedic/android/sdk/config/Version.java @@ -0,0 +1,39 @@ +package com.hhmedic.android.sdk.config; + +import android.text.TextUtils; + +import java.io.Serializable; + +public final class Version implements Serializable +{ + + private static String APP_VERSION = HHConfig.getSdkVersion(); + + + public static String getVersion() + { + if (TextUtils.isEmpty(APP_VERSION)) + { + APP_VERSION = HHConfig.getSdkVersion(); + } + + return APP_VERSION; + } + + + + public static void setCommonV(String v) + { + + if (TextUtils.isEmpty(v)) + { + return; + } + + if ((TextUtils.equals("3001", HHConfig.getPid()) || TextUtils.equals("3010", HHConfig.getPid()) || TextUtils.equals("3011", HHConfig.getPid()))) + { + APP_VERSION = v; + } + } + +} diff --git a/app/src/main/res/anim/hh_pop_enter.xml b/app/src/main/res/anim/hh_pop_enter.xml new file mode 100644 index 0000000..48f00dc --- /dev/null +++ b/app/src/main/res/anim/hh_pop_enter.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="utf-8"?> +<set xmlns:android="http://schemas.android.com/apk/res/android"> + + + <scale android:fromXScale="1.0" android:toXScale="1.0" + android:fromYScale="0.0" android:toYScale="1.0" android:pivotX="0%" + android:pivotY="0%" android:duration="200" /> +</set> \ No newline at end of file diff --git a/app/src/main/res/anim/hh_pop_exit.xml b/app/src/main/res/anim/hh_pop_exit.xml new file mode 100644 index 0000000..6f6cc55 --- /dev/null +++ b/app/src/main/res/anim/hh_pop_exit.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="utf-8"?> +<set xmlns:android="http://schemas.android.com/apk/res/android"> + + <scale android:fromXScale="1.0" android:toXScale="1.0" + android:fromYScale="1.0" android:toYScale="0.0" android:pivotX="0%" + android:pivotY="0%" android:duration="200" /> + +</set> \ No newline at end of file diff --git a/app/src/main/res/drawable-xxhdpi/hh_av_bottom_bg.png b/app/src/main/res/drawable-xxhdpi/hh_av_bottom_bg.png new file mode 100644 index 0000000..efb29c5 Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/hh_av_bottom_bg.png differ diff --git a/app/src/main/res/drawable-xxhdpi/hh_av_change_front_disable.png b/app/src/main/res/drawable-xxhdpi/hh_av_change_front_disable.png new file mode 100644 index 0000000..4c2ebc0 Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/hh_av_change_front_disable.png differ diff --git a/app/src/main/res/drawable-xxhdpi/hh_av_change_front_normal.png b/app/src/main/res/drawable-xxhdpi/hh_av_change_front_normal.png new file mode 100644 index 0000000..b6d26bc Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/hh_av_change_front_normal.png differ diff --git a/app/src/main/res/drawable-xxhdpi/hh_av_change_front_press.png b/app/src/main/res/drawable-xxhdpi/hh_av_change_front_press.png new file mode 100644 index 0000000..4c2ebc0 Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/hh_av_change_front_press.png differ diff --git a/app/src/main/res/drawable-xxhdpi/hh_av_chat_accept_bg_normal.png b/app/src/main/res/drawable-xxhdpi/hh_av_chat_accept_bg_normal.png new file mode 100644 index 0000000..67c9641 Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/hh_av_chat_accept_bg_normal.png differ diff --git a/app/src/main/res/drawable-xxhdpi/hh_av_chat_accept_bg_press.png b/app/src/main/res/drawable-xxhdpi/hh_av_chat_accept_bg_press.png new file mode 100644 index 0000000..90311be Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/hh_av_chat_accept_bg_press.png differ diff --git a/app/src/main/res/drawable-xxhdpi/hh_av_chat_change_doctor_icon.png b/app/src/main/res/drawable-xxhdpi/hh_av_chat_change_doctor_icon.png new file mode 100644 index 0000000..2ec614c Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/hh_av_chat_change_doctor_icon.png differ diff --git a/app/src/main/res/drawable-xxhdpi/hh_av_chat_refuse_bg_normal.png b/app/src/main/res/drawable-xxhdpi/hh_av_chat_refuse_bg_normal.png new file mode 100644 index 0000000..81a5fec Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/hh_av_chat_refuse_bg_normal.png differ diff --git a/app/src/main/res/drawable-xxhdpi/hh_av_chat_refuse_bg_press.png b/app/src/main/res/drawable-xxhdpi/hh_av_chat_refuse_bg_press.png new file mode 100644 index 0000000..cf5b388 Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/hh_av_chat_refuse_bg_press.png differ diff --git a/app/src/main/res/drawable-xxhdpi/hh_av_chat_voice.png b/app/src/main/res/drawable-xxhdpi/hh_av_chat_voice.png new file mode 100644 index 0000000..f7c6bec Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/hh_av_chat_voice.png differ diff --git a/app/src/main/res/drawable-xxhdpi/hh_av_chat_voice_press.png b/app/src/main/res/drawable-xxhdpi/hh_av_chat_voice_press.png new file mode 100644 index 0000000..c331186 Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/hh_av_chat_voice_press.png differ diff --git a/app/src/main/res/drawable-xxhdpi/hh_close_icon_white.png b/app/src/main/res/drawable-xxhdpi/hh_close_icon_white.png new file mode 100644 index 0000000..86d1589 Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/hh_close_icon_white.png differ diff --git a/app/src/main/res/drawable-xxhdpi/hh_list_item_bg_with_border_bottom.xml b/app/src/main/res/drawable-xxhdpi/hh_list_item_bg_with_border_bottom.xml new file mode 100644 index 0000000..905fd22 --- /dev/null +++ b/app/src/main/res/drawable-xxhdpi/hh_list_item_bg_with_border_bottom.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8"?> +<layer-list xmlns:android="http://schemas.android.com/apk/res/android" > + <item android:drawable="@color/hhui_drawable_color_list_separator"/> + <item android:drawable="@color/hhui_config_color_white" android:bottom="@dimen/hh_list_divider_height"/> +</layer-list> \ No newline at end of file diff --git a/app/src/main/res/drawable-xxhdpi/hh_list_item_bg_with_border_bottom_pressed.xml b/app/src/main/res/drawable-xxhdpi/hh_list_item_bg_with_border_bottom_pressed.xml new file mode 100644 index 0000000..0ab9107 --- /dev/null +++ b/app/src/main/res/drawable-xxhdpi/hh_list_item_bg_with_border_bottom_pressed.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8"?> +<layer-list xmlns:android="http://schemas.android.com/apk/res/android" > + <item android:drawable="@color/hhui_drawable_color_list_separator"/> + <item android:drawable="@color/hhui_drawable_color_list_pressed" android:bottom="@dimen/hh_list_divider_height"/> +</layer-list> \ No newline at end of file diff --git a/app/src/main/res/drawable-xxhdpi/hh_sdk_error_red_icon.png b/app/src/main/res/drawable-xxhdpi/hh_sdk_error_red_icon.png new file mode 100644 index 0000000..48d92c6 Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/hh_sdk_error_red_icon.png differ diff --git a/app/src/main/res/drawable-xxhdpi/hp_avchat_tools_bg.png b/app/src/main/res/drawable-xxhdpi/hp_avchat_tools_bg.png new file mode 100644 index 0000000..dc79c73 Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/hp_avchat_tools_bg.png differ diff --git a/app/src/main/res/drawable-xxhdpi/hp_avchat_tools_more.png b/app/src/main/res/drawable-xxhdpi/hp_avchat_tools_more.png new file mode 100644 index 0000000..6c6f404 Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/hp_avchat_tools_more.png differ diff --git a/app/src/main/res/drawable-xxhdpi/hp_avchat_tools_more_open.png b/app/src/main/res/drawable-xxhdpi/hp_avchat_tools_more_open.png new file mode 100644 index 0000000..c49aab6 Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/hp_avchat_tools_more_open.png differ diff --git a/app/src/main/res/drawable-xxhdpi/hp_avchat_tools_start_bg.png b/app/src/main/res/drawable-xxhdpi/hp_avchat_tools_start_bg.png new file mode 100644 index 0000000..70d055f Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/hp_avchat_tools_start_bg.png differ diff --git a/app/src/main/res/drawable-xxhdpi/hp_call_default_loading.jpg b/app/src/main/res/drawable-xxhdpi/hp_call_default_loading.jpg new file mode 100644 index 0000000..c4e48a4 Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/hp_call_default_loading.jpg differ diff --git a/app/src/main/res/drawable-xxhdpi/hp_doctor_job_icon.png b/app/src/main/res/drawable-xxhdpi/hp_doctor_job_icon.png new file mode 100644 index 0000000..32c6353 Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/hp_doctor_job_icon.png differ diff --git a/app/src/main/res/drawable-xxhdpi/hp_flash_close.png b/app/src/main/res/drawable-xxhdpi/hp_flash_close.png new file mode 100644 index 0000000..b60b488 Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/hp_flash_close.png differ diff --git a/app/src/main/res/drawable-xxhdpi/hp_flash_open.png b/app/src/main/res/drawable-xxhdpi/hp_flash_open.png new file mode 100644 index 0000000..cab6041 Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/hp_flash_open.png differ diff --git a/app/src/main/res/drawable-xxhdpi/hp_line_up_image.jpg b/app/src/main/res/drawable-xxhdpi/hp_line_up_image.jpg new file mode 100644 index 0000000..b4aaff1 Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/hp_line_up_image.jpg differ diff --git a/app/src/main/res/drawable/hh_av_accept_btn_bg.xml b/app/src/main/res/drawable/hh_av_accept_btn_bg.xml new file mode 100644 index 0000000..b85966f --- /dev/null +++ b/app/src/main/res/drawable/hh_av_accept_btn_bg.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8"?> +<selector xmlns:android="http://schemas.android.com/apk/res/android"> + <item android:drawable="@drawable/hh_av_chat_accept_bg_press" android:state_pressed="true"/> + <item android:drawable="@drawable/hh_av_chat_accept_bg_normal" /> +</selector> \ No newline at end of file diff --git a/app/src/main/res/drawable/hh_av_btn_text_color.xml b/app/src/main/res/drawable/hh_av_btn_text_color.xml new file mode 100644 index 0000000..1611494 --- /dev/null +++ b/app/src/main/res/drawable/hh_av_btn_text_color.xml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="utf-8"?> +<selector xmlns:android="http://schemas.android.com/apk/res/android"> + <item android:color="@color/hh_sdk_line_color" android:state_enabled="false"/> + + <item android:color="@android:color/white"/> + +</selector> \ No newline at end of file diff --git a/app/src/main/res/drawable/hh_av_chat_change_camera_bg.xml b/app/src/main/res/drawable/hh_av_chat_change_camera_bg.xml new file mode 100644 index 0000000..c9f0684 --- /dev/null +++ b/app/src/main/res/drawable/hh_av_chat_change_camera_bg.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="utf-8"?> +<selector xmlns:android="http://schemas.android.com/apk/res/android"> + <item android:drawable="@drawable/hh_av_change_front_disable" android:state_enabled="false" /> + <item android:drawable="@drawable/hh_av_change_front_press" android:state_pressed="true" /> + <item android:drawable="@drawable/hh_av_change_front_normal" /> +</selector> \ No newline at end of file diff --git a/app/src/main/res/drawable/hh_av_chat_voice_bg.xml b/app/src/main/res/drawable/hh_av_chat_voice_bg.xml new file mode 100644 index 0000000..045dd30 --- /dev/null +++ b/app/src/main/res/drawable/hh_av_chat_voice_bg.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="utf-8"?> +<selector xmlns:android="http://schemas.android.com/apk/res/android"> + <item android:drawable="@drawable/hh_av_chat_voice_press" android:state_enabled="false" /> + <item android:drawable="@drawable/hh_av_chat_voice_press" android:state_pressed="true" /> + <item android:drawable="@drawable/hh_av_chat_voice" /> +</selector> \ No newline at end of file diff --git a/app/src/main/res/drawable/hh_av_refuse_btn_bg.xml b/app/src/main/res/drawable/hh_av_refuse_btn_bg.xml new file mode 100644 index 0000000..c45309b --- /dev/null +++ b/app/src/main/res/drawable/hh_av_refuse_btn_bg.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8"?> +<selector xmlns:android="http://schemas.android.com/apk/res/android"> + <item android:drawable="@drawable/hh_av_chat_refuse_bg_press" android:state_pressed="true"/> + <item android:drawable="@drawable/hh_av_chat_refuse_bg_normal" /> +</selector> \ No newline at end of file diff --git a/app/src/main/res/drawable/hh_av_tools_bg.xml b/app/src/main/res/drawable/hh_av_tools_bg.xml new file mode 100644 index 0000000..06f2c15 --- /dev/null +++ b/app/src/main/res/drawable/hh_av_tools_bg.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="utf-8"?> +<shape xmlns:android="http://schemas.android.com/apk/res/android" + > + + <corners android:radius="3dp"/> + + <solid android:color="#33000000"/> + +</shape> \ No newline at end of file diff --git a/app/src/main/res/drawable/hh_list_item_bg.xml b/app/src/main/res/drawable/hh_list_item_bg.xml new file mode 100644 index 0000000..e878b21 --- /dev/null +++ b/app/src/main/res/drawable/hh_list_item_bg.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="utf-8"?> +<selector xmlns:android="http://schemas.android.com/apk/res/android"> + + <item android:drawable="@drawable/hh_list_item_bg_with_border_bottom_pressed" android:state_pressed="true"/> + + <item android:drawable="@drawable/hh_list_item_bg_with_border_bottom"/> + + +</selector> \ No newline at end of file diff --git a/app/src/main/res/drawable/hh_progress_bg.xml b/app/src/main/res/drawable/hh_progress_bg.xml new file mode 100644 index 0000000..fa119d7 --- /dev/null +++ b/app/src/main/res/drawable/hh_progress_bg.xml @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="utf-8"?> +<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> + <item android:id="@android:id/background"> + <clip> + <shape> + + <gradient android:startColor="@android:color/white" android:endColor="@android:color/white"/> + + + </shape> + + </clip> + + </item> + + <item android:id="@android:id/progress"> + <clip> + <shape> + + <gradient android:startColor="@color/hp_sdk_blue" android:endColor="@color/hp_sdk_blue"/> + </shape> + + </clip> + + </item> + +</layer-list> diff --git a/app/src/main/res/drawable/hh_sdk_dialog_normal_bg.xml b/app/src/main/res/drawable/hh_sdk_dialog_normal_bg.xml new file mode 100644 index 0000000..73faa27 --- /dev/null +++ b/app/src/main/res/drawable/hh_sdk_dialog_normal_bg.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="utf-8"?> +<shape xmlns:android="http://schemas.android.com/apk/res/android" + android:shape="rectangle"> + + <corners android:radius="10dp"/> + + <solid android:color="@android:color/white"/> +</shape> \ No newline at end of file diff --git a/app/src/main/res/drawable/hhui_dialog_bg.xml b/app/src/main/res/drawable/hhui_dialog_bg.xml new file mode 100644 index 0000000..cdb61ed --- /dev/null +++ b/app/src/main/res/drawable/hhui_dialog_bg.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8"?> +<shape xmlns:android="http://schemas.android.com/apk/res/android"> + <corners android:radius="@dimen/hh_radius"/> + <solid android:color="@color/hhui_config_color_white"/> +</shape> \ No newline at end of file diff --git a/app/src/main/res/drawable/hhui_tip_dialog_bg.xml b/app/src/main/res/drawable/hhui_tip_dialog_bg.xml new file mode 100644 index 0000000..0ea3d3a --- /dev/null +++ b/app/src/main/res/drawable/hhui_tip_dialog_bg.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="UTF-8"?> +<shape xmlns:android="http://schemas.android.com/apk/res/android" + android:shape="rectangle" > + <solid android:color="@color/hhui_config_color_75_pure_black" /> + <corners android:radius="15dp" /> +</shape> \ No newline at end of file diff --git a/app/src/main/res/drawable/hp_black_bg.xml b/app/src/main/res/drawable/hp_black_bg.xml new file mode 100644 index 0000000..ac70c49 --- /dev/null +++ b/app/src/main/res/drawable/hp_black_bg.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="utf-8"?> +<shape xmlns:android="http://schemas.android.com/apk/res/android" + android:shape="rectangle"> + <solid android:color="@android:color/black"/> + +</shape> \ No newline at end of file diff --git a/app/src/main/res/drawable/hp_tips_bg.xml b/app/src/main/res/drawable/hp_tips_bg.xml new file mode 100644 index 0000000..1ce78f6 --- /dev/null +++ b/app/src/main/res/drawable/hp_tips_bg.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="utf-8"?> +<shape xmlns:android="http://schemas.android.com/apk/res/android" + android:shape="rectangle"> + <solid android:color="@android:color/black"/> + + <corners android:radius="@dimen/hh_radius"/> + +</shape> \ No newline at end of file diff --git a/app/src/main/res/layout/activity_hh_avchat_layout.xml b/app/src/main/res/layout/activity_hh_avchat_layout.xml new file mode 100644 index 0000000..ad9a263 --- /dev/null +++ b/app/src/main/res/layout/activity_hh_avchat_layout.xml @@ -0,0 +1,44 @@ +<?xml version="1.0" encoding="utf-8"?> +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="match_parent" + android:id="@+id/main_content" + android:layout_height="match_parent"> + + + <com.hhmedic.android.sdk.module.video.widget.chat.ChatVideoView + android:id="@+id/chat" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:visibility="gone" /> + + + <com.hhmedic.android.sdk.module.video.widget.calling.CallingView + android:id="@+id/call" + android:layout_width="match_parent" + android:layout_height="match_parent" /> + + + <FrameLayout + android:id="@+id/preview_layout" + android:layout_width="@dimen/hp_video_small_width" + android:layout_height="@dimen/hp_video_small_height" + android:layout_alignParentEnd="true" + android:layout_marginTop="@dimen/hh_chat_small_layout_top" + android:layout_marginEnd="15dp"> + + + </FrameLayout> + + + <TextView + android:visibility="gone" + android:text="@string/hh_dev_tips" + android:textColor="@android:color/holo_red_dark" + android:layout_marginTop="36dp" + android:layout_centerHorizontal="true" + android:id="@+id/dev_tips_incoming" + android:layout_width="wrap_content" + android:layout_height="wrap_content" /> + + +</RelativeLayout> \ No newline at end of file diff --git a/app/src/main/res/layout/activity_hh_browser_layout.xml b/app/src/main/res/layout/activity_hh_browser_layout.xml new file mode 100644 index 0000000..7274632 --- /dev/null +++ b/app/src/main/res/layout/activity_hh_browser_layout.xml @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="utf-8"?> +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:orientation="vertical" android:layout_width="match_parent" + android:background="@color/hh_ui_bg" + android:layout_height="match_parent"> + + + <include layout="@layout/hh_system_toolbar_layout"/> + + + + <ProgressBar + android:max="100" + android:progressDrawable="@drawable/hh_progress_bg" + style="?android:attr/progressBarStyleHorizontal" + android:id="@+id/hh_progress" + android:layout_width="match_parent" + android:layout_height="2dp"/> + + + <WebView + android:id="@+id/webView" + android:layout_width="match_parent" + android:layout_height="match_parent"/> + + + +</LinearLayout> \ No newline at end of file diff --git a/app/src/main/res/layout/activity_hh_video_layout.xml b/app/src/main/res/layout/activity_hh_video_layout.xml new file mode 100644 index 0000000..5ca431d --- /dev/null +++ b/app/src/main/res/layout/activity_hh_video_layout.xml @@ -0,0 +1,53 @@ +<?xml version="1.0" encoding="utf-8"?> +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="match_parent" + xmlns:app="http://schemas.android.com/apk/res-auto" + android:background="@android:color/black" + android:layout_height="match_parent"> + + + <com.hhmedic.android.sdk.module.video.player.VideoView + android:id="@+id/video" + android:layout_width="match_parent" + android:layout_height="match_parent"/> + + + <TextView + android:id="@+id/connect" + android:text="@string/hh_video_connect_str" + android:layout_width="wrap_content" + android:textColor="@android:color/white" + android:layout_centerInParent="true" + android:layout_height="wrap_content"/> + + + <Button + android:layout_marginTop="14dp" + android:id="@+id/hang_up" + android:drawableTop="@drawable/hh_av_refuse_btn_bg" + style="@style/hh_av_btn" + android:layout_marginBottom="30dp" + android:layout_alignParentBottom="true" + android:layout_centerHorizontal="true" + android:text="@string/hh_av_hangup_btn" + android:layout_width="wrap_content" + android:layout_height="wrap_content" /> + + + + + <androidx.appcompat.widget.Toolbar + android:id="@+id/toolbar" + app:titleTextColor="@android:color/transparent" + android:layout_width="match_parent" + android:layout_height="46dp" + android:layout_marginTop="40dp" + app:theme="@style/HH.Toolbar.Light" + android:background="@android:color/transparent" + /> + + + + + +</RelativeLayout> \ No newline at end of file diff --git a/app/src/main/res/layout/hh_av_upload_photo_layout.xml b/app/src/main/res/layout/hh_av_upload_photo_layout.xml new file mode 100644 index 0000000..3ea07a2 --- /dev/null +++ b/app/src/main/res/layout/hh_av_upload_photo_layout.xml @@ -0,0 +1,77 @@ +<?xml version="1.0" encoding="utf-8"?> +<RelativeLayout + xmlns:android="http://schemas.android.com/apk/res/android" + android:orientation="vertical" android:layout_width="match_parent" + android:layout_height="match_parent"> + + + <ImageView + android:id="@+id/cover" + android:scaleType="centerCrop" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:contentDescription="@string/hh_sdk_image_name" /> + + + <TextView + android:id="@+id/count" + android:paddingBottom="1dp" + android:paddingTop="1dp" + android:paddingStart="@dimen/normal_margin" + android:paddingEnd="@dimen/normal_margin" + android:background="@color/hp_sdk_alpha_black" + android:layout_alignParentEnd="true" + android:textColor="@android:color/white" + android:textSize="10.0sp" + android:layout_width="wrap_content" + android:layout_height="wrap_content" /> + + + + <ProgressBar + android:max="100" + android:id="@+id/progress" + android:layout_margin="@dimen/normal_margin" + android:layout_centerVertical="true" + style="?android:attr/progressBarStyleHorizontal" + android:layout_width="match_parent" + android:layout_height="4dp" /> + + + + + <RelativeLayout + android:visibility="gone" + android:id="@+id/error_tips_layout" + android:layout_width="match_parent" + android:layout_height="match_parent"> + + <ImageView + android:src="@drawable/hh_sdk_error_red_icon" + android:layout_centerInParent="true" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:contentDescription="@string/hh_sdk_image_name" /> + + + <TextView + android:paddingBottom="1dp" + android:paddingTop="1dp" + android:background="@color/hp_sdk_alpha_black" + android:textColor="@android:color/white" + android:textSize="9.0sp" + android:gravity="center_horizontal" + android:text="@string/hh_video_upload_error" + android:layout_alignParentBottom="true" + android:layout_width="match_parent" + android:layout_height="wrap_content" /> + + + </RelativeLayout> + + + + + +</RelativeLayout> + diff --git a/app/src/main/res/layout/hh_bottom_sheet_list.xml b/app/src/main/res/layout/hh_bottom_sheet_list.xml new file mode 100644 index 0000000..fc5c1f6 --- /dev/null +++ b/app/src/main/res/layout/hh_bottom_sheet_list.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="utf-8"?> +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical"> + + <TextView + android:id="@+id/title" + android:layout_width="match_parent" + android:layout_height="@dimen/hh_bottom_sheet_title_height" + android:ellipsize="middle" + android:gravity="center_vertical" + android:singleLine="true" + android:visibility="gone"/> + + <ListView + android:id="@+id/listview" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:background="@color/hhui_config_color_white" + android:divider="@null" + android:dividerHeight="0dp"/> +</LinearLayout> diff --git a/app/src/main/res/layout/hh_bottom_sheet_list_item.xml b/app/src/main/res/layout/hh_bottom_sheet_list_item.xml new file mode 100644 index 0000000..566ec62 --- /dev/null +++ b/app/src/main/res/layout/hh_bottom_sheet_list_item.xml @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="utf-8"?> +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="match_parent" + android:layout_height="@dimen/hh_bottom_sheet_list_item_height" + android:gravity="center" + android:background="@drawable/hh_list_item_bg" + android:orientation="horizontal" + android:paddingLeft="16dp" + android:paddingRight="16dp"> + + + + <TextView + android:text="@string/hh_sdk_image_name" + android:id="@+id/bottom_dialog_list_item_title" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:ellipsize="middle" + android:textColor="@color/hp_black_33" + android:textSize="16.0sp" + android:singleLine="true" + /> + + +</LinearLayout> \ No newline at end of file diff --git a/app/src/main/res/layout/hh_calling_layout.xml b/app/src/main/res/layout/hh_calling_layout.xml new file mode 100644 index 0000000..782612c --- /dev/null +++ b/app/src/main/res/layout/hh_calling_layout.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="utf-8"?> +<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="match_parent" + android:id="@+id/calling_content" + android:layout_height="match_parent"> + + + + + +</FrameLayout> \ No newline at end of file diff --git a/app/src/main/res/layout/hh_certificate_layout.xml b/app/src/main/res/layout/hh_certificate_layout.xml new file mode 100644 index 0000000..42df6a7 --- /dev/null +++ b/app/src/main/res/layout/hh_certificate_layout.xml @@ -0,0 +1,81 @@ +<?xml version="1.0" encoding="utf-8"?> +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:background="@color/hh_certificate_bg"> + + <ImageView + android:id="@+id/hh_doctor_certificate" + android:layout_width="match_parent" + android:layout_height="match_parent" /> + + + <RelativeLayout + android:id="@+id/hh_loading_state_layout" + android:layout_width="match_parent" + android:layout_height="match_parent"> + + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_centerInParent="true" + android:gravity="center_horizontal" + android:orientation="vertical"> + + + <ImageView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:contentDescription="@string/hh_sdk_image_name" + /> + + + <LinearLayout + android:id="@+id/hh_text_state_layout" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginTop="16dp" + android:gravity="center_vertical"> + + + <TextView + android:id="@+id/hh_state_text" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center_vertical" + android:textColor="@android:color/white" + android:textSize="14.0sp" /> + + + <com.hhmedic.android.sdk.uikit.widget.HHLoadingView + android:id="@+id/hh_loading" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginStart="10dp" /> + + + </LinearLayout> + + + </LinearLayout> + + </RelativeLayout> + + + <ImageView + android:id="@+id/hh_certificate_close" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignParentEnd="true" + android:contentDescription="@string/hh_sdk_image_name" + android:paddingStart="16dp" + android:paddingTop="28dp" + android:paddingEnd="20dp" + android:paddingBottom="16dp" + android:src="@drawable/hh_close_icon_white" /> + + +</RelativeLayout> + + diff --git a/app/src/main/res/layout/hh_chat_mobile_controller_layout.xml b/app/src/main/res/layout/hh_chat_mobile_controller_layout.xml new file mode 100644 index 0000000..fa382fc --- /dev/null +++ b/app/src/main/res/layout/hh_chat_mobile_controller_layout.xml @@ -0,0 +1,170 @@ +<?xml version="1.0" encoding="utf-8"?> +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:id="@+id/bottom_control" + android:layout_width="match_parent" + android:layout_height="match_parent"> + + + <RelativeLayout + android:id="@+id/bottom_menu_layout" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_alignParentBottom="true" + android:background="@drawable/hh_av_bottom_bg" + android:paddingLeft="@dimen/hh_horizontal_margin" + android:paddingRight="@dimen/hh_horizontal_margin"> + + + <LinearLayout + android:id="@+id/photos_layout" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignParentStart="true" + android:gravity="center_horizontal" + android:orientation="vertical"> + + + <View + android:id="@+id/empty_view_for_bottom" + android:layout_width="1dp" + android:layout_height="100dp" /> + + <com.hhmedic.android.sdk.module.video.widget.chat.ChatToolsView + android:id="@+id/tools" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginBottom="20dp" + android:visibility="gone" /> + + + <ImageView + android:id="@+id/showTools" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginBottom="20dp" + android:background="@drawable/hh_av_tools_bg" + android:contentDescription="@string/hh_sdk_image_name" + android:paddingStart="13dp" + android:paddingEnd="13dp" + android:src="@drawable/hp_avchat_tools_more" /> + + <com.hhmedic.android.sdk.module.video.widget.chat.UploadView + android:id="@+id/upload" + android:layout_width="64dp" + android:layout_height="64dp" + android:layout_marginTop="14dp" /> + + <Button + android:id="@+id/photos" + style="@style/hh_av_btn" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginTop="18dp" + android:drawableTop="@drawable/hh_av_chat_voice_bg" + android:text="@string/hp_video_camera_title" /> + + + </LinearLayout> + + + <LinearLayout + + android:id="@+id/center" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignBottom="@+id/photos_layout" + android:layout_centerHorizontal="true" + android:gravity="center_horizontal" + android:orientation="vertical"> + + + <TextView + android:id="@+id/time_label" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginTop="@dimen/hh_vertical_large" + android:textColor="@android:color/white" + android:textSize="@dimen/hp_video_menu_text_font" /> + + + <Button + + android:id="@+id/hand_up" + style="@style/hh_av_btn" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginTop="14dp" + android:drawableTop="@drawable/hh_av_refuse_btn_bg" + android:text="@string/hh_av_hangup_btn" /> + + + </LinearLayout> + + + <LinearLayout + android:id="@+id/switch_layout" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignBottom="@+id/photos_layout" + android:layout_alignParentEnd="true" + android:gravity="center_horizontal" + android:orientation="vertical"> + + + <Button + android:id="@+id/change_doctor" + style="@style/hh_av_btn" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginBottom="4dp" + android:drawableTop="@drawable/hh_av_chat_change_doctor_icon" + android:text="@string/hh_av_change_doctor" + android:textColor="@drawable/hh_av_btn_text_color" /> + + + <Button + android:id="@+id/change" + style="@style/hh_av_btn" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginTop="14dp" + android:drawableTop="@drawable/hh_av_chat_change_camera_bg" + android:text="@string/hh_av_change_camera" + android:textColor="@drawable/hh_av_btn_text_color" /> + + + <Button + android:id="@+id/showJob" + style="@style/hh_av_btn" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:drawablePadding="2dp" + android:text="@string/hp_doctor_job_title" + android:textColor="@android:color/white" + android:visibility="gone" /> + + + </LinearLayout> + + + </RelativeLayout> + + + <ImageView + android:id="@+id/watermark" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginStart="@dimen/normal_margin" + android:layout_marginTop="@dimen/hh_chat_water_layout_top" + android:layout_marginEnd="122dp" + android:contentDescription="@string/hh_sdk_image_name" + android:scaleType="fitStart" /> + + + <com.hhmedic.android.sdk.module.video.widget.chat.ChatTipView + android:id="@+id/hh_chat_tip" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_centerInParent="true" /> + +</RelativeLayout> diff --git a/app/src/main/res/layout/hh_chat_tip_layout.xml b/app/src/main/res/layout/hh_chat_tip_layout.xml new file mode 100644 index 0000000..1f047d4 --- /dev/null +++ b/app/src/main/res/layout/hh_chat_tip_layout.xml @@ -0,0 +1,34 @@ +<?xml version="1.0" encoding="utf-8"?> +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:id="@+id/connect_layout" + android:layout_width="wrap_content" + android:layout_height="40dp" + android:layout_centerInParent="true" + android:background="@drawable/hp_tips_bg" + android:gravity="center" + android:paddingStart="10dp" + android:paddingEnd="10dp"> + + + <TextView + android:id="@+id/tips" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/hh_video_connect_str" + android:paddingLeft="10dp" + android:paddingRight="10dp" + android:textColor="@android:color/white" + android:textSize="15.0sp" /> + + +<!-- <com.hhmedic.android.sdk.uikit.widget.WaitView--> +<!-- android:id="@+id/connect_wait"--> +<!-- android:layout_width="20dp"--> +<!-- android:visibility="gone"--> +<!-- android:layout_height="wrap_content"--> +<!-- android:layout_marginStart="@dimen/dp_6"--> +<!-- android:textColor="@android:color/white" />--> + + +</LinearLayout> + diff --git a/app/src/main/res/layout/hh_chat_tools_layout.xml b/app/src/main/res/layout/hh_chat_tools_layout.xml new file mode 100644 index 0000000..d9808f7 --- /dev/null +++ b/app/src/main/res/layout/hh_chat_tools_layout.xml @@ -0,0 +1,72 @@ +<?xml version="1.0" encoding="utf-8"?> +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:orientation="vertical" android:layout_width="wrap_content" + android:background="@drawable/hh_av_tools_bg" + android:paddingStart="8dp" + android:paddingEnd="8dp" + android:layout_height="wrap_content"> + + <LinearLayout + android:layout_gravity="center_horizontal" + android:id="@+id/job_icon_layout" + style="@style/hp_video_menu_layout" + android:layout_width="wrap_content" + android:layout_height="wrap_content"> + + + <ImageView + android:src="@drawable/hp_doctor_job_icon" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:contentDescription="@string/hh_sdk_image_name" /> + + + <TextView + android:text="@string/hp_doctor_job_title" + style="@style/hp_video_menu_text" + android:layout_width="wrap_content" + android:layout_height="wrap_content" /> + + + </LinearLayout> + + + + <LinearLayout + android:layout_gravity="center_horizontal" + android:id="@+id/flash_layout" + style="@style/hp_video_menu_layout" + android:layout_width="wrap_content" + android:layout_height="wrap_content"> + + + <ImageView + android:id="@+id/open_result" + android:src="@drawable/hp_flash_close" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:contentDescription="@string/hh_sdk_image_name" /> + + + <TextView + android:text="@string/hp_flash_title" + style="@style/hp_video_menu_text" + android:layout_width="wrap_content" + android:layout_height="wrap_content" /> + + + </LinearLayout> + + + + <ImageView + android:id="@+id/close" + android:layout_marginTop="10dp" + android:src="@drawable/hp_avchat_tools_more_open" + android:layout_gravity="center_horizontal" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:contentDescription="@string/hh_sdk_image_name" /> + + +</LinearLayout> \ No newline at end of file diff --git a/app/src/main/res/layout/hh_chat_video_layout.xml b/app/src/main/res/layout/hh_chat_video_layout.xml new file mode 100644 index 0000000..63a61c2 --- /dev/null +++ b/app/src/main/res/layout/hh_chat_video_layout.xml @@ -0,0 +1,30 @@ +<?xml version="1.0" encoding="utf-8"?> +<RelativeLayout + xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="match_parent" + android:background="@drawable/hp_black_bg" + android:layout_height="match_parent"> + + + <FrameLayout + android:id="@+id/large_size_preview" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:gravity="center" + android:layout_centerInParent="true" + android:background="@drawable/hp_black_bg" + android:orientation="horizontal" /> + + + <TextView + android:id="@+id/notificationLayout" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:layout_gravity="center" + android:gravity="center" + android:shadowDy="1" + android:shadowRadius="1" + android:textSize="16sp" + /> + +</RelativeLayout> diff --git a/app/src/main/res/layout/hh_doctor_calling_layout.xml b/app/src/main/res/layout/hh_doctor_calling_layout.xml new file mode 100644 index 0000000..65bf89d --- /dev/null +++ b/app/src/main/res/layout/hh_doctor_calling_layout.xml @@ -0,0 +1,146 @@ +<?xml version="1.0" encoding="utf-8"?> +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="match_parent" android:layout_height="match_parent"> + + + + + <ImageView + android:id="@+id/icon" + android:scaleType="centerCrop" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:contentDescription="@string/hh_sdk_image_name" /> + + + + <LinearLayout + android:paddingTop="@dimen/dp_10" + android:background="@color/hp_alpha_black" + android:layout_above="@+id/bottom_layout" + android:orientation="vertical" + android:paddingBottom="@dimen/dp_10" + android:layout_width="match_parent" + android:layout_height="wrap_content"> + + <TextView + android:layout_gravity="center_horizontal" + android:id="@+id/name" + android:text="@string/hh_sdk_image_name" + android:textSize="22sp" + android:textColor="@android:color/white" + android:layout_width="wrap_content" + android:layout_height="wrap_content" /> + + + + <RelativeLayout + android:layout_marginTop="@dimen/dp_6" + android:layout_width="match_parent" + android:layout_height="wrap_content"> + + + <TextView + android:id="@+id/des" + android:layout_centerHorizontal="true" + android:text="@string/hh_av_accept_show_hint" + android:textSize="13.0sp" + android:textColor="@android:color/white" + android:layout_width="wrap_content" + android:layout_height="wrap_content" /> + + + <com.hhmedic.android.sdk.uikit.widget.WaitView + android:layout_width="wrap_content" + android:layout_toEndOf="@+id/des" + android:textColor="@android:color/white" + android:layout_marginStart="@dimen/dp_6" + android:id="@+id/wait" + android:layout_height="wrap_content" /> + + + + </RelativeLayout> + + + + + + + </LinearLayout> + + + + <FrameLayout + android:background="@color/hp_alpha_black" + android:paddingLeft="@dimen/hh_horizontal_margin" + android:paddingRight="@dimen/hh_horizontal_margin" + android:id="@+id/bottom_layout" + android:layout_alignParentBottom="true" + android:layout_width="match_parent" + android:layout_height="wrap_content"> + + + + <RelativeLayout + android:id="@+id/calling_bottom" + android:paddingRight="@dimen/hh_callback_padding" + android:paddingLeft="@dimen/hh_callback_padding" + android:visibility="gone" + android:layout_width="match_parent" + android:layout_height="wrap_content"> + + + <Button + android:id="@+id/refuse" + android:drawableTop="@drawable/hh_av_refuse_btn_bg" + style="@style/hh_av_btn" + android:text="@string/hh_av_refuse_btn" + android:layout_width="wrap_content" + android:layout_height="wrap_content" /> + + + <Button + android:id="@+id/accept" + android:text="@string/hh_av_accept_btn" + android:layout_alignParentEnd="true" + android:drawableTop="@drawable/hh_av_accept_btn_bg" + style="@style/hh_av_btn" + android:layout_width="wrap_content" + android:layout_height="wrap_content"> + <requestFocus/> + </Button> + + + <!-- 多人视频 中间状态 --> + + <Button + android:visibility="gone" + android:layout_centerHorizontal="true" + android:id="@+id/cancel_multi" + android:drawableTop="@drawable/hh_av_refuse_btn_bg" + style="@style/hh_av_btn" + android:text="@string/hh_cancel" + android:layout_width="wrap_content" + android:layout_height="wrap_content" /> + + + </RelativeLayout> + + + <Button + android:layout_gravity="center_horizontal" + android:id="@+id/cancel" + android:drawableTop="@drawable/hh_av_refuse_btn_bg" + style="@style/hh_av_btn" + android:text="@string/hh_cancel" + android:layout_width="wrap_content" + android:layout_height="wrap_content" /> + + + </FrameLayout> + + + + +</RelativeLayout> \ No newline at end of file diff --git a/app/src/main/res/layout/hh_expert_calling_layout.xml b/app/src/main/res/layout/hh_expert_calling_layout.xml new file mode 100644 index 0000000..0c163c0 --- /dev/null +++ b/app/src/main/res/layout/hh_expert_calling_layout.xml @@ -0,0 +1,100 @@ +<?xml version="1.0" encoding="utf-8"?> +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:background="#ff282828" + android:layout_width="match_parent" android:layout_height="match_parent"> + + + + <ImageView + android:id="@+id/expert_icon" + android:layout_marginTop="120dp" + android:layout_centerHorizontal="true" + android:layout_width="190dp" + android:layout_height="190dp" + android:contentDescription="@string/hh_sdk_image_name" /> + + + + + <TextView + android:layout_below="@+id/expert_icon" + android:layout_centerHorizontal="true" + android:id="@+id/expert_name" + android:layout_marginTop="12dp" + android:text="@string/hh_sdk_image_name" + android:textSize="22sp" + android:textColor="@android:color/white" + android:layout_width="wrap_content" + android:layout_height="wrap_content" /> + + + + <RelativeLayout + android:layout_below="@+id/expert_name" + android:layout_centerHorizontal="true" + android:layout_marginTop="@dimen/dp_6" + android:layout_width="match_parent" + android:layout_height="wrap_content"> + + + <TextView + android:id="@+id/expert_des" + android:layout_centerHorizontal="true" + android:text="@string/hh_av_accept_show_hint" + android:textSize="13.0sp" + android:textColor="@android:color/white" + android:layout_width="wrap_content" + android:layout_height="wrap_content" /> + + + <com.hhmedic.android.sdk.uikit.widget.WaitView + android:layout_width="wrap_content" + android:layout_toEndOf="@+id/expert_des" + android:textColor="@android:color/white" + android:layout_marginStart="@dimen/dp_6" + android:id="@+id/expert_wait" + android:layout_height="wrap_content" /> + + + + </RelativeLayout> + + + + <RelativeLayout + android:layout_alignParentBottom="true" + android:paddingEnd="@dimen/hh_callback_padding" + android:paddingStart="@dimen/hh_callback_padding" + android:layout_width="match_parent" + android:layout_height="wrap_content"> + + + <Button + android:id="@+id/expert_refuse" + android:drawableTop="@drawable/hh_av_refuse_btn_bg" + style="@style/hh_av_btn" + android:text="@string/hh_av_refuse_btn" + android:focusedByDefault="false" + android:layout_width="wrap_content" + android:layout_height="wrap_content"> + </Button> + + + <Button + android:id="@+id/expert_accept" + android:text="@string/hh_av_accept_btn" + android:layout_alignParentEnd="true" + android:drawableTop="@drawable/hh_av_accept_btn_bg" + style="@style/hh_av_btn" + android:focusedByDefault="true" + android:layout_width="wrap_content" + android:layout_height="wrap_content"> + <requestFocus/> + </Button> + + + </RelativeLayout> + + + +</RelativeLayout> \ No newline at end of file diff --git a/app/src/main/res/layout/hh_line_up_calling_layout.xml b/app/src/main/res/layout/hh_line_up_calling_layout.xml new file mode 100644 index 0000000..1def064 --- /dev/null +++ b/app/src/main/res/layout/hh_line_up_calling_layout.xml @@ -0,0 +1,71 @@ +<?xml version="1.0" encoding="utf-8"?> +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="match_parent" + android:layout_height="match_parent"> + + + + + <ImageView + android:id="@+id/lineup_ad" + android:layout_width="match_parent" + android:scaleType="centerCrop" + android:layout_height="match_parent" + android:contentDescription="@string/hh_sdk_image_name" /> + + + <LinearLayout + android:layout_alignParentBottom="true" + android:paddingTop="@dimen/dp_10" + android:background="@color/hp_alpha_black" + android:orientation="vertical" + android:paddingBottom="@dimen/dp_10" + android:layout_width="match_parent" + android:layout_height="wrap_content"> + + + + <TextView + android:layout_marginTop="@dimen/dp_10" + android:id="@+id/lineup_tips" + android:layout_gravity="center_horizontal" + android:text="@string/hp_call_wait_str" + android:textSize="16sp" + android:textColor="@android:color/white" + android:layout_width="wrap_content" + android:layout_height="wrap_content" /> + + + <com.hhmedic.android.sdk.uikit.widget.WaitView + android:layout_width="wrap_content" + android:layout_marginTop="@dimen/dp_6" + android:textColor="@android:color/white" + android:layout_marginStart="@dimen/dp_6" + android:id="@+id/wait" + android:layout_gravity="center_horizontal" + android:layout_height="wrap_content" /> + + + + <Button + android:layout_gravity="center_horizontal" + android:id="@+id/cancel" + android:drawableTop="@drawable/hh_av_refuse_btn_bg" + style="@style/hh_av_btn" + android:text="@string/hh_cancel" + android:layout_width="wrap_content" + android:layout_height="wrap_content" /> + + + </LinearLayout> + + + + + + + + + + +</RelativeLayout> \ No newline at end of file diff --git a/app/src/main/res/layout/hh_system_toolbar_layout.xml b/app/src/main/res/layout/hh_system_toolbar_layout.xml new file mode 100644 index 0000000..fc5bc89 --- /dev/null +++ b/app/src/main/res/layout/hh_system_toolbar_layout.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="utf-8"?> +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto" + android:id="@+id/toolbar_layout" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical"> + + <androidx.appcompat.widget.Toolbar + android:id="@+id/toolbar" + app:titleTextColor="@android:color/black" + android:layout_width="match_parent" + android:layout_height="46dp" + android:background="@android:color/white" + app:theme="@style/HHUI.Toolbar" + app:titleTextAppearance="@style/HHUI.Toolbar.TitleText" + /> + + + <View style="@style/hh_sdk_line" /> + +</LinearLayout> \ No newline at end of file diff --git a/app/src/main/res/layout/hh_tips_dialog_layout.xml b/app/src/main/res/layout/hh_tips_dialog_layout.xml new file mode 100644 index 0000000..8c0dede --- /dev/null +++ b/app/src/main/res/layout/hh_tips_dialog_layout.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="utf-8"?> +<merge xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="match_parent" + android:layout_height="match_parent"> + <!--<LinearLayout--> + <!--android:id="@+id/contentWrap"--> + <!--style="@style/hhui_tip_dialog_wrap"--> + <!--android:orientation="vertical"/>--> + + <LinearLayout android:id="@+id/contentWrap" + android:orientation="vertical" + style="@style/hhui_tip_dialog_wrap"/> + +</merge> \ No newline at end of file diff --git a/app/src/main/res/menu/hh_menu_close.xml b/app/src/main/res/menu/hh_menu_close.xml new file mode 100644 index 0000000..3327b50 --- /dev/null +++ b/app/src/main/res/menu/hh_menu_close.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="utf-8"?> +<menu xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto"> + + <item + android:id="@+id/close" + app:showAsAction="always" + android:title="关闭" /> + +</menu> \ No newline at end of file diff --git a/app/src/main/res/raw/hangup.mp3 b/app/src/main/res/raw/hangup.mp3 new file mode 100644 index 0000000..a788e1a Binary files /dev/null and b/app/src/main/res/raw/hangup.mp3 differ diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml new file mode 100644 index 0000000..d781ec5 --- /dev/null +++ b/app/src/main/res/values/colors.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + +</resources> diff --git a/app/src/main/res/values/hh_attrs.xml b/app/src/main/res/values/hh_attrs.xml new file mode 100644 index 0000000..44e0e8d --- /dev/null +++ b/app/src/main/res/values/hh_attrs.xml @@ -0,0 +1,44 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + + + <attr name="hhui_content_padding_horizontal" format="dimension"/> <!-- 已废弃 --> + <attr name="hhui_content_spacing_horizontal" format="dimension"/> <!-- margin 和 padding 等使用的内容通用水平间距 --> + + <attr name="hhui_dialog_min_width" format="dimension"/> + <attr name="hhui_dialog_max_width" format="dimension"/> + <attr name="hhui_dialog_bg" format="reference"/> + <attr name="hhui_dialog_margin_vertical" format="dimension"/> + <attr name="hhui_dialog_padding_horizontal" format="dimension"/> + <attr name="hhui_dialog_background_dim_amount" format="float"/> + <attr name="hhui_dialog_wrapper_style" format="reference"/> + <attr name="hhui_dialog_title_style" format="reference"/> + <attr name="hhui_dialog_action_container_style" format="reference"/> + <attr name="hhui_dialog_action_style" format="reference"/> + <attr name="hhui_dialog_message_content_style" format="reference"/> + <attr name="hhui_dialog_edit_content_style" format="reference"/> + <attr name="hhui_dialog_menu_container_style" format="reference"/> + <attr name="hhui_dialog_menu_item_style" format="reference"/> + + <!-- tips --> + <attr name="hhui_tip_dialog_bg" format="reference"/> + <attr name="hhui_tip_dialog_min_width" format="dimension"/> + <attr name="hhui_tip_dialog_min_height" format="dimension"/> + <attr name="hhui_tip_dialog_padding_vertical" format="dimension"/> + <attr name="hhui_tip_dialog_padding_horizontal" format="dimension"/> + <attr name="hhui_tip_dialog_margin_horizontal" format="dimension"/> + + + + + <declare-styleable name="HHUILoadingView"> + <attr name="hhui_loading_view_size" format="dimension"/> + <attr name="android:color"/> + </declare-styleable> + <attr name="HHUILoadingStyle" format="reference"/> + + + + + +</resources> \ No newline at end of file diff --git a/app/src/main/res/values/hh_colors.xml b/app/src/main/res/values/hh_colors.xml new file mode 100644 index 0000000..e1e2309 --- /dev/null +++ b/app/src/main/res/values/hh_colors.xml @@ -0,0 +1,46 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + + + <color name="hp_alpha_black">#80000000</color> + + <color name="hp_black_33">#ff333333</color> + + <color name="hp_black_66">#ff666666</color> + + <color name="hp_black_64">#ff646464</color> + + + <color name="hp_black_99">#ff999999</color> + + <color name="hp_black_96">#ff969696</color> + + + <color name="hhui_config_color_white">#ffffff</color> + + <color name="hhui_config_color_75_pure_black">#C0000000</color> + + <color name="hhui_drawable_color_list_pressed">#DEE0E2</color> + + <color name="hhui_drawable_color_list_separator">#DEE0E2</color> + + + <color name="hp_sdk_blue">#ff0592f5</color> + + + <color name="hp_sdk_alpha_black">#80000000</color> + + <color name="hh_sdk_line_color">#ffd2d2d2</color> + + <color name="hh_hint_color">#797D86</color> + + <color name="hh_certificate_bg">#66000000</color> + + <color name="hh_ui_bg">#fff3f3f3</color> + + <color name="hp_hint">#ffaaaaaa</color> + + <color name="hh_red_tips">#ffEC1313</color> + + +</resources> \ No newline at end of file diff --git a/app/src/main/res/values/hh_dimens.xml b/app/src/main/res/values/hh_dimens.xml new file mode 100644 index 0000000..be2131b --- /dev/null +++ b/app/src/main/res/values/hh_dimens.xml @@ -0,0 +1,80 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + + + <dimen name="dp_10">10.0dp</dimen> + + <dimen name="dp_6">6.0dp</dimen> + + <dimen name="hh_av_profile_height">64dp</dimen> + + <dimen name="normal_margin">8.0dp</dimen> + + <dimen name="hh_horizontal_margin">14.0dp</dimen> + + <dimen name="hp_video_small_height">135.0dp</dimen> + + <dimen name="hp_video_small_width">96.0dp</dimen> + + <dimen name="hh_vertical_large">40dp</dimen> + + <dimen name="hh_vertical_medium">30dp</dimen> + + <dimen name="hh_action_bar_height">46dp</dimen> + + <dimen name="hh_radius">4dp</dimen> + + <dimen name="uikit_horizontal_margin">14.0dp</dimen> + + <dimen name="hh_bottom_sheet_list_item_height">56.0dp</dimen> + + <dimen name="hh_bottom_sheet_title_height">56.0dp</dimen> + + <dimen name="hh_bottom_sheet_grid_padding_vertical">12.0dp</dimen> + + <dimen name="hh_bottom_sheet_grid_line_padding_horizontal">12.0dp</dimen> + + <dimen name="hh_bottom_sheet_grid_line_vertical_space">0dp</dimen> + + <dimen name="hh_bottom_sheet_grid_item_mini_width">84.0dp</dimen> + + <dimen name="hh_bottom_sheet_grid_item_icon_size">56.0dp</dimen> + + <dimen name="hh_list_divider_height">1px</dimen> + + <!-- 全局统一的界面左右间距,例如列表分隔线inset --> + <dimen name="hhui_content_padding_horizontal">@dimen/hhui_content_spacing_horizontal</dimen> <!-- 已废弃 --> + <dimen name="hhui_content_spacing_horizontal">16dp</dimen> <!-- margin 和 padding 等使用的内容通用水平间距 --> + + + <dimen name="hp_video_menu_text_font">12.0sp</dimen> + + <dimen name="hh_notify_carton_font">14.0sp</dimen> + + <dimen name="hh_chat_small_layout_top">36.0dp</dimen> + + <dimen name="hh_chat_water_layout_top">34.0dp</dimen> + + <dimen name="hp_chat_layout_padding">10dp</dimen> + + + <dimen name="hh_setting_item_height">50dp</dimen> + + <dimen name="hh_callback_padding">26dp</dimen> + + <dimen name="hp_content_padding">10dp</dimen> + + <dimen name="hp_content_font_padding">4dp</dimen> + + <dimen name="hh_line_height">0.5dp</dimen> + + <dimen name="hh_vertical_margin">14.0dp</dimen> + + <dimen name="hh_tablet_slogan_size">40sp</dimen> + + <dimen name="hh_sdk_dialog_margin_h">40dp</dimen> + + <dimen name="hh_sdk_dialog_margin_v">70dp</dimen> + + +</resources> \ No newline at end of file diff --git a/app/src/main/res/values/hh_strings.xml b/app/src/main/res/values/hh_strings.xml new file mode 100644 index 0000000..fecbc4a --- /dev/null +++ b/app/src/main/res/values/hh_strings.xml @@ -0,0 +1,143 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + + <string-array name="hp_sdk_select_photo"> + + + + <item>拍照</item> + + <item>从图库选择</item> + + <item>取消</item> + + </string-array> + + + <string name="hh_sdk_image_name">contentDescription</string> + + <string name="hp_line_up_timeout">目前医生比较繁忙,请稍候重试。</string> + + <string name="hh_av_accept_show_hint">邀请你视频</string> + + <string name="hh_av_change_camera">切换摄像头</string> + + <string name="hh_av_change_doctor">更换医生</string> + + <string name="hh_upload_img_tip">微信扫描二维码\n上传照片</string> + + <string name="hh_av_accept_btn">接听</string> + + <string name="hh_av_refuse_btn">拒绝</string> + + <string name="hh_av_hangup_btn">挂断</string> + + <string name="hp_video_camera_title">拍照</string> + + <string name="hp_call_wait_str">目前咨询人数较多,感谢耐心等待</string> + + <string name="hh_cancel">取消</string> + + <string name="hh_sdk_ok">确定</string> + + <string name="hh_change_doctor_ok">确定更换</string> + + <string name="hh_sdk_back">返回</string> + + <string name="hh_av_switch_audio_model">已切换到语音聊天</string> + + <string name="hp_doctor_job_title">执业医师资格证</string> + + <string name="hp_flash_title">闪光灯</string> + + <string name="hp_address_title">地址</string> + + <string name="hh_av_waiting_accept">呼叫中</string> + + <string name="hh_av_other_platform">已在其他设备接听</string> + + <string name="hh_av_broke">通话已结束</string> + + <string name="hh_av_remote_cancel">对方取消</string> + + <string name="hh_av_waiting_connect">拨号中</string> + + <string name="hp_call_permission_tips">您拒绝了视频需要的相机和录音权限,无法视频</string> + + <string name="hp_local_phone_call">本地电话,已自动为你挂断视频</string> + + <string name="hh_sdk_upload_tips">点击重新上传</string> + + <string name="hh_sdk_upload_success_tips">已上传</string> + + + + + <string name="hh_av_calling_net_broke_timeout">通话中,网络断开超时</string> + + <string name="hh_av_call_failed_offline">通话不可达,对方离线状态</string> + + <string name="hh_av_no_permission">暂无权限,请开通音视频服务</string> + + <string name="hh_av_other_error">未知错误</string> + + <string name="hh_av_calling_busy">对方正忙</string> + + <string name="hh_dev_tips">当前处在测试环境下</string> + + <string name="hh_video_connect_str">连接中</string> + + + <string name="net_poor_tip">当前网络质量较差</string> + + + <string name="hh_video_upload_error">点击重传</string> + + + <string name="hh_alert_change_doctor_tips">立即更换其他医生咨询,确定更换吗?【只可更换1次】</string> + + <string name="hh_alert_change_doctor_fail_tips">您已更换过医生,24小时内只可更换1次</string> + + + <string name="hh_error_tip_chat_connect_over_time">当前网络状态不佳,建议切换网络或稍后呼叫医生</string> + + <string name="hh_audio_record_error">目前无法视频,请在“系统设置”查看本应用的麦克风权限是否打开,打开后可正常通话。</string> + + <string name="hh_permission_tips">视频通话需要相机和录音权限才能进行,请立即设置</string> + + + <string name="hh_permission_alert_setting">设置</string> + + <string name="hh_multi_cancel_tips">%s取消呼叫</string> + + <string name="hh_multi_wait_doctor_join">医生接通中</string> + <string name="hh_multi_incoming_title">%s 邀请你视频咨询</string> + + <string name="hh_multi_hearer_state_title_leave">%s已断开连接</string> + <string name="hh_multi_hearer_state_title_leave_tips">%s已断开连接</string> + + <string name="hh_multi_hearer_state_title_busy_tips">%s拒绝接听</string> + + <string name="hh_multi_hearer_state_title_busy">%s已拒绝</string> + + + + <string name="hh_alert_i_known">我知道了</string> + + <string name="hh_call_dialog_title">请选择给谁咨询健康问题 </string> + + <string name="hh_call_protocol_str"> 同意《服务说明》咨询建议仅参考,如症状未缓解请到医院就诊</string> + + <string name="hh_call_protocol_alert">同意《服务说明》后可发起咨询</string> + + + <string name="hp_save">保存</string> + + + + + + + + +</resources> \ No newline at end of file diff --git a/app/src/main/res/values/hh_styles.xml b/app/src/main/res/values/hh_styles.xml new file mode 100644 index 0000000..a3e178c --- /dev/null +++ b/app/src/main/res/values/hh_styles.xml @@ -0,0 +1,201 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + + + <style name="hh_av_btn" parent="hh_btn_style"> + + <item name="android:drawablePadding">@dimen/normal_margin</item> + <item name="android:textColor">@android:color/white</item> + <item name="android:textSize">@dimen/hp_video_menu_text_font</item> + + </style> + + + <style name="hh_job_btn" parent="hh_btn_style"> + + <item name="android:drawablePadding">-8dp</item> + <item name="android:textColor">@android:color/white</item> + <item name="android:textSize">@dimen/hp_video_menu_text_font</item> + + </style> + + + <style name="hh_btn_style" parent="@style/Widget.AppCompat.Button.Borderless"> + + </style> + + + <style name="hp_video_menu_layout"> + + <item name="android:paddingTop">20.0dp</item> + + <item name="android:gravity">center_horizontal</item> + + <item name="android:orientation">vertical</item> + + </style> + + + <style name="hp_video_menu_text"> + + <item name="android:textColor">@android:color/white</item> + + <item name="android:layout_marginTop">6dp</item> + + <item name="android:textSize">9.0sp</item> + + </style> + + + + <style name="HH_ChatTheme" parent="Theme.AppCompat.Light.NoActionBar"> + <!-- Customize your theme here. --> + <item name="colorPrimary">@color/hhui_config_color_white</item> + <item name="colorPrimaryDark">@color/hhui_config_color_white</item> + <item name="colorAccent">@color/hhui_config_color_white</item> + <item name="colorControlNormal">@android:color/black</item> + <item name="buttonBarPositiveButtonStyle">@style/hh_positiveBtnStyle</item> + <item name="buttonBarNegativeButtonStyle">@style/hh_negativeBtnStyle</item> + + </style> + + + <style name="HH_Normal_Theme" parent="Theme.AppCompat.Light.NoActionBar"> + <!-- Customize your theme here. --> + <item name="colorPrimary">@color/hhui_config_color_white</item> + <item name="colorPrimaryDark">@color/hhui_config_color_white</item> + <item name="colorAccent">@color/hp_sdk_blue</item> + <item name="colorControlNormal">@color/hp_sdk_blue</item> + <item name="buttonBarPositiveButtonStyle">@style/hh_positiveBtnStyle</item> + <item name="buttonBarNegativeButtonStyle">@style/hh_negativeBtnStyle</item> + + </style> + + <!--确定按钮样式--> + <style name="hh_positiveBtnStyle" parent="Widget.AppCompat.Button.ButtonBar.AlertDialog"> + <item name="android:textColor">@color/hp_sdk_blue</item> + </style> + + <!--确定按钮样式--> + <style name="hh_negativeBtnStyle" parent="Widget.AppCompat.Button.ButtonBar.AlertDialog"> + <item name="android:textColor">@color/hp_black_96</item> + </style> + + <style name="hhui_tip_dialog_wrap"> + <item name="android:layout_width">wrap_content</item> + <item name="android:layout_height">wrap_content</item> + <item name="android:minWidth">120.dp</item> + <item name="android:minHeight">56.dp</item> + <item name="android:layout_gravity">center</item> + <item name="android:layout_marginLeft">20dp</item> + <item name="android:layout_marginRight">20dp</item> + <item name="android:gravity">center</item> + <item name="android:paddingLeft">16dp</item> + <item name="android:paddingRight">16dp</item> + <item name="android:paddingTop">24dp</item> + <item name="android:paddingBottom">24dp</item> + <item name="android:background">@drawable/hhui_tip_dialog_bg</item> + </style> + + + <style name="HHUI.TipDialog" parent="android:Theme.Dialog"> + <item name="android:windowFrame">@null</item> + <item name="android:windowNoTitle">true</item> + <item name="android:windowBackground">@android:color/transparent</item> + <item name="android:backgroundDimEnabled">false</item> + <item name="android:windowIsFloating">true</item> + <item name="android:windowContentOverlay">@null</item> + </style> + + + <style name="HHUI.BottomSheet" parent="android:Theme.Dialog"> + <item name="android:backgroundDimAmount">0.6</item> + <item name="android:windowNoTitle">true</item> + <item name="android:windowBackground">@android:color/transparent</item> + <item name="android:windowAnimationStyle">@null + </item><!-- 为了避免在有 NavigationBar 的手机上 Dialog 从 NavigationBar 底部上来。去掉 Dialog 的动画,使用 View 的动画。--> + <item name="android:layout_width">match_parent</item> + </style> + + + <style name="HHUI.Toolbar.TitleText" parent="TextAppearance.Widget.AppCompat.Toolbar.Title"> + <item name="android:textSize">17sp</item> + <item name="android:textColor">@android:color/black</item> + </style> + + + <style name="HHUI.Toolbar" parent="Theme.AppCompat.Light"> + + <item name="actionMenuTextColor">@android:color/black</item> + <item name="colorPrimary">@color/hhui_config_color_white</item> + <item name="colorPrimaryDark">@color/hhui_config_color_white</item> + <item name="colorControlNormal">@android:color/black</item> + + </style> + + + <style name="hh_sdk_line"> + + <item name="android:layout_height">1px</item> + <item name="android:layout_width">match_parent</item> + <item name="android:background">@color/hh_sdk_line_color</item> + + </style> + + + <style name="hh_popupAnimation" mce_bogus="1" parent="android:Animation"> + <item name="android:windowEnterAnimation">@anim/hh_pop_enter</item> + <item name="android:windowExitAnimation">@anim/hh_pop_exit</item> + </style> + + + + <style name="Toolbar.TitleText" parent="TextAppearance.Widget.AppCompat.Toolbar.Title"> + <item name="android:textSize">17sp</item> + <item name="android:textColor">@android:color/black</item> + </style> + + + + <style name="HH_PopupAnimation" parent="android:Animation" mce_bogus="1"> + <item name="android:windowEnterAnimation">@anim/hh_pop_enter</item> + <item name="android:windowExitAnimation">@anim/hh_pop_exit</item> + </style> + + + <style name="hh_sdk_dialog" parent="Theme.AppCompat.Light.Dialog.Alert"> + + + <item name="colorAccent">@color/hp_black_33</item> + + </style> + + + <style name="HH.Toolbar.Light" parent="HHUI.Toolbar"> + + <item name="colorControlNormal">@android:color/white</item> + + <item name="actionMenuTextColor">@android:color/white</item> + + </style> + + + + + + + <style name="hh_normal_font"> + + <item name="android:textSize">15.0sp</item> + + <item name="android:textColor">@color/hp_black_33</item> + + <item name="android:lineSpacingExtra">2dp</item> + + </style> + + + + + +</resources> \ No newline at end of file diff --git a/app/src/main/res/values/hh_themes_compat.xml b/app/src/main/res/values/hh_themes_compat.xml new file mode 100644 index 0000000..e2cb048 --- /dev/null +++ b/app/src/main/res/values/hh_themes_compat.xml @@ -0,0 +1,32 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + + <style name="HHUI.Compat" parent="Theme.AppCompat.Light"> + <item name="hhui_content_spacing_horizontal">20dp</item> + <item name="hhui_content_padding_horizontal">@dimen/hhui_content_spacing_horizontal</item> + <item name="hhui_dialog_min_width">260dp</item> + <item name="hhui_dialog_max_width">360dp</item> + <item name="hhui_dialog_bg">@drawable/hhui_dialog_bg</item> + <item name="hhui_dialog_margin_vertical">20dp</item> + <item name="hhui_dialog_padding_horizontal">24dp</item> + <item name="hhui_dialog_background_dim_amount">0.6</item> + <!--<item name="hhui_dialog_wrapper_style">@style/QMUI.Dialog.Wrapper</item>--> + <!--<item name="hhui_dialog_title_style">@style/QMUI.Dialog.Title</item>--> + <!--<item name="hhui_dialog_action_container_style">@style/QMUI.Dialog.ActionContainer</item>--> + <!--<item name="hhui_dialog_action_style">@style/QMUI.Dialog.Action</item>--> + <!--<item name="hhui_dialog_message_content_style">@style/QMUI.Dialog.MessageContent</item>--> + <!--<item name="hhui_dialog_edit_content_style">@style/QMUI.Dialog.EditContent</item>--> + <!--<item name="hhui_dialog_menu_container_style">@style/QMUI.Dialog.MenuContainer</item>--> + <!--<item name="hhui_dialog_menu_item_style">@style/QMUI.Dialog_MenuItem</item>--> + + <!-- tip --> + <item name="hhui_tip_dialog_bg">@drawable/hhui_tip_dialog_bg</item> + <item name="hhui_tip_dialog_min_width">120dp</item> + <item name="hhui_tip_dialog_min_height">56dp</item> + <item name="hhui_tip_dialog_margin_horizontal">?attr/hhui_content_spacing_horizontal</item> + <item name="hhui_tip_dialog_padding_vertical">12dp</item> + <item name="hhui_tip_dialog_padding_horizontal">?attr/hhui_content_padding_horizontal</item> + + </style> + +</resources> \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml new file mode 100644 index 0000000..8542005 --- /dev/null +++ b/app/src/main/res/values/strings.xml @@ -0,0 +1,2 @@ +<resources> +</resources> diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml new file mode 100644 index 0000000..d5ad29c --- /dev/null +++ b/app/src/main/res/values/styles.xml @@ -0,0 +1,17 @@ +<resources> + + <!-- Base application theme. --> + <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar"> + <!-- Customize your theme here. --> + + </style> + + + + <style name="hh_video_chat_style" parent="Theme.AppCompat.Light.NoActionBar"> + + + + </style> + +</resources> diff --git a/app/src/main/res/xml/hh_network_security_config.xml b/app/src/main/res/xml/hh_network_security_config.xml new file mode 100644 index 0000000..dca93c0 --- /dev/null +++ b/app/src/main/res/xml/hh_network_security_config.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<network-security-config> + <base-config cleartextTrafficPermitted="true" /> +</network-security-config> \ No newline at end of file diff --git a/app/src/main/res/xml/provider_paths.xml b/app/src/main/res/xml/provider_paths.xml new file mode 100644 index 0000000..6857a19 --- /dev/null +++ b/app/src/main/res/xml/provider_paths.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="utf-8"?> +<paths> + <external-path + name="external_files" + path="." /> + + + <root-path + name="root_path" + path="." /> + + <cache-path + name="cache_path" + path="."/> + +</paths> \ No newline at end of file diff --git a/build.gradle b/build.gradle new file mode 100644 index 0000000..ab07263 --- /dev/null +++ b/build.gradle @@ -0,0 +1,45 @@ +// Top-level build file where you can add configuration options common to all sub-projects/modules. +ext{ + //这个标志打的是测试还是正式包 + isDebug = true + //标志是否要打印log + isPrint = false + + isTV = false + + isSound = false + + useDNS = false + + sdkVersion = "3.0.6" +} + +buildscript { + + repositories { + google() + jcenter() + + } + dependencies { + classpath 'com.android.tools.build:gradle:3.5.0' + classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.5' + classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1' + } +} + +allprojects { + repositories { + google() + jcenter() + + } + + repositories { + mavenCentral() + } +} + +task clean(type: Delete) { + delete rootProject.buildDir +} \ No newline at end of file diff --git a/gradle.properties b/gradle.properties new file mode 100644 index 0000000..8b5f7ed --- /dev/null +++ b/gradle.properties @@ -0,0 +1,21 @@ +# Project-wide Gradle settings. +# IDE (e.g. Android Studio) users: +# Gradle settings configured through the IDE *will override* +# any settings specified in this file. +# For more details on how to configure your build environment visit +# http://www.gradle.org/docs/current/userguide/build_environment.html +# Specifies the JVM arguments used for the daemon process. +# The setting is particularly useful for tweaking memory settings. +org.gradle.jvmargs=-Xmx1536m +# When configured, Gradle will run in incubating parallel mode. +# This option should only be used with decoupled projects. More details, visit +# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects +# org.gradle.parallel=true +# AndroidX package structure to make it clearer which packages are bundled with the +# Android operating system, and which are packaged with your app's APK +# https://developer.android.com/topic/libraries/support-library/androidx-rn +android.useAndroidX=true +# Automatically convert third-party libraries to use AndroidX +android.enableJetifier=true + +android.injected.testOnly=false \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000..f6b961f Binary files /dev/null and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000..8466f94 --- /dev/null +++ b/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,6 @@ +#Thu Jul 23 11:51:04 CST 2020 +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip diff --git a/gradlew b/gradlew new file mode 100644 index 0000000..cccdd3d --- /dev/null +++ b/gradlew @@ -0,0 +1,172 @@ +#!/usr/bin/env sh + +############################################################################## +## +## Gradle start up script for UN*X +## +############################################################################## + +# Attempt to set APP_HOME +# Resolve links: $0 may be a link +PRG="$0" +# Need this for relative symlinks. +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi +done +SAVED="`pwd`" +cd "`dirname \"$PRG\"`/" >/dev/null +APP_HOME="`pwd -P`" +cd "$SAVED" >/dev/null + +APP_NAME="Gradle" +APP_BASE_NAME=`basename "$0"` + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS="" + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD="maximum" + +warn () { + echo "$*" +} + +die () { + echo + echo "$*" + echo + exit 1 +} + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "`uname`" in + CYGWIN* ) + cygwin=true + ;; + Darwin* ) + darwin=true + ;; + MINGW* ) + msys=true + ;; + NONSTOP* ) + nonstop=true + ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD="java" + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then + MAX_FD_LIMIT=`ulimit -H -n` + if [ $? -eq 0 ] ; then + if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then + MAX_FD="$MAX_FD_LIMIT" + fi + ulimit -n $MAX_FD + if [ $? -ne 0 ] ; then + warn "Could not set maximum file descriptor limit: $MAX_FD" + fi + else + warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" + fi +fi + +# For Darwin, add options to specify how the application appears in the dock +if $darwin; then + GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" +fi + +# For Cygwin, switch paths to Windows format before running java +if $cygwin ; then + APP_HOME=`cygpath --path --mixed "$APP_HOME"` + CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + JAVACMD=`cygpath --unix "$JAVACMD"` + + # We build the pattern for arguments to be converted via cygpath + ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` + SEP="" + for dir in $ROOTDIRSRAW ; do + ROOTDIRS="$ROOTDIRS$SEP$dir" + SEP="|" + done + OURCYGPATTERN="(^($ROOTDIRS))" + # Add a user-defined pattern to the cygpath arguments + if [ "$GRADLE_CYGPATTERN" != "" ] ; then + OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" + fi + # Now convert the arguments - kludge to limit ourselves to /bin/sh + i=0 + for arg in "$@" ; do + CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` + CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option + + if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition + eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` + else + eval `echo args$i`="\"$arg\"" + fi + i=$((i+1)) + done + case $i in + (0) set -- ;; + (1) set -- "$args0" ;; + (2) set -- "$args0" "$args1" ;; + (3) set -- "$args0" "$args1" "$args2" ;; + (4) set -- "$args0" "$args1" "$args2" "$args3" ;; + (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + esac +fi + +# Escape application args +save () { + for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done + echo " " +} +APP_ARGS=$(save "$@") + +# Collect all arguments for the java command, following the shell quoting and substitution rules +eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" + +# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong +if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then + cd "$(dirname "$0")" +fi + +exec "$JAVACMD" "$@" diff --git a/gradlew.bat b/gradlew.bat new file mode 100644 index 0000000..f955316 --- /dev/null +++ b/gradlew.bat @@ -0,0 +1,84 @@ +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS= + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto init + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto init + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:init +@rem Get command-line arguments, handling Windows variants + +if not "%OS%" == "Windows_NT" goto win9xME_args + +:win9xME_args +@rem Slurp the command line arguments. +set CMD_LINE_ARGS= +set _SKIP=2 + +:win9xME_args_slurp +if "x%~1" == "x" goto execute + +set CMD_LINE_ARGS=%* + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/sdktest/.gitignore b/sdktest/.gitignore new file mode 100644 index 0000000..796b96d --- /dev/null +++ b/sdktest/.gitignore @@ -0,0 +1 @@ +/build diff --git a/sdktest/build.gradle b/sdktest/build.gradle new file mode 100644 index 0000000..c1c5591 --- /dev/null +++ b/sdktest/build.gradle @@ -0,0 +1,63 @@ +apply plugin: 'com.android.application' + +android { + compileSdkVersion 29 + buildToolsVersion "29.0.2" + + defaultConfig { + applicationId "com.hhmedic.android.sdktest" + minSdkVersion 17 + targetSdkVersion 29 + versionCode 1 + versionName "1.0" + multiDexEnabled true + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" + + ndk { + //设置支持的SO库架构 + abiFilters "armeabi-v7a"//, "x86","arm64-v8a","x86_64" + } + } + + buildTypes { + release { + minifyEnabled true + proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' + } + + debug { + minifyEnabled true + proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' + } + } + + + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + +} + +dependencies { + implementation fileTree(dir: 'libs', include: ['*.jar']) + + implementation project(':app') +// implementation 'com.hhmedic.android.sdk:hh_trtc_pingan_dev:3.0.6.12091027' + + + implementation 'com.github.bumptech.glide:glide:4.9.0' + + api 'com.hhmedic.android.sdk:okhttputils:1.0.0.12011739' + + implementation 'com.google.code.gson:gson:2.8.0' + + implementation 'androidx.appcompat:appcompat:1.2.0' + implementation 'androidx.constraintlayout:constraintlayout:1.1.3' + testImplementation 'junit:junit:4.12' + androidTestImplementation 'androidx.test.ext:junit:1.1.1' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' + + debugImplementation 'com.squareup.leakcanary:leakcanary-android:1.6.3' + releaseImplementation 'com.squareup.leakcanary:leakcanary-android-no-op:1.6.2' +} diff --git a/sdktest/proguard-rules.pro b/sdktest/proguard-rules.pro new file mode 100644 index 0000000..d28c2fa --- /dev/null +++ b/sdktest/proguard-rules.pro @@ -0,0 +1,53 @@ +# Add project specific ProGuard rules here. +# You can control the set of applied configuration files using the +# proguardFiles setting in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} + +# Uncomment this to preserve the line number information for +# debugging stack traces. +#-keepattributes SourceFile,LineNumberTable + +# If you keep the line number information, uncomment this to +# hide the original source file name. +#-renamesourcefileattribute SourceFile + +-ignorewarnings +-keepattributes *Annotation* +-keepattributes Exceptions +-keepattributes InnerClasses +-keepattributes Signature +-keepattributes SourceFile,LineNumberTable + + +#指定代码的压缩级别 +-optimizationpasses 5 + +#包明不混合大小写 +-dontusemixedcaseclassnames + +#不去忽略非公共的库类 +-dontskipnonpubliclibraryclasses + + #优化 不优化输入的类文件 +-dontoptimize + + #预校验 +-dontpreverify + + #混淆时是否记录日志 +-verbose + + # 混淆时所采用的算法 +-optimizations !code/simplification/arithmetic,!field/*,!class/merging/* + +#保护注解 +-keepattributes *Annotation* \ No newline at end of file diff --git a/sdktest/release/output.json b/sdktest/release/output.json new file mode 100644 index 0000000..60d4466 --- /dev/null +++ b/sdktest/release/output.json @@ -0,0 +1 @@ +[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":1,"versionName":"1.0","enabled":true,"outputFile":"sdktest-release.apk","fullName":"release","baseName":"release"},"path":"sdktest-release.apk","properties":{}}] \ No newline at end of file diff --git a/sdktest/release/sdktest-release.apk b/sdktest/release/sdktest-release.apk new file mode 100644 index 0000000..7245924 Binary files /dev/null and b/sdktest/release/sdktest-release.apk differ diff --git a/sdktest/src/androidTest/java/com/hhmedic/android/sdktest/ExampleInstrumentedTest.java b/sdktest/src/androidTest/java/com/hhmedic/android/sdktest/ExampleInstrumentedTest.java new file mode 100644 index 0000000..75851a7 --- /dev/null +++ b/sdktest/src/androidTest/java/com/hhmedic/android/sdktest/ExampleInstrumentedTest.java @@ -0,0 +1,27 @@ +package com.hhmedic.android.sdktest; + +import android.content.Context; + +import androidx.test.platform.app.InstrumentationRegistry; +import androidx.test.ext.junit.runners.AndroidJUnit4; + +import org.junit.Test; +import org.junit.runner.RunWith; + +import static org.junit.Assert.*; + +/** + * Instrumented test, which will execute on an Android device. + * + * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> + */ +@RunWith(AndroidJUnit4.class) +public class ExampleInstrumentedTest { + @Test + public void useAppContext() { + // Context of the app under test. + Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); + + assertEquals("com.hhmedic.android.sdktest", appContext.getPackageName()); + } +} diff --git a/sdktest/src/main/AndroidManifest.xml b/sdktest/src/main/AndroidManifest.xml new file mode 100644 index 0000000..725d1e3 --- /dev/null +++ b/sdktest/src/main/AndroidManifest.xml @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="utf-8"?> +<manifest xmlns:android="http://schemas.android.com/apk/res/android" + package="com.hhmedic.android.sdktest"> + + + <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> + + + <application + android:name="com.hhmedic.android.sdktest.TestApp" + android:allowBackup="true" + android:icon="@mipmap/ic_launcher" + android:label="@string/app_name" + android:roundIcon="@mipmap/ic_launcher_round" + android:supportsRtl="true" + android:theme="@style/AppTheme"> + <activity android:name=".MainActivity"> + <intent-filter> + <action android:name="android.intent.action.MAIN" /> + + <category android:name="android.intent.category.LAUNCHER" /> + </intent-filter> + </activity> + </application> + +</manifest> \ No newline at end of file diff --git a/sdktest/src/main/java/com/hhmedic/android/sdktest/ChatFrontPop.java b/sdktest/src/main/java/com/hhmedic/android/sdktest/ChatFrontPop.java new file mode 100644 index 0000000..a13990a --- /dev/null +++ b/sdktest/src/main/java/com/hhmedic/android/sdktest/ChatFrontPop.java @@ -0,0 +1,40 @@ +package com.hhmedic.android.sdktest; + +import android.content.Context; +import android.graphics.drawable.ColorDrawable; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; +import android.widget.PopupWindow; + +public class ChatFrontPop extends PopupWindow { + + + public ChatFrontPop(Context context) { + super(context); + initView(context); + } + + private void initView(Context context) + { + View view = LayoutInflater.from(context).inflate(R.layout.hh_chat_front_layout,null); + + setContentView(view); + + setWidth(ViewGroup.LayoutParams.MATCH_PARENT); + + setHeight(ViewGroup.LayoutParams.MATCH_PARENT); + + setFocusable(true); + + setOutsideTouchable(true); + + setBackgroundDrawable(new ColorDrawable(0)); + + setClippingEnabled(false); + + view.findViewById(R.id.close).setOnClickListener(v -> { + dismiss(); + }); + } +} diff --git a/sdktest/src/main/java/com/hhmedic/android/sdktest/MainActivity.java b/sdktest/src/main/java/com/hhmedic/android/sdktest/MainActivity.java new file mode 100644 index 0000000..2c095b9 --- /dev/null +++ b/sdktest/src/main/java/com/hhmedic/android/sdktest/MainActivity.java @@ -0,0 +1,180 @@ +package com.hhmedic.android.sdktest; + +import android.os.Bundle; + +import androidx.appcompat.app.AppCompatActivity; + +import com.hhmedic.android.sdk.base.utils.Logger; +import com.hhmedic.android.sdk.listener.HHCallExListener; +import com.hhmedic.android.sdk.listener.HHLoginListener; +import com.hhmedic.android.sdk.model.HHCallInfo; +import com.hhmedic.android.sdk.module.call.CallType; + +import java.util.HashMap; + +public class MainActivity extends AppCompatActivity { + + private ChatFrontPop mPop; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + +// PermissionUtils.askWriteForPermissions(this); + + findViewById(R.id.test).setOnClickListener(view -> doTest()); + + + findViewById(R.id.test_multi).setOnClickListener(view -> doTestMulti()); + + + findViewById(R.id.test_for_ui).setOnClickListener(view -> doCallForUI()); + + + findViewById(R.id.test_message).setOnClickListener(view -> forMessage()); + + + HashMap<String,Object> test = new HashMap<>(); + + test.put("res",null); + } + + + + private void forMessage(){ + +// HHDoctor.message(this); + } + + + private void doTest(){ + + //69831AA2CD985438D1DB957A1D079FB13F0D04F68EA2608F6783B874E4F50EEF + // 7126CC872256E755F266AAB90F8682423F0D04F68EA2608F6783B874E4F50EEF + //2BB7AFBA9E13521AAA30DBB2C8372B0F3F0D04F68EA2608F6783B874E4F50EEF + //103A40607F13848CFC4B19892823B9D43F0D04F68EA2608F6783B874E4F50EEF + //E38CCA95244E1C4819BF9FCE4418691DBB7A1F1299CAF508460D59212594CED3 生产 + HHDoctor.login(this, "B0E86BAB0AF0F9E08B8A02969FD7CB553F0D04F68EA2608F6783B874E4F50EEF", new HHLoginListener() { + + @Override + public void onSuccess() { + + + HHDoctor.callForChild(MainActivity.this, new HHCallExListener() { + @Override + public void onLoadDoctor(HHCallInfo callInfo) { + Logger.e("loadDoctorInfo ============"); + } + + @Override + public void onDoctorAgree() { +// removeTestFrontView(); + } + + @Override + public void onCallError(String error) { + + } + + @Override + public void onStart(String orderId) { + + } + + @Override + public void onCalling() { + + } + + @Override + public void onInTheCall() { + + } + + @Override + public void onFinish() { + + } + + @Override + public void onCallSuccess() { +// testFrontView(); + } + + @Override + public void onFail(int code) { + + } + + @Override + public void onCancel() { + + } + + @Override + public void onLineUpTimeout() { + + } + + @Override + public void onLineUp() { + + } + }); + + } + + @Override + public void onError(String s) { + + Logger.e("HH Login fail ----->"+s); + } + }); + } + + private void testFrontView() { +// ChatFrontPop pop = new ChatFrontPop(this); +// View parent = HHDoctor.getChatParentView(); +// pop.showAtLocation(parent, Gravity.NO_GRAVITY,0,0); +// mPop = pop; + } + + private void removeTestFrontView() { + mPop.dismiss(); + mPop = null; + } + + private void doTestMulti(){ + +// new AlertDialog.Builder(this).setMessage("tip") +// .setPositiveButton(getString(com.hhmedic.android.sdk.R.string.hh_alert_i_known), (dialog, index) -> { +// dialog.dismiss(); +// finish(); +// }).setCancelable(false).show(); + + } + + + + private void doCallForUI(){ + + +// HHDoctor.login(this, "69831AA2CD985438D1DB957A1D079FB13F0D04F68EA2608F6783B874E4F50EEF", new HHLoginListener() { +// +// @Override +// public void onSuccess() { +// +// HHDoctor.call(MainActivity.this,null); +// +// } +// +// @Override +// public void onError(String s) { +// +// Logger.e("HH Login fail ----->"+s); +// } +// }); + } +} diff --git a/sdktest/src/main/java/com/hhmedic/android/sdktest/TestApp.java b/sdktest/src/main/java/com/hhmedic/android/sdktest/TestApp.java new file mode 100644 index 0000000..b1e3d3d --- /dev/null +++ b/sdktest/src/main/java/com/hhmedic/android/sdktest/TestApp.java @@ -0,0 +1,63 @@ +package com.hhmedic.android.sdktest; + +import android.app.Application; + +import com.hhmedic.android.sdk.VideoSetting; +import com.hhmedic.android.sdk.config.HHSDKOptions; +import com.hhmedic.android.sdk.config.MessageOptions; +import com.squareup.leakcanary.LeakCanary; +import com.squareup.leakcanary.RefWatcher; + +public class TestApp extends Application { + + + @Override + public void onCreate() { + + super.onCreate(); + + + + HHSDKOptions options = new HHSDKOptions("10284"); + + options.dev = true; + + options.isDebug = true; + + options.useSoundStreamMusic = true; + + options.enableMultiCall = true; + + options.enableVipInfo = false; + + options.enableAddMemberInDoc = false; + + options.enableAddMember = false; + + options.localRenderRotation = 0; + + VideoSetting.setEnableGSENSORMode(false); + + options.messageOptions = new MessageOptions(); + + +// options.messageOptions.hideUserCenter = true; + + HHDoctor.init(this,options); + + + + setupLeakCanary(); + + } + + + protected RefWatcher setupLeakCanary() + { + if (LeakCanary.isInAnalyzerProcess(this)) + { + return RefWatcher.DISABLED; + } + return LeakCanary.install(this); + } +} diff --git a/sdktest/src/main/res/drawable-v24/ic_launcher_foreground.xml b/sdktest/src/main/res/drawable-v24/ic_launcher_foreground.xml new file mode 100644 index 0000000..2b068d1 --- /dev/null +++ b/sdktest/src/main/res/drawable-v24/ic_launcher_foreground.xml @@ -0,0 +1,30 @@ +<vector xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:aapt="http://schemas.android.com/aapt" + android:width="108dp" + android:height="108dp" + android:viewportWidth="108" + android:viewportHeight="108"> + <path android:pathData="M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z"> + <aapt:attr name="android:fillColor"> + <gradient + android:endX="85.84757" + android:endY="92.4963" + android:startX="42.9492" + android:startY="49.59793" + android:type="linear"> + <item + android:color="#44000000" + android:offset="0.0" /> + <item + android:color="#00000000" + android:offset="1.0" /> + </gradient> + </aapt:attr> + </path> + <path + android:fillColor="#FFFFFF" + android:fillType="nonZero" + android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z" + android:strokeWidth="1" + android:strokeColor="#00000000" /> +</vector> \ No newline at end of file diff --git a/sdktest/src/main/res/drawable/ic_launcher_background.xml b/sdktest/src/main/res/drawable/ic_launcher_background.xml new file mode 100644 index 0000000..07d5da9 --- /dev/null +++ b/sdktest/src/main/res/drawable/ic_launcher_background.xml @@ -0,0 +1,170 @@ +<?xml version="1.0" encoding="utf-8"?> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="108dp" + android:height="108dp" + android:viewportWidth="108" + android:viewportHeight="108"> + <path + android:fillColor="#3DDC84" + android:pathData="M0,0h108v108h-108z" /> + <path + android:fillColor="#00000000" + android:pathData="M9,0L9,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M19,0L19,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M29,0L29,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M39,0L39,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M49,0L49,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M59,0L59,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M69,0L69,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M79,0L79,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M89,0L89,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M99,0L99,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,9L108,9" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,19L108,19" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,29L108,29" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,39L108,39" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,49L108,49" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,59L108,59" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,69L108,69" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,79L108,79" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,89L108,89" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,99L108,99" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M19,29L89,29" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M19,39L89,39" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M19,49L89,49" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M19,59L89,59" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M19,69L89,69" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M19,79L89,79" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M29,19L29,89" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M39,19L39,89" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M49,19L49,89" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M59,19L59,89" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M69,19L69,89" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M79,19L79,89" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> +</vector> diff --git a/sdktest/src/main/res/layout/activity_main.xml b/sdktest/src/main/res/layout/activity_main.xml new file mode 100644 index 0000000..b6f04a1 --- /dev/null +++ b/sdktest/src/main/res/layout/activity_main.xml @@ -0,0 +1,69 @@ +<?xml version="1.0" encoding="utf-8"?> +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto" + xmlns:tools="http://schemas.android.com/tools" + android:layout_width="match_parent" + android:layout_height="match_parent" + tools:context=".MainActivity"> + + + <LinearLayout + android:orientation="vertical" + android:layout_centerInParent="true" + android:layout_width="wrap_content" + android:layout_height="wrap_content"> + + <Button + android:id="@+id/test" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="Hello World!" + /> + + + <Button + android:id="@+id/test_for_ui" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="call_dialog" + /> + + + <Button + android:id="@+id/test_multi" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="multi!" + /> + + + + <Button + android:id="@+id/test_message" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="message" + /> + + + + <Button + android:id="@+id/other_rtc_enter" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="other_rtc_enter" + /> + + + + <Button + android:id="@+id/other_rtc_exit" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="other_rtc_exit" + /> + + </LinearLayout> + + +</RelativeLayout> \ No newline at end of file diff --git a/sdktest/src/main/res/layout/hh_chat_front_layout.xml b/sdktest/src/main/res/layout/hh_chat_front_layout.xml new file mode 100644 index 0000000..e51e7bb --- /dev/null +++ b/sdktest/src/main/res/layout/hh_chat_front_layout.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="utf-8"?> +<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="match_parent" + android:layout_height="match_parent" + xmlns:app="http://schemas.android.com/apk/res-auto" + android:background="@android:color/holo_red_dark"> + <Button + android:layout_width="wrap_content" + android:layout_height="wrap_content" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintBottom_toBottomOf="parent" + android:id="@+id/close" + android:text="@string/button_close"/> +</androidx.constraintlayout.widget.ConstraintLayout> \ No newline at end of file diff --git a/sdktest/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/sdktest/src/main/res/mipmap-anydpi-v26/ic_launcher.xml new file mode 100644 index 0000000..eca70cf --- /dev/null +++ b/sdktest/src/main/res/mipmap-anydpi-v26/ic_launcher.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8"?> +<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"> + <background android:drawable="@drawable/ic_launcher_background" /> + <foreground android:drawable="@drawable/ic_launcher_foreground" /> +</adaptive-icon> \ No newline at end of file diff --git a/sdktest/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/sdktest/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml new file mode 100644 index 0000000..eca70cf --- /dev/null +++ b/sdktest/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8"?> +<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"> + <background android:drawable="@drawable/ic_launcher_background" /> + <foreground android:drawable="@drawable/ic_launcher_foreground" /> +</adaptive-icon> \ No newline at end of file diff --git a/sdktest/src/main/res/mipmap-hdpi/ic_launcher.png b/sdktest/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 0000000..a571e60 Binary files /dev/null and b/sdktest/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/sdktest/src/main/res/mipmap-hdpi/ic_launcher_round.png b/sdktest/src/main/res/mipmap-hdpi/ic_launcher_round.png new file mode 100644 index 0000000..61da551 Binary files /dev/null and b/sdktest/src/main/res/mipmap-hdpi/ic_launcher_round.png differ diff --git a/sdktest/src/main/res/mipmap-mdpi/ic_launcher.png b/sdktest/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 0000000..c41dd28 Binary files /dev/null and b/sdktest/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/sdktest/src/main/res/mipmap-mdpi/ic_launcher_round.png b/sdktest/src/main/res/mipmap-mdpi/ic_launcher_round.png new file mode 100644 index 0000000..db5080a Binary files /dev/null and b/sdktest/src/main/res/mipmap-mdpi/ic_launcher_round.png differ diff --git a/sdktest/src/main/res/mipmap-xhdpi/ic_launcher.png b/sdktest/src/main/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 0000000..6dba46d Binary files /dev/null and b/sdktest/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/sdktest/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/sdktest/src/main/res/mipmap-xhdpi/ic_launcher_round.png new file mode 100644 index 0000000..da31a87 Binary files /dev/null and b/sdktest/src/main/res/mipmap-xhdpi/ic_launcher_round.png differ diff --git a/sdktest/src/main/res/mipmap-xxhdpi/ic_launcher.png b/sdktest/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 0000000..15ac681 Binary files /dev/null and b/sdktest/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/sdktest/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/sdktest/src/main/res/mipmap-xxhdpi/ic_launcher_round.png new file mode 100644 index 0000000..b216f2d Binary files /dev/null and b/sdktest/src/main/res/mipmap-xxhdpi/ic_launcher_round.png differ diff --git a/sdktest/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/sdktest/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 0000000..f25a419 Binary files /dev/null and b/sdktest/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/sdktest/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/sdktest/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png new file mode 100644 index 0000000..e96783c Binary files /dev/null and b/sdktest/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png differ diff --git a/sdktest/src/main/res/values/colors.xml b/sdktest/src/main/res/values/colors.xml new file mode 100644 index 0000000..030098f --- /dev/null +++ b/sdktest/src/main/res/values/colors.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + <color name="colorPrimary">#6200EE</color> + <color name="colorPrimaryDark">#3700B3</color> + <color name="colorAccent">#03DAC5</color> +</resources> diff --git a/sdktest/src/main/res/values/dimens.xml b/sdktest/src/main/res/values/dimens.xml new file mode 100644 index 0000000..55b2329 --- /dev/null +++ b/sdktest/src/main/res/values/dimens.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + + <dimen name="hp_video_small_height">96.0dp</dimen> + + <dimen name="hp_video_small_width">135.0dp</dimen> + +</resources> \ No newline at end of file diff --git a/sdktest/src/main/res/values/strings.xml b/sdktest/src/main/res/values/strings.xml new file mode 100644 index 0000000..1f1ba54 --- /dev/null +++ b/sdktest/src/main/res/values/strings.xml @@ -0,0 +1,4 @@ +<resources> + <string name="app_name">SDKTest</string> + <string name="button_close">关闭</string> +</resources> diff --git a/sdktest/src/main/res/values/styles.xml b/sdktest/src/main/res/values/styles.xml new file mode 100644 index 0000000..5885930 --- /dev/null +++ b/sdktest/src/main/res/values/styles.xml @@ -0,0 +1,11 @@ +<resources> + + <!-- Base application theme. --> + <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar"> + <!-- Customize your theme here. --> + <item name="colorPrimary">@color/colorPrimary</item> + <item name="colorPrimaryDark">@color/colorPrimaryDark</item> + <item name="colorAccent">@color/colorAccent</item> + </style> + +</resources> diff --git a/sdktest/src/test/java/com/hhmedic/android/sdktest/ExampleUnitTest.java b/sdktest/src/test/java/com/hhmedic/android/sdktest/ExampleUnitTest.java new file mode 100644 index 0000000..173bcfd --- /dev/null +++ b/sdktest/src/test/java/com/hhmedic/android/sdktest/ExampleUnitTest.java @@ -0,0 +1,17 @@ +package com.hhmedic.android.sdktest; + +import org.junit.Test; + +import static org.junit.Assert.*; + +/** + * Example local unit test, which will execute on the development machine (host). + * + * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> + */ +public class ExampleUnitTest { + @Test + public void addition_isCorrect() { + assertEquals(4, 2 + 2); + } +} \ No newline at end of file diff --git a/settings.gradle b/settings.gradle new file mode 100644 index 0000000..3613b3f --- /dev/null +++ b/settings.gradle @@ -0,0 +1,3 @@ +rootProject.name='lego' +include ':app' +include ':sdktest' -- libgit2 0.24.0