android-notify 1.21__py3-none-any.whl → 1.23__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/core.py +1 -0
- {android_notify-1.21.dist-info → android_notify-1.23.dist-info}/METADATA +23 -12
- android_notify-1.23.dist-info/RECORD +8 -0
- android_notify-1.21.dist-info/RECORD +0 -8
- {android_notify-1.21.dist-info → android_notify-1.23.dist-info}/WHEEL +0 -0
- {android_notify-1.21.dist-info → android_notify-1.23.dist-info}/top_level.txt +0 -0
android_notify/core.py
CHANGED
|
@@ -78,6 +78,7 @@ def send_notification(title:str, message:str, style=None, img_path=None, channel
|
|
|
78
78
|
if not ON_ANDROID:
|
|
79
79
|
print('This Package Only Runs on Android !!! ---> Check "https://github.com/Fector101/android_notify/" for Documentation.')
|
|
80
80
|
return
|
|
81
|
+
asks_permission_if_needed()
|
|
81
82
|
|
|
82
83
|
# Get notification manager
|
|
83
84
|
notification_manager = context.getSystemService(context.NOTIFICATION_SERVICE)
|
|
@@ -1,15 +1,26 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
|
-
Name:
|
|
3
|
-
Version: 1.
|
|
4
|
-
Summary: A Python package for sending Android notifications.
|
|
5
|
-
Home-page: https://github.com/
|
|
2
|
+
Name: android-notify
|
|
3
|
+
Version: 1.23
|
|
4
|
+
Summary: A Python package for sending Android notifications using PyJNIus in Kivy apps.
|
|
5
|
+
Home-page: https://github.com/fector101/android-notify
|
|
6
6
|
Author: Fabian
|
|
7
|
-
Author-email:
|
|
8
|
-
|
|
9
|
-
Project-URL:
|
|
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,push notifications,pyjnius,android notifications,kivy notifications,python android,mobile development
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
16
|
+
Classifier: Operating System :: Android
|
|
17
|
+
Classifier: Development Status :: 4 - Beta
|
|
18
|
+
Classifier: Intended Audience :: Developers
|
|
19
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
10
20
|
Requires-Python: >=3.6
|
|
11
21
|
Description-Content-Type: text/markdown
|
|
12
|
-
Requires-Dist:
|
|
22
|
+
Requires-Dist: kivy>=2.0.0
|
|
23
|
+
Requires-Dist: pyjnius>=1.4.2
|
|
13
24
|
|
|
14
25
|
# Android Notify
|
|
15
26
|
|
|
@@ -46,7 +57,7 @@ In your **`buildozer.spec`** file, ensure you include the following:
|
|
|
46
57
|
|
|
47
58
|
```ini
|
|
48
59
|
# Add pyjnius so it's packaged with the build
|
|
49
|
-
requirements = python3,kivy,pyjnius
|
|
60
|
+
requirements = python3, kivy, pyjnius, android-notify
|
|
50
61
|
|
|
51
62
|
# Add permission for notifications
|
|
52
63
|
android.permissions = POST_NOTIFICATIONS
|
|
@@ -122,8 +133,8 @@ send_notification(
|
|
|
122
133
|
- How to Copy image to app folder
|
|
123
134
|
|
|
124
135
|
```python
|
|
125
|
-
import shutil,os # These
|
|
126
|
-
from android.storage import app_storage_path # type: ignore -- This works only on android
|
|
136
|
+
import shutil,os # These modules come packaged with python
|
|
137
|
+
from android.storage import app_storage_path # type: ignore -- This works only on android
|
|
127
138
|
|
|
128
139
|
app_path = os.path.join(app_storage_path(),'app')
|
|
129
140
|
image_path= "/storage/emulated/0/Download/profile.png"
|
|
@@ -134,7 +145,7 @@ shutil.copy(image_path, os.path.join(app_path, "profile.png"))
|
|
|
134
145
|
- Avoiding Human Error when using different notification styles
|
|
135
146
|
|
|
136
147
|
```python
|
|
137
|
-
from android_notify import NotificationStyles
|
|
148
|
+
from android_notify import send_notification, NotificationStyles
|
|
138
149
|
send_notification(
|
|
139
150
|
title='Picture Alert!',
|
|
140
151
|
message='This notification includes an image.',
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
android_notify/__init__.py,sha256=DOUMyhwcXFBbamkxf0fJCBtRemTGXTiJTrQpKV_XF_A,74
|
|
2
|
+
android_notify/__main__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
|
+
android_notify/core.py,sha256=_47jZI0es_5PsqEVXL-WVsj815HOzn5hEU5d8s3-6j0,5948
|
|
4
|
+
android_notify/styles.py,sha256=P_8sAqb3Hbf_vbhqSoCVjKeqJ05Fr_CksO-HX5pj8pU,134
|
|
5
|
+
android_notify-1.23.dist-info/METADATA,sha256=HpNOzYrE9IiOnwWxFcIflXRa2GlJie0uYpTqnKHr95Q,6648
|
|
6
|
+
android_notify-1.23.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
|
7
|
+
android_notify-1.23.dist-info/top_level.txt,sha256=IR1ONMrRSRINZpWn2X0dL5gbWwWINsK7PW8Jy2p4fU8,15
|
|
8
|
+
android_notify-1.23.dist-info/RECORD,,
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
android_notify/__init__.py,sha256=DOUMyhwcXFBbamkxf0fJCBtRemTGXTiJTrQpKV_XF_A,74
|
|
2
|
-
android_notify/__main__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
|
-
android_notify/core.py,sha256=JsfpijK-v4aDDQ0E2ECdzdlGUGlVM51UDCHgLRZFr9w,5916
|
|
4
|
-
android_notify/styles.py,sha256=P_8sAqb3Hbf_vbhqSoCVjKeqJ05Fr_CksO-HX5pj8pU,134
|
|
5
|
-
android_notify-1.21.dist-info/METADATA,sha256=D4DVpiTBOpuMpi0kELE0IGUEX-3-WddoBNJwjn3wsog,5949
|
|
6
|
-
android_notify-1.21.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
|
7
|
-
android_notify-1.21.dist-info/top_level.txt,sha256=IR1ONMrRSRINZpWn2X0dL5gbWwWINsK7PW8Jy2p4fU8,15
|
|
8
|
-
android_notify-1.21.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|