rename 'docs' directory to 'doc'
This commit is contained in:
58
doc/examples/QUICK_START.md
Normal file
58
doc/examples/QUICK_START.md
Normal file
@@ -0,0 +1,58 @@
|
||||
# Quick Start Guide
|
||||
|
||||
**Purpose:** Minimal working example for Daily Notification Plugin.
|
||||
**Owner:** Development Team
|
||||
**Last Updated:** 2025-12-22
|
||||
**Status:** active
|
||||
|
||||
---
|
||||
|
||||
## Minimal Working Example
|
||||
|
||||
```typescript
|
||||
import { DailyNotification } from '@timesafari/daily-notification-plugin';
|
||||
|
||||
// 1. Request permission
|
||||
const { state } = await DailyNotification.requestPermission();
|
||||
if (state !== 'granted') {
|
||||
console.error('Permission denied');
|
||||
return;
|
||||
}
|
||||
|
||||
// 2. Create schedule
|
||||
const { schedule } = await DailyNotification.createSchedule({
|
||||
id: 'daily-morning',
|
||||
kind: 'notify',
|
||||
clockTime: '09:00',
|
||||
enabled: true
|
||||
});
|
||||
|
||||
// 3. Verify schedule
|
||||
const { schedules } = await DailyNotification.getSchedules();
|
||||
console.log('Active schedules:', schedules);
|
||||
```
|
||||
|
||||
## Platform Setup
|
||||
|
||||
### iOS
|
||||
Add to `Info.plist`:
|
||||
```xml
|
||||
<key>BGTaskSchedulerPermittedIdentifiers</key>
|
||||
<array>
|
||||
<string>org.timesafari.dailynotification.fetch</string>
|
||||
</array>
|
||||
```
|
||||
|
||||
### Android
|
||||
Add to `AndroidManifest.xml`:
|
||||
```xml
|
||||
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
|
||||
<uses-permission android:name="android.permission.SCHEDULE_EXACT_ALARM" />
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
**See also:**
|
||||
- [Common Patterns](./COMMON_PATTERNS.md) — Common integration patterns
|
||||
- [Integration Guide](../integration/INTEGRATION_GUIDE.md) — Full integration guide
|
||||
|
||||
Reference in New Issue
Block a user