{"id":27879189,"url":"https://github.com/androidbroadcast/android-notification-dsl","last_synced_at":"2025-05-05T03:19:12.812Z","repository":{"id":40632905,"uuid":"222215788","full_name":"androidbroadcast/Android-Notification-DSL","owner":"androidbroadcast","description":null,"archived":true,"fork":false,"pushed_at":"2022-01-18T16:21:36.000Z","size":917,"stargazers_count":162,"open_issues_count":1,"forks_count":4,"subscribers_count":9,"default_branch":"develop","last_synced_at":"2025-05-05T03:19:06.865Z","etag":null,"topics":["android","dsl","kotlin","notifications"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/androidbroadcast.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-11-17T08:00:24.000Z","updated_at":"2025-02-15T14:54:30.000Z","dependencies_parsed_at":"2022-09-26T21:41:02.093Z","dependency_job_id":null,"html_url":"https://github.com/androidbroadcast/Android-Notification-DSL","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/androidbroadcast%2FAndroid-Notification-DSL","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/androidbroadcast%2FAndroid-Notification-DSL/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/androidbroadcast%2FAndroid-Notification-DSL/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/androidbroadcast%2FAndroid-Notification-DSL/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/androidbroadcast","download_url":"https://codeload.github.com/androidbroadcast/Android-Notification-DSL/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252429963,"owners_count":21746577,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","dsl","kotlin","notifications"],"created_at":"2025-05-05T03:19:12.276Z","updated_at":"2025-05-05T03:19:12.803Z","avatar_url":"https://github.com/androidbroadcast.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Android Notification DSL (In Development)\n\nKotlin DSL for creating Android Notification using [NotificationCompat](https://developer.android.com/reference/androidx/core/app/NotificationCompat).\n\n```gradle\n// Core functionality\nimplementation 'com.github.kirich1409:android-notification-dsl-core:0.2.1'\n\n// Extentions to simoplify work\nimplementation 'com.github.kirich1409:android-notification-dsl-extensions:0.2.1'\n\n// Media Notification DSL\nimplementation 'com.github.kirich1409:android-notification-dsl-media:0.2.1'\n```\n\n## Sample\n\n### Simple Notification\n:\n```kotlin\nnotification(context, CHANNEL_ID, smallIcon = R.drawable.notification_icon) {\n    contentTitle(textTitle)\n    contentText(textContent)\n    priority(NotificationCompat.PRIORITY_DEFAULT)\n}\n```\n\n### Grouped Notification\n\nCreate grouped notifications\n\n```kotlin\nnotificationsGroup(context, groupKey = GROUP_KEY, channelId = CHANNEL) {\n    summary(SUMMARY_NOTIFICATION_ID, smallIcon = R.drawable.ic_android_white_24dp) {\n        contentTitle(R.string.notification_summary_title)\n        contentText(R.string.notification_summary_text)\n    }\n\n    notifications {\n        notification(NOTIFICATION_1_ID, smallIcon = R.drawable.ic_android_white_24dp) {\n            contentTitle(R.string.notification_1_title)\n        }\n\n        notification(NOTIFICATION_2_ID, smallIcon = R.drawable.ic_android_white_24dp) {\n            contentTitle(R.string.notification_2_title)\n        }\n    }\n}\n```\n\n### Notification Channels DSL\n\nCreating Android Notification Channels and Groups\n\n```kotlin\ncreateChannelsAndGroups(context) {\n    channel(CHANNEL_1_ID, CHANNEL_1_NAME)\n\n    group(CHANNEL_GROUP_1_ID, CHANNEL_GROUP_1_NAME) {\n        // Empty group\n    }\n\n    group(CHANNEL_GROUP_2_ID, CHANNEL_GROUP_2_NAME) {\n        channel(CHANNEL_2_ID, CHANNEL_2_NAME)\n    }\n}\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandroidbroadcast%2Fandroid-notification-dsl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandroidbroadcast%2Fandroid-notification-dsl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandroidbroadcast%2Fandroid-notification-dsl/lists"}