Skip to content
Merged
Show file tree
Hide file tree
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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed

- Corrected the minimum Android SDK to **API 26**. ML Kit Entity Extraction
(`entity-extraction:16.0.0-beta6`) declares `minSdk 26`, so apps at `minSdk 24`
failed to build (manifest merge). The library's declared `minSdkVersion` and the
README requirement are now `26`.
- iOS: return UTF-16 offsets from `NSDataDetector` instead of grapheme-cluster
distances, so `start`/`end` align with JavaScript string indices and Android's
ML Kit char offsets. Previously mismatched on text containing emoji, accented,
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,9 @@ Detects entities in the given text using native platform APIs.
## Requirements

- iOS 15.1+
- Android API 24+ (minSdk)
- Android API 26+ (minSdk) — required by ML Kit Entity Extraction. Set
`minSdkVersion = 26` (or higher) in your app; with Expo, use
[`expo-build-properties`](https://docs.expo.dev/versions/latest/sdk/build-properties/).
- Expo SDK 50+ or bare React Native with `expo-modules-core`

## Contributing
Expand Down
3 changes: 2 additions & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ android {
compileSdkVersion safeExtGet("compileSdkVersion", 34)

defaultConfig {
minSdkVersion safeExtGet("minSdkVersion", 24)
// ML Kit Entity Extraction (com.google.mlkit:entity-extraction) requires minSdk 26.
minSdkVersion safeExtGet("minSdkVersion", 26)
targetSdkVersion safeExtGet("targetSdkVersion", 34)
}

Expand Down
12 changes: 11 additions & 1 deletion example/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,16 @@
},
"web": {
"favicon": "./assets/favicon.png"
}
},
"plugins": [
[
"expo-build-properties",
{
"android": {
"minSdkVersion": 26
}
}
]
]
}
}
5 changes: 3 additions & 2 deletions example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@
"web": "expo start --web"
},
"dependencies": {
"react-native-data-detector": "file:..",
"expo": "~54.0.33",
"expo-build-properties": "~1.0.10",
"expo-status-bar": "~3.0.9",
"react": "19.1.0",
"react-native": "0.81.5"
"react-native": "0.81.5",
"react-native-data-detector": "file:.."
},
"devDependencies": {
"@types/react": "~19.1.0",
Expand Down
Loading