Skip to content

Commit

Permalink
Fixed product search codelabs review comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
khanhlvg committed May 18, 2021
1 parent 76aba7a commit 265ec65
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 22 deletions.
2 changes: 1 addition & 1 deletion product-search/codelab1/android/final/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ dependencies {
// Volley Network call
implementation 'com.android.volley:volley:1.2.0'
// ML Kit
implementation 'com.google.mlkit:object-detection:16.2.3'
implementation 'com.google.mlkit:object-detection:16.2.4'
// Gson
implementation 'com.google.code.gson:gson:2.8.6'
// Glide
Expand Down
2 changes: 1 addition & 1 deletion product-search/codelab1/android/starter/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,5 @@ dependencies {
// Glide
implementation 'com.github.bumptech.glide:glide:4.12.0'
// ML Kit
implementation 'com.google.mlkit:object-detection:16.2.3'
implementation 'com.google.mlkit:object-detection:16.2.4'
}
Original file line number Diff line number Diff line change
Expand Up @@ -204,22 +204,4 @@ class ObjectDetectorActivity : AppCompatActivity() {
// Make a copy of the bitmap in a desirable format
return bitmap?.copy(Bitmap.Config.ARGB_8888, false)
}

/**
* Function to log information about object detected by ML Kit.
*/
private fun debugPrint(detectedObjects: List<DetectedObject>) {
detectedObjects.forEachIndexed { index, detectedObject ->
val box = detectedObject.boundingBox

Log.d(TAG, "Detected object: $index")
Log.d(TAG, " trackingId: ${detectedObject.trackingId}")
Log.d(TAG, " boundingBox: (${box.left}, ${box.top}) - (${box.right},${box.bottom})")
detectedObject.labels.forEach {
Log.d(TAG, " categories: ${it.text}")
Log.d(TAG, " confidence: ${it.confidence}")
}
}
}

}
2 changes: 1 addition & 1 deletion product-search/codelab2/android/final/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ dependencies {
// Volley Network call
implementation 'com.android.volley:volley:1.2.0'
// ML Kit
implementation 'com.google.mlkit:object-detection:16.2.3'
implementation 'com.google.mlkit:object-detection:16.2.4'
// Gson
implementation 'com.google.code.gson:gson:2.8.6'
// Glide
Expand Down
2 changes: 1 addition & 1 deletion product-search/codelab2/android/starter/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ dependencies {
// Volley Network call
implementation 'com.android.volley:volley:1.2.0'
// ML Kit
implementation 'com.google.mlkit:object-detection:16.2.3'
implementation 'com.google.mlkit:object-detection:16.2.4'
// Gson
implementation 'com.google.code.gson:gson:2.8.6'
// Glide
Expand Down

0 comments on commit 265ec65

Please sign in to comment.