android-notify 1.3__py3-none-any.whl → 1.60.6.dev0__py3-none-any.whl

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.

@@ -1,350 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: android-notify
3
- Version: 1.3
4
- Summary: A Python package that simpilfies creating Android Post notifications using PyJNIus in Kivy apps.
5
- Home-page: https://github.com/fector101/android-notify
6
- Author: Fabian
7
- Author-email: fector101@yahoo.com
8
- License: MIT
9
- Project-URL: Documentation, https://github.com/fector101/android-notify/
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
-
25
- # Android-Notifiy
26
-
27
- A Python library for effortlessly creating and managing Android notifications in Kivy android apps.
28
- Supports various styles and ensures seamless integration and customization.
29
-
30
- ## Features
31
-
32
- - Compatible with Android 8.0+.
33
- - Supports including images in notifications.
34
- - Support for multiple notification styles:
35
- - Progress
36
- - Big Picture
37
- - Inbox
38
- - Big Text
39
- - Large Icon
40
-
41
- This module automatically handles:
42
-
43
- - Permission requests for notifications
44
- - Customizable notification channels.
45
-
46
- ## Installation
47
-
48
- This package is available on PyPI and can be installed via pip:
49
-
50
- ```bash
51
- pip install android-notify
52
- ```
53
-
54
- ## **Dependencies**
55
-
56
- **Prerequisites:**
57
-
58
- - Kivy
59
-
60
- In your **`buildozer.spec`** file, ensure you include the following:
61
-
62
- ```ini
63
- # Add pyjnius so it's packaged with the build
64
- requirements = python3, kivy, pyjnius, android-notify
65
-
66
- # Add permission for notifications
67
- android.permissions = POST_NOTIFICATIONS
68
-
69
- # Required dependencies (write exactly as shown, no quotation marks)
70
- android.gradle_dependencies = androidx.core:core:1.6.0, androidx.core:core-ktx:1.15.0
71
- android.enable_androidx = True
72
- ```
73
-
74
- ---
75
-
76
- ## Basic Usage
77
-
78
- ```python
79
- from android_notify import Notification
80
-
81
- # Create a simple notification
82
- notification = Notification(
83
- title="Hello",
84
- message="This is a basic notification"
85
- )
86
- notification.send()
87
- ```
88
-
89
- **Sample Image:**
90
- ![basic notification img sample](https://raw.githubusercontent.com/Fector101/android_notify/main/docs/imgs/basicnoti.jpg)
91
-
92
- ## Notification Styles
93
-
94
- The library supports multiple notification styles:
95
-
96
- 1. `simple` - Basic notification with title and message
97
- 2. `progress` - Shows a progress bar
98
- 3. `big_text` - Expandable notification with long text
99
- 4. `inbox` - List-style notification
100
- 5. `big_picture` - Notification with a large image
101
- 6. `large_icon` - Notification with a custom icon
102
- 7. `both_imgs` - Combines big picture and large icon
103
- 8. `custom` - For custom notification styles
104
-
105
- ### Style Examples
106
-
107
- #### Notification with an Image (Big Picture Style)
108
-
109
- ```python
110
- # Image notification
111
- notification = Notification(
112
- title='Picture Alert!',
113
- message='This notification includes an image.',
114
- style="big_picture",
115
- big_picture_path="assets/imgs/photo.png"
116
- )
117
- ```
118
-
119
- **Sample Image:**
120
- ![big_picture img sample](https://raw.githubusercontent.com/Fector101/android_notify/main/docs/imgs/bigpicturenoti.jpg)
121
-
122
- #### Inbox Notification Style
123
-
124
- ```python
125
- # Send a notification with inbox style
126
- notification = Notification(
127
- title='Inbox Notification',
128
- message='Line 1\nLine 2\nLine 3',
129
- style='inbox'
130
- )
131
- ```
132
-
133
- **Sample Image:**
134
- ![Inbox Notification sample](https://raw.githubusercontent.com/Fector101/android_notify/main/docs/imgs/inboxnoti.jpg)
135
-
136
- #### Big text notification (Will Display as simple text if Device dosen't support)
137
-
138
- ```python
139
- notification = Notification(
140
- title="Article",
141
- message="Long article content...",
142
- style="big_text"
143
- )
144
- ```
145
-
146
- #### Progress bar notification
147
-
148
- ```python
149
- notification = Notification(
150
- title="Download",
151
- message="Downloading file...",
152
- style="progress",
153
- progress_max_value=100,
154
- progress_current_value=0
155
- )
156
-
157
- ```
158
-
159
- **Sample Image:**
160
- ![progress img sample](https://raw.githubusercontent.com/Fector101/android_notify/main/docs/imgs/progress.jpg)
161
-
162
- #### Notification with an Image (Large Icon Style)
163
-
164
- ```python
165
- notification = Notification(
166
- title="Completed download",
167
- message="profile.jpg",
168
- style="large_icon",
169
- large_icon_path="assets/imgs/profile.png"
170
- )
171
-
172
- ```
173
-
174
- **Sample Image:**
175
- ![large_icon img sample](https://raw.githubusercontent.com/Fector101/android_notify/main/docs/imgs/large_icon.jpg)
176
-
177
- ## Advanced Features
178
-
179
- ### Updating Notifications
180
-
181
- ```python
182
- notification = Notification(title="Initial Title")
183
- notification.send()
184
-
185
- # Update title
186
- notification.updateTitle("New Title")
187
-
188
- # Update message
189
- notification.updateMessage("New Message")
190
- ```
191
-
192
- ### Progress Bar Management
193
-
194
- ```python
195
- notification = Notification(
196
- title="Download Progress",
197
- style="progress"
198
- )
199
-
200
- # Update progress
201
- notification.updateProgressBar(50, "50% Complete")
202
-
203
- # Remove progress bar
204
- notification.removeProgressBar("Download Complete")
205
- ```
206
-
207
- ### Channel Management
208
-
209
- Notifications are organized into channels. You can customize the channel name and ID:
210
-
211
- - Custom Channel Name's Gives User ability to turn on/off specific
212
-
213
- ```python
214
- notification = Notification(
215
- title="Download finished",
216
- message="How to Catch a Fish.mp4",
217
- channel_name="Download Notifications", # Will create User-visible name "downloads"
218
- channel_id="custom_downloads" # Optional: specify custom channel ID
219
- )
220
- ```
221
-
222
- **Sample Image:**
223
- ![channels img sample](https://raw.githubusercontent.com/Fector101/android_notify/main/docs/imgs/channel_name.jpg)
224
-
225
- ### Silent Notifications
226
-
227
- To send a notification without sound or heads-up display:
228
-
229
- ```python
230
- notification = Notification(title="Silent Update")
231
- notification.send(silent=True)
232
- ```
233
-
234
- ### Assist
235
-
236
- - How to Copy image to app folder
237
-
238
- ```python
239
- import shutil,os # These modules come packaged with python
240
- from android.storage import app_storage_path # type: ignore -- This works only on android
241
-
242
- app_path = os.path.join(app_storage_path(),'app')
243
- image_path= "/storage/emulated/0/Download/profile.png"
244
-
245
- shutil.copy(image_path, os.path.join(app_path, "profile.png"))
246
- ```
247
-
248
- - Avoiding Human Error when using different notification styles
249
-
250
- ```python
251
- from android_notify import Notification, NotificationStyles
252
- notification = Notification(
253
- title="New Photo",
254
- message="Check out this image",
255
- style=NotificationStyles.BIG_PICTURE,
256
- big_picture_path="assets/imgs/photo.png"
257
- ).send()
258
- ```
259
-
260
- ## Development Mode
261
-
262
- When developing on non-Android platforms, the library provides debugging output:
263
-
264
- ```python
265
- # Enable logs (default is True when not on Android)
266
- Notification.logs = True
267
-
268
- # Create notification for testing
269
- notification = Notification(title="Test")
270
- notification.send()
271
- # Will print notification properties instead of sending
272
- ```
273
-
274
- ## Image Requirements
275
-
276
- - Images must be located within your app's asset folder
277
- - Supported paths are relative to your app's storage path
278
- - Example: `assets/imgs/icon.png`
279
-
280
- ## Error Handling
281
-
282
- The library validates arguments and provides helpful error messages:
283
-
284
- - Invalid style names will suggest the closest matching style
285
- - Invalid arguments will list all valid options
286
- - Missing image files will raise FileNotFoundError with the attempted path
287
-
288
- ## Limitations
289
-
290
- 1. Only works on Android devices
291
- 2. Images must be within the app's storage path
292
- 3. Channel names are limited to 40 characters
293
- 4. Channel IDs are limited to 50 characters
294
-
295
- ## Best Practices
296
-
297
- 1. Always handle permissions appropriately
298
- 2. Use meaningful channel names for organization
299
- 3. Keep progress bar updates reasonable (don't update too frequently)
300
- 4. Test notifications on different Android versions
301
- 5. Consider using silent notifications for frequent updates
302
-
303
- ## Debugging Tips
304
-
305
- 1. Enable logs during development: `Notification.logs = True`
306
- 2. Check channel creation with Android's notification settings
307
- 3. Verify image paths before sending notifications
308
- 4. Test different styles to ensure proper display
309
-
310
- Remember to check Android's notification documentation for best practices and guidelines regarding notification frequency and content.
311
-
312
- ## Contribution
313
-
314
- Feel free to open issues or submit pull requests for improvements!
315
-
316
- ## Reporting Issues
317
-
318
- Found a bug? Please open an issue on our [GitHub Issues](https://github.com/Fector101/android_notify/issues) page.
319
-
320
- ## Author
321
-
322
- - Fabian - <fector101@yahoo.com>
323
- - GitHub: [Android Notify Repo](https://github.com/Fector101/android_notify)
324
- - Twitter: [FabianDev_](https://twitter.com/intent/user?user_id=1246911115319263233)
325
-
326
- For feedback or contributions, feel free to reach out!
327
-
328
- ---
329
-
330
- ## ☕ Support the Project
331
-
332
- 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.
333
-
334
- <a href="https://www.buymeacoffee.com/fector101" target="_blank">
335
- <img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" alt="Buy Me A Coffee" height="60">
336
- </a>
337
-
338
- ---
339
-
340
- ## Acknowledgments
341
-
342
- - This Project was thoroughly Tested by the [Laner Project](https://github.com/Fector101/Laner/) - A application for Securely Transfering Files Wirelessly between your PC and Phone.
343
- - Thanks to the Kivy and Pyjnius communities.
344
-
345
- ---
346
-
347
- ## 🌐 **Links**
348
-
349
- - **PyPI:** [android-notify on PyPI](https://pypi.org/project/android-notify/)
350
- - **GitHub:** [Source Code Repository](https://github.com/Fector101/android_notify/)
@@ -1,9 +0,0 @@
1
- android_notify/__init__.py,sha256=dAcsj7M_KHBOira9AVk4LtFFXRHTYsn6tza4Oz7T1MM,107
2
- android_notify/__main__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
- android_notify/core.py,sha256=hHzBnVw25x_WpMHp_HPKCuHEL2mQ7IHC_I3EqQZylas,6081
4
- android_notify/styles.py,sha256=I2p31qStg9DaML9U4nXRvdpGzpppK6RS-qlDKuOv_Tk,328
5
- android_notify/sword.py,sha256=8v28Q9x3CRRa3xDbHUd8629S5KvLy7xnjSygbqT-coQ,16271
6
- android_notify-1.3.dist-info/METADATA,sha256=fA2YdjiuZKnEWirQdnzci1l4di-EXmphkdlp41I0FzU,9831
7
- android_notify-1.3.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
8
- android_notify-1.3.dist-info/top_level.txt,sha256=IR1ONMrRSRINZpWn2X0dL5gbWwWINsK7PW8Jy2p4fU8,15
9
- android_notify-1.3.dist-info/RECORD,,