Android Question Erel's Barcode Reader Based on Google Play Services

colboy

Member
Licensed User
Longtime User
I noticed Erel's new library/class after having deployed MobileVision 1.5.1 in another application. I noticed Erel said the following:

It doesn't require an internet connection. It might need to download information on the first run though it didn't require anything when I tested it.
See this link: https://developers.google.com/visio...rial#querying_the_detector_operational_status

I have developed an application that was installed on 35 machines last year. For some reason the client had to ensure each had a valid internet connection for the install and first run, for the application to then operate correctly on an Internetless wifi. I'm making some user changes to the program and the client is asking if I can somehow change the system, so they don't need Internet access, as it will rapidly speed up their deployment, as the facilities they are installing into do not have Internet access.

If Google Play Services and additional downloads are needed, is there anyway to identify them, and then include them in the B4A project, so they can all be installed without further user intervention?

Thanks, in advance.

Colin
 

drgottjr

Expert
Licensed User
Longtime User
your app's manifest should refer to certain mobile vision dependencies (face, ocr, barcode).
(android:name="com.google.android.gms.vision.DEPENDENCIES" android:value="barcode,face")

these are what is downloaded from google when the app is run. until that download has
completed successfully, your mobile vision features will not function. actually, it's the various detectors
that will not start up.

this doesn't answer your question fully; since it's unclear whether you could install those dependencies from B4A
even if you knew what their full names were and had some way to download them or extract them yourself for
inclusion in your apk. trying to look for them on your device could involve root permissions.

the download normally only takes a few seconds. you can observe the device reaching out to google for them in
the log. with a simple test, you can see how the app fails when you try to run it offline for the first time. if you then
connect your device to the Internet and run the app again, the dependencies are downloaded, and all is good.
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
If Google Play Services and additional downloads are needed, is there anyway to identify them, and then include them in the B4A project, so they can all be installed without further user intervention?
The downloading step is done internally in Google Play Services. I haven't seen any documentation about the downloaded resources and whether there is an option to include them in some other way.
 
Upvote 0
Top