OCR with Expo and React Native - react-native

I'm trying to build a mobile app which performs OCR. I've decided to use React Native because it's cross platform and Expo for the SDK it provides. However, I'm not quite sure what the best way to perform OCR is. I've found this tesseract ocr library but it seems that I need to eject from expo to use that because it relies on native code. I've also tried using this pure js library but that depends on util from the Node Standard Library which isn't supported by Expo. I've also the anyline library but it seems that using Anyline requires payments which I'd like to avoid if possible.
Is the best path forward using the tessaract OCR library and ejecting from expo?

Seems like there is no expo-native way to perform OCR: https://expo.canny.io/feature-requests/p/support-optical-character-recognition-ocr

Related

Using Baidu Map for react native/expo

I'm building a React Native App for a Chinese Company. I'm using Expo.
I really would love to use Google Maps, but it is not allowed there...
The best solution I found was to use Baidu Map,
I searched for SDKs and found some of them in GitHub.
I decided to use this one: https://github.com/qiuxiang/react-native-baidumap-sdk
which provides great documentation.
Although, I'm having some trouble implementing it to the app. I think that they don't support expo.
Does anyone here ever have a similar problem?
Or used another map...
Would really save my life!
This library uses native (Android & iOS) SDKs and provides a React Native API on top of them. Expo does not yet support custom native modules, which means you'll have to eject from it to use this package (or any other that uses BaiduMap or other native code).
I'm guessing they probably have a web based JS SDK instead which you could try to integrate into your app via a <WebView /> instead?

Will this module work in expo or react native?

I am new to react native and expo.
This is the module i am looking at: https://github.com/leesiongchan/react-native-esc-pos
I want to build an app that can print using bluetooth thermal printer. I am not sure if i should build it using react native or expo. Please advise me.
Thank you.
Expo has its own limitations and there are even some bugs there too, Its good for quick development as the documentation suggests the same that it is good to get you started with development within minutes without much hustle. In my opinion, React Native CLI is most of the time the best option even if you are new to react native development. Because of the following reasons
You will learn a lot as you will get your hands dirty in core react native app development.
You won't have to deal with expo limitations
You won't have to be dependent on expo tools
Any Library which requires linking or contains native modules will not work with the expo.
The library you mentioned uses many native modules and usually these type of libraries are not supported and that is the reason why they've built their own APIs and Native Components you can read this,
the developer has not mentioned Expo support anywhere on the docs but still You can open an issue on GitHub and ask the developer if it supports EXPO platform or not, or maybe instead of asking you can try the library yourself and you will find out if its working or not,

how to using Optical Character Recognition (OCR) in react native that using expo?

I'm Trying to use OCR in react-native that using expo too.
I've tried using Tesseract but it has error, i've search the solution, and seems i should eject the expo.
i want to use pure tesseract javascript, but expo doesn't support standar node.
is there any other way ? it could be better if you have some example on it. Thank You.

React native: How to use js library from cdn stripe.js

I want to use stripe.js library with React native which is only available with a cdn.
Is it possible to use a js library with a cdn only with react native?
If your goal was simply to integrate an external JavaScript file in your project, the best way might be to download the file from the CDN manually, or as part of your build process and simply require/import the local file in your app.
However, for using Stripe in your app, I'd recommend looking for a mobile-specific solution such as stripe-expo, or react-native-payments with the react-native-payments-addon-stripe. The stripe.js library is intended for browser use, and while it may work, mobile-specific SDKs are likely to work better in React Native.
Googling "react native stripe" turns out a few other third-party libraries as well. I haven't personally used any of them, but they may be worth evaluating.

Can you add libraries with native dependencies to an Expo react native project?

Can you use libraries like https://github.com/tolu360/react-native-google-places in an Expo project? I assume any npm library is ok to add, but what about libraries like this google places picker that requires post install steps to link the native projects. Are they supported with Expo?
Regular Expo projects are written only in JavaScript and don't support npm packages that contain Objective-C or Java. However, Expo provides an advanced SDK called ExpoKit for when you absolutely need to use custom native code. From the Expo docs:
Normally, Expo apps are written in pure JS and never “drop down”
to the native iOS or Android layer. This is core to the Expo
philosophy and it’s part of what makes Expo fast and powerful to
use.
However, there are some cases where advanced developers need native
capabilities outside of what Expo offers out-of-the-box. The most
common situation is when a project requires a specific Native Module
which is not supported by React Native Core or the Expo SDK.
You could "detach" your Expo project to create Xcode and Android Studio projects that contain ExpoKit. Then you would add custom Objective-C or Java the same way as with any other Xcode or Android Studio project.
However, the Expo docs also warn about some of the downsides of writing custom native code; many features often can be implemented well in JS, allowing you to retain all of the benefits of a standard Expo project.
Warning: We discourage most of our developers from taking this route,
as we believe almost everything you need to do is better accomplished
in a cross-platform way with JS.
Writing in JS enables you to best take advantage of over-the-air code
deployment and benefit from ongoing updates and support from Expo.
You should only do this if you have a particular demand from native
code which Expo won’t do a good job supporting, such as (for
example) specialized CPU-intensive video processing that must happen
locally on the device.