New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

cordova-background-timer2

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cordova-background-timer2

BackgroundTimer Plugin

  • 0.0.5
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

cordova-background-timer

Background Timer plugin for Cordova

Supported Platforms

  • Android

Installation

Automatic Installation using PhoneGap/Cordova CLI (iOS and Android)
  1. Make sure you update your projects to Cordova iOS version 3.5.0+ before installing this plugin.
cordova platform update android
  1. Install this plugin using PhoneGap/Cordova cli:
cordova plugin add https://github.com/dukhanov/cordova-background-timer.git

Usage

start the plugin

var eventCallback = function() {
	// timer event fired
}

var successCallback = function() {
	// timer plugin configured successfully
}

var errorCallback = function(e) {
	// an error occurred
}

var settings = {
	timerInterval: 60000, // interval between ticks of the timer in milliseconds (Default: 60000)
	startOnBoot: true, // enable this to start timer after the device was restarted (Default: false)
	stopOnTerminate: true, // set to true to force stop timer in case the app is terminated (User closed the app and etc.) (Default: true)

	hours: 12, // delay timer to start at certain time (Default: -1)
	minutes: 0, // delay timer to start at certain time (Default: -1)
}

window.BackgroundTimer.onTimerEvent(eventCallback); // subscribe on timer event
// timer will start at 12:00
window.BackgroundTimer.start(successCallback, errorCallback, settings);

#stop a timer

var successCallback = function(){
	// timer tick
}

var errorCallback = function(e){
	// an error occurred
}

window.BackgroundTimer.stop(successCallback, errorCallback);

Keywords

FAQs

Package last updated on 19 Jun 2019

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc