https://github.com/KhubaibKhan4/Alert-KMP
Alert-KMP is a Kotlin Multiplatform (KMP) library designed to facilitate native notification displays across Android, iOS, Web, and Desktop
https://github.com/KhubaibKhan4/Alert-KMP
composemultiplatform desktop-library ios-library kmp-library kotlin kotlin-library kotlin-multiplatform-library multiplatform-kotlin-library web-library
Last synced: 3 months ago
JSON representation
Alert-KMP is a Kotlin Multiplatform (KMP) library designed to facilitate native notification displays across Android, iOS, Web, and Desktop
- Host: GitHub
- URL: https://github.com/KhubaibKhan4/Alert-KMP
- Owner: KhubaibKhan4
- License: mit
- Created: 2024-07-04T07:31:34.000Z (10 months ago)
- Default Branch: master
- Last Pushed: 2024-12-15T16:30:58.000Z (4 months ago)
- Last Synced: 2025-01-24T15:07:43.823Z (3 months ago)
- Topics: composemultiplatform, desktop-library, ios-library, kmp-library, kotlin, kotlin-library, kotlin-multiplatform-library, multiplatform-kotlin-library, web-library
- Language: Kotlin
- Homepage:
- Size: 3.49 MB
- Stars: 71
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
- kmp-awesome - Alert-KMP - Local and Native Notifications Library (Libraries / 📱 Device)
README
# Alert-KMP
[](https://search.maven.org/artifact/io.github.khubaibkhan4/alert-kmp)








![]()
[](https://github.com/KhubaibKhan4/Alert-KMP/actions/workflows/android.yml)## Overview
Alert-KMP is a Kotlin Multiplatform (KMP) library designed to facilitate native notification displays across Android, iOS, Web, and Desktop platforms using JetBrains Compose Multiplatform. It provides a unified API for triggering notifications that seamlessly integrates into Kotlin's multiplatform ecosystem.
## Features
- **Platform Agnostic:** Supports Android, iOS, Web, and Desktop platforms through Kotlin Multiplatform.
- **Compose Multiplatform Integration:** Seamlessly integrates with JetBrains Compose Multiplatform UI framework.
- **Customizable Notifications:** Easily customize notification content, icons, actions, and behaviors to suit application needs.
- **Event Handling:** Provides callbacks and event listeners for notification actions and dismissal.
- **Local Notifications Support**## Plans
- **FCM Implementation**
- **Schedule Native Notifications**## Installation
You can include Alert-KMP in your project by adding the following dependency:
### Compose Multiplatform Setup
**Version Catalog**
```toml
[versions]
alertKmp = "2.0.0"[libraries]
alert-kmp = { module = "io.github.khubaibkhan4:alert-kmp", version.ref = "alertKmp" }
``````groovy
implementation("io.github.khubaibkhan4:alert-kmp:2.0.0")
```### Platform Specific
```
**alert-kmp-jvm**
implementation("io.github.khubaibkhan4:alert-kmp-jvm:2.0.0")**alert-kmp-android**
implementation("io.github.khubaibkhan4:alert-kmp-android:2.0.0")**alert-kmp-js**
implementation("io.github.khubaibkhan4:alert-kmp-js:2.0.0")**alert-kmp-wasm-js**
implementation("io.github.khubaibkhan4:alert-kmp-wasm-js:2.0.0")```
## Usage
```groovy
import io.github.khubaibkhan4.alert.Notification
import io.github.khubaibkhan4.alert.NotificationType
import io.github.khubaibkhan4.alert.createNotificationfun main() {
val notification = createNotification(NotificationType.TOAST)
notification.show("Hello, World!")OR
Notify(message= "Hellow World!", duration=NotificationDuration.SHORT)
}
```
## Notification Types
The library supports multiple notification types:- **NotificationType.TOAST** - Displays a toast message.
- **NotificationType.ALERT** - Displays an alert dialog.
- **NotificationType.TOP** - Displays a notification at the top of the screen.
- **NotificationType.CUSTOM** - Displays a custom notification (implementations vary by platform).## Future Plan's
- System Level Notificationa.## 🤝 Connect with Me
Let's chat about potential projects, job opportunities, or any other collaboration! Feel free to connect with me through the following channels:
[](https://www.linkedin.com/in/khubaibkhandev)
[](https://twitter.com/codespacepro)
[](mailto:[email protected])## 💰 You can help me by Donating
[](https://buymeacoffee.com/khubaibkhan) [](https://paypal.me/18.bscs) [](https://patreon.com/MuhammadKhubaibImtiaz) [](https://ko-fi.com/muhammadkhubaibimtiaz)## Screenshots
||

## Web Toast

## Web Top Toast

## Web Custom

## Desktop
## iOS Alerts
https://github.com/user-attachments/assets/484e976a-0b8d-47fa-84d6-53b3d4733aaa
https://github.com/user-attachments/assets/bd642ecb-55e1-4441-b3fe-a44eb6b84c2d## Demo
https://github.com/KhubaibKhan4/Alert-KMP/assets/98816544/f554204b-d484-49a3-b409-caa7e95c5d04
## Star History
**Stargazers**
[](https://github.com/KhubaibKhan4/Alert-KMP/stargazers)
**Forkers**
[](https://github.com/KhubaibKhan4/Alert-KMP/network/members)
## Contribution Guidelines
We welcome contributions to the Alert-KMP Library Project! To contribute, please follow these guidelines:- **Reporting Bugs**: If you encounter a bug, please open an issue and provide detailed information about the bug, including steps to reproduce it.
- **Suggesting Features**: We encourage you to suggest new features or improvements by opening an issue and describing your idea.
- **Submitting Pull Requests**: If you'd like to contribute code, please fork the repository, create a new branch for your changes, and submit a pull request with a clear description of the changes.## Code of Conduct
We expect all contributors and users of the Alert-KMP Library Project to adhere to our code of conduct. Please review the [Code of Conduct](CODE_OF_CONDUCT.md) for details on expected behavior and reporting procedures.