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

capacitor-timer-notification

Package Overview
Dependencies
Maintainers
0
Versions
54
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

capacitor-timer-notification - npm Package Compare versions

Comparing version 0.0.21 to 0.0.22

14

dist/docs.json

@@ -25,5 +25,11 @@ {

{
"name": "pauseTimer",
"signature": "() => Promise<void>",
"parameters": [],
"name": "updateNotification",
"signature": "(options: { duration: number; statusText: string; }) => Promise<void>",
"parameters": [
{
"name": "options",
"docs": "",
"type": "{ duration: number; statusText: string; }"
}
],
"returns": "Promise<void>",

@@ -33,3 +39,3 @@ "tags": [],

"complexTypes": [],
"slug": "pausetimer"
"slug": "updatenotification"
},

@@ -36,0 +42,0 @@ {

@@ -5,4 +5,7 @@ export interface TimerNotificationPlugin {

}): Promise<void>;
pauseTimer(): Promise<void>;
updateNotification(options: {
duration: number;
statusText: string;
}): Promise<void>;
stopTimer(): Promise<void>;
}

@@ -1,4 +0,4 @@

import type { TimerNotificationPlugin } from './definitions';
import { TimerNotificationPlugin } from './definitions';
declare const TimerNotification: TimerNotificationPlugin;
export * from './definitions';
export { TimerNotification };
import { registerPlugin } from '@capacitor/core';
const TimerNotification = registerPlugin('TimerNotification', {
web: () => import('./web').then((m) => new m.TimerNotificationWeb()),
});
const TimerNotification = registerPlugin('TimerNotification');
export * from './definitions';
export { TimerNotification };
//# sourceMappingURL=index.js.map

@@ -7,27 +7,5 @@ 'use strict';

const TimerNotification = core.registerPlugin('TimerNotification', {
web: () => Promise.resolve().then(function () { return web; }).then((m) => new m.TimerNotificationWeb()),
});
const TimerNotification = core.registerPlugin('TimerNotification');
class TimerNotificationWeb extends core.WebPlugin {
async startTimer() {
console.log('Timer started');
// Implement start logic or keep it as a stub for now
}
async pauseTimer() {
console.log('Timer paused');
// Implement pause logic or keep it as a stub for now
}
async stopTimer() {
console.log('Timer stopped');
// Implement stop logic or keep it as a stub for now
}
}
var web = /*#__PURE__*/Object.freeze({
__proto__: null,
TimerNotificationWeb: TimerNotificationWeb
});
exports.TimerNotification = TimerNotification;
//# sourceMappingURL=plugin.cjs.js.map
var capacitorTimerNotification = (function (exports, core) {
'use strict';
'use strict';
const TimerNotification = core.registerPlugin('TimerNotification', {
web: () => Promise.resolve().then(function () { return web; }).then((m) => new m.TimerNotificationWeb()),
});
const TimerNotification = core.registerPlugin('TimerNotification');
class TimerNotificationWeb extends core.WebPlugin {
async startTimer() {
console.log('Timer started');
// Implement start logic or keep it as a stub for now
}
async pauseTimer() {
console.log('Timer paused');
// Implement pause logic or keep it as a stub for now
}
async stopTimer() {
console.log('Timer stopped');
// Implement stop logic or keep it as a stub for now
}
}
exports.TimerNotification = TimerNotification;
var web = /*#__PURE__*/Object.freeze({
__proto__: null,
TimerNotificationWeb: TimerNotificationWeb
});
Object.defineProperty(exports, '__esModule', { value: true });
exports.TimerNotification = TimerNotification;
return exports;
Object.defineProperty(exports, '__esModule', { value: true });
return exports;
})({}, capacitorExports);
//# sourceMappingURL=plugin.js.map
{
"name": "capacitor-timer-notification",
"version": "0.0.21",
"version": "0.0.22",
"description": "timer notifcation",

@@ -5,0 +5,0 @@ "main": "dist/plugin.cjs.js",

@@ -1,16 +0,18 @@

# capacitor-timer-notification
## capacitor-timer-notification
A Capacitor plugin to create a timer notification that will show a notification with a countdown timer.
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:
Add the following to your `android/app/src/main/AndroidManifest.xml` file to declare the necessary permissions and service:
```xml
<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PLAYBACK" />
````xml
<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"/>
```
<service
android:name=".TimerService"
android:enabled="true"
android:exported="false"
android:foregroundServiceType="mediaPlayback"/>

@@ -25,3 +27,3 @@

npx cap sync
```
````

@@ -33,3 +35,3 @@ ## API

* [`startTimer(...)`](#starttimer)
* [`pauseTimer()`](#pausetimer)
* [`updateNotification(...)`](#updatenotification)
* [`stopTimer()`](#stoptimer)

@@ -55,8 +57,12 @@

### pauseTimer()
### updateNotification(...)
```typescript
pauseTimer() => Promise<void>
updateNotification(options: { duration: number; statusText: string; }) => Promise<void>
```
| Param | Type |
| ------------- | ------------------------------------------------------ |
| **`options`** | <code>{ duration: number; statusText: string; }</code> |
--------------------

@@ -63,0 +69,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc