React Native project demonstrating Android Turbo Modules (New Architecture).
Key-value storage module. Internally uses Android SharedPreferences.
| Method | Description |
|---|---|
setItem(value, key) |
Save a value |
getItem(key) |
Retrieve a value |
removeItem(key) |
Delete a value |
clear() |
Clear all data |
Document scanner using Google ML Kit SDK.
| Method | Description |
|---|---|
scanDocument(pageLimit) |
Opens camera scanner, returns image URI |
How it works:
I built a native module that integrates Google ML Kit Document Scanner SDK into React Native. ML Kit handles scanning, edge detection, and image processing. My module bridges it to JS — configures options, launches scanner, and returns the scanned image URI via Promise
- JS calls
scanDocument(pageLimit)→ Promise created - Native module configures ML Kit options (page limit, formats, scanner mode)
- ML Kit opens built-in camera UI — no custom camera code needed
- ML Kit detects document edges, auto crops, removes shadows, fixes rotation
- User confirms scan →
onActivityResultreceives scanned image - Native module resolves Promise with image URI back to JS
- JS displays scanned image using the returned URI
specs/ # TypeScript specs (codegen input)
├── NativeLocalStorage.ts
└── NativeDocumentScanner.ts
android/.../com/
├── nativelocalstorage/
│ ├── NativeLocalStorageModule.kt
│ └── NativeLocalStoragePackage.kt
├── nativedocumentscanner/
│ ├── NativeDocumentScannerModule.kt
│ └── NativeDocumentScannerPackage.kt
└── turbomoduleexample/
├── MainActivity.kt
└── MainApplication.kt
npm install
npm run android