android-notify


Nameandroid-notify JSON
Version 1.60.2 PyPI version JSON
download
home_pageNone
SummaryA Python package that simplifies creating Android notifications in Kivy and Flet apps.
upload_time2025-10-26 11:45:40
maintainerNone
docs_urlNone
authorNone
requires_python>=3.6
licenseNone
keywords android notifications kivy mobile post-notifications pyjnius android-notifications kivy-notifications python-android mobile-development push-notifications mobile-app kivy-application
VCS
bugtrack_url
requirements pyjnius setuptools twine
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <div align="center">
    <br>
    <h1> Android-Notify </h1>
    <p><a href='https://android-notify.vercel.app'>Android Notify</a> is a Python library for effortlessly creating and managing Android notifications in Kivy and Flet apps.</p>
    <p>Supports various styles and ensures seamless integration, customization and Pythonic APIs.</p>
    <!-- <br> -->
    <!-- <img src="https://raw.githubusercontent.com/Fector101/android_notify/main/docs/imgs/democollage.jpg"> -->
</div>
<!-- Channel [CRUD]
The Android Notify package provides a simple yet comprehensive way to create and manage rich notifications on Android devices directly from your Python code. This library bridges the gap between Python and Android's notification system, giving you full control over notifications with a clean, Pythonic API. -->

## Features

