background-fetch
Background Fetch plugin for Cordova and Ionic. Cross-platform Background Fetch implementation. This plugin will execute your provided callbackFn whenever a…
latest: v9.6.0 · npm: @awesome-cordova-plugins/background-fetch
Install
npm install @awesome-cordova-plugins/background-fetch
ionic cordova plugin add cordova-plugin-background-fetchMigrating to Capacitor?
No 1:1 official equivalent was found for this plugin. Check the Capgo community plugin directory or the official Capacitor plugin list for alternatives — many Cordova plugins also still work inside Capacitor via npx cap add.
Background Fetch
Cross-platform Background Fetch implementation. This plugin will execute your provided callbackFn whenever a background-fetch event occurs.
iOS
There is no way to increase the rate which a fetch-event occurs and this plugin sets the rate to the most frequent possible value -- iOS determines the rate automatically based upon device usage and time-of-day (ie: fetch-rate is about ~15min during prime-time hours; less frequently when the user is presumed to be sleeping).
Android
Uses JobScheduler (API 21+) or AlarmManager to schedule periodic callbacks. Additional constraints
(network, charging, idle) can be set via BackgroundFetchConfig.
For more detail, please see https://github.com/transistorsoft/cordova-plugin-background-fetch
Installation
ionic cordova plugin add cordova-plugin-background-fetch
npm install @awesome-cordova-plugins/background-fetch
Plugin Repo: https://github.com/transistorsoft/cordova-plugin-background-fetch
Supported Platforms
- Android
- iOS