android-notify 1.52.4__tar.gz → 1.52.5__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.4
3
+ Version: 1.52.5
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
@@ -128,17 +128,23 @@ The library supports multiple notification styles:
128
128
  #### Progress Bar notification
129
129
 
130
130
  ```python
131
- from kivy.clock import Clock
131
+
132
+ progress = 0
132
133
 
133
134
  notification = Notification(
134
- title="Downloading...",
135
- message="0% downloaded",
136
- style="progress",
137
- progress_max_value=100,
138
- progress_current_value=0
139
- )
135
+ title="Downloading...", message="0% downloaded",
136
+ style= "progress",
137
+ progress_current_value=0,progress_max_value=100
138
+ )
140
139
  notification.send()
141
- Clock.schedule_interval(lambda dt: notification.updateProgressBar(dt, f"{dt}% downloaded"), 30)
140
+
141
+ def update_progress(dt):
142
+ global progress
143
+ progress = min(progress + 10, 100)
144
+ notification.updateProgressBar(progress, f"{progress}% downloaded")
145
+ return progress < 100 # Stops when reaching 100%
146
+
147
+ Clock.schedule_interval(update_progress, 3)
142
148
  ```
143
149
 
144
150
  **Sample Image:**
@@ -92,17 +92,23 @@ The library supports multiple notification styles:
92
92
  #### Progress Bar notification
93
93
 
94
94
  ```python
95
- from kivy.clock import Clock
95
+
96
+ progress = 0
96
97
 
97
98
  notification = Notification(
98
- title="Downloading...",
99
- message="0% downloaded",
100
- style="progress",
101
- progress_max_value=100,
102
- progress_current_value=0
103
- )
99
+ title="Downloading...", message="0% downloaded",
100
+ style= "progress",
101
+ progress_current_value=0,progress_max_value=100
102
+ )
104
103
  notification.send()
105
- Clock.schedule_interval(lambda dt: notification.updateProgressBar(dt, f"{dt}% downloaded"), 30)
104
+
105
+ def update_progress(dt):
106
+ global progress
107
+ progress = min(progress + 10, 100)
108
+ notification.updateProgressBar(progress, f"{progress}% downloaded")
109
+ return progress < 100 # Stops when reaching 100%
110
+
111
+ Clock.schedule_interval(update_progress, 3)
106
112
  ```
107
113
 
108
114
  **Sample Image:**
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: android-notify
3
- Version: 1.52.4
3
+ Version: 1.52.5
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
@@ -128,17 +128,23 @@ The library supports multiple notification styles:
128
128
  #### Progress Bar notification
129
129
 
130
130
  ```python
131
- from kivy.clock import Clock
131
+
132
+ progress = 0
132
133
 
133
134
  notification = Notification(
134
- title="Downloading...",
135
- message="0% downloaded",
136
- style="progress",
137
- progress_max_value=100,
138
- progress_current_value=0
139
- )
135
+ title="Downloading...", message="0% downloaded",
136
+ style= "progress",
137
+ progress_current_value=0,progress_max_value=100
138
+ )
140
139
  notification.send()
141
- Clock.schedule_interval(lambda dt: notification.updateProgressBar(dt, f"{dt}% downloaded"), 30)
140
+
141
+ def update_progress(dt):
142
+ global progress
143
+ progress = min(progress + 10, 100)
144
+ notification.updateProgressBar(progress, f"{progress}% downloaded")
145
+ return progress < 100 # Stops when reaching 100%
146
+
147
+ Clock.schedule_interval(update_progress, 3)
142
148
  ```
143
149
 
144
150
  **Sample Image:**
@@ -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.4",
9
+ version="1.52.5",
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.",