
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.
cordova-plugin-background-app
Advanced tools
The purpose of this plugin is to enable notifications, alarms, etc to re-start your app and fire callbacks without the app causing any visual cues to the user. In essense, it allows starting an app as an Android service, but does so without the use of an
The purpose of this plugin is to enable notifications, alarms, etc to re-start your app and fire callbacks without the app causing any visual cues to the user. In essense, it allows starting an app as an Android service, but does so without the use of an actual service.
Works on iOS and Android.
iOS values for resumeType limited to: ''
, 'launch'
, 'normal'
, 'normal-launch'
To see it in action, try the example app.
For how to create your own plugin that uses it, look at cordova-plugin-chrome-apps-notifications or cordova-plugin-chrome-apps-alarms
cordova.backgroundapp.resumeType
(string)After the deviceready
event, this will either be:
''
- When started as a service.'launch'
- When started normally.After a resume
event, this will be one of:
'normal'
- Triggered by an external intent (launcher / task switcher). App was running normally, but had been backgrounded.'normal-launch'
- Triggered by an external intent (launcher / task switcher). App was running as a service.'programmatic'
- Triggered by a call to BackgroundActivity.launchForeground()
. App was running normally, but had been backgrounded.'programmatic-launch'
- Triggered by a call to `BackgroundActivity. App was running as a service.The normal way to use this plugin:
document.addEventListener("deviceready", function() {
if (cordova.backgroundapp.resumeType == 'launch') {
renderUi();
}
}, false);
document.addEventListener("resume", function() {
if (cordova.backgroundapp.resumeType == 'normal-launch') {
renderUi();
} else if (cordova.backgroundapp.resumeType == 'programmatic-launch') {
// You launched programatically (through cordova.backgroundapp.show() perhaps)
// so you should have already called renderUi() from where you called .show().
}
}, false);
cordova.backgroundapp.show()
Brings the app to the foreground. E.g. Call this in response to a user clicking on a notification.
This symbol will be null on iOS, since iOS has not yet implemented this functionality.
The goal is ultimately to be able to run the app in an Android service, but because many plugins utilize CordovaInterface.getActivity(), a background Activity rather than a Service is more viable.
<intent-filter>
BackgroundLauncherActivity
to recieve launch intent and start your main activity.<activity-alias>
to make your
previous main activity point to BackgroundLauncherActivity
, and then rename your
main activity to not conflict with the alias. This is so that
launcher shortcuts
continue to function correctly.cordova.backgroundapp.resumeType
being 'launch'
when running in background on Androidcordova.backgroundapp.resumeType
and cordova.backgroundapp.show()
resumeType
values only)FAQs
The purpose of this plugin is to enable notifications, alarms, etc to re-start your app and fire callbacks without the app causing any visual cues to the user. In essense, it allows starting an app as an Android service, but does so without the use of an
The npm package cordova-plugin-background-app receives a total of 5 weekly downloads. As such, cordova-plugin-background-app popularity was classified as not popular.
We found that cordova-plugin-background-app demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 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.