android-notify 1.58__tar.gz → 1.59.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of android-notify might be problematic. Click here for more details.

@@ -0,0 +1,119 @@
1
+ Metadata-Version: 2.4
2
+ Name: android-notify
3
+ Version: 1.59.1
4
+ Summary: A Python package that simplifies creating Android notifications in Kivy apps.
5
+ Home-page: https://android-notify.vercel.app
6
+ Author: Fabian
7
+ Author-email: fector101@yahoo.com
8
+ License: MIT
9
+ Project-URL: Documentation, https://android-notify.vercel.app/
10
+ Project-URL: Source, https://github.com/fector101/android-notify
11
+ Project-URL: Tracker, https://github.com/fector101/android-notify/issues
12
+ Project-URL: Funding, https://www.buymeacoffee.com/fector101
13
+ Keywords: android,notifications,kivy,mobile,post-notifications,pyjnius,android-notifications,kivy-notifications,python-android,mobile-development,push-notifications,mobile-app,kivy-application
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: License :: OSI Approved :: MIT License
16
+ Classifier: Operating System :: Android
17
+ Classifier: Development Status :: 5 - Production/Stable
18
+ Classifier: Intended Audience :: Developers
19
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
20
+ Requires-Python: >=3.6
21
+ Description-Content-Type: text/markdown
22
+ Requires-Dist: kivy>=2.0.0
23
+ Requires-Dist: pyjnius>=1.4.2
24
+ Dynamic: author
25
+ Dynamic: author-email
26
+ Dynamic: classifier
27
+ Dynamic: description
28
+ Dynamic: description-content-type
29
+ Dynamic: home-page
30
+ Dynamic: keywords
31
+ Dynamic: license
32
+ Dynamic: project-url
33
+ Dynamic: requires-dist
34
+ Dynamic: requires-python
35
+ Dynamic: summary
36
+
37
+ <div align="center">
38
+ <br>
39
+ <h1> Android-Notify </h1>
40
+ <p><a href='https://android-notify.vercel.app'>Android Notify</a> is a Python library for effortlessly creating and managing Android notifications in Kivy apps.</p>
41
+ <p>Supports various styles and ensures seamless integration, customization and Pythonic APIs.</p>
42
+ <!-- <br> -->
43
+ <!-- <img src="https://raw.githubusercontent.com/Fector101/android_notify/main/docs/imgs/democollage.jpg"> -->
44
+ </div>
45
+ <!-- Channel [CRUD]
46
+ 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. -->
47
+
48
+ ## Features
49
+
50
+ - **Multiple Notification Styles**: Support for various notification styles including:
51
+ - Simple text notifications
52
+ - Progress bar notifications (determinate and indeterminate)
53
+ - Big text notifications
54
+ - Inbox-style notifications
55
+ - Large icon notifications
56
+ - Big picture notifications
57
+ - Combined image styles
58
+
59
+ - **Rich Functionality**:
60
+ - Add action buttons with custom callbacks
61
+ - Update notification content dynamically
62
+ - Manage progress bars with fine-grained control
63
+ - Custom notification Icon
64
+ - Custom notification channels for Android 8.0+ (Creating and Deleting)
65
+ - Silent notifications
66
+ - Persistent notifications
67
+ - Click handlers and callbacks
68
+ - Cancel Notifications
69
+
70
+ ## Quick Start
71
+
72
+ ```python
73
+ from android_notify import Notification
74
+
75
+ # Simple notification
76
+ Notification(
77
+ title="Hello",
78
+ message="This is a basic notification."
79
+ ).send()
80
+
81
+ ```
82
+
83
+ **Sample Image:**
84
+ ![basic notification img sample](https://raw.githubusercontent.com/Fector101/android_notify/main/docs/imgs/basicnoti.jpg)
85
+
86
+ ## Installation
87
+
88
+ In your **`buildozer.spec`** file, ensure you include the following:
89
+
90
+ ```ini
91
+ # Add pyjnius so ensure it's packaged with the build
92
+ requirements = python3, kivy, pyjnius, android-notify
93
+ # Add permission for notifications
94
+ android.permissions = POST_NOTIFICATIONS
95
+
96
+ # Required dependencies (write exactly as shown, no quotation marks)
97
+ android.gradle_dependencies = androidx.core:core:1.6.0, androidx.core:core-ktx:1.15.0
98
+ android.enable_androidx = True
99
+ android.api = 35
100
+ ```
101
+
102
+ Can be installed via `pip` For testing purposes:
103
+
104
+ ```bash
105
+ pip install android_notify
106
+ ```
107
+
108
+ ## Documentation
109
+
110
+ For full documentation, examples, and advanced usage, API reference visit the
111
+ [documentation](https://android-notify.vercel.app)
112
+
113
+ ## ☕ Support the Project
114
+
115
+ 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.
116
+
117
+ <a href="https://www.buymeacoffee.com/fector101" target="_blank">
118
+ <img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" alt="Buy Me A Coffee" height="60">
119
+ </a>
@@ -0,0 +1,83 @@
1
+ <div align="center">
2
+ <br>
3
+ <h1> Android-Notify </h1>
4
+ <p><a href='https://android-notify.vercel.app'>Android Notify</a> is a Python library for effortlessly creating and managing Android notifications in Kivy apps.</p>
5
+ <p>Supports various styles and ensures seamless integration, customization and Pythonic APIs.</p>
6
+ <!-- <br> -->
7
+ <!-- <img src="https://raw.githubusercontent.com/Fector101/android_notify/main/docs/imgs/democollage.jpg"> -->
8
+ </div>
9
+ <!-- Channel [CRUD]
10
+ 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. -->
11
+
12
+ ## Features
13
+
14
+ - **Multiple Notification Styles**: Support for various notification styles including:
15
+ - Simple text notifications
16
+ - Progress bar notifications (determinate and indeterminate)
17
+ - Big text notifications
18
+ - Inbox-style notifications
19
+ - Large icon notifications
20
+ - Big picture notifications
21
+ - Combined image styles
22
+
23
+ - **Rich Functionality**:
24
+ - Add action buttons with custom callbacks
25
+ - Update notification content dynamically
26
+ - Manage progress bars with fine-grained control
27
+ - Custom notification Icon
28
+ - Custom notification channels for Android 8.0+ (Creating and Deleting)
29
+ - Silent notifications
30
+ - Persistent notifications
31
+ - Click handlers and callbacks
32
+ - Cancel Notifications
33
+
34
+ ## Quick Start
35
+
36
+ ```python
37
+ from android_notify import Notification
38
+
39
+ # Simple notification
40
+ Notification(
41
+ title="Hello",
42
+ message="This is a basic notification."
43
+ ).send()
44
+
45
+ ```
46
+
47
+ **Sample Image:**
48
+ ![basic notification img sample](https://raw.githubusercontent.com/Fector101/android_notify/main/docs/imgs/basicnoti.jpg)
49
+
50
+ ## Installation
51
+
52
+ In your **`buildozer.spec`** file, ensure you include the following:
53
+
54
+ ```ini
55
+ # Add pyjnius so ensure it's packaged with the build
56
+ requirements = python3, kivy, pyjnius, android-notify
57
+ # Add permission for notifications
58
+ android.permissions = POST_NOTIFICATIONS
59
+
60
+ # Required dependencies (write exactly as shown, no quotation marks)
61
+ android.gradle_dependencies = androidx.core:core:1.6.0, androidx.core:core-ktx:1.15.0
62
+ android.enable_androidx = True
63
+ android.api = 35
64
+ ```
65
+
66
+ Can be installed via `pip` For testing purposes:
67
+
68
+ ```bash
69
+ pip install android_notify
70
+ ```
71
+
72
+ ## Documentation
73
+
74
+ For full documentation, examples, and advanced usage, API reference visit the
75
+ [documentation](https://android-notify.vercel.app)
76
+
77
+ ## ☕ Support the Project
78
+
79
+ 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.
80
+
81
+ <a href="https://www.buymeacoffee.com/fector101" target="_blank">
82
+ <img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" alt="Buy Me A Coffee" height="60">
83
+ </a>
@@ -1,3 +1,19 @@
1
+ """For autocomplete Storing Reference to Available Methods"""
2
+ from typing import Literal
3
+ Importance = Literal['urgent','high','medium','low','none']
4
+ """
5
+ :argument urgent - Makes a sound and appears as a heads-up notification.
6
+
7
+ :argument high - Makes a sound.
8
+
9
+ :argument urgent - Makes no sound.
10
+
11
+ :argument urgent - Makes no sound and doesn't appear in the status bar.
12
+
13
+ :argument urgent - Makes no sound and doesn't in the status bar or shade.
14
+ """
15
+
16
+ # Idea for typing autocompletion and reference
1
17
  # class Bundle:
2
18
  # pass
3
19
  # class PythonActivity:
@@ -69,4 +85,7 @@
69
85
  # class NotificationCompatBigPictureStyle:
70
86
  # pass
71
87
  # class NotificationCompatInboxStyle:
72
- # pass
88
+ # pass
89
+
90
+ #Now writing Knowledge from errors
91
+ # notify.(int, Builder.build()) # must be int
@@ -0,0 +1,10 @@
1
+ """Collection of useful functions"""
2
+
3
+ import inspect
4
+ def can_accept_arguments(func, *args, **kwargs):
5
+ try:
6
+ sig = inspect.signature(func)
7
+ sig.bind(*args, **kwargs)
8
+ return True
9
+ except TypeError:
10
+ return False
@@ -1,11 +1,11 @@
1
- """Assists Notification Class with Args keeps sub class cleaner"""
1
+ """Assists Notification Class with Args keeps subclass cleaner"""
2
2
  from dataclasses import dataclass, fields
3
3
  import difflib
4
4
  from .styles import NotificationStyles
5
5
 
6
6
  @dataclass
7
7
  class BaseNotification:
8
- """Encapsulator"""
8
+ """Encapsulation"""
9
9
 
10
10
  # Basic options
11
11
  title: str = ''
@@ -20,18 +20,24 @@ class BaseNotification:
20
20
  body: str = ''
21
21
 
22
22
  # Notification Functions
23
- identifer: str = ''
23
+ name: str = ''
24
24
  callback: object = None
25
25
 
26
26
  # Advanced Options
27
+ id: int = 0
27
28
  app_icon: str = 'Defaults to package app icon'
29
+
28
30
  channel_name: str = 'Default Channel'
31
+ """User visible channel name"""
29
32
  channel_id: str = 'default_channel'
33
+ """Used to reference notification channel"""
34
+
30
35
  silent: bool = False
31
36
  logs: bool = False
32
37
 
33
38
  def __init__(self, **kwargs):
34
39
  """Custom init to handle validation before dataclass assigns values"""
40
+
35
41
  # Validate provided arguments
36
42
  self.validate_args(kwargs)
37
43
 
@@ -80,3 +86,4 @@ class BaseNotification:
80
86
  raise ValueError(
81
87
  f"Invalid style '{inputted_style}'. Allowed styles: {allowed_styles}"
82
88
  )
89
+
@@ -0,0 +1,22 @@
1
+ """Contains Safe way to call Styles"""
2
+
3
+ class NotificationStyles:
4
+ """ Safely Adding Styles"""
5
+ DEFAULT = "simple"
6
+
7
+ PROGRESS = "progress"
8
+ INBOX = "inbox"
9
+
10
+ # v1.59+
11
+ # Deprecated
12
+ # setBigText == Notification(...,big_picture_path="...",style=NotificationStyles.BIG_TEXT)
13
+ # setLargeIcon == Notification(...,large_icon_path="...",style=NotificationStyles.LARGE_ICON)
14
+ # setBigPicture == Notification(...,body="...",style=NotificationStyles.BIG_PICTURE)
15
+ # Use .refresh to apply any new changes after .send
16
+ BIG_TEXT = "big_text"
17
+ LARGE_ICON = "large_icon"
18
+ BIG_PICTURE = "big_picture"
19
+ BOTH_IMGS = "both_imgs"
20
+
21
+ # MESSAGING = "messaging" # TODO
22
+ # CUSTOM = "custom" # TODO