├── android-snippets ├── settings.gradle ├── app │ ├── src │ │ └── main │ │ │ ├── res │ │ │ ├── values │ │ │ │ ├── strings.xml │ │ │ │ ├── colors.xml │ │ │ │ ├── dimens.xml │ │ │ │ └── styles.xml │ │ │ ├── mipmap-hdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-mdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxxhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── values-w820dp │ │ │ │ └── dimens.xml │ │ │ └── layout │ │ │ │ └── activity_main.xml │ │ │ ├── AndroidManifest.xml │ │ │ └── java │ │ │ └── com │ │ │ └── google │ │ │ └── example │ │ │ └── mlkit │ │ │ ├── kotlin │ │ │ └── MainActivity.kt │ │ │ └── MainActivity.java │ └── proguard-rules.pro ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── build.gradle ├── gradle.properties └── README.md ├── material-showcase ├── settings.gradle ├── .editorconfig ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── app │ ├── src │ │ └── main │ │ │ ├── res │ │ │ ├── drawable │ │ │ │ ├── logo_google_cloud.png │ │ │ │ ├── camera_flash.xml │ │ │ │ ├── barcode_field_box.xml │ │ │ │ ├── ic_flash_on_vd_white_24.xml │ │ │ │ ├── top_action_bar_scrim.xml │ │ │ │ ├── ic_close_vd_white_24.xml │ │ │ │ ├── ic_flash_off_vd_white_24.xml │ │ │ │ ├── ic_photo_library_vd_white_24.xml │ │ │ │ ├── ic_image_search_vd_black_24.xml │ │ │ │ ├── ic_settings_vd_white_24.xml │ │ │ │ └── logo_mlkit.xml │ │ │ ├── values │ │ │ │ ├── styles.xml │ │ │ │ └── colors.xml │ │ │ ├── values-v21 │ │ │ │ └── styles.xml │ │ │ ├── layout │ │ │ │ ├── activity_settings.xml │ │ │ │ ├── barcode_bottom_sheet.xml │ │ │ │ ├── activity_live_barcode.xml │ │ │ │ ├── activity_main.xml │ │ │ │ ├── product_bottom_sheet.xml │ │ │ │ ├── top_action_bar_in_static_image.xml │ │ │ │ ├── barcode_field.xml │ │ │ │ ├── activity_live_object.xml │ │ │ │ ├── detection_mode_item.xml │ │ │ │ └── top_action_bar_in_live_camera.xml │ │ │ └── animator │ │ │ │ ├── bottom_prompt_chip_enter.xml │ │ │ │ ├── search_button_enter.xml │ │ │ │ └── static_image_dot_enter.xml │ │ │ └── java │ │ │ └── com │ │ │ └── google │ │ │ └── mlkit │ │ │ └── md │ │ │ ├── camera │ │ │ ├── FrameMetadata.kt │ │ │ ├── FrameProcessor.kt │ │ │ └── CameraSizePair.kt │ │ │ ├── productsearch │ │ │ └── Product.kt │ │ │ ├── barcodedetection │ │ │ └── BarcodeField.kt │ │ │ ├── settings │ │ │ └── SettingsActivity.kt │ │ │ └── InputInfo.kt │ └── proguard-rules.pro └── gradle.properties ├── automl ├── settings.gradle ├── app │ ├── src │ │ └── main │ │ │ ├── res │ │ │ ├── values │ │ │ │ ├── styles.xml │ │ │ │ ├── dimens.xml │ │ │ │ └── colors.xml │ │ │ ├── mipmap-hdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-mdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── drawable-hdpi │ │ │ │ ├── ic_settings_white_24dp.png │ │ │ │ ├── ic_switch_camera_white_48dp_inset.png │ │ │ │ └── ic_switch_camera_white_48dp.xml │ │ │ ├── drawable-mdpi │ │ │ │ ├── ic_settings_white_24dp.png │ │ │ │ ├── ic_switch_camera_white_48dp_inset.png │ │ │ │ └── ic_switch_camera_white_48dp.xml │ │ │ ├── drawable-xhdpi │ │ │ │ ├── ic_settings_white_24dp.png │ │ │ │ ├── ic_switch_camera_white_48dp_inset.png │ │ │ │ └── ic_switch_camera_white_48dp.xml │ │ │ ├── drawable-xxhdpi │ │ │ │ ├── ic_settings_white_24dp.png │ │ │ │ ├── ic_switch_camera_white_48dp_inset.png │ │ │ │ └── ic_switch_camera_white_48dp.xml │ │ │ ├── drawable-xxxhdpi │ │ │ │ ├── ic_settings_white_24dp.png │ │ │ │ ├── ic_switch_camera_white_48dp_inset.png │ │ │ │ └── ic_switch_camera_white_48dp.xml │ │ │ ├── layout │ │ │ │ ├── activity_settings.xml │ │ │ │ ├── settings_style.xml │ │ │ │ ├── toggle_style.xml │ │ │ │ ├── spinner_style.xml │ │ │ │ └── activity_chooser.xml │ │ │ ├── menu │ │ │ │ └── camera_button_menu.xml │ │ │ └── xml │ │ │ │ └── preference_still_image.xml │ │ │ └── java │ │ │ └── com │ │ │ └── google │ │ │ └── mlkit │ │ │ └── vision │ │ │ └── automl │ │ │ └── demo │ │ │ ├── preference │ │ │ └── StillImagePreferenceFragment.java │ │ │ └── CameraImageGraphic.java │ └── proguard-rules.pro ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── build.gradle └── gradle.properties ├── img ├── 1.png ├── 2.png └── 3.png ├── digitalink ├── settings.gradle ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── app │ ├── src │ │ └── main │ │ │ ├── res │ │ │ ├── mipmap-hdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-mdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ └── values │ │ │ │ ├── colors.xml │ │ │ │ ├── strings.xml │ │ │ │ └── styles.xml │ │ │ └── java │ │ │ └── com │ │ │ └── google │ │ │ └── mlkit │ │ │ └── samples │ │ │ └── vision │ │ │ └── digitalink │ │ │ ├── kotlin │ │ │ └── StatusTextView.kt │ │ │ └── StatusTextView.java │ ├── proguard-rules.pro │ └── build.gradle ├── build.gradle ├── gradle.properties └── README.md ├── vision-quickstart ├── settings.gradle ├── app │ └── src │ │ └── main │ │ ├── assets │ │ └── automl │ │ │ ├── dict.txt │ │ │ └── manifest.json │ │ ├── res │ │ ├── values │ │ │ ├── styles.xml │ │ │ ├── dimens.xml │ │ │ └── colors.xml │ │ ├── mipmap-hdpi │ │ │ └── ic_launcher.png │ │ ├── mipmap-mdpi │ │ │ └── ic_launcher.png │ │ ├── mipmap-xhdpi │ │ │ └── ic_launcher.png │ │ ├── mipmap-xxhdpi │ │ │ └── ic_launcher.png │ │ ├── drawable-hdpi │ │ │ ├── ic_settings_white_24dp.png │ │ │ ├── ic_switch_camera_white_48dp_inset.png │ │ │ └── ic_switch_camera_white_48dp.xml │ │ ├── drawable-mdpi │ │ │ ├── ic_settings_white_24dp.png │ │ │ ├── ic_switch_camera_white_48dp_inset.png │ │ │ └── ic_switch_camera_white_48dp.xml │ │ ├── drawable-xhdpi │ │ │ ├── ic_settings_white_24dp.png │ │ │ ├── ic_switch_camera_white_48dp_inset.png │ │ │ └── ic_switch_camera_white_48dp.xml │ │ ├── drawable-xxhdpi │ │ │ ├── ic_settings_white_24dp.png │ │ │ ├── ic_switch_camera_white_48dp_inset.png │ │ │ └── ic_switch_camera_white_48dp.xml │ │ ├── drawable-xxxhdpi │ │ │ ├── ic_settings_white_24dp.png │ │ │ ├── ic_switch_camera_white_48dp_inset.png │ │ │ └── ic_switch_camera_white_48dp.xml │ │ ├── layout │ │ │ ├── activity_settings.xml │ │ │ ├── settings_style.xml │ │ │ ├── toggle_style.xml │ │ │ ├── spinner_style.xml │ │ │ ├── activity_vision_entry_choice.xml │ │ │ └── activity_chooser.xml │ │ ├── drawable │ │ │ └── list_item_background.xml │ │ └── menu │ │ │ └── camera_button_menu.xml │ │ └── java │ │ └── com │ │ └── google │ │ └── mlkit │ │ └── vision │ │ └── demo │ │ ├── preference │ │ └── StillImagePreferenceFragment.java │ │ ├── CameraImageGraphic.java │ │ └── VisionImageProcessor.java ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── build.gradle └── gradle.properties ├── translate ├── gradle.properties ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── settings.gradle ├── app │ ├── src │ │ └── main │ │ │ ├── res │ │ │ ├── values │ │ │ │ ├── dimens.xml │ │ │ │ ├── strings.xml │ │ │ │ ├── styles.xml │ │ │ │ └── colors.xml │ │ │ ├── drawable │ │ │ │ ├── ic_file_download_white_24dp.xml │ │ │ │ ├── ic_baseline_delete_24.xml │ │ │ │ ├── ic_baseline_translate_32.xml │ │ │ │ └── ic_compare_arrows_black_24dp.xml │ │ │ └── layout │ │ │ │ └── activity_translate_main.xml │ │ │ ├── java │ │ │ └── com │ │ │ │ └── google │ │ │ │ └── mlkit │ │ │ │ └── samples │ │ │ │ └── nl │ │ │ │ └── translate │ │ │ │ ├── EntryChoiceActivity.kt │ │ │ │ ├── kotlin │ │ │ │ └── MainActivity.kt │ │ │ │ └── java │ │ │ │ └── MainActivity.java │ │ │ └── AndroidManifest.xml │ └── proguard-rules.pro ├── build.gradle └── README.md ├── langid ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── app │ ├── src │ │ └── main │ │ │ ├── res │ │ │ ├── mipmap-hdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-mdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ └── values │ │ │ │ ├── colors.xml │ │ │ │ ├── styles.xml │ │ │ │ └── strings.xml │ │ │ ├── AndroidManifest.xml │ │ │ └── java │ │ │ └── com │ │ │ └── google │ │ │ └── mlkit │ │ │ └── samples │ │ │ └── nl │ │ │ └── languageid │ │ │ └── EntryChoiceActivity.kt │ ├── proguard-rules.pro │ └── build.gradle ├── settings.gradle ├── build.gradle ├── gradle.properties └── README.md ├── smartreply ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── settings.gradle ├── app │ ├── src │ │ └── main │ │ │ ├── res │ │ │ ├── values │ │ │ │ ├── dimens.xml │ │ │ │ ├── colors.xml │ │ │ │ ├── styles.xml │ │ │ │ └── strings.xml │ │ │ ├── drawable │ │ │ │ ├── rounded_rectangle_blue.xml │ │ │ │ ├── rounded_rectangle_gray.xml │ │ │ │ ├── rounded_rectangle_light_gray.xml │ │ │ │ ├── ic_camera_front_black_24dp.xml │ │ │ │ └── ic_tag_faces_black_24dp.xml │ │ │ ├── layout │ │ │ │ ├── main_smartreply_activity.xml │ │ │ │ ├── smart_reply_chip.xml │ │ │ │ ├── item_message_remote.xml │ │ │ │ └── item_message_local.xml │ │ │ └── menu │ │ │ │ └── chat_fragment_actions.xml │ │ │ ├── AndroidManifest.xml │ │ │ └── java │ │ │ └── com │ │ │ └── google │ │ │ └── mlkit │ │ │ └── samples │ │ │ └── nl │ │ │ └── smartreply │ │ │ ├── kotlin │ │ │ ├── MainActivityKotlin.kt │ │ │ └── model │ │ │ │ └── Message.kt │ │ │ └── java │ │ │ └── MainActivityJava.java │ └── proguard-rules.pro ├── build.gradle ├── gradle.properties └── README.md ├── codescanner ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── settings.gradle ├── app │ └── src │ │ └── main │ │ ├── res │ │ ├── values │ │ │ ├── styles.xml │ │ │ ├── colors.xml │ │ │ └── strings.xml │ │ └── layout │ │ │ └── activity_main.xml │ │ ├── AndroidManifest.xml │ │ └── java │ │ └── com │ │ └── google │ │ └── mlkit │ │ └── samples │ │ └── codescanner │ │ └── EntryChoiceActivity.kt ├── build.gradle ├── gradle.properties └── README.md ├── internal ├── chooserx │ ├── src │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── res │ │ │ └── layout │ │ │ │ └── activity_entry_choice.xml │ │ │ └── java │ │ │ └── com │ │ │ └── mlkit │ │ │ └── example │ │ │ └── internal │ │ │ ├── Choice.java │ │ │ └── BaseEntryChoiceActivity.java │ ├── proguard-rules.pro │ └── build.gradle ├── lint │ ├── gradle │ │ └── wrapper │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ ├── build.gradle │ └── src │ │ └── main │ │ └── java │ │ └── com │ │ └── mlkit │ │ └── lint │ │ └── QuickstartIssueRegistry.kt └── lintchecks │ ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties │ ├── build.gradle │ ├── src │ └── main │ │ └── AndroidManifest.xml │ └── proguard-rules.pro ├── entityextraction ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── settings.gradle ├── gradle.properties ├── app │ ├── src │ │ └── main │ │ │ ├── res │ │ │ ├── drawable │ │ │ │ ├── ic_baseline_get_app_gray_32.xml │ │ │ │ ├── ic_baseline_get_app_white_32.xml │ │ │ │ ├── ic_baseline_delete_gray_32.xml │ │ │ │ └── logo_mlkit.xml │ │ │ ├── menu │ │ │ │ └── menu_choose_model.xml │ │ │ ├── values │ │ │ │ ├── colors.xml │ │ │ │ └── styles.xml │ │ │ └── layout │ │ │ │ ├── activity_models.xml │ │ │ │ └── list_item.xml │ │ │ ├── java │ │ │ └── com │ │ │ │ └── google │ │ │ │ └── mlkit │ │ │ │ └── samples │ │ │ │ └── nl │ │ │ │ └── entityextraction │ │ │ │ └── EntryChoiceActivity.kt │ │ │ └── AndroidManifest.xml │ └── build.gradle └── build.gradle ├── translate-showcase ├── app │ ├── src │ │ └── main │ │ │ ├── res │ │ │ ├── font │ │ │ │ └── pt_sans.ttf │ │ │ ├── drawable │ │ │ │ └── greyscale_regular_3x.png │ │ │ ├── values │ │ │ │ ├── colors.xml │ │ │ │ └── strings.xml │ │ │ └── layout │ │ │ │ └── main_translateshowcase_activity.xml │ │ │ ├── java │ │ │ └── com │ │ │ │ └── google │ │ │ │ └── mlkit │ │ │ │ └── showcase │ │ │ │ └── translate │ │ │ │ ├── util │ │ │ │ ├── ScopedExecutor.kt │ │ │ │ ├── ResultOrError.kt │ │ │ │ └── SmoothedMutableLiveData.kt │ │ │ │ └── MainActivity.kt │ │ │ └── AndroidManifest.xml │ └── proguard-rules.pro ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── settings.gradle ├── build.gradle └── README.md ├── .gitignore └── README.md /android-snippets/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | -------------------------------------------------------------------------------- /material-showcase/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | -------------------------------------------------------------------------------- /automl/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name='ML Kit AutoML' 2 | include ':app' 3 | -------------------------------------------------------------------------------- /material-showcase/.editorconfig: -------------------------------------------------------------------------------- 1 | [*.{java,kt}] 2 | max_line_length = 120 3 | -------------------------------------------------------------------------------- /img/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ethic-ai-dev/body-measurement/HEAD/img/1.png -------------------------------------------------------------------------------- /img/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ethic-ai-dev/body-measurement/HEAD/img/2.png -------------------------------------------------------------------------------- /img/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ethic-ai-dev/body-measurement/HEAD/img/3.png -------------------------------------------------------------------------------- /digitalink/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | rootProject.name = "ML Kit Digital Ink Recognition Demo" -------------------------------------------------------------------------------- /vision-quickstart/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name='ML Kit Vision Quickstart' 2 | include ':app' 3 | -------------------------------------------------------------------------------- /vision-quickstart/app/src/main/assets/automl/dict.txt: -------------------------------------------------------------------------------- 1 | daisy 2 | dandelion 3 | roses 4 | sunflowers 5 | tulips 6 | -------------------------------------------------------------------------------- /translate/gradle.properties: -------------------------------------------------------------------------------- 1 | android.useAndroidX=true 2 | android.enableJetifier=true 3 | org.gradle.jvmargs=-Xmx4g 4 | -------------------------------------------------------------------------------- /android-snippets/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | MLKit Code Snippets 3 | 4 | -------------------------------------------------------------------------------- /automl/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /vision-quickstart/app/src/main/res/drawable-xxhdpi/ic_settings_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ethic-ai-dev/body-measurement/HEAD/vision-quickstart/app/src/main/res/drawable-xxhdpi/ic_settings_white_24dp.png -------------------------------------------------------------------------------- /vision-quickstart/app/src/main/res/drawable-xxxhdpi/ic_settings_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ethic-ai-dev/body-measurement/HEAD/vision-quickstart/app/src/main/res/drawable-xxxhdpi/ic_settings_white_24dp.png -------------------------------------------------------------------------------- /smartreply/app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 40dp 4 | 8dp 5 | -------------------------------------------------------------------------------- /vision-quickstart/app/src/main/res/drawable-hdpi/ic_switch_camera_white_48dp_inset.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ethic-ai-dev/body-measurement/HEAD/vision-quickstart/app/src/main/res/drawable-hdpi/ic_switch_camera_white_48dp_inset.png -------------------------------------------------------------------------------- /vision-quickstart/app/src/main/res/drawable-mdpi/ic_switch_camera_white_48dp_inset.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ethic-ai-dev/body-measurement/HEAD/vision-quickstart/app/src/main/res/drawable-mdpi/ic_switch_camera_white_48dp_inset.png -------------------------------------------------------------------------------- /vision-quickstart/app/src/main/res/drawable-xhdpi/ic_switch_camera_white_48dp_inset.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ethic-ai-dev/body-measurement/HEAD/vision-quickstart/app/src/main/res/drawable-xhdpi/ic_switch_camera_white_48dp_inset.png -------------------------------------------------------------------------------- /vision-quickstart/app/src/main/res/drawable-xxhdpi/ic_switch_camera_white_48dp_inset.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ethic-ai-dev/body-measurement/HEAD/vision-quickstart/app/src/main/res/drawable-xxhdpi/ic_switch_camera_white_48dp_inset.png -------------------------------------------------------------------------------- /vision-quickstart/app/src/main/res/drawable-xxxhdpi/ic_switch_camera_white_48dp_inset.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ethic-ai-dev/body-measurement/HEAD/vision-quickstart/app/src/main/res/drawable-xxxhdpi/ic_switch_camera_white_48dp_inset.png -------------------------------------------------------------------------------- /codescanner/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.8-bin.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /digitalink/app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #6200EE 4 | #3700B3 5 | #03DAC5 6 | -------------------------------------------------------------------------------- /android-snippets/app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3F51B5 4 | #303F9F 5 | #FF4081 6 | 7 | -------------------------------------------------------------------------------- /android-snippets/app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16dp 4 | 16dp 5 | 6 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .gradle 2 | build/ 3 | .DS_Store 4 | *.iml 5 | *.apk 6 | *.aar 7 | *.zip 8 | google-services.json 9 | 10 | .project 11 | .settings 12 | .classpath 13 | 14 | local.properties 15 | 16 | .idea/* 17 | !idea/codeStyles 18 | 19 | captures 20 | .externalNativeBuild 21 | .cxx 22 | 23 | -------------------------------------------------------------------------------- /automl/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Mon Jan 24 22:56:49 UTC 2022 2 | distributionBase=GRADLE_USER_HOME 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-bin.zip 4 | distributionPath=wrapper/dists 5 | zipStorePath=wrapper/dists 6 | zipStoreBase=GRADLE_USER_HOME 7 | -------------------------------------------------------------------------------- /langid/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Mon Jan 24 22:44:42 UTC 2022 2 | distributionBase=GRADLE_USER_HOME 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-bin.zip 4 | distributionPath=wrapper/dists 5 | zipStorePath=wrapper/dists 6 | zipStoreBase=GRADLE_USER_HOME 7 | -------------------------------------------------------------------------------- /digitalink/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Mon Jan 24 22:29:24 UTC 2022 2 | distributionBase=GRADLE_USER_HOME 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-bin.zip 4 | distributionPath=wrapper/dists 5 | zipStorePath=wrapper/dists 6 | zipStoreBase=GRADLE_USER_HOME 7 | -------------------------------------------------------------------------------- /smartreply/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Mon Jan 24 22:50:04 UTC 2022 2 | distributionBase=GRADLE_USER_HOME 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-bin.zip 4 | distributionPath=wrapper/dists 5 | zipStorePath=wrapper/dists 6 | zipStoreBase=GRADLE_USER_HOME 7 | -------------------------------------------------------------------------------- /translate/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Mon Jan 24 22:53:12 UTC 2022 2 | distributionBase=GRADLE_USER_HOME 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-bin.zip 4 | distributionPath=wrapper/dists 5 | zipStorePath=wrapper/dists 6 | zipStoreBase=GRADLE_USER_HOME 7 | -------------------------------------------------------------------------------- /android-snippets/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Mon Aug 24 22:29:37 PDT 2020 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-all.zip 7 | -------------------------------------------------------------------------------- /entityextraction/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Mon Jan 24 22:39:58 UTC 2022 2 | distributionBase=GRADLE_USER_HOME 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-bin.zip 4 | distributionPath=wrapper/dists 5 | zipStorePath=wrapper/dists 6 | zipStoreBase=GRADLE_USER_HOME 7 | -------------------------------------------------------------------------------- /internal/lint/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Mon Feb 03 13:16:03 PST 2020 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip 7 | -------------------------------------------------------------------------------- /vision-quickstart/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Wed Jan 06 14:48:40 PST 2021 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip 7 | -------------------------------------------------------------------------------- /internal/lintchecks/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.library' 2 | 3 | android { 4 | compileSdkVersion 29 5 | 6 | defaultConfig { 7 | minSdkVersion 16 8 | targetSdkVersion 29 9 | } 10 | } 11 | 12 | dependencies { 13 | lintChecks project(":internal:lint") 14 | } 15 | -------------------------------------------------------------------------------- /internal/lintchecks/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Mon Feb 03 13:15:08 PST 2020 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip 7 | -------------------------------------------------------------------------------- /material-showcase/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Sun Jan 31 23:07:35 PST 2021 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip 7 | -------------------------------------------------------------------------------- /translate-showcase/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Sun May 17 19:28:24 BST 2020 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip 7 | -------------------------------------------------------------------------------- /automl/app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16dp 4 | 16dp 5 | 10dp 6 | 7 | -------------------------------------------------------------------------------- /translate/app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16dp 4 | 16dp 5 | 6 | 200dp 7 | 8 | -------------------------------------------------------------------------------- /vision-quickstart/app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16dp 4 | 16dp 5 | 10dp 6 | 7 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 |
3 |

