
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
sdk-telemetry
Advanced tools
SDK Telemetry is a library designed for real-time location tracking and telemetry data collection. It helps developers capture, process, and analyze device location data efficiently, providing both current location and real-time tracking capabilities.
Install the SDK via npm or yarn:
npm install sdk-telemetry
yarn add sdk-telemetry
Current Location: Fetch the current GPS coordinates of the device (latitude, longitude, altitude, speed, and heading). Real-Time Tracking: Continuously track device movement with a customizable distance filter to optimize performance and reduce Geocoding/Directions: Convert geographic coordinates into human-readable addresses and retrieve coordinates for a given addressnoise. Geofencing: Monitor specific geographic areas and trigger events when entering or exiting these zones. Offline Tracking: Track locations when offline and sync them once the connection is restored.
1. Initialize the SDK Before using any functionality, initialize the SDK:
import { TelemetrySDK } from "sdk-telemetry";
TelemetrySDK.initialize({
geocodingApiKey: "YOUR_API_KEY", // Required for geocoding features
});
2. Get Current Location Fetch the device's current location:
TelemetrySDK.getCurrentLocation()
.then((location) => {
console.log("Current location:", location);
})
.catch((error) => {
console.error("Error fetching location:", error.message);
});
3. Start Real-Time Tracking Start tracking the device's movement in real-time. You can specify a distance filter to ignore updates for insignificant movements.
TelemetrySDK.startRealTimeTracking(
(location) => {
console.log("New location captured:", location);
},
50, // Minimum distance in meters to record a new location
(error) => {
console.error("Tracking error:", error.message);
}
);
To stop tracking:
TelemetrySDK.stopRealTimeTracking();
console.log("Tracking stopped.");
4. Geocoding/Directions
TelemetrySDK.getAddressFromCoordinates(40.712776, -74.005974)
.then((address) => {
console.log("Address:", address);
})
.catch((error) => {
console.error("Error fetching address:", error.message);
});
TelemetrySDK.getCoordinatesFromAddress("1600 Amphitheatre Parkway, Mountain View, CA")
.then(({ latitude, longitude }) => {
console.log("Coordinates:", { latitude, longitude });
})
.catch((error) => {
console.error("Error fetching coordinates:", error.message);
});
5. Geofencing
TelemetrySDK.addGeoFence("home", { latitude: 40.712776, longitude: -74.005974 }, 100);
TelemetrySDK.addGeoFence("office", { latitude: 37.774929, longitude: -122.419418 }, 200);
console.log("Geofences added.");
TelemetrySDK.removeGeoFence("home");
console.log("Geofence removed.");
TelemetrySDK.startRealTimeTracking(
(location) => {
TelemetrySDK.checkGeoFences(location, (event, fenceId) => {
console.log(`Geofence event: ${event} - ${fenceId}`);
});
},
50, // Minimum distance in meters to register a new location
(error) => {
console.error("Error during real-time tracking:", error.message);
}
);
5. Offline Tracking Track user locations automatically when offline and sync them when back online.
TelemetrySDK.startOfflineTracking(TelemetrySDK.getCurrentLocation, 5000);
console.log("Offline tracking started.");
TelemetrySDK.stopOfflineTracking();
console.log("Offline tracking stopped.");
TelemetrySDK.syncOfflineLocations(async (locations) => {
console.log("Syncing offline locations:", locations);
// Example: Send locations to server
await fetch("https://your-api.com/sync-locations", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ locations }),
});
});
Real-Time Tracking
distanceFilter:
Geocoding
geocodingApiKey:
Geofencing
id: Unique identifier for the geofence.center: Central location of the geofence (latitude and longitude).radius: Radius of the geofence in meters.Jest Tests Run the included unit tests to ensure the SDK functions correctly:
npm test
Planned features:
1. What happens if GPS is disabled?** If the device's GPS is disabled, the SDK will return an error message indicating that location data is unavailable.
2. How does the distanceFilter work? The distanceFilter ensures that only location updates with a significant distance change (e.g., 50 meters) are captured. This reduces unnecessary updates and optimizes battery consumption.
3. Do I need an API key for geocoding? Yes, geocoding functionality requires an API key from a geocoding service like OpenCage or Google Maps. Make sure to initialize the SDK with the key before using these features.
4. Can I track locations offline? Yes, use the offline tracking functionality to store locations when there’s no internet connection and sync them when back online.
This project is licensed under the MIT License. See the LICENSE file for details.
### Summary of Changes
1. Added Geocoding/Directions and GeoFencing to the Features section.
2. Included usage examples for geocoding (getAddressFromCoordinates and getCoordinatesFromAddress).
3. Highlighted the need for the geocodingApiKey in the configuration options.
4. Updated the FAQ to clarify geocoding-specific requirements.
FAQs
SDK para telemetría de dispositivos móviles en React Native y React.
We found that sdk-telemetry demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.