Skillshub android-notifications
Push notifications for Android using Firebase Cloud Messaging and NotificationCompat. Use when integrating FCM or local notifications in Android apps. (triggers: **/*Notification*.kt, **/MainActivity.kt, FirebaseMessaging, NotificationCompat, NotificationChannel, FCM)
install
source · Clone the upstream repo
git clone https://github.com/ComeOnOliver/skillshub
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/ComeOnOliver/skillshub "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/HoangNguyen0403/agent-skills-standard/android-notifications" ~/.claude/skills/comeonoliver-skillshub-android-notifications && rm -rf "$T"
manifest:
skills/HoangNguyen0403/agent-skills-standard/android-notifications/SKILL.mdsource content
Android Notifications
Priority: P2 (OPTIONAL)
Push notifications using Firebase Cloud Messaging.
Implementation Guidelines
- Channels: Create
with a unique ID (required for API 26+). Notifications without a valid channel are silently dropped. UseNotificationChannel
for backwards compatibility.NotificationCompat - Permissions: Explicitly request
on Android 13+ (API 33). Avoid requesting system permission on app launch; show a priming dialog first to explain the benefit.POST_NOTIFICATIONS - Service: Implement
withFirebaseMessagingService
andonMessageReceived
for background push handling. Declare the service inonNewToken
with theAndroidManifest
intent action.MESSAGING_EVENT - Flow: Handle notification taps in both
andonCreate
usingonNewIntent
. Pass data between activities viaPendingIntent
extras.Intent - Payload: Limit the notification payload to essential IDs. Perform background data fetching via WorkManager if more data is 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 be declared with
action.MESSAGING_EVENT