0.0.9 • Published 4 years ago
capacitor-background-interval-process v0.0.9
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>
Param | Type |
---|---|
option | IStartOptions |
terminateProcess()
terminateProcess() => Promise<void>
addListener(...)
addListener(eventName: 'DOIT', callback: () => void) => Promise<PluginListenerHandle> & PluginListenerHandle
Param | Type |
---|---|
eventName | "DOIT" |
callback | () => void |
Returns: Promise<PluginListenerHandle> & PluginListenerHandle
removeAllListeners()
removeAllListeners() => Promise<void>
Interfaces
IIsProcessAlive
Prop | Type |
---|---|
status | boolean |
IStartOptions
Prop | Type |
---|---|
interval | number |
title | string |
description | string |
PluginListenerHandle
Prop | Type |
---|---|
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' }
}
}