4 | Live Body Measurements
5 |

6 | Yolo8-based Image Segmentation & Pose Estimation 7 |
8 | 9 | # Implemented in Android/Java 10 | 11 | Used MLkit Vision Library 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /digitalink/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | ML Kit Digital Ink Recognition Demo 3 | ML Kit Digital Ink Recognition Demo 4 | Clear 5 | 6 | -------------------------------------------------------------------------------- /material-showcase/app/src/main/res/values-v21/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | -------------------------------------------------------------------------------- /material-showcase/app/src/main/res/drawable/camera_flash.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /material-showcase/app/src/main/res/layout/activity_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | -------------------------------------------------------------------------------- /smartreply/app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #4285F4 4 | #3367D6 5 | #F4B400 6 | 7 | #4286f4 8 | #f44242 9 | 10 | -------------------------------------------------------------------------------- /automl/app/src/main/res/layout/activity_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /material-showcase/app/src/main/res/drawable/barcode_field_box.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /entityextraction/gradle.properties: -------------------------------------------------------------------------------- 1 | android.useAndroidX=true 2 | android.enableJetifier=true 3 | 4 | # The setting is particularly useful for tweaking memory settings. 5 | org.gradle.jvmargs=-Xmx4096m -XX:MaxPermSize=1024m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 6 | 7 | # Uses one worker to build. This helps resolve build OOM issue. 8 | org.gradle.workers.max=1 9 | -------------------------------------------------------------------------------- /vision-quickstart/app/src/main/res/layout/activity_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /codescanner/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /entityextraction/app/src/main/res/drawable/ic_baseline_get_app_gray_32.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /entityextraction/app/src/main/res/drawable/ic_baseline_get_app_white_32.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /automl/app/src/main/res/layout/settings_style.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | -------------------------------------------------------------------------------- /material-showcase/app/src/main/res/drawable/ic_flash_on_vd_white_24.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /codescanner/app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | @color/blue 4 | @color/darkBlue 5 | @color/red 6 | #3681E6 7 | #2F5FC0 8 | #D81B60 9 | 10 | -------------------------------------------------------------------------------- /material-showcase/app/src/main/res/drawable/top_action_bar_scrim.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 10 | 11 | -------------------------------------------------------------------------------- /entityextraction/app/src/main/res/menu/menu_choose_model.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /langid/app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | @color/blue 4 | @color/darkBlue 5 | @color/red 6 | 7 | #3681E6 8 | #2F5FC0 9 | #D81B60 10 | 11 | -------------------------------------------------------------------------------- /smartreply/app/src/main/res/drawable/rounded_rectangle_blue.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /smartreply/app/src/main/res/drawable/rounded_rectangle_gray.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /vision-quickstart/app/src/main/res/layout/settings_style.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | -------------------------------------------------------------------------------- /automl/app/src/main/res/layout/toggle_style.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /smartreply/app/src/main/res/drawable/rounded_rectangle_light_gray.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /automl/app/src/main/res/layout/spinner_style.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | -------------------------------------------------------------------------------- /entityextraction/app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | @color/blue 4 | @color/darkBlue 5 | @color/red 6 | 7 | #3681E6 8 | #2F5FC0 9 | #D81B60 10 | 11 | -------------------------------------------------------------------------------- /android-snippets/app/src/main/res/values-w820dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 64dp 6 | 7 | -------------------------------------------------------------------------------- /entityextraction/app/src/main/res/drawable/ic_baseline_delete_gray_32.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /langid/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /vision-quickstart/app/src/main/res/layout/toggle_style.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /vision-quickstart/app/src/main/res/layout/spinner_style.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | -------------------------------------------------------------------------------- /entityextraction/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /smartreply/app/src/main/res/layout/main_smartreply_activity.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | -------------------------------------------------------------------------------- /digitalink/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | 10 | -------------------------------------------------------------------------------- /smartreply/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /material-showcase/app/src/main/res/drawable/ic_close_vd_white_24.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /vision-quickstart/app/src/main/res/drawable/list_item_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 9 | 10 | -------------------------------------------------------------------------------- /android-snippets/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /langid/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.4.21' 3 | 4 | repositories { 5 | google() 6 | jcenter() 7 | } 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:4.2.0' 10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 11 | } 12 | } 13 | 14 | allprojects { 15 | repositories { 16 | mavenLocal() 17 | google() 18 | jcenter() 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /material-showcase/app/src/main/res/drawable/ic_flash_off_vd_white_24.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /translate/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.4.21' 3 | 4 | repositories { 5 | google() 6 | jcenter() 7 | } 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:4.2.0' 10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 11 | } 12 | } 13 | 14 | allprojects { 15 | repositories { 16 | mavenLocal() 17 | google() 18 | jcenter() 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /codescanner/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.4.31' 3 | 4 | repositories { 5 | google() 6 | jcenter() 7 | } 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:4.2.0' 10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 11 | } 12 | } 13 | 14 | allprojects { 15 | repositories { 16 | mavenLocal() 17 | google() 18 | jcenter() 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /entityextraction/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.5.0' 3 | 4 | repositories { 5 | google() 6 | jcenter() 7 | } 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:4.2.0' 10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 11 | } 12 | } 13 | 14 | allprojects { 15 | repositories { 16 | mavenLocal() 17 | google() 18 | jcenter() 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /automl/app/src/main/res/drawable-mdpi/ic_switch_camera_white_48dp.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 10 | -------------------------------------------------------------------------------- /automl/app/src/main/res/drawable-xhdpi/ic_switch_camera_white_48dp.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 10 | -------------------------------------------------------------------------------- /vision-quickstart/app/src/main/res/drawable-mdpi/ic_switch_camera_white_48dp.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 10 | -------------------------------------------------------------------------------- /automl/app/src/main/res/drawable-xxxhdpi/ic_switch_camera_white_48dp.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 10 | -------------------------------------------------------------------------------- /smartreply/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.4.21' 3 | 4 | repositories { 5 | mavenLocal() 6 | google() 7 | jcenter() 8 | } 9 | dependencies { 10 | classpath 'com.android.tools.build:gradle:4.2.0' 11 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 12 | } 13 | } 14 | 15 | allprojects { 16 | repositories { 17 | mavenLocal() 18 | google() 19 | jcenter() 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /vision-quickstart/app/src/main/res/drawable-xhdpi/ic_switch_camera_white_48dp.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 10 | -------------------------------------------------------------------------------- /vision-quickstart/app/src/main/res/drawable-xxxhdpi/ic_switch_camera_white_48dp.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 10 | -------------------------------------------------------------------------------- /translate/app/src/main/res/drawable/ic_file_download_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 9 | 12 | 13 | -------------------------------------------------------------------------------- /automl/app/src/main/res/drawable-hdpi/ic_switch_camera_white_48dp.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 10 | -------------------------------------------------------------------------------- /automl/app/src/main/res/drawable-xxhdpi/ic_switch_camera_white_48dp.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 10 | -------------------------------------------------------------------------------- /vision-quickstart/app/src/main/res/drawable-hdpi/ic_switch_camera_white_48dp.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 10 | -------------------------------------------------------------------------------- /vision-quickstart/app/src/main/res/drawable-xxhdpi/ic_switch_camera_white_48dp.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 10 | -------------------------------------------------------------------------------- /material-showcase/app/src/main/res/drawable/ic_photo_library_vd_white_24.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /translate/app/src/main/res/drawable/ic_baseline_delete_24.xml: -------------------------------------------------------------------------------- 1 | 9 | 12 | 13 | -------------------------------------------------------------------------------- /automl/app/src/main/res/menu/camera_button_menu.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 8 | 12 | 13 | -------------------------------------------------------------------------------- /vision-quickstart/app/src/main/res/menu/camera_button_menu.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 8 | 12 | 13 | -------------------------------------------------------------------------------- /automl/app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #4CAF50 4 | #388E3C 5 | #7C4DFF 6 | 7 | #78909C 8 | #E6E6E6 9 | #689F38 10 | #BFBFBF 11 | #FFFFFF 12 | #4286f4 13 | #f44242 14 | 15 | -------------------------------------------------------------------------------- /translate-showcase/app/src/main/java/com/google/mlkit/showcase/translate/util/ScopedExecutor.kt: -------------------------------------------------------------------------------- 1 | package com.google.mlkit.showcase.translate.util 2 | 3 | import java.util.concurrent.Executor 4 | import java.util.concurrent.atomic.AtomicBoolean 5 | 6 | class ScopedExecutor(private val executor: Executor) : Executor { 7 | 8 | private val isShutdown = AtomicBoolean() 9 | 10 | fun shutdown() { 11 | isShutdown.set(true) 12 | } 13 | 14 | override fun execute(command: Runnable) { 15 | executor.execute { 16 | if (!isShutdown.get()) command.run() 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /vision-quickstart/app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #4CAF50 4 | #388E3C 5 | #7C4DFF 6 | 7 | #78909C 8 | #E6E6E6 9 | #689F38 10 | #BFBFBF 11 | #FFFFFF 12 | #4286f4 13 | #f44242 14 | 15 | -------------------------------------------------------------------------------- /internal/lint/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'java-library' 2 | apply plugin: "kotlin" 3 | 4 | targetCompatibility = JavaVersion.VERSION_1_7 5 | sourceCompatibility = JavaVersion.VERSION_1_7 6 | 7 | dependencies { 8 | compileOnly "com.android.tools.lint:lint-api:26.5.3" 9 | compileOnly "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.61" 10 | testImplementation "com.android.tools.lint:lint:26.5.3" 11 | testImplementation "com.android.tools.lint:lint-tests:26.5.3" 12 | } 13 | 14 | jar { 15 | manifest { 16 | attributes("Lint-Registry-v2": "com.mlkit.lint.QuickstartIssueRegistry") 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /translate/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | MLKit-Translate 4 | Translated text 5 | Downloaded models: %1$s 6 | Translating… 7 | Delete Model 8 | Download Model 9 | Unknown error occurred. 10 | Source text 11 | 12 | -------------------------------------------------------------------------------- /automl/app/src/main/res/xml/preference_still_image.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /android-snippets/build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | buildscript { 4 | ext.kotlin_version = '1.4.31' 5 | repositories { 6 | mavenLocal() 7 | google() 8 | jcenter() 9 | } 10 | dependencies { 11 | classpath 'com.android.tools.build:gradle:7.2.1' 12 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 13 | } 14 | } 15 | 16 | allprojects { 17 | repositories { 18 | google() 19 | mavenLocal() 20 | jcenter() 21 | } 22 | } 23 | 24 | task clean(type: Delete) { 25 | delete rootProject.buildDir 26 | } 27 | -------------------------------------------------------------------------------- /translate/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 11 | 15 | 16 | -------------------------------------------------------------------------------- /smartreply/app/src/main/res/menu/chat_fragment_actions.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 8 | 12 | 16 | -------------------------------------------------------------------------------- /automl/build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | buildscript { 4 | 5 | repositories { 6 | mavenLocal() 7 | google() 8 | jcenter() 9 | } 10 | dependencies { 11 | classpath 'com.android.tools.build:gradle:4.2.0' 12 | 13 | // NOTE: Do not place your application dependencies here; they belong 14 | // in the individual module build.gradle files 15 | } 16 | } 17 | 18 | allprojects { 19 | repositories { 20 | mavenLocal() 21 | google() 22 | jcenter() 23 | } 24 | } 25 | 26 | task clean(type: Delete) { 27 | delete rootProject.buildDir 28 | } 29 | -------------------------------------------------------------------------------- /android-snippets/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /Users/ianbarber/Library/Android/sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -------------------------------------------------------------------------------- /material-showcase/app/src/main/res/drawable/ic_image_search_vd_black_24.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /material-showcase/app/src/main/res/layout/barcode_bottom_sheet.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /smartreply/app/src/main/res/drawable/ic_camera_front_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 12 | 13 | -------------------------------------------------------------------------------- /internal/lintchecks/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /translate-showcase/settings.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020 Google Inc. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | include ':app' 19 | rootProject.name='ML Kit Translate Showcase' 20 | -------------------------------------------------------------------------------- /translate/app/src/main/res/drawable/ic_baseline_translate_32.xml: -------------------------------------------------------------------------------- 1 | 9 | 12 | 13 | -------------------------------------------------------------------------------- /vision-quickstart/build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | buildscript { 4 | 5 | repositories { 6 | mavenCentral() 7 | mavenLocal() 8 | google() 9 | } 10 | dependencies { 11 | classpath 'com.android.tools.build:gradle:7.4.2' 12 | classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.20' 13 | 14 | // NOTE: Do not place your application dependencies here; they belong 15 | // in the individual module build.gradle files 16 | } 17 | } 18 | 19 | allprojects { 20 | repositories { 21 | mavenCentral() 22 | mavenLocal() 23 | google() 24 | } 25 | } 26 | 27 | task clean(type: Delete) { 28 | delete rootProject.buildDir 29 | } 30 | -------------------------------------------------------------------------------- /entityextraction/app/src/main/res/layout/activity_models.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 15 | 16 | 20 | 21 | -------------------------------------------------------------------------------- /digitalink/build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | buildscript { 3 | ext.kotlin_version = "1.7.20" 4 | repositories { 5 | mavenCentral() 6 | mavenLocal() 7 | google() 8 | } 9 | dependencies { 10 | classpath "com.android.tools.build:gradle:4.2.0" 11 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 12 | 13 | // NOTE: Do not place your application dependencies here; they belong 14 | // in the individual module build.gradle files 15 | } 16 | } 17 | 18 | allprojects { 19 | repositories { 20 | mavenCentral() 21 | mavenLocal() 22 | google() 23 | } 24 | } 25 | 26 | task clean(type: Delete) { 27 | delete rootProject.buildDir 28 | } 29 | -------------------------------------------------------------------------------- /android-snippets/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 11 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /material-showcase/app/src/main/res/animator/bottom_prompt_chip_enter.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 10 | 16 | 21 | 22 | -------------------------------------------------------------------------------- /smartreply/gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | # IDE (e.g. Android Studio) users: 3 | # Gradle settings configured through the IDE *will override* 4 | # any settings specified in this file. 5 | # For more details on how to configure your build environment visit 6 | # http://www.gradle.org/docs/current/userguide/build_environment.html 7 | # Specifies the JVM arguments used for the daemon process. 8 | # The setting is particularly useful for tweaking memory settings. 9 | org.gradle.jvmargs=-Xmx1536m 10 | # When configured, Gradle will run in incubating parallel mode. 11 | # This option should only be used with decoupled projects. More details, visit 12 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 13 | # org.gradle.parallel=true 14 | android.useAndroidX=true 15 | android.enableJetifier=true -------------------------------------------------------------------------------- /automl/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | -------------------------------------------------------------------------------- /codescanner/gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | # IDE (e.g. Android Studio) users: 3 | # Gradle settings configured through the IDE *will override* 4 | # any settings specified in this file. 5 | # For more details on how to configure your build environment visit 6 | # http://www.gradle.org/docs/current/userguide/build_environment.html 7 | # Specifies the JVM arguments used for the daemon process. 8 | # The setting is particularly useful for tweaking memory settings. 9 | org.gradle.jvmargs=-Xmx1536m 10 | # When configured, Gradle will run in incubating parallel mode. 11 | # This option should only be used with decoupled projects. More details, visit 12 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 13 | # org.gradle.parallel=true 14 | android.useAndroidX=true 15 | android.enableJetifier=true 16 | -------------------------------------------------------------------------------- /digitalink/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile -------------------------------------------------------------------------------- /langid/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | -------------------------------------------------------------------------------- /internal/chooserx/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | -------------------------------------------------------------------------------- /langid/gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | # IDE (e.g. Android Studio) users: 3 | # Gradle settings configured through the IDE *will override* 4 | # any settings specified in this file. 5 | # For more details on how to configure your build environment visit 6 | # http://www.gradle.org/docs/current/userguide/build_environment.html 7 | # Specifies the JVM arguments used for the daemon process. 8 | # The setting is particularly useful for tweaking memory settings. 9 | org.gradle.jvmargs=-Xmx1536m 10 | # When configured, Gradle will run in incubating parallel mode. 11 | # This option should only be used with decoupled projects. More details, visit 12 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 13 | # org.gradle.parallel=true 14 | 15 | 16 | android.useAndroidX=true 17 | android.enableJetifier=true 18 | -------------------------------------------------------------------------------- /material-showcase/gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | # IDE (e.g. Android Studio) users: 3 | # Gradle settings configured through the IDE *will override* 4 | # any settings specified in this file. 5 | # For more details on how to configure your build environment visit 6 | # http://www.gradle.org/docs/current/userguide/build_environment.html 7 | # Specifies the JVM arguments used for the daemon process. 8 | # The setting is particularly useful for tweaking memory settings. 9 | org.gradle.jvmargs=-Xmx1536m 10 | # When configured, Gradle will run in incubating parallel mode. 11 | # This option should only be used with decoupled projects. More details, visit 12 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 13 | # org.gradle.parallel=true 14 | android.useAndroidX=true 15 | android.enableJetifier=true 16 | -------------------------------------------------------------------------------- /smartreply/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | -------------------------------------------------------------------------------- /translate/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | -------------------------------------------------------------------------------- /internal/lintchecks/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | -------------------------------------------------------------------------------- /material-showcase/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | -------------------------------------------------------------------------------- /translate-showcase/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | -------------------------------------------------------------------------------- /smartreply/app/src/main/res/drawable/ic_tag_faces_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 12 | 13 | -------------------------------------------------------------------------------- /android-snippets/gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | android.enableJetifier=true 13 | android.useAndroidX=true 14 | org.gradle.jvmargs=-Xmx1536m 15 | 16 | # When configured, Gradle will run in incubating parallel mode. 17 | # This option should only be used with decoupled projects. More details, visit 18 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 19 | # org.gradle.parallel=true 20 | -------------------------------------------------------------------------------- /android-snippets/app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 13 | 14 | 18 | 19 | -------------------------------------------------------------------------------- /material-showcase/app/src/main/java/com/google/mlkit/md/camera/FrameMetadata.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020 Google LLC 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.google.mlkit.md.camera 18 | 19 | /** Metadata info of a camera frame. */ 20 | class FrameMetadata(val width: Int, val height: Int, val rotation: Int) 21 | -------------------------------------------------------------------------------- /android-snippets/app/src/main/java/com/google/example/mlkit/kotlin/MainActivity.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020 Google LLC. All rights reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.google.example.mlkit.kotlin 18 | 19 | import androidx.appcompat.app.AppCompatActivity 20 | 21 | class MainActivity : AppCompatActivity() 22 | -------------------------------------------------------------------------------- /android-snippets/app/src/main/java/com/google/example/mlkit/MainActivity.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020 Google LLC. All rights reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.google.example.mlkit; 18 | 19 | import androidx.appcompat.app.AppCompatActivity; 20 | 21 | public class MainActivity extends AppCompatActivity { 22 | 23 | } 24 | -------------------------------------------------------------------------------- /codescanner/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | Code Scanner Demo 3 | Allow input code manually 4 | Enable auto-zoom feature 5 | Scan Barcode 6 | Barcode detected.\n%1$s 7 | Code scanner is cancelled. 8 | Camera permission is not granted. 9 | App name is not set. 10 | Failed to scan code: %1$s 11 | 12 | -------------------------------------------------------------------------------- /material-showcase/app/src/main/java/com/google/mlkit/md/productsearch/Product.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020 Google LLC 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.google.mlkit.md.productsearch 18 | 19 | /** Information about a product. */ 20 | data class Product internal constructor(val imageUrl: String, val title: String, val subtitle: String) 21 | -------------------------------------------------------------------------------- /entityextraction/app/src/main/res/layout/list_item.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 15 | 22 | 23 | -------------------------------------------------------------------------------- /material-showcase/app/src/main/res/layout/activity_live_barcode.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 12 | 13 | 14 | 15 | 16 | 17 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /translate/app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | #008577 20 | #00574B 21 | #D81B60 22 | -------------------------------------------------------------------------------- /translate-showcase/app/src/main/java/com/google/mlkit/showcase/translate/util/ResultOrError.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020 Google Inc. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package com.google.mlkit.showcase.translate.util 19 | 20 | /** 21 | * Holds a result or some operation or the exception. 22 | */ 23 | class ResultOrError(var result: String?, var error: Exception?) 24 | -------------------------------------------------------------------------------- /smartreply/app/src/main/res/layout/smart_reply_chip.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 21 | 22 | -------------------------------------------------------------------------------- /translate-showcase/app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 20 | #008577 21 | #00574B 22 | #D81B60 23 | 24 | -------------------------------------------------------------------------------- /entityextraction/app/src/main/java/com/google/mlkit/samples/nl/entityextraction/EntryChoiceActivity.kt: -------------------------------------------------------------------------------- 1 | package com.google.mlkit.samples.nl.entityextraction 2 | 3 | import android.content.Intent 4 | import com.google.mlkit.samples.nl.entityextraction.java.MainActivityJava 5 | import com.google.mlkit.samples.nl.entityextraction.kotlin.MainActivityKotlin 6 | import com.mlkit.example.internal.BaseEntryChoiceActivity 7 | import com.mlkit.example.internal.Choice 8 | 9 | class EntryChoiceActivity : BaseEntryChoiceActivity() { 10 | 11 | override fun getChoices(): List { 12 | return listOf( 13 | Choice( 14 | "Java", 15 | "Run the ML Kit Entity Extraction quickstart written in Java.", 16 | Intent(this, MainActivityJava::class.java) 17 | ), 18 | Choice( 19 | "Kotlin", 20 | "Run the ML Kit Entity Extraction quickstart written in Kotlin.", 21 | Intent(this, MainActivityKotlin::class.java) 22 | ) 23 | ) 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /langid/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | MLKit-LanguageID 3 | Enter your text (≥ 20 bytes for accurate results) 4 | Identify language 5 | Identify possible languages 6 | Clear text 7 | Identified language(s): %1$s 8 | Your input: %1$s 9 | Please enter your text in order to identify the language. 10 | Waiting… 11 | Failed to identify language 12 | ML Kit sample app to provide basic knowledge on using Language Identification API on Android.\nEnter your text in the text box above and press button to trigger the API. 13 | 14 | -------------------------------------------------------------------------------- /digitalink/gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m 13 | org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 14 | 15 | # When configured, Gradle will run in incubating parallel mode. 16 | # This option should only be used with decoupled projects. More details, visit 17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 18 | # org.gradle.parallel=true 19 | 20 | android.useAndroidX=true 21 | android.enableJetifier=true 22 | -------------------------------------------------------------------------------- /material-showcase/app/src/main/java/com/google/mlkit/md/barcodedetection/BarcodeField.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020 Google LLC 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.google.mlkit.md.barcodedetection 18 | 19 | import android.os.Parcelable 20 | import kotlinx.android.parcel.Parcelize 21 | 22 | /** Information about a barcode field. */ 23 | @Parcelize 24 | data class BarcodeField(val label: String, val value: String) : Parcelable 25 | -------------------------------------------------------------------------------- /internal/chooserx/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.library' 2 | 3 | android { 4 | compileSdkVersion 31 5 | 6 | defaultConfig { 7 | minSdkVersion 19 8 | targetSdkVersion 31 9 | versionCode 1 10 | versionName "1.0" 11 | 12 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" 13 | 14 | } 15 | 16 | buildTypes { 17 | proguard { 18 | debuggable false 19 | minifyEnabled true 20 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro', 'proguard.cfg' 21 | } 22 | release { 23 | minifyEnabled false 24 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 25 | } 26 | } 27 | 28 | } 29 | 30 | dependencies { 31 | implementation 'com.google.android.material:material:1.2.0' 32 | implementation 'androidx.recyclerview:recyclerview:1.1.0' 33 | implementation 'androidx.constraintlayout:constraintlayout:1.1.3' 34 | } 35 | -------------------------------------------------------------------------------- /material-showcase/app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 17 | 18 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /digitalink/app/src/main/java/com/google/mlkit/samples/vision/digitalink/kotlin/StatusTextView.kt: -------------------------------------------------------------------------------- 1 | package com.google.mlkit.samples.vision.digitalink.kotlin 2 | 3 | import android.content.Context 4 | import androidx.appcompat.widget.AppCompatTextView 5 | import android.util.AttributeSet 6 | import com.google.mlkit.samples.vision.digitalink.kotlin.StrokeManager.StatusChangedListener 7 | 8 | /** 9 | * Status bar for the test app. 10 | * 11 | * 12 | * It is updated upon status changes announced by the StrokeManager. 13 | */ 14 | class StatusTextView : AppCompatTextView, StatusChangedListener { 15 | private var strokeManager: StrokeManager? = null 16 | 17 | constructor(context: Context) : super(context) {} 18 | constructor(context: Context?, attributeSet: AttributeSet?) : super( 19 | context!!, 20 | attributeSet 21 | ) { 22 | } 23 | 24 | override fun onStatusChanged() { 25 | this.text = strokeManager!!.status 26 | } 27 | 28 | fun setStrokeManager(strokeManager: StrokeManager?) { 29 | this.strokeManager = strokeManager 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /internal/chooserx/src/main/res/layout/activity_entry_choice.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /translate/app/src/main/java/com/google/mlkit/samples/nl/translate/EntryChoiceActivity.kt: -------------------------------------------------------------------------------- 1 | package com.google.mlkit.samples.nl.translate 2 | 3 | import android.content.Intent 4 | import androidx.appcompat.app.AppCompatDelegate 5 | import com.google.mlkit.samples.nl.translate.java.MainActivity 6 | import com.mlkit.example.internal.BaseEntryChoiceActivity 7 | import com.mlkit.example.internal.Choice 8 | 9 | class EntryChoiceActivity : BaseEntryChoiceActivity() { 10 | 11 | override fun getChoices(): List { 12 | return listOf( 13 | Choice( 14 | "Java", 15 | "Run the ML Kit Translate quickstart written in Java.", 16 | Intent(this, MainActivity::class.java) 17 | ), 18 | Choice( 19 | "Kotlin", 20 | "Run the ML Kit Translate quickstart written in Kotlin.", 21 | Intent(this, com.google.mlkit.samples.nl.translate.kotlin.MainActivity::class.java) 22 | ) 23 | ) 24 | } 25 | 26 | companion object { 27 | init { 28 | AppCompatDelegate.setCompatVectorFromResourcesEnabled(true) 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /android-snippets/README.md: -------------------------------------------------------------------------------- 1 | # ML Kit Android Snippets 2 | 3 | This is a collection of Android code snippets seen on https://developers.google.com/ml-kit. This project is not meant to be run as a standalone app to demo ML Kit APIs. 4 | 5 | ## License 6 | 7 | Copyright 2020 Google, Inc. 8 | 9 | Licensed to the Apache Software Foundation (ASF) under one or more contributor 10 | license agreements. See the NOTICE file distributed with this work for 11 | additional information regarding copyright ownership. The ASF licenses this 12 | file to you under the Apache License, Version 2.0 (the "License"); you may not 13 | use this file except in compliance with the License. You may obtain a copy of 14 | the License at 15 | 16 | http://www.apache.org/licenses/LICENSE-2.0 17 | 18 | Unless required by applicable law or agreed to in writing, software 19 | distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 20 | WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 21 | License for the specific language governing permissions and limitations under 22 | the License. 23 | -------------------------------------------------------------------------------- /translate-showcase/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 17 | 18 | 19 | ML Kit Translate Showcase 20 | Powered by Google Translate 21 | Center text in box 22 | Downloading model files… 23 | 24 | -------------------------------------------------------------------------------- /digitalink/app/src/main/java/com/google/mlkit/samples/vision/digitalink/StatusTextView.java: -------------------------------------------------------------------------------- 1 | package com.google.mlkit.samples.vision.digitalink; 2 | 3 | import android.content.Context; 4 | import android.util.AttributeSet; 5 | import android.widget.TextView; 6 | import androidx.annotation.NonNull; 7 | import com.google.mlkit.samples.vision.digitalink.StrokeManager.StatusChangedListener; 8 | 9 | /** 10 | * Status bar for the test app. 11 | * 12 | *

