android-notify 1.52.2__py3-none-any.whl → 1.52.3__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.

android_notify/sword.py CHANGED
@@ -116,7 +116,7 @@ class Notification:
116
116
  # if key not in non_string_keys: value = str(value) to fix
117
117
  #non_string_keys=['progress_max_value','progress_current_value','callback','logs']
118
118
  # TODO using default values to check types
119
-
119
+
120
120
  # During Development (When running on PC)
121
121
  logs=not ON_ANDROID
122
122
  def __init__(self,**kwargs):
@@ -157,11 +157,11 @@ class Notification:
157
157
  Args:
158
158
  new_title (str): New Notification Title
159
159
  """
160
- self.title=new_title
160
+ self.title=str(new_title)
161
161
  if self.logs:
162
- print(f'new notification title: {new_title}')
162
+ print(f'new notification title: {self.title}')
163
163
  if ON_ANDROID:
164
- self.__builder.setContentTitle(new_title)
164
+ self.__builder.setContentTitle(String(self.title))
165
165
 
166
166
  def updateMessage(self,new_message):
167
167
  """Changes Old Message
@@ -169,11 +169,11 @@ class Notification:
169
169
  Args:
170
170
  new_message (str): New Notification Message
171
171
  """
172
- self.message=new_message
172
+ self.message=str(new_message)
173
173
  if self.logs:
174
- print(f'new notification message: {new_message}')
174
+ print(f'new notification message: {self.message}')
175
175
  if ON_ANDROID:
176
- self.__builder.setContentText(new_message)
176
+ self.__builder.setContentText(String(self.message))
177
177
 
178
178
  def updateProgressBar(self,current_value,message:str=''):
179
179
  """current_value is the value to set progressbar, message defaults to last message"""
@@ -186,7 +186,7 @@ class Notification:
186
186
 
187
187
  self.__builder.setProgress(self.progress_max_value, current_value, False)
188
188
  if message:
189
- self.__builder.setContentText(String(message))
189
+ self.updateMessage(message)
190
190
  self.notification_manager.notify(self.__id, self.__builder.build())
191
191
 
192
192
  def removeProgressBar(self,message=''):
@@ -305,11 +305,11 @@ class Notification:
305
305
  Args:
306
306
  style (str): required style
307
307
  """
308
-
308
+
309
309
  if not ON_ANDROID:
310
310
  # TODO for logs when not on android and style related to imgs etraxct app path from buildozer.spec and print
311
311
  return
312
-
312
+
313
313
  if style == NotificationStyles.BIG_TEXT:
314
314
  big_text_style = NotificationCompatBigTextStyle() # pylint: disable=E0606
315
315
  big_text_style.bigText(str(self.body))
@@ -338,7 +338,7 @@ class Notification:
338
338
 
339
339
  if already_sent:
340
340
  self.notification_manager.notify(self.__id, self.__builder.build())
341
-
341
+
342
342
  # elif style == 'custom':
343
343
  # self.__builder = self.__doCustomStyle()
344
344
 
@@ -357,7 +357,7 @@ class Notification:
357
357
  bitmap = self.__getImgFromPath(user_img)
358
358
  if bitmap:
359
359
  self.__applyNotificationImage(bitmap,img_style)
360
-
360
+
361
361
 
362
362
  def __getImgFromPath(self, relative_path):
363
363
  app_folder=os.path.join(app_storage_path(),'app') # pylint: disable=possibly-used-before-assignment
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: android-notify
3
- Version: 1.52.2
3
+ Version: 1.52.3
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
@@ -2,8 +2,8 @@ android_notify/__init__.py,sha256=lcLjyfegXgU7cyGhfSphAOBipXwemrVkdYy3mcF6X5Y,17
2
2
  android_notify/__main__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
3
  android_notify/core.py,sha256=B3gOgbLGGI6tz-Q_T2wmk74oggOSDX0Qz4lqj00vaFo,6114
4
4
  android_notify/styles.py,sha256=3olKruhAbTrk5OzuhDnk_Pgpv8XYk8dWFmr48Q9rQVk,352
5
- android_notify/sword.py,sha256=xBcrRPpbOYKoXzErNYAsjEtSj8NI78unTEnO9nipRPs,26037
6
- android_notify-1.52.2.dist-info/METADATA,sha256=sR2K5ZdPsDveDmQqYCgiKKEuambWOT30ktB5UHnQCoc,13445
7
- android_notify-1.52.2.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
8
- android_notify-1.52.2.dist-info/top_level.txt,sha256=IR1ONMrRSRINZpWn2X0dL5gbWwWINsK7PW8Jy2p4fU8,15
9
- android_notify-1.52.2.dist-info/RECORD,,
5
+ android_notify/sword.py,sha256=GfuetTPjoCglRmmxmPAi5zMvCKxMynSGEfDqUADDcSA,26000
6
+ android_notify-1.52.3.dist-info/METADATA,sha256=lnW4jrhSlYKWfdusYhM-TX2AUm_CAQAi5A-F_W_PhDc,13445
7
+ android_notify-1.52.3.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
8
+ android_notify-1.52.3.dist-info/top_level.txt,sha256=IR1ONMrRSRINZpWn2X0dL5gbWwWINsK7PW8Jy2p4fU8,15
9
+ android_notify-1.52.3.dist-info/RECORD,,