- **Multiple Notification Styles**: Support for various notification styles including:
  - Simple text notifications
  - [Progress bar notifications](https://android-notify.vercel.app/components#progress-bars) (determinate and indeterminate)
  - Large icon notifications
  - Big picture notifications
  - Combined image styles
  - Custom notification Icon - [images section](https://android-notify.vercel.app/components#images)
  - Big text notifications
  - Inbox-style notifications
  - Colored texts and Icons

- **Rich Functionality**:
  - Add action buttons with custom callbacks
  - [Update notification](https://android-notify.vercel.app/advanced-methods#updating-notification) content dynamically
  - Manage progress bars with fine-grained control
  - [Custom notification channels](https://android-notify.vercel.app/advanced-methods#channel-management) for Android 8.0+ (Creating and Deleting)
  - Silent notifications
  - Persistent notifications
  - Click handlers and callbacks
  - Cancel Notifications

## Quick Start

```python
from android_notify import Notification

# Simple notification
Notification(
    title="Hello",
    message="This is a basic notification."
).send()

```

**Sample Image:**  
![basic notification img sample](https://raw.githubusercontent.com/Fector101/android_notify/main/docs/imgs/basicnoti.jpg)

## Installation

### Kivy apps:  

In your **`buildozer.spec`** file, ensure you include the following:

```ini
# Add pyjnius so ensure it's packaged with the build
requirements = python3, kivy, pyjnius, android-notify
# Add permission for notifications
android.permissions = POST_NOTIFICATIONS

# Required dependencies (write exactly as shown, no quotation marks)
android.gradle_dependencies = androidx.core:core:1.6.0, androidx.core:core-ktx:1.15.0
android.enable_androidx = True
android.api = 35
```

### Flet apps:  

1/3) In your `pyproject.toml` file, ensure you include the following:

```toml
[tool.flet.android]
dependencies = [
  "pyjnius","android-notify"
]

[tool.flet.android.permission]
"android.permission.POST_NOTIFICATIONS" = true
```
2/3) At Path `<project-root>/build/flutter/android/app/build.gradle` add the following lines at the end of the file:

Change from this: `dependencies{}`  
To this:
```gradle
dependencies {
    implementation 'androidx.core:core:1.6.0'
    implementation 'androidx.core:core-ktx:1.15.0'
}
```
3/3) At Path `<project-root>/build/flutter/android/app/proguard-rules.pro` add the following lines at the end of the file:

Change from this:
```proguard
-keep class com.flet.serious_python_android.** { *; }
-keepnames class * { *; }
```
To this:
```proguard
-keep class com.flet.serious_python_android.** { *; }
-keepnames class * { *; }

# Keep any AndroidX Core class with 'Notification' in its name
-keep class androidx.core.**Notification** { *; }
-keep class androidx.core.**Notification**$* { *; }

# Used to request access to Notification
-keep class androidx.core.app.ActivityCompat { *; }
```
> [!NOTE]  
> If you change these values `dependencies, name, bundle_id, product, company` in your `pyproject.toml` file, make sure to go through the above steps again to ensure the changes are reflected in the build files.
[complete flet example](https://github.com/Fector101/android_notify/tree/main/docs/examples/flet-working)

Can be installed via `pip` For testing purposes:

```bash
pip install android_notify
android-notify -v
```

## Documentation
For Dev Version use
```requirements = python3, kivy, pyjnius, https://github.com/Fector101/android_notify/archive/main.zip```


To use colored text in your notifications:
- Copy the [res](https://github.com/Fector101/android_notify/tree/main/android_notify/res) folder to your app path.  
Lastly in your `buildozer.spec` file
- Add `source.include_exts = xml` and `android.add_resources = ./res`

For full documentation, examples, and advanced usage, API reference visit the
[documentation](https://android-notify.vercel.app)

## ☕ Support the Project

If you find this project helpful, consider buying me a coffee! 😊 Or Giving it a star on 🌟 [GitHub](https://github.com/Fector101/android_notify/) Your support helps maintain and improve the project.

<a href="https://www.buymeacoffee.com/fector101" target="_blank">
  <img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" alt="Buy Me A Coffee" height="60">
</a>

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "android-notify",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": null,
    "keywords": "android, notifications, kivy, mobile, post-notifications, pyjnius, android-notifications, kivy-notifications, python-android, mobile-development, push-notifications, mobile-app, kivy-application",
    "author": null,
    "author_email": "Fabian <fector101@yahoo.com>",
    "download_url": "https://files.pythonhosted.org/packages/fd/7d/7740b7c72e5d25616afd03ffc317f8e481dd2084391cc7c31b941dc59539/android_notify-1.60.2.tar.gz",
    "platform": null,
    "description": "<div align=\"center\">\r\n    <br>\r\n    <h1> Android-Notify </h1>\r\n    <p><a href='https://android-notify.vercel.app'>Android Notify</a> is a Python library for effortlessly creating and managing Android notifications in Kivy and Flet apps.</p>\r\n    <p>Supports various styles and ensures seamless integration, customization and Pythonic APIs.</p>\r\n    <!-- <br> -->\r\n    <!-- <img src=\"https://raw.githubusercontent.com/Fector101/android_notify/main/docs/imgs/democollage.jpg\"> -->\r\n</div>\r\n<!-- Channel [CRUD]\r\nThe Android Notify package provides a simple yet comprehensive way to create and manage rich notifications on Android devices directly from your Python code. This library bridges the gap between Python and Android's notification system, giving you full control over notifications with a clean, Pythonic API. -->\r\n\r\n## Features\r\n\r\n- **Multiple Notification Styles**: Support for various notification styles including:\r\n  - Simple text notifications\r\n  - [Progress bar notifications](https://android-notify.vercel.app/components#progress-bars) (determinate and indeterminate)\r\n  - Large icon notifications\r\n  - Big picture notifications\r\n  - Combined image styles\r\n  - Custom notification Icon - [images section](https://android-notify.vercel.app/components#images)\r\n  - Big text notifications\r\n  - Inbox-style notifications\r\n  - Colored texts and Icons\r\n\r\n- **Rich Functionality**:\r\n  - Add action buttons with custom callbacks\r\n  - [Update notification](https://android-notify.vercel.app/advanced-methods#updating-notification) content dynamically\r\n  - Manage progress bars with fine-grained control\r\n  - [Custom notification channels](https://android-notify.vercel.app/advanced-methods#channel-management) for Android 8.0+ (Creating and Deleting)\r\n  - Silent notifications\r\n  - Persistent notifications\r\n  - Click handlers and callbacks\r\n  - Cancel Notifications\r\n\r\n## Quick Start\r\n\r\n```python\r\nfrom android_notify import Notification\r\n\r\n# Simple notification\r\nNotification(\r\n    title=\"Hello\",\r\n    message=\"This is a basic notification.\"\r\n).send()\r\n\r\n```\r\n\r\n**Sample Image:**  \r\n![basic notification img sample](https://raw.githubusercontent.com/Fector101/android_notify/main/docs/imgs/basicnoti.jpg)\r\n\r\n## Installation\r\n\r\n### Kivy apps:  \r\n\r\nIn your **`buildozer.spec`** file, ensure you include the following:\r\n\r\n```ini\r\n# Add pyjnius so ensure it's packaged with the build\r\nrequirements = python3, kivy, pyjnius, android-notify\r\n# Add permission for notifications\r\nandroid.permissions = POST_NOTIFICATIONS\r\n\r\n# Required dependencies (write exactly as shown, no quotation marks)\r\nandroid.gradle_dependencies = androidx.core:core:1.6.0, androidx.core:core-ktx:1.15.0\r\nandroid.enable_androidx = True\r\nandroid.api = 35\r\n```\r\n\r\n### Flet apps:  \r\n\r\n1/3) In your `pyproject.toml` file, ensure you include the following:\r\n\r\n```toml\r\n[tool.flet.android]\r\ndependencies = [\r\n  \"pyjnius\",\"android-notify\"\r\n]\r\n\r\n[tool.flet.android.permission]\r\n\"android.permission.POST_NOTIFICATIONS\" = true\r\n```\r\n2/3) At Path `<project-root>/build/flutter/android/app/build.gradle` add the following lines at the end of the file:\r\n\r\nChange from this: `dependencies{}`  \r\nTo this:\r\n```gradle\r\ndependencies {\r\n    implementation 'androidx.core:core:1.6.0'\r\n    implementation 'androidx.core:core-ktx:1.15.0'\r\n}\r\n```\r\n3/3) At Path `<project-root>/build/flutter/android/app/proguard-rules.pro` add the following lines at the end of the file:\r\n\r\nChange from this:\r\n```proguard\r\n-keep class com.flet.serious_python_android.** { *; }\r\n-keepnames class * { *; }\r\n```\r\nTo this:\r\n```proguard\r\n-keep class com.flet.serious_python_android.** { *; }\r\n-keepnames class * { *; }\r\n\r\n# Keep any AndroidX Core class with 'Notification' in its name\r\n-keep class androidx.core.**Notification** { *; }\r\n-keep class androidx.core.**Notification**$* { *; }\r\n\r\n# Used to request access to Notification\r\n-keep class androidx.core.app.ActivityCompat { *; }\r\n```\r\n> [!NOTE]  \r\n> If you change these values `dependencies, name, bundle_id, product, company` in your `pyproject.toml` file, make sure to go through the above steps again to ensure the changes are reflected in the build files.\r\n[complete flet example](https://github.com/Fector101/android_notify/tree/main/docs/examples/flet-working)\r\n\r\nCan be installed via `pip` For testing purposes:\r\n\r\n```bash\r\npip install android_notify\r\nandroid-notify -v\r\n```\r\n\r\n## Documentation\r\nFor Dev Version use\r\n```requirements = python3, kivy, pyjnius, https://github.com/Fector101/android_notify/archive/main.zip```\r\n\r\n\r\nTo use colored text in your notifications:\r\n- Copy the [res](https://github.com/Fector101/android_notify/tree/main/android_notify/res) folder to your app path.  \r\nLastly in your `buildozer.spec` file\r\n- Add `source.include_exts = xml` and `android.add_resources = ./res`\r\n\r\nFor full documentation, examples, and advanced usage, API reference visit the\r\n[documentation](https://android-notify.vercel.app)\r\n\r\n## \u2615 Support the Project\r\n\r\nIf you find this project helpful, consider buying me a coffee! \ud83d\ude0a Or Giving it a star on \ud83c\udf1f [GitHub](https://github.com/Fector101/android_notify/) Your support helps maintain and improve the project.\r\n\r\n<a href=\"https://www.buymeacoffee.com/fector101\" target=\"_blank\">\r\n  <img src=\"https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png\" alt=\"Buy Me A Coffee\" height=\"60\">\r\n</a>\r\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A Python package that simplifies creating Android notifications in Kivy and Flet apps.",
    "version": "1.60.2",
    "project_urls": {
        "Documentation": "https://android-notify.vercel.app/",
        "Funding": "https://www.buymeacoffee.com/fector101",
        "Homepage": "https://android-notify.vercel.app",
        "Source": "https://github.com/fector101/android_notify",
        "Tracker": "https://github.com/fector101/android_notify/issues"
    },
    "split_keywords": [
        "android",
        " notifications",
        " kivy",
        " mobile",
        " post-notifications",
        " pyjnius",
        " android-notifications",
        " kivy-notifications",
        " python-android",
        " mobile-development",
        " push-notifications",
        " mobile-app",
        " kivy-application"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "68fe90af62e0d3734e4154cf770dc5c887481382004dff6648858d2e465d9f89",
                "md5": "30a40342e11ba2f04dfb195cca00892c",
                "sha256": "d915ce2950cd8712f1c7e57cf79aa55b16ffa34d99258a1b6bfeabfb5826aa57"
            },
            "downloads": -1,
            "filename": "android_notify-1.60.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "30a40342e11ba2f04dfb195cca00892c",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 5033185,
            "upload_time": "2025-10-26T11:45:35",
            "upload_time_iso_8601": "2025-10-26T11:45:35.956459Z",
            "url": "https://files.pythonhosted.org/packages/68/fe/90af62e0d3734e4154cf770dc5c887481382004dff6648858d2e465d9f89/android_notify-1.60.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "fd7d7740b7c72e5d25616afd03ffc317f8e481dd2084391cc7c31b941dc59539",
                "md5": "dd025316abc77e8f68f8d65c074ca6b9",
                "sha256": "ef26ee14bbccd4d1915fd77bdb9cf96d41b92a8f0836c37c96e7798315f233aa"
            },
            "downloads": -1,
            "filename": "android_notify-1.60.2.tar.gz",
            "has_sig": false,
            "md5_digest": "dd025316abc77e8f68f8d65c074ca6b9",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 4221529,
            "upload_time": "2025-10-26T11:45:40",
            "upload_time_iso_8601": "2025-10-26T11:45:40.431849Z",
            "url": "https://files.pythonhosted.org/packages/fd/7d/7740b7c72e5d25616afd03ffc317f8e481dd2084391cc7c31b941dc59539/android_notify-1.60.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-10-26 11:45:40",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "fector101",
    "github_project": "android_notify",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "pyjnius",
            "specs": []
        },
        {
            "name": "setuptools",
            "specs": []
        },
        {
            "name": "twine",
            "specs": []
        }
    ],
    "lcname": "android-notify"
}
        
Elapsed time: 2.85224s