Skip to content
Back to skills

Android Notifications

ASecurity

Integrate push notifications using Firebase Cloud Messaging and NotificationCompat on Android. Use when setting up FCM, creating notification channels, or handling local notifications.

  • 549 stars
  • 0 votes
  • 2 copies
  • 3 views
  • Added June 6, 2026
developmentapi

Works with

  • api

Security analysis

A100/100

Pro scans all 3 files and shows the line behind each finding

Scanned June 6, 2026

npx -y skills add HoangNguyen0403/agent-skills-standard --skill android-notifications --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Android Notifications?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Android Notifications
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/hoangnguyen0403-android-notifications/badge)](https://www.skillsdirectory.com/skills/hoangnguyen0403-android-notifications)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: android-notifications
description: Integrate push notifications using Firebase Cloud Messaging and NotificationCompat on Android. Use when setting up FCM, creating notification channels, or handling local notifications.
metadata:
  triggers:
    files:
    - '**/*Notification*.kt'
    - '**/MainActivity.kt'
    keywords:
    - FirebaseMessaging
    - NotificationCompat
    - NotificationChannel
    - FCM
---
# Android Notifications

## **Priority: P2 (OPTIONAL)**


## Implementation Guidelines

- **Channels**: Create **`NotificationChannel`** with unique ID (required for **API 26+**). Notifications without valid channel **silently dropped**. Use **`NotificationCompat`** for backwards compatibility.
- **Permissions**: **Explicitly request `POST_NOTIFICATIONS`** on **Android 13+ (API 33)**. Avoid requesting system permission on **app launch**; show **priming dialog** first to explain benefit.
- **Service**: Implement **`FirebaseMessagingService`** with **`onMessageReceived`** and **`onNewToken`** for background push handling. Declare service in **`AndroidManifest`** with `MESSAGING_EVENT` intent action.
- **Flow**: Handle **notification taps in both `onCreate` and `onNewIntent`** using **`PendingIntent`**. Pass data between activities via `Intent` extras.
- **Payload**: Limit notification payload to essential IDs. Perform **background data fetching** via WorkManager if more data needed.

## Anti-Patterns

- **No Missing Channel**: Notifications fail silently without channels on API 26+.
- **No Unconditional Requests**: Don't spam permission dialog on first launch.
- **No Missing Manifest**: Service must declared with `MESSAGING_EVENT` action.

## References

- [Implementation Details](references/implementation.md)

Files in this skill

  • SKILL.md1.7 KB
  • evals/evals.json2.7 KB
  • references/implementation.md2.9 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.