android-vision icon indicating copy to clipboard operation
android-vision copied to clipboard

About faceDetector face library downloaded and isOperational

Open jackfunnyGit opened this issue 7 years ago • 10 comments

As mentioned in developers.google.com:

When an app is first installed, it may be necessary to "download" required files.

known fact: The faceDetector isOperational always return false when the app is first installed with the internet disabled. The isOperational return true after I turn on the internet and restart the app again. Then,even though I turn off the internet, the faceDetector also works.

My questions are below: 1.Where is the face library downloaded from? from internet,from the google play service or from the internet through the goolge play service? 2. Does the faceDetector library only need to be downloaded once in the first time and work in the next time even though the internet is disabled? 3.Which folder is the face library downloaded to? (in /data/data/com.google.android.gms/files/com.google.android.gms.vision ?) 4.What is the size of the face library? 5.Is there a way to force the library to be downloaded, and then start using the API? Is there a listener to this operation? 6.Would using "isOperational" trigger this download?

jackfunnyGit avatar May 02 '17 08:05 jackfunnyGit

The faceDetector isOperational always return false when the app is first installed with the internet disabled.

This isn't strictly always true. If you install an app while connected to the Internet (which presumably most people do), the library files may be downloaded at that time (before the app is started). This is enabled if you indicate which libraries are needed in the app's manifest, as described in the Add the Vision Dependency to your Android Manifest section here.

Does the faceDetector library only need to be downloaded once in the first time and work in the next time even though the internet is disabled?

It doesn't need to download every time, so once it is downloaded and you go offline, the face detector will still work. However, if there is a version update, a new version of the library will be downloaded (only when connected to the Internet).

Is there a way to force the library to be downloaded, and then start using the API? Is there a listener to this operation?

No, but the download is triggered automatically upon install (see the manifest comment above) or first use of any method of the API (including isOperational).

pm0733464 avatar May 02 '17 16:05 pm0733464

Thanks for your answers. I still have some questions as the following:

This isn't strictly always true. If you install an app while connected to the Internet (which presumably most people do), the library files may be downloaded at that time (before the app is started). This is enabled if you indicate which libraries are needed in the app's manifest, as described in the Add the Vision Dependency to your Android Manifest section here.

Does it take a long time to install app if the device is running on a slow connection? In other words,can I tell the detector is operational at the time the app is installed with the internet enabled?

No, but the download is triggered automatically upon install (see the manifest comment above) or first use of any method of the API (including isOperational).

I have tried as the following situation: 1 Add the Vision Dependency to my Android Manifest 2 disable the internet 3 install the app (we can tell the detector is not working because the library is not downloaded yet) 4 launch the app (as predicted, operational return false) 5 connect to the internet However,the download is never triggered even though I finish the main activity by the back press and launch again. (when launched,the app will check the if the detector works with isOperational()) The download is never triggered until I kill the process and restart the app again with new process. Can you please tell me why or what's the condition to trigger the automatic download with the first use of the API ?

jackfunnyGit avatar May 03 '17 03:05 jackfunnyGit

Does the google vision text recognizer NOT supported on all android devices?, because when I use the dispendency and run, it only runs perfectly on Samsung Galaxy s6 but not any other android device and when I try it throws back "detector.isOperational() always false". Please help me to solve this problem

zamwel avatar Nov 10 '17 10:11 zamwel

Does anyone have an idea if google will embed this lib in the near future?

andreluiz1987 avatar Jan 04 '18 12:01 andreluiz1987

I face the same issue, GMS Is not invoking lib download in some phones. Please help regarding this.??

nagendra456 avatar Jan 12 '18 10:01 nagendra456

Any update on GMS download, The operational state is always returning false on some devices Is there any plan to Integrate a progress handler Kind of a thing for the Native Library download ? Anyone have any Idea on when google fix these Issues ?

vrvmadan avatar Apr 10 '18 16:04 vrvmadan

Any update on the download issue.

vrvmadan avatar Apr 20 '18 08:04 vrvmadan

Updates?

RnD-Bobo avatar May 17 '18 13:05 RnD-Bobo

UPDATES????

onuryurtturk avatar Jan 14 '19 06:01 onuryurtturk

Why not providing the lib directly?

aiynmm avatar Apr 08 '19 03:04 aiynmm