0.0.9 • Published 4 years ago

capacitor-background-interval-process v0.0.9

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

Capacitor Background Interval Process

capacitor-background-interval-process

This plugin ensures you can execute background processes such native when app is suspended

Install

npm install capacitor-background-interval-process
npx cap sync

API

isProcessAlive()

isProcessAlive() => Promise<IIsProcessAlive>

Returns: Promise<IIsProcessAlive>


startProcess(...)

startProcess(option: IStartOptions) => Promise<void>
ParamType
optionIStartOptions

terminateProcess()

terminateProcess() => Promise<void>

addListener(...)

addListener(eventName: 'DOIT', callback: () => void) => Promise<PluginListenerHandle> & PluginListenerHandle
ParamType
eventName"DOIT"
callback() => void

Returns: Promise<PluginListenerHandle> & PluginListenerHandle


removeAllListeners()

removeAllListeners() => Promise<void>

Interfaces

IIsProcessAlive

PropType
statusboolean

IStartOptions

PropType
intervalnumber
titlestring
descriptionstring

PluginListenerHandle

PropType
remove() => Promise<void>

ANDROID

And add xmlns:tools="http://schemas.android.com/tools" to AndroidManifest.xml

And add to android/app/build.gradle

     android {
          configurations.all {
               resolutionStrategy { force 'androidx.work:work-runtime:2.6.0' }
          }
     }