Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] master from googlesamples:master #1

Open
wants to merge 308 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
308 commits
Select commit Hold shift + click to select a range
2f80c30
List of included changes:
a-googler Sep 28, 2021
9fa3205
List of included changes:
a-googler Oct 20, 2021
e53e6ea
Update gradle version to 7.2
Nov 11, 2021
436f9f4
List of included changes:
a-googler Nov 15, 2021
a35b94c
List of included changes:
a-googler Nov 15, 2021
0fe560d
List of included changes:
a-googler Nov 15, 2021
820493a
List of included changes:
a-googler Nov 15, 2021
25c85d9
List of included changes:
a-googler Nov 15, 2021
1029632
List of included changes:
a-googler Nov 8, 2021
97effe3
List of included changes:
a-googler Nov 15, 2021
55e32cc
List of included changes:
a-googler Nov 15, 2021
497e604
Merge "List of included changes: - Update Podfiles to use the lates…
Nov 15, 2021
de3a7e2
Merge "List of included changes: - Update Podfiles to use the lates…
Nov 15, 2021
cc33d1f
Merge "List of included changes: - Update Podfiles to use the lates…
Nov 15, 2021
2fe0a94
Merge "List of included changes: - Update Podfiles to use the lates…
Nov 15, 2021
81e5d16
Merge "List of included changes: - Fix for 1D barcode display issue…
Nov 15, 2021
6491856
Merge "List of included changes: - Update Podfiles to use the lates…
Nov 15, 2021
733187c
List of included changes:
a-googler Nov 8, 2021
23917b3
Merge "List of included changes: - internal - Update chooserx's t…
Nov 15, 2021
2d4e747
List of included changes:
a-googler Nov 8, 2021
fa322b7
List of included changes:
a-googler Nov 8, 2021
8f3610b
Merge "List of included changes: - internal - Update digital ink …
Nov 15, 2021
9a03866
List of included changes:
a-googler Nov 8, 2021
4c05644
Merge "List of included changes: - internal - Update langid app's…
Nov 15, 2021
023746f
List of included changes:
a-googler Nov 8, 2021
3c72df8
Merge "List of included changes: - internal - ...Internal change.…
Nov 15, 2021
9487a61
Merge "List of included changes: - Internal change - Update sampl…
Nov 15, 2021
df991a7
List of included changes:
a-googler Nov 12, 2021
61c3651
Merge "List of included changes: - Add setting switch to show recog…
Nov 15, 2021
7d2c985
Update langid gradle version to 6.5
Nov 16, 2021
fd6b32e
Update SDK versions in showcase app
Nov 16, 2021
3276cfa
Merge "List of included changes: - Fix for 1D barcode display issue…
Nov 17, 2021
20c3f8e
List of included changes:
a-googler Nov 16, 2021
39564c8
List of included changes:
a-googler Nov 18, 2021
2d3ebc1
List of included changes:
a-googler Nov 19, 2021
58b41da
List of included changes:
a-googler Nov 19, 2021
be9ce82
Merge "List of included changes: - Do not show CameraX activities o…
Nov 20, 2021
9bf4ae3
List of included changes:
a-googler Nov 19, 2021
7d8ca18
List of included changes:
a-googler Nov 22, 2021
61c5460
List of included changes:
a-googler Nov 22, 2021
b735025
Merge "List of included changes: - Add nullability check to avoid c…
Nov 23, 2021
8a5cdcd
Update issue templates
jackqdyulei Dec 21, 2021
6d8ef7b
Update issue templates
jackqdyulei Dec 21, 2021
7848824
Update issue templates
jackqdyulei Dec 21, 2021
101492f
Update issue templates
jackqdyulei Dec 21, 2021
f3ec0e6
Version updates and trivial polish.
a-googler Jan 11, 2022
a8cc06e
Version update for EE demo.
a-googler Jan 11, 2022
544a969
Version update and remove the link to tensorflow bintray
a-googler Dec 10, 2021
70e92f5
Version update for Digital Ink demo.
a-googler Jan 11, 2022
c8b8578
Tweak smart reply demo.
a-googler Dec 7, 2021
59fadd8
Version update for LangId demo.
a-googler Jan 11, 2022
cf3c16e
Tweak Translate Demo.
a-googler Nov 8, 2021
645184f
Version update for translate showcase.
zhouyiself Jan 13, 2022
bc0b227
Version update for material showcase.
zhouyiself Jan 13, 2022
52d25ad
Update ML Kit SDK versions in showcase apps.
zhouyiself Jan 13, 2022
52295b2
Update AGP & Gradle versions.
zhouyiself Jan 25, 2022
b6892e7
Add settings for Pose Detection GPU acceleration
a-googler Feb 1, 2022
80a962b
List of included changes:
a-googler Feb 7, 2022
7bc5324
Update deployment target to iOS 14.5 and hide the status bar.
a-googler Feb 3, 2022
2988387
Fix the issue of barely readable result in dark mode
a-googler Jan 10, 2022
8c64582
- Fix broken UI in the dark mode.
a-googler Jan 10, 2022
100c850
Merge "- Fix broken UI in the dark mode. - Fix weird color in top n…
zongmins Feb 10, 2022
94f4c90
Merge "Fix the issue of barely readable result in dark mode"
zongmins Feb 10, 2022
1d3b433
List of included changes:
a-googler Feb 10, 2022
c8923f1
List of included changes:
a-googler Feb 11, 2022
c854c16
List of included changes:
a-googler Feb 11, 2022
198edd3
List of included changes:
a-googler Feb 11, 2022
4f075b1
Merge "List of included changes: - Update Podfiles to use the lates…
zongmins Feb 11, 2022
7c78af5
Merge "List of included changes: - Update Podfiles to use the lates…
zongmins Feb 11, 2022
64c878d
List of included changes:
a-googler Feb 11, 2022
a71354c
List of included changes:
a-googler Feb 11, 2022
7b2f8a2
Merge "List of included changes: - Update Podfiles to use the lates…
zongmins Feb 11, 2022
ca95f73
Merge "List of included changes: - Update Podfiles to use the lates…
zongmins Feb 11, 2022
acde81e
List of included changes:
a-googler Feb 11, 2022
56a072a
List of included changes:
a-googler Feb 11, 2022
a3f7a7f
Merge "List of included changes: - Update Podfiles to use the lates…
zongmins Feb 14, 2022
77a68e9
List of included changes:
a-googler Feb 15, 2022
4be2fe8
List of included changes:
a-googler Feb 15, 2022
d10c447
List of included changes:
a-googler Apr 12, 2022
2747255
List of included changes:
a-googler Feb 14, 2022
32c58dc
List of included changes:
a-googler Apr 13, 2022
d2d8e62
List of included changes:
a-googler Apr 19, 2022
e31d824
List of included changes:
a-googler Apr 19, 2022
373c8df
List of included changes:
a-googler Apr 19, 2022
02e8394
List of included changes:
a-googler Apr 19, 2022
ee07ffd
List of included changes:
a-googler Apr 19, 2022
0465027
List of included changes:
a-googler Apr 19, 2022
b99ccb2
List of included changes:
a-googler Apr 19, 2022
bfb406c
Merge "List of included changes: - Updates pod versions for the new…
miworking Apr 19, 2022
4b3ba4e
Merge "List of included changes: - Updates pod versions for the new…
miworking Apr 19, 2022
7749eed
Merge "List of included changes: - Updates pod versions for the new…
miworking Apr 19, 2022
b16e6fd
Merge "List of included changes: - Updates pod versions for the new…
miworking Apr 19, 2022
1976016
Merge "List of included changes: - Updates pod versions for the new…
miworking Apr 19, 2022
032fa08
Merge "List of included changes: - Updates pod versions for the new…
miworking Apr 19, 2022
c78618f
List of included changes:
a-googler Apr 19, 2022
5c35770
List of included changes:
a-googler Apr 19, 2022
8577b66
Add code scanner demo.
a-googler May 5, 2022
989ea17
Add required gradle files to code scanner demo.
zhouyiself May 5, 2022
730b9d6
Set debug build variant as default.
a-googler May 5, 2022
388cdb0
List of included changes:
a-googler Jun 15, 2022
214c4ef
List of included changes:
a-googler Jun 15, 2022
a5de25e
List of included changes:
a-googler Jun 15, 2022
61a97d7
List of included changes:
a-googler Jun 15, 2022
ce01df4
List of included changes:
a-googler Jun 15, 2022
8c05f32
List of included changes:
a-googler Jun 15, 2022
9588b35
List of included changes:
a-googler Jun 15, 2022
d71a5f8
Merge "List of included changes: - Updates pod versions for the new…
lipenny000 Jun 15, 2022
d818e39
Merge "List of included changes: - Updates pod versions for the new…
lipenny000 Jun 15, 2022
6341c16
Merge "List of included changes: - Updates pod versions for the new…
lipenny000 Jun 15, 2022
61b582a
Merge "List of included changes: - Updates pod versions for the new…
lipenny000 Jun 15, 2022
0e0f9c2
Merge "List of included changes: - Updates pod versions for the new…
lipenny000 Jun 15, 2022
7754434
Merge "List of included changes: - Updates pod versions for the new…
lipenny000 Jun 15, 2022
6d0e25e
Add on failure listener for inference in smart reply sample app.
a-googler Jun 5, 2022
429e0e9
Demonstrate the manual input option of Code Scanner API.
a-googler Jun 7, 2022
ba92704
Merge "Demonstrate the manual input option of Code Scanner API."
zhouyiself Jun 16, 2022
aadb1c5
Define click handler in layout for consistency in the code scanner demo.
a-googler Jun 16, 2022
7b9bcf9
Fix compilation error from the snippet app.
zhouyiself Jun 22, 2022
5a30503
List of included changes:
a-googler Jun 22, 2022
18437dc
Tweak code scanner demo.
a-googler Jun 22, 2022
629c3a2
List of included changes:
a-googler Jul 22, 2022
9913f8b
List of included changes:
a-googler Jul 22, 2022
f7d63c4
List of included changes:
a-googler Jul 22, 2022
f25fa6d
List of included changes:
a-googler Jul 22, 2022
6007a89
List of included changes:
a-googler Jul 22, 2022
4e9079d
List of included changes:
a-googler Jul 22, 2022
c1d4ce5
List of included changes:
a-googler Jul 22, 2022
23cd026
Merge "List of included changes: - Updates pod versions for a new r…
Jul 25, 2022
7d981f9
Merge "List of included changes: - Updates pod versions for a new r…
Jul 25, 2022
564f681
Merge "List of included changes: - Updates pod versions for a new r…
Jul 25, 2022
efa5487
Merge "List of included changes: - Updates pod versions for a new r…
Jul 25, 2022
6c8e560
Merge "List of included changes: - Updates pod versions for a new r…
Jul 25, 2022
6e31e43
Merge "List of included changes: - Updates pod versions for a new r…
Jul 25, 2022
a8f8850
List of included changes:
a-googler Feb 9, 2022
134fe3b
List of included changes:
a-googler Jul 29, 2022
1e9d8f1
List of included changes:
a-googler Jul 25, 2022
8bae738
List of included changes:
a-googler Jul 13, 2022
05f33bd
Merge "List of included changes: - Add setting to show OCR confiden…
sfufagoogle Aug 1, 2022
04c3fd8
Merge "List of included changes:"
sfufagoogle Aug 1, 2022
c865c12
Merge "List of included changes: - Support independent cancelation …
sfufagoogle Aug 1, 2022
7e4bf8d
List of included changes:
a-googler Aug 2, 2022
c10305f
List of included changes:
a-googler Apr 15, 2022
af9698b
List of included changes:
a-googler Aug 30, 2022
24a6e54
List of included changes:
a-googler Aug 30, 2022
ad4ba3c
List of included changes:
a-googler Aug 17, 2022
6cc445c
Merge "List of included changes: - Add freezesText attribute for Te…
Aug 30, 2022
0098679
List of included changes:
a-googler Aug 30, 2022
23db719
Update for Text.Symbol
zongmins Sep 6, 2022
36254d3
List of included changes:
a-googler Sep 6, 2022
bea1576
List of included changes:
a-googler Sep 9, 2022
cdaf07e
List of included changes:
a-googler Sep 20, 2022
3ae562b
List of included changes:
a-googler Nov 8, 2022
bc77220
List of included changes:
a-googler Nov 15, 2022
552b07a
List of included changes:
a-googler Nov 15, 2022
f26643c
List of included changes:
a-googler Nov 20, 2022
20679b7
List of included changes:
a-googler Dec 8, 2022
94d4000
List of included changes:
a-googler Mar 7, 2023
7f13003
List of included changes:
a-googler Mar 7, 2023
cddd4fb
List of included changes:
a-googler Mar 7, 2023
9e95715
List of included changes:
a-googler Mar 7, 2023
ba808ba
List of included changes:
a-googler Mar 7, 2023
8877225
List of included changes:
a-googler Mar 7, 2023
f32fcbd
List of included changes:
a-googler Mar 7, 2023
9c3e9bc
Merge "List of included changes: - Internal changes. - Avoid sign…
miworking Mar 7, 2023
9d5cf69
Merge "List of included changes: - Internal changes. - Disables b…
miworking Mar 7, 2023
ccbb9c5
Merge "List of included changes: - Internal changes. - Avoid sign…
miworking Mar 7, 2023
9a2e3a1
Merge "List of included changes: - Internal changes. - Avoid sign…
miworking Mar 7, 2023
13e9ac8
Merge "List of included changes: - Internal changes. - Avoid sign…
miworking Mar 7, 2023
e58e481
Merge "List of included changes: - Internal changes. - Avoid sign…
miworking Mar 7, 2023
7d36726
Removes quickstart app of Text Recognition V1 as the Text Recognition…
miworking Mar 9, 2023
6336da1
List of included changes:
a-googler Mar 14, 2023
7e807b0
List of included changes:
a-googler Mar 9, 2023
592c82e
Merge "List of included changes: - Internal change"
sfufagoogle Mar 22, 2023
16f2b3a
List of included changes:
a-googler Feb 13, 2023
a85eaea
List of included changes:
a-googler Apr 18, 2023
35d594a
Update gradle wrapper to 7.5
Apr 18, 2023
55c05fc
List of included changes:
a-googler Apr 25, 2023
c1411e9
List of included changes:
a-googler Apr 26, 2023
1169c8c
List of included changes:
a-googler May 25, 2023
903e970
List of included changes:
a-googler May 5, 2023
a281981
Merge "List of included changes: - Enable auto zoom feature for MLK…
May 30, 2023
3cefd96
Add Subject Segmentation feature in vision quickstart app.
a-googler Oct 17, 2023
61026c6
List of included changes:
a-googler Oct 9, 2023
d990c09
List of included changes:
a-googler Oct 9, 2023
ce51889
Merge "List of included changes: - Update kotlin and gradle version…
zhouyiself Oct 18, 2023
e84c20d
Merge "List of included changes: - Update translate API version. …
zhouyiself Oct 18, 2023
ca7dde3
List of included changes:
a-googler Oct 18, 2023
564b908
Mention Subject Segmentation API in the vision demo's README file.
a-googler Oct 19, 2023
b549955
Update gradle version for Translation demo.
zhouyiself Nov 6, 2023
bc24326
Update gradle version for AutoML demo.
zhouyiself Nov 7, 2023
db1c727
Update entity extraction Java, kotlin, AGP version, gradle.properties
a-googler Oct 13, 2023
087081b
Update kotlin and gradle versions
a-googler Nov 3, 2023
e97f641
Update kotlin and gradle versions
a-googler Nov 3, 2023
04d8c59
Bumping kotlin version for mlkit libraries
a-googler Nov 3, 2023
ef99306
Merge "Update kotlin and gradle versions"
Jan 11, 2024
76f2e63
Merge "Update kotlin and gradle versions"
Jan 11, 2024
05a376d
Merge "Bumping kotlin version for mlkit libraries"
Jan 11, 2024
3c8f204
Add namespace in build.gradle for chooserx module.
a-googler Oct 13, 2023
85501ef
Add document scanner sample app
a-googler Nov 15, 2023
025ecf5
List of included changes:
a-googler Jan 24, 2024
839d69b
Add gradle config files
lipenny000 Jan 24, 2024
c7f3f3f
Update repository config in build.gradle.
a-googler Feb 2, 2024
7dfe455
Update repository config in build.gradle.
a-googler Feb 2, 2024
adc36a1
Polish app UI.
a-googler Feb 3, 2024
acb84c8
Merge "Update repository config in build.gradle."
Feb 3, 2024
6c5998e
Merge "Polish app UI."
Feb 3, 2024
6f79ed8
Update gradle version
ai-plays Feb 3, 2024
fb5dda0
List of included changes:
a-googler Feb 2, 2024
137e2a3
List of included changes:
a-googler Feb 2, 2024
1c5ad98
List of included changes:
a-googler Feb 2, 2024
6145616
List of included changes:
a-googler Feb 2, 2024
761acd1
List of included changes:
a-googler Feb 2, 2024
2f93b0c
List of included changes:
a-googler Feb 2, 2024
5c51e21
Merge "List of included changes: - Internal fixes and cleanup."
zongmins Feb 12, 2024
96171f1
Merge "List of included changes: - Internal fixes and cleanup. - …
zongmins Feb 12, 2024
ebcda9e
Merge "List of included changes: - Internal fixes and cleanup. - …
zongmins Feb 12, 2024
54ac737
Merge "List of included changes: - Internal fixes and cleanup. - …
zongmins Feb 12, 2024
d0959e1
List of included changes:
a-googler Feb 2, 2024
e0bdc50
Temporarily revert selfie segmentation's version back to old version.
a-googler Feb 22, 2024
b54456a
Update demo to use latest pose & facemesh & segmentation versions.
a-googler Feb 24, 2024
138176f
List of included changes:
a-googler Apr 4, 2024
46bfa35
List of included changes:
a-googler Apr 5, 2024
d7231db
List of included changes:
a-googler Apr 4, 2024
0fd06ae
List of included changes:
a-googler Apr 4, 2024
f4c25be
List of included changes:
a-googler Apr 5, 2024
cc7cc35
List of included changes:
a-googler Apr 4, 2024
c582971
Merge "List of included changes: - Updates pod versions."
lipenny000 Apr 5, 2024
72cb6a0
Merge "List of included changes: - Updates pod versions."
lipenny000 Apr 5, 2024
94e86dc
Merge "List of included changes: - Updates ios version from `12.0` …
lipenny000 Apr 5, 2024
440b900
Merge "List of included changes: - Updates pod versions."
lipenny000 Apr 5, 2024
e8f08d0
List of included changes:
a-googler Apr 4, 2024
18c0574
Merge "List of included changes: - Updates ios version from `12.0` …
lipenny000 Apr 5, 2024
672196a
Merge "List of included changes: - Updates pod versions."
lipenny000 Apr 5, 2024
4a015db
Update SDK versions.
a-googler Apr 23, 2024
52ffef0
Update translate SDK version.
a-googler Apr 23, 2024
80eed66
Update langid SDK version.
a-googler Apr 23, 2024
4f39eb0
Update smart reply SDK version.
a-googler Apr 23, 2024
41afbb1
Update SDK versions for automl sample.
a-googler Apr 23, 2024
cc5168a
Merge "Update langid SDK version."
zhouyiself Aug 13, 2024
44e6a6a
Merge "Update smart reply SDK version."
zhouyiself Aug 13, 2024
ddbe5d9
List of included changes:
a-googler Sep 24, 2024
ab9b9aa
List of included changes:
a-googler Sep 24, 2024
821fbbd
List of included changes:
a-googler Sep 24, 2024
fa4e266
List of included changes:
a-googler Sep 24, 2024
66773e2
List of included changes:
a-googler Sep 24, 2024
eb0302c
List of included changes:
a-googler Sep 24, 2024
0878d8d
Merge "List of included changes: - Internal cleanup."
zongmins Sep 24, 2024
aafe633
Merge "List of included changes: - Internal cleanup."
zongmins Sep 24, 2024
b25a927
Merge "List of included changes: - Internal cleanup."
zongmins Sep 24, 2024
d36f46a
Merge "List of included changes: - Internal cleanup."
zongmins Sep 24, 2024
f6b7dba
Merge "List of included changes: - Internal cleanup."
zongmins Sep 24, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
36 changes: 36 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
name: Bug report
about: Create a report to help us improve
title: "[Bug report] Title for the bug"
labels: ''
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Example Steps to reproduce the behavior in sample app:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

