Skip to content
 
 

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

React Native Background Timer

Emit event periodically (also when application is running in the background).

Currently for Android only.

Instalation

  • npm install react-native-background-timer --save
  • rnpm link

Usage

var {DeviceEventEmitter} = React;
var BackgroundTimer = require('react-native-background-timer');
// start timing
BackgroundTimer.start(5000); // delay in milliseconds
// listen for event
DeviceEventEmitter.addListener('backgroundTimer', () => {
	// this will be executed every 5 seconds
	// also when application is running in the background
	console.log('tic');
});
// you can explicitly stop timing
BackgroundTimer.stop();

About

Emit event periodically (also when application is running in the background)

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages