Skip to content

Let timer works when app enter background or screen lock and the webview shutdown timer and network

Notifications You must be signed in to change notification settings

snowwolfjay/capacitor-timer

Repository files navigation

native-timer

use native timer when not web platform to avoid timer paused by system when app come into background

Install

npm install native-timer
npx cap sync

API

setTimeout(...)

setTimeout(d: { delay: number; id: number; }) => Promise<any>
Param Type
d { delay: number; id: number; }

Returns: Promise<any>


clearTimer(...)

clearTimer(d: { id: number; }) => Promise<any>
Param Type
d { id: number; }

Returns: Promise<any>


About

Let timer works when app enter background or screen lock and the webview shutdown timer and network

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published