
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
@enhancers/react-native-background-geofence
Advanced tools
background geofence
npm install @enhancers/react-native-background-geofence
Add this to your AndroidManifest.xml file:
<service
android:name="com.enhancers.backgroundgeofence.services.BoundaryEventJobIntentService"
android:enabled="true"
android:exported="true"
android:permission="android.permission.BIND_JOB_SERVICE" />
<service android:name="com.enhancers.backgroundgeofence.services.BoundaryEventHeadlessTaskService" />
<receiver
android:name="com.enhancers.backgroundgeofence.receivers.BoundaryEventBroadcastReceiver"
android:enabled="true" />
Add this keys to app info.plist file
<key>NSLocationWhenInUseUsageDescription</key>
<string>Background Geofencing</string>
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
<string>Background Geofencing</string>
BackgroundGeofence.addGeofence
is a method used to add a geofence with specific parameters such as latitude, longitude, radius, and notifications for entering and exiting the geofence.
BackgroundGeofence.addGeofence({
id: TEST_GEOFENCE_ID,
lat: 34.017714,
lng: -118.499033,
radius: 50, // in meters
enterGeofenceNotificationTitle: 'enter-titolo',
enterGeofenceNotificationText: 'enter-testo',
exitGeofenceNotificationTitle: 'exit-titolo',
exitGeofenceNotificationText: 'exit-testo',
})
.then((id: string) =>
console.log('[geofence] Added geofence with id', id)
)
.catch((e: any) =>
console.error('[geofence] Error in BackgroundGeofence.addGeofence', e)
);
});
Parameters
The following code demonstrates how to set up listeners for ENTER
and EXIT
geofence events using the BackgroundGeofence.on
method. These listeners allow you to execute specific actions when a device enters or exits a geofenced area.
const onEnterEvent = BackgroundGeofence.on(
GeofenceEvent.ENTER,
(id: string) => {
console.log(`Enter event ${id}!!`);
setLastEventReceived(GeofenceEvent.ENTER + ' - ' + id);
}
);
const onExitEvent = BackgroundGeofence.on(
GeofenceEvent.EXIT,
(id: string) => {
console.log(`Exit event ${id}!!`);
setLastEventReceived(GeofenceEvent.EXIT + ' - ' + id);
}
);
Parameters BackgroundGeofence.on(eventType, callback)
FAQs
background geofence
We found that @enhancers/react-native-background-geofence demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.