It is updated upon status changes announced by the StrokeManager. 13 | */ 14 | public class StatusTextView extends TextView implements StatusChangedListener { 15 | 16 | private StrokeManager strokeManager; 17 | 18 | public StatusTextView(@NonNull Context context) { 19 | super(context); 20 | } 21 | 22 | public StatusTextView(Context context, AttributeSet attributeSet) { 23 | super(context, attributeSet); 24 | } 25 | 26 | @Override 27 | public void onStatusChanged() { 28 | this.setText(this.strokeManager.getStatus()); 29 | } 30 | 31 | void setStrokeManager(StrokeManager strokeManager) { 32 | this.strokeManager = strokeManager; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /translate/app/src/main/res/layout/activity_translate_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 24 | 25 | -------------------------------------------------------------------------------- /translate-showcase/app/src/main/res/layout/main_translateshowcase_activity.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 25 | -------------------------------------------------------------------------------- /internal/chooserx/src/main/java/com/mlkit/example/internal/Choice.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020 Google LLC. All rights reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.mlkit.example.internal; 18 | 19 | import android.content.Intent; 20 | 21 | public class Choice { 22 | 23 | public final String title; 24 | public final String description; 25 | public final Intent launchIntent; 26 | 27 | public Choice(String title, String description, Intent launchIntent) { 28 | this.title = title; 29 | this.description = description; 30 | this.launchIntent = launchIntent; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /internal/lint/src/main/java/com/mlkit/lint/QuickstartIssueRegistry.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020 Google LLC. All rights reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.mlkit.lint 18 | 19 | import com.android.tools.lint.client.api.IssueRegistry 20 | import com.android.tools.lint.detector.api.CURRENT_API 21 | import com.android.tools.lint.detector.api.Issue 22 | 23 | @Suppress("unused") 24 | class QuickstartIssueRegistry : IssueRegistry() { 25 | 26 | override val api = CURRENT_API 27 | 28 | override val issues: List 29 | get() = listOf(ISSUE_INVALID_IMPORT, ISSUE_HUNGARIAN_NOTATION) 30 | } 31 | -------------------------------------------------------------------------------- /material-showcase/app/src/main/java/com/google/mlkit/md/camera/FrameProcessor.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020 Google LLC 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.google.mlkit.md.camera 18 | 19 | import java.nio.ByteBuffer 20 | 21 | /** An interface to process the input camera frame and perform detection on it. */ 22 | interface FrameProcessor { 23 | 24 | /** Processes the input frame with the underlying detector. */ 25 | fun process(data: ByteBuffer, frameMetadata: FrameMetadata, graphicOverlay: GraphicOverlay) 26 | 27 | /** Stops the underlying detector and release resources. */ 28 | fun stop() 29 | } 30 | -------------------------------------------------------------------------------- /material-showcase/app/src/main/res/drawable/ic_settings_vd_white_24.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /automl/gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | # IDE (e.g. Android Studio) users: 3 | # Gradle settings configured through the IDE *will override* 4 | # any settings specified in this file. 5 | # For more details on how to configure your build environment visit 6 | # http://www.gradle.org/docs/current/userguide/build_environment.html 7 | # Specifies the JVM arguments used for the daemon process. 8 | # The setting is particularly useful for tweaking memory settings. 9 | org.gradle.jvmargs=-Xmx4096m -XX:MaxPermSize=1024m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 10 | # When configured, Gradle will run in incubating parallel mode. 11 | # This option should only be used with decoupled projects. More details, visit 12 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 13 | # org.gradle.parallel=true 14 | # AndroidX package structure to make it clearer which packages are bundled with the 15 | # Android operating system, and which are packaged with your app's APK 16 | # https://developer.android.com/topic/libraries/support-library/androidx-rn 17 | android.useAndroidX=true 18 | # Automatically convert third-party libraries to use AndroidX 19 | android.enableJetifier=true 20 | -------------------------------------------------------------------------------- /material-showcase/app/src/main/res/layout/product_bottom_sheet.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 18 | 19 | 23 | 24 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /translate/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 12 | 13 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 27 | 28 | 29 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /smartreply/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | MLKit-SmartReply 3 | Send 4 | Enter some input text first. 5 | Switch emulated user 6 | Enter message text 7 | Generate history with sensitive content 8 | Generate basic history 9 | SWITCH 10 | Clear chat history 11 | Chatting as Red User 12 | Chatting as Blue User 13 | 14 | 15 | A non-English language was 16 | detected, therefore no replies were generated. 17 | 18 | Success! But no appropriate replies were generated. 19 | 20 | -------------------------------------------------------------------------------- /smartreply/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 10 | 11 | 13 | 16 | 17 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 29 | 30 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /entityextraction/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 10 | 11 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 23 | 24 | 27 | 28 | 31 | 32 | 35 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /translate-showcase/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 15 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /translate/app/src/main/res/drawable/ic_compare_arrows_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 16 | 17 | 24 | 27 | 28 | -------------------------------------------------------------------------------- /vision-quickstart/app/src/main/java/com/google/mlkit/vision/demo/preference/StillImagePreferenceFragment.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020 Google LLC. All rights reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.google.mlkit.vision.demo.preference; 18 | 19 | import android.os.Bundle; 20 | import android.preference.PreferenceFragment; 21 | import com.google.mlkit.vision.demo.R; 22 | 23 | /** Configures still image demo settings. */ 24 | public class StillImagePreferenceFragment extends PreferenceFragment { 25 | 26 | @Override 27 | public void onCreate(Bundle savedInstanceState) { 28 | super.onCreate(savedInstanceState); 29 | addPreferencesFromResource(R.xml.preference_still_image); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /codescanner/app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 14 | 20 |