Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
sriharshamadamanchi authored Aug 21, 2024
1 parent fab963e commit 8e37744
Showing 1 changed file with 26 additions and 26 deletions.
52 changes: 26 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,9 @@ Your `AndroidManifest.xml` should look liks this

### requestLocation
```javascript
import { requestLocation } from '@rn-bridge/react-native-geofencing';
import Geofencing from '@rn-bridge/react-native-geofencing';

const response = await requestLocation({ allowWhileUsing: true });
const response = await Geofencing.requestLocation({ allowWhileUsing: true });
```
Response:
```json
Expand All @@ -121,9 +121,9 @@ Response:

To request background location:
```javascript
import { requestLocation } from '@rn-bridge/react-native-geofencing';
import Geofencing from '@rn-bridge/react-native-geofencing';

const response = await requestLocation({ allowAlways: true });
const response = await Geofencing.requestLocation({ allowAlways: true });
```
Response:
```json
Expand All @@ -141,17 +141,17 @@ Supported options:
### getLocationAuthorizationStatus
```javascript
import { getLocationAuthorizationStatus } from '@rn-bridge/react-native-geofencing';
import Geofencing from '@rn-bridge/react-native-geofencing';

const response = await getLocationAuthorizationStatus();
const response = await Geofencing.getLocationAuthorizationStatus();
```
Response: `WhileInUse` `Always` `Denied`

### getCurrentLocation
```javascript
import { getCurrentLocation } from '@rn-bridge/react-native-geofencing';
import Geofencing from '@rn-bridge/react-native-geofencing';

const response = await getCurrentLocation();
const response = await Geofencing.getCurrentLocation();
```
Reponse:
```json
Expand All @@ -171,9 +171,9 @@ Reponse:

### addGeofence
```javascript
import { addGeofence } from '@rn-bridge/react-native-geofencing';
import Geofencing from '@rn-bridge/react-native-geofencing';

const response = await addGeofence({
const response = await Geofencing.addGeofence({
id: 'a9957259-8036-4dcb-974c-34eae9b44bdb',
latitude: 16.153062,
longitude: 100.281585,
Expand All @@ -195,9 +195,9 @@ Supported options:

### removeGeofence
```javascript
import { removeGeofence } from '@rn-bridge/react-native-geofencing';
import Geofencing from '@rn-bridge/react-native-geofencing';

const response = await removeGeofence(id)
const response = await Geofencing.removeGeofence(id)
```
Response:
```json
Expand All @@ -211,9 +211,9 @@ Supported options:

### getRegisteredGeofences
```javascript
import { getRegisteredGeofences } from '@rn-bridge/react-native-geofencing';
import Geofencing from '@rn-bridge/react-native-geofencing';

const response = await getRegisteredGeofences()
const response = await Geofencing.getRegisteredGeofences()
```
Response:
```json
Expand Down Expand Up @@ -250,9 +250,9 @@ import { Authorization } from '@rn-bridge/react-native-geofencing';
### onEnter
```javascript
import { Geofence, Events } from '@rn-bridge/react-native-geofencing';
import Geofencing, { Events } from '@rn-bridge/react-native-geofencing';

Geofence.onEnter((ids: string[]) => {
Geofencing.onEnter((ids: string[]) => {
console.log(Events.Enter, ids);
});
```
Expand All @@ -263,9 +263,9 @@ Response:

### onExit
```javascript
import { Geofence, Events } from '@rn-bridge/react-native-geofencing';
import Geofencing, { Events } from '@rn-bridge/react-native-geofencing';

Geofence.onExit((ids: string[]) => {
Geofencing.onExit((ids: string[]) => {
console.log(Events.Exit, ids);
});
```
Expand All @@ -276,30 +276,30 @@ Response:

### removeOnEnterListener
```javascript
import { Geofence } from '@rn-bridge/react-native-geofencing';
import Geofencing from '@rn-bridge/react-native-geofencing';

Geofence.removeOnEnterListener()
Geofencing.removeOnEnterListener()
```

### removeOnExitListener
```javascript
import { Geofence } from '@rn-bridge/react-native-geofencing';
import Geofencing from '@rn-bridge/react-native-geofencing';

Geofence.removeOnExitListener()
Geofencing.removeOnExitListener()
```

### isOnEnterListenerAdded
```javascript
import { Geofence } from '@rn-bridge/react-native-geofencing';
import Geofencing from '@rn-bridge/react-native-geofencing';

Geofence.isOnEnterListenerAdded() // true or false
Geofencing.isOnEnterListenerAdded() // true or false
```

### isOnExitListenerAdded
```javascript
import { Geofence } from '@rn-bridge/react-native-geofencing';
import Geofencing from '@rn-bridge/react-native-geofencing';

Geofence.isOnExitListenerAdded() // true or false
Geofencing.isOnExitListenerAdded() // true or false
```

## How To Run Example App ?
Expand Down

0 comments on commit 8e37744

Please sign in to comment.