How to use the react-native-background-fetch.STATUS_AVAILABLE function in react-native-background-fetch

To help you get started, we’ve selected a few react-native-background-fetch examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github BlueWallet / BlueWallet / models / notifications.js View on Github external
BackgroundFetch.status(status => {
      switch (status) {
        case BackgroundFetch.STATUS_RESTRICTED:
          console.log('BackgroundFetch restricted');
          break;
        case BackgroundFetch.STATUS_DENIED:
          console.log('BackgroundFetch denied');
          break;
        case BackgroundFetch.STATUS_AVAILABLE:
          console.log('BackgroundFetch is enabled');
          break;
      }
    });
  }
github guardian / editions / projects / Mallard / src / helpers / push-download-failsafe.ts View on Github external
BackgroundFetch.status(status => {
        switch (status) {
            case BackgroundFetch.STATUS_RESTRICTED:
                pushTracking(ID, 'restricted')
                break
            case BackgroundFetch.STATUS_DENIED:
                pushTracking(ID, 'denied')
                break
            case BackgroundFetch.STATUS_AVAILABLE:
                pushTracking(ID, 'enabled')
                break
        }
    })
}