Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Add optional android install section to readme #10

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
chore: Add optional android install section to readme.
markrickert committed Aug 16, 2022
commit 332649f53be951f6fbfdb77ce6f84dc77c2de3ca
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -30,6 +30,24 @@ module.exports = {
> Note: You have to restart metro-bundler for changes in the `babel.config.js` file to take effect.
## Optional (But Recommended) for Android:
> [From the MLKit setup instructions](https://developers.google.com/ml-kit/vision/text-recognition/android). `vision-camera-ocr` does not add this for you automatically.
You can configure your app to automatically download the ML model to the device after your app is installed from the Play Store. To do so, add the following declaration to your app's `AndroidManifest.xml` file:
```xml
<application ...>
...
<meta-data
android:name="com.google.mlkit.vision.DEPENDENCIES"
android:value="ocr" />
<!-- To use multiple models: android:value="ocr,model2,model3" -->
</application>
```
If you do not enable install-time model downloads, the model will be downloaded the first time you run the on-device detector. Requests you make before the download has completed will produce no results.
## Usage
```js