Security News
RubyGems.org Adds New Maintainer Role
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
@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 19 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.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.
Security News
Research
Socket's threat research team has detected five malicious npm packages targeting Roblox developers, deploying malware to steal credentials and personal data.