Google Vision Barcode Detection Library Not Installing On Some Devices
Asked Answered
D

1

7

I'm writing an app using the new Google Play Services Vision libraries to detect barcodes.

Everything works fine on most devices I've tested on, but one particular device refuses to install the native libraries (mentioned in this comment)

// Note: The first time that an app using the barcode or face API is installed on a
// device, GMS will download a native libraries to the device in order to do detection.
// Usually this completes before the app is run for the first time.  But if that
// download has not yet completed, then the above call will not detect any barcodes
// and/or faces.
//
// isOperational() can be used to check if the required native libraries are currently
// available.  The detectors will automatically become operational once the library
// downloads complete on device.

In the logs of the device, I have found this:

D/Vision  (28899): Registration status barcode_armeabi_v7a.zip: There is not enough space to perform the download.
D/Vision  (28899): Download status barcode_armeabi_v7a.zip: There is not enough space to perform the download.

However the device (HTC One M8 / Android 5.0.1 / Play Services 7.8.99 2134222-438) definitely has enough free space - 800mb. I could free some more space on this particular device, but I can't tell potentially tens of thousands of users to do that...

Can any Google Developer provide insight? Is this a bug? How much free space does a device need? What mechanisms are used to determine if a device has enough free space?

Deify answered 10/9, 2015 at 9:19 Comment(2)
Is this 800mb free space on the SD card? Could you check if you have reasonable space specifically on your internal storage?Betatron
There is no SD card, it's the internal storage.Deify
S
5

The download mechanism is careful not to download when a device is considered to be "too low" on storage.

We updated the sample apps to include a low storage check. For example:

https://github.com/googlesamples/android-vision/blob/master/visionSamples/photo-demo/app/src/main/java/com/google/android/gms/samples/vision/face/photo/PhotoViewerActivity.java#L91

Update:

Google Vision has lowered the free storage requirement to 500 MB in Google Play Services 8.4. See the release notes here:

https://developers.google.com/vision/release-notes?hl=en

Schooling answered 10/9, 2015 at 19:22 Comment(2)
Interesting. The device here is 16gb, so would need just 1.6gb free. I'm not sure customers would understand that they would need to clear 10% of their storage to use our app, this will probably block our launch and we may need to consider using another solution if this behaviour doesn't change :( Have you got any experience with larger devices? Say a 128gb S6? If Samsung have set that to 10% too, that'd mean they'd need 12.8gb free to use our app. Hopefully they wouldn't have done that...Deify
See the update above. The lower limit on free storage space is now 500 MB rather than a fixed 10%.Schooling

© 2022 - 2024 — McMap. All rights reserved.