android-notify 1.56__py3-none-any.whl → 1.57__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 +14 -12
- android_notify/types_idea.py +72 -0
- {android_notify-1.56.dist-info → android_notify-1.57.dist-info}/METADATA +1 -1
- {android_notify-1.56.dist-info → android_notify-1.57.dist-info}/RECORD +6 -5
- {android_notify-1.56.dist-info → android_notify-1.57.dist-info}/WHEEL +0 -0
- {android_notify-1.56.dist-info → android_notify-1.57.dist-info}/top_level.txt +0 -0
android_notify/sword.py
CHANGED
|
@@ -31,6 +31,7 @@ try:
|
|
|
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
|
|
34
|
+
# from .types_idea import *
|
|
34
35
|
# print(MESSAGE) Already Printing in core.py
|
|
35
36
|
|
|
36
37
|
# This is so no crashes when developing on PC
|
|
@@ -138,34 +139,34 @@ class Notification(BaseNotification):
|
|
|
138
139
|
self.__builder.setContentText(String(self.message))
|
|
139
140
|
self.__dispatchNotification()
|
|
140
141
|
|
|
141
|
-
def updateProgressBar(self,current_value:int,message:str='',title:str=''):
|
|
142
|
+
def updateProgressBar(self,current_value:int,message:str='',title:str='',buffer=0.5):
|
|
142
143
|
"""Updates progress bar current value
|
|
143
144
|
|
|
144
145
|
Args:
|
|
145
146
|
current_value (int): the value from progressbar current progress
|
|
146
147
|
message (str): defaults to last message
|
|
147
148
|
title (str): defaults to last title
|
|
148
|
-
|
|
149
|
-
NOTE: There is a 0.5sec delay, if updating title,msg with progressbar frequenlty pass them in too to avoid update issues
|
|
149
|
+
buffer (float, optional): Avoid Updating progressbar value too frequently Defaults to 0.5secs
|
|
150
|
+
NOTE: There is a 0.5sec delay for value change, if updating title,msg with progressbar frequenlty pass them in too to avoid update issues
|
|
150
151
|
"""
|
|
152
|
+
# replacing new value for when timer is called
|
|
153
|
+
self.progress_current_value = current_value
|
|
151
154
|
|
|
152
|
-
# Cancel any existing timer before setting a new one
|
|
153
155
|
if self.__update_timer:
|
|
154
|
-
self.
|
|
155
|
-
|
|
156
|
-
|
|
156
|
+
if self.logs:
|
|
157
|
+
print('Progressbar update too soon Doing bounce 0.5sec')
|
|
158
|
+
return
|
|
159
|
+
|
|
157
160
|
def delayed_update():
|
|
158
161
|
if self.__update_timer is None:
|
|
159
162
|
# Ensure we are not executing an old timer
|
|
160
163
|
return
|
|
161
164
|
if self.logs:
|
|
162
|
-
print(f'Progress Bar Update value: {
|
|
165
|
+
print(f'Progress Bar Update value: {self.progress_current_value}')
|
|
163
166
|
|
|
164
|
-
self.progress_current_value = current_value
|
|
165
|
-
|
|
166
167
|
if not ON_ANDROID:
|
|
167
168
|
return
|
|
168
|
-
self.__builder.setProgress(self.progress_max_value,
|
|
169
|
+
self.__builder.setProgress(self.progress_max_value, self.progress_current_value, False)
|
|
169
170
|
if message:
|
|
170
171
|
self.updateMessage(message)
|
|
171
172
|
if title:
|
|
@@ -178,7 +179,7 @@ class Notification(BaseNotification):
|
|
|
178
179
|
self.__update_timer = threading.Timer(0.5, delayed_update)
|
|
179
180
|
self.__update_timer.start()
|
|
180
181
|
|
|
181
|
-
def removeProgressBar(self,message='',show_on_update=True, title:str='') ->
|
|
182
|
+
def removeProgressBar(self,message='',show_on_update=True, title:str='') -> bool:
|
|
182
183
|
"""Removes Progress Bar from Notification
|
|
183
184
|
|
|
184
185
|
Args:
|
|
@@ -301,6 +302,7 @@ class Notification(BaseNotification):
|
|
|
301
302
|
|
|
302
303
|
Args:
|
|
303
304
|
style (str): required style
|
|
305
|
+
already_sent (bool,False): If notification was already sent
|
|
304
306
|
"""
|
|
305
307
|
|
|
306
308
|
if not ON_ANDROID:
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# class Bundle:
|
|
2
|
+
# pass
|
|
3
|
+
# class PythonActivity:
|
|
4
|
+
# mActivity=''# Get the app's context
|
|
5
|
+
# pass
|
|
6
|
+
# class String(str):
|
|
7
|
+
# pass
|
|
8
|
+
# class Intent:
|
|
9
|
+
# def __init__(self,context,activity):
|
|
10
|
+
# pass
|
|
11
|
+
# class PendingIntent:
|
|
12
|
+
# FLAG_IMMUTABLE=''
|
|
13
|
+
# FLAG_UPDATE_CURRENT=''
|
|
14
|
+
# def getActivity(self,context,value,action_intent,pending_intent_type):
|
|
15
|
+
# pass
|
|
16
|
+
# class BitmapFactory:
|
|
17
|
+
# def decodeStream(self,stream):
|
|
18
|
+
# pass
|
|
19
|
+
# class BuildVersion:
|
|
20
|
+
# SDK_INT=0
|
|
21
|
+
# class NotificationManager:
|
|
22
|
+
# pass
|
|
23
|
+
# class NotificationChannel:
|
|
24
|
+
# def __init__(self,channel_id,channel_name,importance):
|
|
25
|
+
# pass
|
|
26
|
+
# def createNotificationChannel(self, channel):
|
|
27
|
+
# pass
|
|
28
|
+
#
|
|
29
|
+
# def getNotificationChannel(self, channel_id):
|
|
30
|
+
# pass
|
|
31
|
+
# class IconCompat:
|
|
32
|
+
# def createWithBitmap(self,bitmap):
|
|
33
|
+
# pass
|
|
34
|
+
#
|
|
35
|
+
# class NotificationManagerCompat:
|
|
36
|
+
# IMPORTANCE_DEFAULT=3
|
|
37
|
+
# IMPORTANCE_HIGH=4
|
|
38
|
+
#
|
|
39
|
+
#
|
|
40
|
+
# class NotificationCompat:
|
|
41
|
+
# DEFAULT_ALL=3
|
|
42
|
+
# PRIORITY_HIGH=4
|
|
43
|
+
#
|
|
44
|
+
# def __init__(self,context):
|
|
45
|
+
# pass
|
|
46
|
+
# def Builder(self,context,channel_id):
|
|
47
|
+
# pass
|
|
48
|
+
# class NotificationCompatBuilder:
|
|
49
|
+
# def __init__(self,context,channel_id):
|
|
50
|
+
# pass
|
|
51
|
+
# def setContentTitle(self,title):
|
|
52
|
+
# pass
|
|
53
|
+
# def setContentText(self,text):
|
|
54
|
+
# pass
|
|
55
|
+
# def setSmallIcon(self,icon):
|
|
56
|
+
# pass
|
|
57
|
+
# def setLargeIcon(self,icon):
|
|
58
|
+
# pass
|
|
59
|
+
# def setAutoCancel(self,auto_cancel):
|
|
60
|
+
# pass
|
|
61
|
+
# def setPriority(self,priority):
|
|
62
|
+
# pass
|
|
63
|
+
# def setDefaults(self,defaults):
|
|
64
|
+
# pass
|
|
65
|
+
# def build(self):
|
|
66
|
+
# pass
|
|
67
|
+
# class NotificationCompatBigTextStyle:
|
|
68
|
+
# pass
|
|
69
|
+
# class NotificationCompatBigPictureStyle:
|
|
70
|
+
# pass
|
|
71
|
+
# class NotificationCompatInboxStyle:
|
|
72
|
+
# pass
|
|
@@ -3,8 +3,9 @@ android_notify/__main__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
|
3
3
|
android_notify/base.py,sha256=QkNSNFX8KtNnRRm0r1wXsQa6TWMRKySn-3PT-XpY1mM,3377
|
|
4
4
|
android_notify/core.py,sha256=Per4HFwYwP-mxHJqnwcLlWXsbZsSeeAYN49MmFU2qVk,6113
|
|
5
5
|
android_notify/styles.py,sha256=QBkCY8ZO26FnS-jPtRLf9CKEEnnYylmH9enCa5CNDes,354
|
|
6
|
-
android_notify/sword.py,sha256=
|
|
7
|
-
android_notify
|
|
8
|
-
android_notify-1.
|
|
9
|
-
android_notify-1.
|
|
10
|
-
android_notify-1.
|
|
6
|
+
android_notify/sword.py,sha256=wjLYAsQ1OAnK7UthF5VqhUYYN9EX8otbQ7gL0dHElAQ,28115
|
|
7
|
+
android_notify/types_idea.py,sha256=6LC8JQT6rve4AtrppdKRmXeSC07L8ljlO1aQEOpuDV4,1776
|
|
8
|
+
android_notify-1.57.dist-info/METADATA,sha256=Fzrqbb5beNdPXQld1lCtbxu-UmnQ0bHndg07z5oD_JU,16568
|
|
9
|
+
android_notify-1.57.dist-info/WHEEL,sha256=jB7zZ3N9hIM9adW7qlTAyycLYW9npaWKLRzaoVcLKcM,91
|
|
10
|
+
android_notify-1.57.dist-info/top_level.txt,sha256=IR1ONMrRSRINZpWn2X0dL5gbWwWINsK7PW8Jy2p4fU8,15
|
|
11
|
+
android_notify-1.57.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|