capacitor-clock-alarm
v0.5.19
Published
This capacitor add-on allows you to create an alarm clock for iOS and Android
Downloads
50
Readme
clock-alarm
This capacitor add-on allows you to create an alarm clock for iOS and Android
Install
npm install clock-alarm
npx cap sync
Add code (iOS)
The code is automatically added with npx cap sync.
Add code (Android)
The code is automatically added with npx cap sync.
API
echo(...)
echo(options: { value: string; }) => Promise<{ value: string; }>
| Param | Type |
| ------------- | ------------------------------- |
| options
| { value: string; } |
Returns: Promise<{ value: string; }>
setAlarm(...)
setAlarm(options: AlarmOptions) => Promise<alarmResult>
| Param | Type |
| ------------- | ----------------------------------------------------- |
| options
| AlarmOptions |
Returns: Promise<alarmResult>
removeAlarm(...)
removeAlarm(options: { id: number; }) => Promise<{ result: boolean; }>
| Param | Type |
| ------------- | ---------------------------- |
| options
| { id: number; } |
Returns: Promise<{ result: boolean; }>
Interfaces
alarmResult
| Prop | Type |
| ------------ | -------------------- |
| result
| boolean |
AlarmOptions
| Prop | Type | Description |
| ------------- | ----------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
| id
| number | |
| at
| string | .toISOString() Fecha y hora en formato "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'". Ejemplo: "2023-06-18T15:15:00" at: Date().toISOString() |
| message
| string | |
| every
| everyType | |
| count
| number | |
| repeats
| boolean | |
| Weekday
| Weekday | |
| hour
| number | |
| minute
| number | |
Type Aliases
everyType
'year' | 'month' | 'two-weeks' | 'week' | 'day' | 'hour' | 'minute' | 'second'
Enums
Weekday
| Members | Value |
| --------------- | -------------- |
| Sunday
| 1 |
| Monday
| 2 |
| Tuesday
| 3 |
| Wednesday
| 4 |
| Thursday
| 5 |
| Friday
| 6 |
| Saturday
| 7 |