
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
background-location-update
Advanced tools
A Capacitor plugin which lets you receive location updates even while the app is backgrounded.
npm install background-location-update
npx cap sync
import { BackgroundLocation, Location } from 'background-location-update';
Add the following keys to Info.plist.
:
<dict>
...
<key>NSLocationWhenInUseUsageDescription</key>
<string>We need to track your location</string>
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
<string>We need to track your location while your device is locked.</string>
<key>UIBackgroundModes</key>
<array>
<string>location</string>
</array>
...
</dict>
Configure AndroidManifest.xml
:
<manifest>
<application>
<service
android:name="com.viewtrak.plugins.backgroundlocation.BackgroundLoctionService"
android:enabled="true"
android:exported="true"
android:foregroundServiceType="location" />
</application>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-feature android:name="android.hardware.location.gps" />
</manifest>
Configration specific to Android can be made in strings.xml
:
<resources>
<!--
The channel name for the background notification. This will be visible
when the user presses & holds the notification. It defaults to
"Background Tracking".
-->
<string name="capacitor_background_location_notification_channel_name">
Background Tracking
</string>
<!--
The icon to use for the background notification. Note the absence of a
leading "@". It defaults to "mipmap/ic_launcher", the app's launch icon.
If a raster image is used to generate the icon (as opposed to a vector
image), it must have a transparent background. To make sure your image
is compatible, select "Notification Icons" as the Icon Type when
creating the image asset in Android Studio.
-->
<string name="capacitor_background_location_notification_icon">
drawable/ic_tracking
</string>
</resources>
addWatcher(...)
removeWatcher(...)
openSettings()
addListener('onlineNotificationAction', ...)
addWatcher(options: WatcherOptions, callback: (position?: Location | undefined, error?: CallbackError | undefined) => void) => Promise<string>
Param | Type |
---|---|
options | WatcherOptions |
callback | (position?: Location, error?: CallbackError) => void |
Returns: Promise<string>
removeWatcher(options: { id: string; }) => Promise<void>
Param | Type |
---|---|
options | { id: string; } |
openSettings() => Promise<void>
addListener(eventName: 'onlineNotificationAction', listenerFunc: (data: { isOnline: boolean; }) => void) => Promise<PluginListenerHandle> & PluginListenerHandle
Called when onlineNotificationAction set to true in addWatcher() and result received
Provides onlineNotificationAction result.
Param | Type |
---|---|
eventName | 'onlineNotificationAction' |
listenerFunc | (data: { isOnline: boolean; }) => void |
Returns: Promise<PluginListenerHandle> & PluginListenerHandle
Since: 2.0.2
Prop | Type |
---|---|
backgroundMessage | string |
backgroundTitle | string |
requestPermissions | boolean |
stale | boolean |
distanceFilter | number |
onlineNotificationAction | boolean |
isOnline | boolean |
actionOnline | string |
actionOffline | string |
Prop | Type |
---|---|
latitude | number |
longitude | number |
accuracy | number |
altitude | number | null |
altitudeAccuracy | number | null |
simulated | boolean |
bearing | number | null |
speed | number | null |
time | number | null |
Prop | Type |
---|---|
code | string |
Prop | Type |
---|---|
remove | () => Promise<void> |
FAQs
Gives the user location update in background
The npm package background-location-update receives a total of 0 weekly downloads. As such, background-location-update popularity was classified as not popular.
We found that background-location-update 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.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.