mlkit-material-android icon indicating copy to clipboard operation
mlkit-material-android copied to clipboard

AsyncTask was deprecated in API level R

Open seventhmoon opened this issue 4 years ago • 2 comments

AsyncTask was deprecated in API level R Use the standard java.util.concurrent or Kotlin concurrency utilities instead. (https://developer.android.com/reference/android/os/AsyncTask)

The following classes are subclass of AsyncTask and were affected. https://github.com/firebase/mlkit-material-android/blob/a85e249467aecc065f6548aa5a898202bbdc8547/app/src/main/java/com/google/firebase/ml/md/kotlin/productsearch/ImageDownloadTask.kt https://github.com/firebase/mlkit-material-android/blob/841efd9fb8fd321cc117b8b6dd6b45d351938139/app/src/main/java/com/google/firebase/ml/md/java/productsearch/ImageDownloadTask.java

seventhmoon avatar Apr 11 '20 16:04 seventhmoon

I suggest replacing the ImageDownloadTask class with an Image Loading Library. Glide maybe?

thatfiredev avatar Apr 11 '20 21:04 thatfiredev

Well, I don't think showing that image is core feature of this sample.

"that the visual search functionality here is mock since no real search backend has set up for this repository"

Can consider dropping this image loading.

Anyway, fixed in https://github.com/firebase/mlkit-material-android/pull/40

seventhmoon avatar Apr 12 '20 03:04 seventhmoon