react-native-nitro-geolocation 1.3.0 → 1.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -179,7 +179,39 @@ permission set from the Android background setup guide when using
179
179
 
180
180
  ---
181
181
 
182
- ### 4. Continue In The Docs
182
+ ### 4. DevTools Plugin
183
+
184
+ Use the Rozenite DevTools plugin to mock locations during development with an
185
+ interactive map. It works with the Modern API root import.
186
+
187
+ ![DevTools Plugin Demo](https://raw.githubusercontent.com/jingjing2222/react-native-nitro-geolocation/main/devtools.gif)
188
+
189
+ ```bash
190
+ yarn add @react-native-nitro-geolocation/rozenite-plugin
191
+ ```
192
+
193
+ ```tsx
194
+ import {
195
+ createPosition,
196
+ useGeolocationDevTools,
197
+ } from "@react-native-nitro-geolocation/rozenite-plugin";
198
+
199
+ function App() {
200
+ useGeolocationDevTools({
201
+ initialPosition: createPosition("Seoul, South Korea"),
202
+ });
203
+
204
+ return <RootNavigator />;
205
+ }
206
+ ```
207
+
208
+ The plugin requires Rozenite DevTools in your app. See the
209
+ [DevTools Plugin guide](https://react-native-nitro-geolocation.pages.dev/guide/devtools)
210
+ for setup, presets, troubleshooting, and the demo.
211
+
212
+ ---
213
+
214
+ ### 5. Continue In The Docs
183
215
 
184
216
  Use the docs site for the detailed flows:
185
217
 
@@ -100,7 +100,8 @@ class NitroBackgroundLocationController private constructor(
100
100
  if (permissions.foregroundPermission() != PermissionStatus.GRANTED) {
101
101
  throw SecurityException("Foreground location permission is required")
102
102
  }
103
- if (permissions.backgroundPermission() != BackgroundPermissionStatus.GRANTED) {
103
+ if (current.android?.foregroundService == null &&
104
+ permissions.backgroundPermission() != BackgroundPermissionStatus.GRANTED) {
104
105
  throw SecurityException("Background location permission is required")
105
106
  }
106
107
  state = BackgroundLocationState.STARTING
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-nitro-geolocation",
3
- "version": "1.3.0",
3
+ "version": "1.3.1",
4
4
  "description": "Nitro-powered native geolocation for modern React Native apps",
5
5
  "main": "src/index",
6
6
  "source": "src/index",