iT邦幫忙

2024 iThome 鐵人賽

DAY 5
0

Day 4 好不容易可以運行 React Expo 專案了。

今天要來看看 React Expo 在 Notification API 提供了哪些功能。

// 安排自現在起的特定日期、時間發出一次性通知
Schedule a one-off notification for a specific date or some time from now
// 安排在指定的時間區段內重覆發出通知(或是與 iOS 裝置的某個日曆日相符的條件下發出通知)
Schedule a notification repeating in some time interval (or a calendar date match on iOS)
// 獲得及設置應用程式 badge(應用程式圖示邊角的紅點,用以顯示未讀通知數量)計數
Get and set the application badge icon number
// 取得原生裝置推播 token,以便使用 FCM、APNs 發送通知
Fetch a native device push token, so you can send push notifications with FCM and APNs
// 取得 Expo 推播 token,以便可以使用 Expo 發送推播
Fetch an Expo push token, so you can send push notifications with Expo
// 在前台和背景監聽收到的通知
Listen to incoming notifications in the foreground and background
// 監聽以便利用通知互動
Listen to interactions with notifications
// 當應用程式處於前台時處理通知
Handle notifications when the app is in the foreground
// 從通知中心/通知匣強制關閉通知
Imperatively dismiss notifications from Notification Center/tray
// 建立、通知及刪除 Android channels
Create, update, and delete Android notification channels
// 在 Android 上設定通知的自定圖示及顏色
Set custom icon and color for notifications on Android

資料來源:Expo - Expo Notifications


上一篇
[Day 4] 運行 React Expo 專案
下一篇
[Day 6] Windows 安裝 Expo Notification library
系列文
跨平台協同:在 React Native 和 Kotlin 應用中實現無縫交互 -以 Notification 為例7
圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友留言

立即登入留言