Skip to content

sdsleo/react-native-background-process

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-native-background-process

Create a constantly running background task to fetch realtime.


## Getting started

$ npm install react-native-background-process --save

or

$ yarn add react-native-background-process

Usage

import BackgroundProcess from 'react-native-background-process';

BackgroundProcess.run({
    msgTitle: "Background Process", //(default Background Process) enter the notification title  
    msgBody: "Running in the Background", // (default Running in the Background) enter the notification body
    interval: 5000, // (default 5000) interval time to restart the execution of the process
    process: function() { // (required)
        console.log("I'm working")
        // your code here
    }
});

// Stop Process
BackgroundProcess.stop();

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published