Back to Trending
RepositoryKotlinINIndia
PatilShreyas

PatilShreyas/FCM-OnDeviceNotificationScheduler

Demo implementation to Schedule FCM Notifications on Android Device using AlarmManager + WorkManager.

123stars
28forks
3issues
3views

🔔 Lên lịch thông báo FCM ngay trên thiết bị Android

Demo cách dùng AlarmManager + WorkManager để lên lịch và hiển thị thông báo FCM vào thời gian xác định, ngay cả khi thiết bị mất kết nối mạng.

Đây là ứng dụng mẫu cho thấy cách triển khai tính năng lên lịch thông báo FCM trên chính thiết bị Android thay vì phụ thuộc vào Firebase Cloud Functions hay Cloud Pub/Sub — giúp giảm chi phí và phức tạp. Ứng dụng đăng ký kênh FCM discount-offers, nhận payload dữ liệu và xử lý lên lịch thông qua AlarmManager và WorkManager.

✨ Điểm nổi bật

  • Dựa trên FCM kênh discount-offers: Nhận dữ liệu từ FCM và xử lý theo logic đã định nghĩa.
  • Payload hỗ trợ lên lịch: Gồm isScheduled và scheduledTime để quyết định hiển thị ngay hay lên lịch sau.
  • Sử dụng AlarmManager: Đặt báo thức một lần tại thời gian đã chỉ định để kích hoạt xử lý.
  • Xử lý bằng WorkManager: Thực hiện công việc nền và hiển thị thông báo khi báo thức kích hoạt.
  • Hiển thị ngay khi không có mạng: Thông báo vẫn hiện trên thanh trạng thái ngay cả khi Wi-Fi/Data đã tắt.
  • Cấu trúc rõ ràng: Tách rõ các thành phần như Service, Receiver, Worker và Utility.

💡 Vì sao đáng chú ý

Không cần dùng đến giải pháp đắt tiền như Cloud Functions hay Pub/Sub, dự án này giữ toàn bộ xử lý logic trên chính thiết bị, phù hợp cho các ứng dụng nhỏ lẻ hoặc demo nhanh. Kiến trúc kết hợp AlarmManager + WorkManager cũng giúp đảm bảo thông báo được gửi đúng giờ dù thiết bị đang ở trạng thái không kết nối, rất hữu ích trong các tình huống như khuyợn mãi, cảnh báo thời gian thực.


#FCM #Android #WorkManager #AlarmManager #Kotlin #Firebase #TiniX

Similar Projects

Discover other similar projects and AI models.

RepositoryPython
xtrinch/fcm-django

FCM Django: Send push notifications via django to websites, iOS & android mobile devices through FCM (Firebase Cloud Messaging)

797
Nov 2, 2026
RepositoryRuby
miyataka/fcmpush

Firebase Cloud Messaging API wrapper for Ruby, suppot HTTP v1 API including access_token auto refresh feature.

84
Oct 31, 2026
RepositoryTypeScript
appwrite/appwrite

The open-source cloud for agents & devs. Including Auth, Databases, Storage, Functions, Messaging, Hosting, Realtime, WAF and more

58.6k
Nov 23, 2026
RepositoryTypeScript
morluto/rea

Reverse engineer anything with agents, from app behavior down to native binaries.

475.2k
Nov 23, 2026
RepositoryKotlin
lysine-dev/okhttp

A meticulous HTTP client for the JVM, Android, and GraalVM.

47.1k
Nov 20, 2026
RepositoryKotlin
gkd-kit/gkd

基于无障碍,高级选择器,订阅规则的自定义屏幕点击安卓应用 | An Android APP with custom screen tapping based on Accessibility, Advanced Selectors, and Subscription Rules

45.3k
Nov 13, 2026
RepositoryKotlin
JunkFood02/Seal

🦭 Video/Audio Downloader for Android, based on yt-dlp

31.0k
Sep 25, 2026
RepositoryKotlin
square/leakcanary

A memory leak detection library for Android.

30.0k
Oct 21, 2026
RepositoryKotlin
Heapy/awesome-kotlin

A curated list of awesome Kotlin related stuff Inspired by awesome-java.

11.4k
Nov 22, 2026