android-notify 1.52.5__tar.gz → 1.53__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.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: android-notify
3
- Version: 1.52.5
3
+ Version: 1.53
4
4
  Summary: A Python package that simpilfies creating Android notifications in Kivy apps.
5
5
  Home-page: https://github.com/fector101/android-notify
6
6
  Author: Fabian
@@ -49,6 +49,7 @@ Dynamic: summary
49
49
  - Supports including images in notifications.
50
50
  - All Notifications can take Functions (version 1.50+) [functions section](#functions).
51
51
  - Advanced Notification Handling [section](#advanced-features).
52
+ - Changing default app notification icon with PNG,
52
53
  - Support for multiple notification styles:
53
54
  - [Simple](#basic-usage)
54
55
  - [Progress](#progress-bar-notification)
@@ -58,10 +59,13 @@ Dynamic: summary
58
59
  - [Buttons](#notification-with-buttons)
59
60
  - [Big Text](#big-text-notification)
60
61
 
62
+ - persistenting notification [section](#methods)
63
+
61
64
  This module automatically handles:
62
65
 
63
66
  - Permission requests for notifications
64
67
  - Customizable notification channels.
68
+ - Opening app on notification click
65
69
 
66
70
  ## Installation
67
71
 
@@ -128,6 +132,7 @@ The library supports multiple notification styles:
128
132
  #### Progress Bar notification
129
133
 
130
134
  ```python
135
+ from kivy.clock import Clock
131
136
 
132
137
  progress = 0
133
138
 
@@ -207,6 +212,8 @@ notification.send()
207
212
 
208
213
  #### Notification with Buttons
209
214
 
215
+ Here's a sample of how to add buttons below, To Remove Buttons Simply Call the `removeButtons` method on the Notification Instance
216
+
210
217
  ```python
211
218
  notification = Notification(title="Jane Dough", message="How to use android-notify #coding #purepython")
212
219
  def playVideo():
@@ -271,7 +278,8 @@ notification.send()
271
278
  notification.updateProgressBar(30, "30% downloaded")
272
279
 
273
280
  # Remove progress bar
274
- notification.removeProgressBar("Download Complete")
281
+ # show_on_update to notification briefly after removed progressbar
282
+ notification.removeProgressBar("Download Complete",show_on_update=True)
275
283
  ```
276
284
 
277
285
  ### Adding Style even when already sent
@@ -395,6 +403,63 @@ notification.send()
395
403
  # Will print notification properties instead of sending
396
404
  ```
397
405
 
406
+ ### Methods
407
+
408
+ ### Instance.**init**
409
+
410
+ args
411
+
412
+ - app_icon: To Change Default app icon use PNG Or Image Will display as a Black Box
413
+
414
+ ### Instance.send
415
+
416
+ args
417
+
418
+ - persistent : To make notification stay after user clicks clear All
419
+ - close_on_click : To close notification on click
420
+
421
+ ### Instance.addButton
422
+
423
+ args
424
+
425
+ - text : Button Text
426
+
427
+ ### Instance.updateTitle
428
+
429
+ args
430
+
431
+ - new_title : String to be set as New notification Title
432
+
433
+ ### Instance.updateMessage
434
+
435
+ args
436
+
437
+ - new_message : String to be set as New notification Message
438
+
439
+ ### Instance.updateProgressBar
440
+
441
+ args
442
+
443
+ - current_value (str): the value from progressbar current progress
444
+ - message (str,optional): defaults to last message
445
+
446
+ ### Instance.removeProgressBar
447
+
448
+ This Removes Progress bar
449
+
450
+ args
451
+
452
+ - message (str, optional): notification message, Defaults to 'last message'.
453
+ - show_on_update (bool, optional): To show notification brifely when progressbar removed. Defaults to True.
454
+
455
+ ### Instance.addNotificationStyle
456
+
457
+ This is useful to add style after Notification is sent or Add more styles to Notification
458
+ args
459
+
460
+ - style: choosen style. All options are in the `NotificationStyles` class `['simple','progress','inbox','big_text','large_icon','big_picture','both_imgs]`
461
+ - already_sent: specfiy if notification.send() method has already been called, it defaults to false
462
+
398
463
  ## Image Requirements
399
464
 
400
465
  - Online Images should start with `http://` or `https://`
@@ -13,6 +13,7 @@
13
13
  - Supports including images in notifications.
14
14
  - All Notifications can take Functions (version 1.50+) [functions section](#functions).
15
15
  - Advanced Notification Handling [section](#advanced-features).
16
+ - Changing default app notification icon with PNG,
16
17
  - Support for multiple notification styles:
17
18
  - [Simple](#basic-usage)
18
19
  - [Progress](#progress-bar-notification)
@@ -22,10 +23,13 @@
22
23
  - [Buttons](#notification-with-buttons)
23
24
  - [Big Text](#big-text-notification)
24
25
 
26
+ - persistenting notification [section](#methods)
27
+
25
28
  This module automatically handles:
26
29
 
27
30
  - Permission requests for notifications
28
31
  - Customizable notification channels.
32
+ - Opening app on notification click
29
33
 
30
34
  ## Installation
31
35
 
@@ -92,6 +96,7 @@ The library supports multiple notification styles:
92
96
  #### Progress Bar notification
93
97
 
94
98
  ```python
99
+ from kivy.clock import Clock
95
100
 
96
101
  progress = 0
97
102
 
@@ -171,6 +176,8 @@ notification.send()
171
176
 
172
177
  #### Notification with Buttons
173
178
 
179
+ Here's a sample of how to add buttons below, To Remove Buttons Simply Call the `removeButtons` method on the Notification Instance
180
+
174
181
  ```python
175
182
  notification = Notification(title="Jane Dough", message="How to use android-notify #coding #purepython")
176
183
  def playVideo():
@@ -235,7 +242,8 @@ notification.send()
235
242
  notification.updateProgressBar(30, "30% downloaded")
236
243
 
237
244
  # Remove progress bar
238
- notification.removeProgressBar("Download Complete")
245
+ # show_on_update to notification briefly after removed progressbar
246
+ notification.removeProgressBar("Download Complete",show_on_update=True)
239
247
  ```
240
248
 
241
249
  ### Adding Style even when already sent
@@ -359,6 +367,63 @@ notification.send()
359
367
  # Will print notification properties instead of sending
360
368
  ```
361
369
 
370
+ ### Methods
371
+
372
+ ### Instance.**init**
373
+
374
+ args
375
+
376
+ - app_icon: To Change Default app icon use PNG Or Image Will display as a Black Box
377
+
378
+ ### Instance.send
379
+
380
+ args
381
+
382
+ - persistent : To make notification stay after user clicks clear All
383
+ - close_on_click : To close notification on click
384
+
385
+ ### Instance.addButton
386
+
387
+ args
388
+
389
+ - text : Button Text
390
+
391
+ ### Instance.updateTitle
392
+
393
+ args
394
+
395
+ - new_title : String to be set as New notification Title
396
+
397
+ ### Instance.updateMessage
398
+
399
+ args
400
+
401
+ - new_message : String to be set as New notification Message
402
+
403
+ ### Instance.updateProgressBar
404
+
405
+ args
406
+
407
+ - current_value (str): the value from progressbar current progress
408
+ - message (str,optional): defaults to last message
409
+
410
+ ### Instance.removeProgressBar
411
+
412
+ This Removes Progress bar
413
+
414
+ args
415
+
416
+ - message (str, optional): notification message, Defaults to 'last message'.
417
+ - show_on_update (bool, optional): To show notification brifely when progressbar removed. Defaults to True.
418
+
419
+ ### Instance.addNotificationStyle
420
+
421
+ This is useful to add style after Notification is sent or Add more styles to Notification
422
+ args
423
+
424
+ - style: choosen style. All options are in the `NotificationStyles` class `['simple','progress','inbox','big_text','large_icon','big_picture','both_imgs]`
425
+ - already_sent: specfiy if notification.send() method has already been called, it defaults to false
426
+
362
427
  ## Image Requirements
363
428
 
364
429
  - Online Images should start with `http://` or `https://`
@@ -0,0 +1,28 @@
1
+ """Assists Notification Class with Args auto-complete: keeps sub class cleaner"""
2
+ from dataclasses import dataclass
3
+
4
+ @dataclass
5
+ class BaseNotification:
6
+ """Encapsulator"""
7
+
8
+ # Basic options
9
+ title: str = ''
10
+ message: str = ''
11
+ style: str = 'simple'
12
+
13
+ # Style specfic attributes
14
+ big_picture_path: str = ''
15
+ large_icon_path: str = ''
16
+ progress_max_value: int = 100
17
+ progress_current_value: int = 0
18
+ body: str = ''
19
+
20
+ # For Nofitication Functions
21
+ identifer: str = ''
22
+ callback: object = None
23
+
24
+ # Advance Options
25
+ channel_name: str = 'Default Channel'
26
+ channel_id: str = 'default_channel'
27
+ silent: bool = False
28
+ app_icon: str = 'Defaults to package app icon'
@@ -4,9 +4,8 @@ import traceback
4
4
  import os
5
5
  import threading
6
6
  import re
7
- import time
8
7
  from .styles import NotificationStyles
9
-
8
+ from .facade import BaseNotification
10
9
  DEV=0
11
10
  ON_ANDROID = False
12
11
 
@@ -28,6 +27,7 @@ try:
28
27
  BuildVersion = autoclass('android.os.Build$VERSION')
29
28
  NotificationManager = autoclass('android.app.NotificationManager')
30
29
  NotificationChannel = autoclass('android.app.NotificationChannel')
30
+ IconCompat = autoclass('androidx.core.graphics.drawable.IconCompat')
31
31
  ON_ANDROID = True
32
32
  except Exception as e:# pylint: disable=W0718
33
33
  MESSAGE='This Package Only Runs on Android !!! ---> Check "https://github.com/Fector101/android_notify/" to see design patterns and more info.' # pylint: disable=C0301
@@ -64,7 +64,7 @@ if ON_ANDROID:
64
64
  * android.permissions = POST_NOTIFICATIONS
65
65
  """)
66
66
 
67
- class Notification:
67
+ class Notification(BaseNotification):
68
68
  """
69
69
  Send a notification on Android.
70
70
 
@@ -104,43 +104,21 @@ class Notification:
104
104
  'style':'simple',
105
105
  'big_picture_path':'',
106
106
  'large_icon_path':'',
107
- 'progress_max_value': 0,
108
- 'progress_current_value': 0,
107
+ 'progress_max_value': 0.5,
108
+ 'progress_current_value': 0.5,
109
109
  'body':'',
110
110
  'channel_name':'Default Channel',
111
111
  'channel_id':'default_channel',
112
112
  'logs':True,
113
113
  "identifer": '',
114
- 'callback': None
114
+ 'callback': None,
115
+ 'app_icon': 'Defaults to package app icon'
115
116
  }
116
- # TODO specify types in a better way instead of using
117
- # if key not in non_string_keys: value = str(value) to fix
118
- #non_string_keys=['progress_max_value','progress_current_value','callback','logs']
119
- # TODO using default values to check types
120
117
 
121
118
  # During Development (When running on PC)
122
119
  logs=not ON_ANDROID
123
- def __init__(self,**kwargs):
120
+ def __init__(self,**kwargs): #pylint: disable=W0231 #@dataclass already does work
124
121
  self.__validateArgs(kwargs)
125
- # Basic options
126
- self.title=''
127
- self.message=''
128
- self.style=''
129
- self.large_icon_path=''
130
- self.big_picture_path=''
131
- self.progress_current_value=0
132
- self.progress_max_value=0
133
- self.body= ''
134
-
135
- # For Nofitication Functions
136
- self.identifer=''
137
- self.callback = None
138
-
139
- # Advance Options
140
- self.channel_name='Default Channel'
141
- self.channel_id='default_channel'
142
- self.silent=False
143
-
144
122
  # Private (Don't Touch)
145
123
  self.__id = self.__getUniqueID()
146
124
  self.__setArgs(kwargs)
@@ -178,7 +156,11 @@ class Notification:
178
156
  self.__builder.setContentText(String(self.message))
179
157
 
180
158
  def updateProgressBar(self,current_value,message:str=''):
181
- """current_value is the value to set progressbar, message defaults to last message
159
+ """Updates progress bar current value
160
+
161
+ Args:
162
+ current_value (str): the value from progressbar current progress
163
+ message (str): defaults to last message
182
164
 
183
165
  NOTE: There is a 0.5sec delay
184
166
  """
@@ -206,9 +188,13 @@ class Notification:
206
188
  self.__update_timer = threading.Timer(0.5, delayed_update)
207
189
  self.__update_timer.start()
208
190
 
209
- def removeProgressBar(self,message=''):
210
- """message defaults to last message"""
191
+ def removeProgressBar(self,message='',show_on_update=True) -> None:
192
+ """Removes Progress Bar from Notification
211
193
 
194
+ Args:
195
+ message (str, optional): notification message. Defaults to 'last message'.
196
+ show_on_update (bool, optional): To show notification brifely when progressbar removed. Defaults to True.
197
+ """
212
198
  if self.__update_timer:
213
199
  self.__update_timer.cancel()
214
200
  self.__update_timer = None
@@ -219,21 +205,24 @@ class Notification:
219
205
  if not ON_ANDROID:
220
206
  return False
221
207
 
208
+ self.__builder.setOnlyAlertOnce(not show_on_update)
222
209
  if message:
223
210
  self.__builder.setContentText(String(message))
224
211
  self.__builder.setProgress(0, 0, False)
225
212
  self.notification_manager.notify(self.__id, self.__builder.build())
226
213
  return True
227
214
 
228
- def send(self,silent:bool=False):
215
+ def send(self,silent:bool=False,persistent=False,close_on_click=True):
229
216
  """Sends notification
230
217
 
231
218
  Args:
232
219
  silent (bool): True if you don't want to show briefly on screen
220
+ persistent (bool): True To not remove Notification When User hits clears All notifications button
221
+ close_on_click (bool): True if you want Notification to be removed when clicked
233
222
  """
234
223
  self.silent=self.silent or silent
235
224
  if ON_ANDROID:
236
- self.__startNotificationBuild()
225
+ self.__startNotificationBuild(persistent,close_on_click)
237
226
  self.notification_manager.notify(self.__id, self.__builder.build())
238
227
  elif self.logs:
239
228
  string_to_display=''
@@ -296,6 +285,15 @@ class Notification:
296
285
  # Set content intent for notification tap
297
286
  self.__builder.setContentIntent(pending_action_intent)
298
287
 
288
+ def removeButtons(self):
289
+ """Removes all notification buttons
290
+ """
291
+ if ON_ANDROID:
292
+ self.__builder.mActions.clear()
293
+ self.notification_manager.notify(self.__id, self.__builder.build())
294
+ if self.logs:
295
+ print('Removed Notication Buttons')
296
+
299
297
  @run_on_ui_thread
300
298
  def addNotificationStyle(self,style:str,already_sent=False):
301
299
  """Adds Style to Notification
@@ -385,12 +383,12 @@ class Notification:
385
383
  if "channel_id" not in options_dict and 'channel_name' in options_dict: # if User doesn't input channel id but inputs channel_name
386
384
  setattr(self,'channel_id', self.__generate_channel_id(options_dict['channel_name']))
387
385
 
388
- def __startNotificationBuild(self):
389
- self.__createBasicNotification()
386
+ def __startNotificationBuild(self,persistent,close_on_click):
387
+ self.__createBasicNotification(persistent,close_on_click)
390
388
  if self.style not in ['simple','']:
391
389
  self.addNotificationStyle(self.style)
392
390
 
393
- def __createBasicNotification(self):
391
+ def __createBasicNotification(self,persistent,close_on_click):
394
392
  # Notification Channel (Required for Android 8.0+)
395
393
  # print("THis is cchannel is ",self.channel_id) #"
396
394
  if BuildVersion.SDK_INT >= 26 and self.notification_manager.getNotificationChannel(self.channel_id) is None:
@@ -408,29 +406,58 @@ class Notification:
408
406
  # TODO fix this by creating a on_Title method in other versions
409
407
  self.__builder.setContentTitle(str(self.title))
410
408
  self.__builder.setContentText(str(self.message))
411
- self.__builder.setSmallIcon(context.getApplicationInfo().icon)
409
+ self.__insertAppIcon()
412
410
  self.__builder.setDefaults(NotificationCompat.DEFAULT_ALL) # pylint: disable=E0606
413
411
  self.__builder.setPriority(NotificationCompat.PRIORITY_DEFAULT if self.silent else NotificationCompat.PRIORITY_HIGH)
414
412
  self.__builder.setOnlyAlertOnce(True)
413
+ self.__builder.setOngoing(persistent)
414
+ self.__builder.setAutoCancel(close_on_click)
415
415
  self.__addIntentToOpenApp()
416
416
 
417
417
  # def __doCustomStyle(self):
418
418
  # # TODO Will implement when needed
419
419
  # return self.__builder
420
-
420
+ def __insertAppIcon(self):
421
+ if self.app_icon not in ['','Defaults to package app icon']:
422
+ self.__setIconFromBitmap(self.app_icon)
423
+ else:
424
+ self.__builder.setSmallIcon(context.getApplicationInfo().icon)
425
+
421
426
  def __buildImg(self, user_img,img_style):
422
427
  if user_img.startswith('http://') or user_img.startswith('https://'):
428
+ def callback(bitmap):
429
+ self.__applyNotificationImage(bitmap,img_style)
423
430
  thread = threading.Thread(
424
- target=self.__getImgFromURL,
425
- args=(user_img,img_style,)
431
+ target=self.__getBitmapFromURL,
432
+ args=[user_img,callback]
426
433
  )
427
434
  thread.start()
428
435
  else:
429
436
  bitmap = self.__getImgFromPath(user_img)
430
437
  if bitmap:
431
438
  self.__applyNotificationImage(bitmap,img_style)
432
-
433
-
439
+
440
+ def __setIconFromBitmap(self,img_path):
441
+ """Path can be link or relative path"""
442
+ if img_path.startswith('http://') or img_path.startswith('https://'):
443
+ def callback(bitmap):
444
+ icon = IconCompat.createWithBitmap(bitmap)
445
+ self.__builder.setSmallIcon(icon)
446
+ threading.Thread(
447
+ target=self.__getBitmapFromURL,
448
+ args=[img_path,callback]
449
+ ).start()
450
+ else:
451
+ bitmap = self.__getImgFromPath(img_path)
452
+ if bitmap:
453
+ icon = IconCompat.createWithBitmap(bitmap)
454
+ self.__builder.setSmallIcon(icon)
455
+ else:
456
+ if self.logs:
457
+ print('Failed getting img for custom notification icon defaulting to app icon')
458
+ self.__builder.setSmallIcon(context.getApplicationInfo().icon)
459
+
460
+
434
461
  def __getImgFromPath(self, relative_path):
435
462
  app_folder=os.path.join(app_storage_path(),'app') # pylint: disable=possibly-used-before-assignment
436
463
  output_path = os.path.join(app_folder, relative_path)
@@ -439,13 +466,20 @@ class Notification:
439
466
  print("These are the existing files in your app Folder:")
440
467
  print('['+', '.join(os.listdir(app_folder)) + ']')
441
468
  return None
469
+ # TODO test with a badly written Image and catch error
442
470
  Uri = autoclass('android.net.Uri')
443
471
  uri = Uri.parse(f"file://{output_path}")
444
472
  return BitmapFactory.decodeStream(context.getContentResolver().openInputStream(uri))
445
473
 
446
- def __getImgFromURL(self,url,img_style):
474
+ def __getBitmapFromURL(self,url,callback):
475
+ """Gets Bitmap from url
476
+
477
+ Args:
478
+ url (str): img url
479
+ callback (function): method to be called after thread done -passes in bitmap data as argument
480
+ """
447
481
  if self.logs:
448
- print("getting image from URL---")
482
+ print("getting Bitmap from URL---")
449
483
  try:
450
484
  URL = autoclass('java.net.URL')
451
485
  url = URL(url)
@@ -454,11 +488,33 @@ class Notification:
454
488
  input_stream = connection.getInputStream()
455
489
  bitmap = BitmapFactory.decodeStream(input_stream)
456
490
  input_stream.close()
457
- self.__applyNotificationImage(bitmap,img_style)
491
+ if bitmap:
492
+ callback(bitmap)
493
+ else:
494
+ print('Error No Bitmap ------------')
458
495
  except Exception as e:
459
- # TODO get type of JAVA Error
496
+ # TODO get all types of JAVA Error
460
497
  print('Error Type ',e)
461
- print('Failed to get Img from URL ',traceback.format_exc())
498
+ print('Failed to get Bitmap from URL ',traceback.format_exc())
499
+
500
+ # def __getImgFromURL(self,url,img_style):
501
+ # if self.logs:
502
+ # print("getting image from URL---")
503
+ # try:
504
+ # URL = autoclass('java.net.URL')
505
+ # url = URL(url)
506
+ # connection = url.openConnection()
507
+ # connection.connect()
508
+ # input_stream = connection.getInputStream()
509
+ # bitmap = BitmapFactory.decodeStream(input_stream)
510
+ # input_stream.close()
511
+ # if bitmap:
512
+ # self.__applyNotificationImage(bitmap,img_style)
513
+
514
+ # except Exception as e:
515
+ # # TODO get type of JAVA Error
516
+ # print('Error Type ',e)
517
+ # print('Failed to get Img from URL ',traceback.format_exc())
462
518
 
463
519
  @run_on_ui_thread
464
520
  def __applyNotificationImage(self,bitmap,img_style):
@@ -526,8 +582,7 @@ class Notification:
526
582
  intent, PendingIntent.FLAG_IMMUTABLE if BuildVersion.SDK_INT >= 31 else PendingIntent.FLAG_UPDATE_CURRENT
527
583
  )
528
584
  self.__builder.setContentIntent(pending_intent)
529
- self.__builder.setAutoCancel(True)
530
-
585
+
531
586
  def __addDataToIntent(self,intent):
532
587
  """Persit Some data to notification object for later use"""
533
588
  bundle = Bundle()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: android-notify
3
- Version: 1.52.5
3
+ Version: 1.53
4
4
  Summary: A Python package that simpilfies creating Android notifications in Kivy apps.
5
5
  Home-page: https://github.com/fector101/android-notify
6
6
  Author: Fabian
@@ -49,6 +49,7 @@ Dynamic: summary
49
49
  - Supports including images in notifications.
50
50
  - All Notifications can take Functions (version 1.50+) [functions section](#functions).
51
51
  - Advanced Notification Handling [section](#advanced-features).
52
+ - Changing default app notification icon with PNG,
52
53
  - Support for multiple notification styles:
53
54
  - [Simple](#basic-usage)
54
55
  - [Progress](#progress-bar-notification)
@@ -58,10 +59,13 @@ Dynamic: summary
58
59
  - [Buttons](#notification-with-buttons)
59
60
  - [Big Text](#big-text-notification)
60
61
 
62
+ - persistenting notification [section](#methods)
63
+
61
64
  This module automatically handles:
62
65
 
63
66
  - Permission requests for notifications
64
67
  - Customizable notification channels.
68
+ - Opening app on notification click
65
69
 
66
70
  ## Installation
67
71
 
@@ -128,6 +132,7 @@ The library supports multiple notification styles:
128
132
  #### Progress Bar notification
129
133
 
130
134
  ```python
135
+ from kivy.clock import Clock
131
136
 
132
137
  progress = 0
133
138
 
@@ -207,6 +212,8 @@ notification.send()
207
212
 
208
213
  #### Notification with Buttons
209
214
 
215
+ Here's a sample of how to add buttons below, To Remove Buttons Simply Call the `removeButtons` method on the Notification Instance
216
+
210
217
  ```python
211
218
  notification = Notification(title="Jane Dough", message="How to use android-notify #coding #purepython")
212
219
  def playVideo():
@@ -271,7 +278,8 @@ notification.send()
271
278
  notification.updateProgressBar(30, "30% downloaded")
272
279
 
273
280
  # Remove progress bar
274
- notification.removeProgressBar("Download Complete")
281
+ # show_on_update to notification briefly after removed progressbar
282
+ notification.removeProgressBar("Download Complete",show_on_update=True)
275
283
  ```
276
284
 
277
285
  ### Adding Style even when already sent
@@ -395,6 +403,63 @@ notification.send()
395
403
  # Will print notification properties instead of sending
396
404
  ```
397
405
 
406
+ ### Methods
407
+
408
+ ### Instance.**init**
409
+
410
+ args
411
+
412
+ - app_icon: To Change Default app icon use PNG Or Image Will display as a Black Box
413
+
414
+ ### Instance.send
415
+
416
+ args
417
+
418
+ - persistent : To make notification stay after user clicks clear All
419
+ - close_on_click : To close notification on click
420
+
421
+ ### Instance.addButton
422
+
423
+ args
424
+
425
+ - text : Button Text
426
+
427
+ ### Instance.updateTitle
428
+
429
+ args
430
+
431
+ - new_title : String to be set as New notification Title
432
+
433
+ ### Instance.updateMessage
434
+
435
+ args
436
+
437
+ - new_message : String to be set as New notification Message
438
+
439
+ ### Instance.updateProgressBar
440
+
441
+ args
442
+
443
+ - current_value (str): the value from progressbar current progress
444
+ - message (str,optional): defaults to last message
445
+
446
+ ### Instance.removeProgressBar
447
+
448
+ This Removes Progress bar
449
+
450
+ args
451
+
452
+ - message (str, optional): notification message, Defaults to 'last message'.
453
+ - show_on_update (bool, optional): To show notification brifely when progressbar removed. Defaults to True.
454
+
455
+ ### Instance.addNotificationStyle
456
+
457
+ This is useful to add style after Notification is sent or Add more styles to Notification
458
+ args
459
+
460
+ - style: choosen style. All options are in the `NotificationStyles` class `['simple','progress','inbox','big_text','large_icon','big_picture','both_imgs]`
461
+ - already_sent: specfiy if notification.send() method has already been called, it defaults to false
462
+
398
463
  ## Image Requirements
399
464
 
400
465
  - Online Images should start with `http://` or `https://`
@@ -3,6 +3,7 @@ setup.py
3
3
  android_notify/__init__.py
4
4
  android_notify/__main__.py
5
5
  android_notify/core.py
6
+ android_notify/facade.py
6
7
  android_notify/styles.py
7
8
  android_notify/sword.py
8
9
  android_notify.egg-info/PKG-INFO
@@ -6,7 +6,7 @@ with open("README.md", "r", encoding="utf-8") as readme_data:
6
6
 
7
7
  setup(
8
8
  name="android-notify",
9
- version="1.52.5",
9
+ version="1.53",
10
10
  author="Fabian",
11
11
  author_email='fector101@yahoo.com',
12
12
  description="A Python package that simpilfies creating Android notifications in Kivy apps.",
File without changes