Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More

capacitor-timer-notification

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

capacitor-timer-notification

timer notifcation


Version published
Weekly downloads
24
decreased by-76.47%
Maintainers
0
Weekly downloads
 
Created

capacitor-timer-notification

A Capacitor plugin to create a timer notification that displays a countdown timer in the notification bar.

Usage

Add the following to your android/app/src/main/AndroidManifest.xml file to declare the necessary permissions and service:

<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PLAYBACK" />

<service
  android:name=".TimerService"
  android:enabled="true"
  android:exported="false"
  android:foregroundServiceType="mediaPlayback"/>




## Install

```bash
npm install capacitor-timer-notification
npx cap sync

API

startTimer(...)

startTimer(options: { duration: number; }) => Promise<void>
ParamType
options{ duration: number; }

stopTimer()

stopTimer() => Promise<void>

getRemainingTime()

getRemainingTime() => Promise<{ remainingTime: number; }>

Returns: Promise<{ remainingTime: number; }>


FAQs

Package last updated on 17 Nov 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts