
Research
Security News
Lazarus Strikes npm Again with New Wave of Malicious Packages
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
@spoonconsulting/cordova-plugin-extra-events
Advanced tools
cordova plugin add @spoonconsulting/cordova-plugin-extra-events
Tested platforms: Android 8+, iOS 11+
This plugin provides access to extra lifecycle events that are useful for saving data before your app quits. This allows you to mostly work around the following issues with cordova:
onPause
event is never fired if the user activates the app switcher, then swipes up to kill the app.onPause
event is never fired if the user actives the "recent apps" switcher, then swipes to kill the app.constructor() {
this.unregister = window.plugins.ExtraEvents.registerForEvents(this.onPluginEvent, (err) => {
console.error(err);
});
}
private onPluginEvent(e: CdvExtraEvent) {
// Save our state when the app starts to go to the background.
switch (e.eventName) {
case 'android_onWindowFocusChanged':
if (!e.hasFocus) {
this.saveState();
}
break;
case 'iOS_appWillResignActive':
this.saveState();
break;
}
}
Registers a callback function to receive events. Returns an unregister function. Can be called with the following events:
Emitted when the main activity gains or loses focus. This happens when your app launches, goes into the background, is interrupted by a dialog or alert, when the user opens the system UI, etc. See the android docs for more info: https://developer.android.com/reference/android/app/Activity.html#onWindowFocusChanged(boolean).
Warning If the user actives the app switcher quickly and immediately kills your app, this event might not have time to fire. Also, if the user kills the app and your callback is taking a long time to run, Android might kill it, the same way that this happens with the native onStop
and onDestroy
methods.
{
eventName: 'android_onWindowFocusChanged',
hasFocus: boolean,
}
Emitted when the app starts going to the background or when the app switcher is triggered. See the native docs for more info: https://developer.apple.com/documentation/uikit/uiapplicationdelegate/1622950-applicationwillresignactive?language=objc.
{
eventName: 'iOS_appWillResignActive',
}
Emitted as the app transitions from background to foreground. See the native docs for more info: https://developer.apple.com/documentation/uikit/uiapplicationdelegate/1623076-applicationwillenterforeground?language=objc.
{
eventName: 'iOS_appWillEnterForeground',
}
FAQs
Cordova Plugin Extra Events
The npm package @spoonconsulting/cordova-plugin-extra-events receives a total of 59 weekly downloads. As such, @spoonconsulting/cordova-plugin-extra-events popularity was classified as not popular.
We found that @spoonconsulting/cordova-plugin-extra-events demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 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
Security News
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.
Security News
Opengrep continues building momentum with the alpha release of its Playground tool, demonstrating the project's rapid evolution just two months after its initial launch.