If applicable, please include `code snippet` and `sample input(image, video, text, etc)`

**Expected behavior**
A clear and concise description of what you expected to happen.

**SDK Info:**
- SDK Name & Version [e.g. com.google.mlkit:face-detection:16.1.3]

**Smartphone:**
- Device/Simulator: [e.g. iPhone6, Pixel 5]
- Device/Simulator OS: [e.g. iOS8.1, Android API 30]

**Development Environment:**
*(For Android issue feel free to skip this section)*
- IDE Eversion: [e.g. Xcode 13.1, Android Studio 4.2]
- Laptop/Desktop: [e.g. iMac Pro (2017), HP Z840 Workstation]
- Laptop/Desktop OS/version: [e.g. macOS 12.0.1]
17 changes: 17 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
name: Feature request
about: Suggest an idea for this project
title: "[Feature request] Title for the request"
labels: ''
assignees: ''

---

**What's your feature request? Please describe.**
A clear and concise description of what the request is. Ex. I would like to have X language support in text recognition[...]

**Mobile environment**
Android, IOS or both

**Additional context**
Add any other context or screenshots about the feature request here.
30 changes: 15 additions & 15 deletions android/android-snippets/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'

android {
compileSdkVersion 29
compileSdkVersion 31

defaultConfig {
applicationId "com.google.example.mlkit"
minSdkVersion 16
targetSdkVersion 29
minSdkVersion 19
targetSdkVersion 31
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
Expand All @@ -28,9 +28,9 @@ android {

dependencies {
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.exifinterface:exifinterface:1.2.0'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.72"
implementation 'androidx.appcompat:appcompat:1.4.2'
implementation 'androidx.exifinterface:exifinterface:1.3.3'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"

// Add this dependency and multiDexEnabled = true in your defaultConfig to solve the error:
// Cannot fit requested classes in a single dex file
Expand All @@ -39,24 +39,24 @@ dependencies {
// ML Kit related dependencies

// Barcode model
implementation 'com.google.mlkit:barcode-scanning:16.0.3'
implementation 'com.google.mlkit:barcode-scanning:17.0.2'

// Object detection and tracking features
implementation 'com.google.mlkit:object-detection:16.2.1'
implementation 'com.google.mlkit:object-detection-custom:16.2.1'
implementation 'com.google.mlkit:object-detection:17.0.0'
implementation 'com.google.mlkit:object-detection-custom:17.0.0'

// Face features
implementation 'com.google.android.gms:play-services-mlkit-face-detection:16.1.1'
implementation 'com.google.android.gms:play-services-mlkit-face-detection:17.0.1'

// Text features
implementation 'com.google.android.gms:play-services-mlkit-text-recognition:16.1.1'
implementation 'com.google.android.gms:play-services-mlkit-text-recognition:18.0.0'

// Image labeling
implementation 'com.google.mlkit:image-labeling:17.0.0'
implementation 'com.google.mlkit:image-labeling:17.0.7'

// Language Identification
implementation 'com.google.mlkit:language-id:16.1.1'
implementation 'com.google.mlkit:language-id:17.0.3'

implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.0'
implementation 'androidx.appcompat:appcompat:1.4.2'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
}
31 changes: 16 additions & 15 deletions android/android-snippets/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.google.example.mlkit">

<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity
android:name=".MainActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".kotlin.MainActivity" />
</application>
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".kotlin.MainActivity" />
</application>

</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import com.google.android.gms.tasks.OnFailureListener;
import com.google.android.gms.tasks.OnSuccessListener;
import com.google.android.gms.tasks.Task;
import com.google.mlkit.vision.barcode.Barcode;
import com.google.mlkit.vision.barcode.common.Barcode;
import com.google.mlkit.vision.barcode.BarcodeScanner;
import com.google.mlkit.vision.barcode.BarcodeScannerOptions;
import com.google.mlkit.vision.barcode.BarcodeScanning;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
import com.google.mlkit.vision.text.Text;
import com.google.mlkit.vision.text.TextRecognition;
import com.google.mlkit.vision.text.TextRecognizer;
import com.google.mlkit.vision.text.TextRecognizerOptions;
import com.google.mlkit.vision.text.latin.TextRecognizerOptions;

public class TextRecognitionActivity extends AppCompatActivity {

Expand Down Expand Up @@ -62,6 +62,9 @@ public void onSuccess(Text visionText) {
// ...
for (Text.Element element: line.getElements()) {
// ...
for (Text.Symbol symbol: element.getSymbols()) {
// ...
}
}
}
}
Expand Down Expand Up @@ -95,6 +98,11 @@ private void processTextBlock(Text result) {
String elementText = element.getText();
Point[] elementCornerPoints = element.getCornerPoints();
Rect elementFrame = element.getBoundingBox();
for (Text.Symbol symbol : element.getSymbols()) {
String symbolText = symbol.getText();
Point[] symbolCornerPoints = symbol.getCornerPoints();
Rect symbolFrame = symbol.getBoundingBox();
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,9 @@
package com.google.example.mlkit.kotlin

import androidx.appcompat.app.AppCompatActivity
import com.google.mlkit.vision.barcode.Barcode
import com.google.mlkit.vision.barcode.BarcodeScanner
import com.google.mlkit.vision.barcode.BarcodeScannerOptions
import com.google.mlkit.vision.barcode.BarcodeScanning
import com.google.mlkit.vision.barcode.common.Barcode
import com.google.mlkit.vision.common.InputImage

class BarcodeScanningActivity : AppCompatActivity() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import com.google.mlkit.vision.common.InputImage
import com.google.mlkit.vision.text.Text
import com.google.mlkit.vision.text.TextRecognition
import com.google.mlkit.vision.text.TextRecognizer
import com.google.mlkit.vision.text.TextRecognizerOptions
import com.google.mlkit.vision.text.latin.TextRecognizerOptions

class TextRecognitionActivity : AppCompatActivity() {

Expand Down
5 changes: 3 additions & 2 deletions android/android-snippets/build.gradle
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
ext.kotlin_version = '1.4.31'
repositories {
mavenLocal()
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.0.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.72"
classpath 'com.android.tools.build:gradle:7.2.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-all.zip
30 changes: 10 additions & 20 deletions android/automl/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 30
compileSdkVersion 34

defaultConfig {
applicationId "com.google.mlkit.vision.automl.demo"
minSdkVersion 16
minSdkVersion 21
multiDexEnabled true
targetSdkVersion 30
targetSdkVersion 34
// Version code for next release (version 9 is now in Play Store)
versionCode 11
versionName "1.11"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
setProperty("archivesBaseName", "vision-automl-remote-model-quickstart")
}
Expand Down Expand Up @@ -51,35 +50,26 @@ android {
}

repositories {
maven { url 'https://google.bintray.com/tensorflow' }
// Depending on AndroidX Snapshot Builds to get the latest CameraX libs.
maven { url 'https://androidx.dev/snapshots/builds/6787662/artifacts/repository/' }
}

dependencies {
// Image labeling with AutoML model support
implementation 'com.google.mlkit:image-labeling-custom:16.3.1'
implementation 'com.google.mlkit:object-detection-custom:16.3.1'
implementation 'com.google.mlkit:linkfirebase:16.1.1'
implementation 'com.google.mlkit:image-labeling-custom:17.0.3'
// Or comment the dependency above and uncomment the dependency below to
// use unbundled model that depends on Google Play Services
// implementation 'com.google.android.gms:play-services-mlkit-image-labeling-custom:16.0.0-beta5'

implementation 'com.google.mlkit:object-detection-custom:17.0.2'
implementation 'com.google.mlkit:linkfirebase:17.0.0'

implementation 'androidx.multidex:multidex:2.0.1'
// -------------------------------------------------------

implementation 'com.google.code.gson:gson:2.8.6'
implementation 'com.google.guava:guava:27.1-android'

// For how to setup gradle dependencies in Android X, see:
// https://developer.android.com/training/testing/set-up-project#gradle-dependencies
// Core library
androidTestImplementation 'androidx.test:core:1.3.0'

// AndroidJUnitRunner and JUnit Rules
androidTestImplementation 'androidx.test:runner:1.3.0'
androidTestImplementation 'androidx.test:rules:1.3.0'

// Assertions
androidTestImplementation 'androidx.test.ext:junit:1.1.2'

// ViewModel and LiveData
implementation "androidx.lifecycle:lifecycle-livedata:2.3.1"
implementation "androidx.lifecycle:lifecycle-viewmodel:2.3.1"
Expand Down
5 changes: 4 additions & 1 deletion android/automl/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
android:installLocation="auto">

<!-- CameraX libraries require minSdkVersion 21, while this quickstart app
supports low to 16. Needs to use overrideLibrary to make the merger tool
supports low to 19. Needs to use overrideLibrary to make the merger tool
ignore this conflict and import the libraries while keeping the app's lower
minSdkVersion value. In code, will check SDK version, before calling CameraX
APIs. -->
Expand All @@ -31,6 +31,9 @@
<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version"/>
<meta-data
android:name="com.google.mlkit.vision.DEPENDENCIES"
android:value="custom_ica"/>

<activity
android:name=".ChooserActivity"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

import static java.lang.Math.min;

import android.annotation.TargetApi;
import android.content.ContentResolver;
import android.content.Context;
import android.graphics.Bitmap;
Expand Down Expand Up @@ -71,18 +70,19 @@ public static Bitmap getBitmap(ByteBuffer data, FrameMetadata metadata) {
}

/** Converts a YUV_420_888 image from CameraX API to a bitmap. */
@RequiresApi(VERSION_CODES.KITKAT)
@RequiresApi(VERSION_CODES.LOLLIPOP)
@Nullable
@ExperimentalGetImage
public static Bitmap getBitmap(ImageProxy image) {
FrameMetadata frameMetadata = new FrameMetadata.Builder()
.setWidth(image.getWidth())
.setHeight(image.getHeight())
.setRotation(image.getImageInfo().getRotationDegrees())
.build();

ByteBuffer nv21Buffer = yuv420ThreePlanesToNV21(
image.getImage().getPlanes(), image.getWidth(), image.getHeight());
FrameMetadata frameMetadata =
new FrameMetadata.Builder()
.setWidth(image.getWidth())
.setHeight(image.getHeight())
.setRotation(image.getImageInfo().getRotationDegrees())
.build();

ByteBuffer nv21Buffer =
yuv420ThreePlanesToNV21(image.getImage().getPlanes(), image.getWidth(), image.getHeight());
return getBitmap(nv21Buffer, frameMetadata);
}

Expand Down Expand Up @@ -304,7 +304,6 @@ private static byte[] nv21Toyv12(byte[] nv21Bytes) {
* before the U buffer and the planes have a pixelStride of 2. If this is case, we can just copy
* them to the NV21 array.
*/
@RequiresApi(VERSION_CODES.KITKAT)
private static ByteBuffer yuv420ThreePlanesToNV21(
Plane[] yuv420888planes, int width, int height) {
int imageSize = width * height;
Expand Down Expand Up @@ -334,7 +333,6 @@ private static ByteBuffer yuv420ThreePlanesToNV21(
}

/** Checks if the UV plane buffers of a YUV_420_888 image are in the NV21 format. */
@RequiresApi(VERSION_CODES.KITKAT)
private static boolean areUVPlanesNV21(Plane[] planes, int width, int height) {
int imageSize = width * height;

Expand Down Expand Up @@ -367,7 +365,6 @@ private static boolean areUVPlanesNV21(Plane[] planes, int width, int height) {
* <p>The input plane data will be copied in 'out', starting at 'offset' and every pixel will be
* spaced by 'pixelStride'. Note that there is no row padding on the output.
*/
@TargetApi(VERSION_CODES.KITKAT)
private static void unpackPlane(
Plane plane, int width, int height, byte[] out, int offset, int pixelStride) {
ByteBuffer buffer = plane.getBuffer();
Expand Down
Loading