android-notify 1.58__py3-none-any.whl → 1.59.1__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/{types_idea.py → an_types.py} +20 -1
- android_notify/an_utils.py +10 -0
- android_notify/base.py +10 -3
- android_notify/styles.py +7 -1
- android_notify/sword.py +422 -182
- android_notify-1.59.1.dist-info/METADATA +119 -0
- android_notify-1.59.1.dist-info/RECORD +12 -0
- {android_notify-1.58.dist-info → android_notify-1.59.1.dist-info}/WHEEL +1 -1
- android_notify-1.58.dist-info/METADATA +0 -575
- android_notify-1.58.dist-info/RECORD +0 -11
- {android_notify-1.58.dist-info → android_notify-1.59.1.dist-info}/top_level.txt +0 -0
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
"""For autocomplete Storing Reference to Available Methods"""
|
|
2
|
+
from typing import Literal
|
|
3
|
+
Importance = Literal['urgent','high','medium','low','none']
|
|
4
|
+
"""
|
|
5
|
+
:argument urgent - Makes a sound and appears as a heads-up notification.
|
|
6
|
+
|
|
7
|
+
:argument high - Makes a sound.
|
|
8
|
+
|
|
9
|
+
:argument urgent - Makes no sound.
|
|
10
|
+
|
|
11
|
+
:argument urgent - Makes no sound and doesn't appear in the status bar.
|
|
12
|
+
|
|
13
|
+
:argument urgent - Makes no sound and doesn't in the status bar or shade.
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
# Idea for typing autocompletion and reference
|
|
1
17
|
# class Bundle:
|
|
2
18
|
# pass
|
|
3
19
|
# class PythonActivity:
|
|
@@ -69,4 +85,7 @@
|
|
|
69
85
|
# class NotificationCompatBigPictureStyle:
|
|
70
86
|
# pass
|
|
71
87
|
# class NotificationCompatInboxStyle:
|
|
72
|
-
# pass
|
|
88
|
+
# pass
|
|
89
|
+
|
|
90
|
+
#Now writing Knowledge from errors
|
|
91
|
+
# notify.(int, Builder.build()) # must be int
|
android_notify/base.py
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
"""Assists Notification Class with Args keeps
|
|
1
|
+
"""Assists Notification Class with Args keeps subclass cleaner"""
|
|
2
2
|
from dataclasses import dataclass, fields
|
|
3
3
|
import difflib
|
|
4
4
|
from .styles import NotificationStyles
|
|
5
5
|
|
|
6
6
|
@dataclass
|
|
7
7
|
class BaseNotification:
|
|
8
|
-
"""
|
|
8
|
+
"""Encapsulation"""
|
|
9
9
|
|
|
10
10
|
# Basic options
|
|
11
11
|
title: str = ''
|
|
@@ -20,18 +20,24 @@ class BaseNotification:
|
|
|
20
20
|
body: str = ''
|
|
21
21
|
|
|
22
22
|
# Notification Functions
|
|
23
|
-
|
|
23
|
+
name: str = ''
|
|
24
24
|
callback: object = None
|
|
25
25
|
|
|
26
26
|
# Advanced Options
|
|
27
|
+
id: int = 0
|
|
27
28
|
app_icon: str = 'Defaults to package app icon'
|
|
29
|
+
|
|
28
30
|
channel_name: str = 'Default Channel'
|
|
31
|
+
"""User visible channel name"""
|
|
29
32
|
channel_id: str = 'default_channel'
|
|
33
|
+
"""Used to reference notification channel"""
|
|
34
|
+
|
|
30
35
|
silent: bool = False
|
|
31
36
|
logs: bool = False
|
|
32
37
|
|
|
33
38
|
def __init__(self, **kwargs):
|
|
34
39
|
"""Custom init to handle validation before dataclass assigns values"""
|
|
40
|
+
|
|
35
41
|
# Validate provided arguments
|
|
36
42
|
self.validate_args(kwargs)
|
|
37
43
|
|
|
@@ -80,3 +86,4 @@ class BaseNotification:
|
|
|
80
86
|
raise ValueError(
|
|
81
87
|
f"Invalid style '{inputted_style}'. Allowed styles: {allowed_styles}"
|
|
82
88
|
)
|
|
89
|
+
|
android_notify/styles.py
CHANGED
|
@@ -6,8 +6,14 @@ class NotificationStyles:
|
|
|
6
6
|
|
|
7
7
|
PROGRESS = "progress"
|
|
8
8
|
INBOX = "inbox"
|
|
9
|
+
|
|
10
|
+
# v1.59+
|
|
11
|
+
# Deprecated
|
|
12
|
+
# setBigText == Notification(...,big_picture_path="...",style=NotificationStyles.BIG_TEXT)
|
|
13
|
+
# setLargeIcon == Notification(...,large_icon_path="...",style=NotificationStyles.LARGE_ICON)
|
|
14
|
+
# setBigPicture == Notification(...,body="...",style=NotificationStyles.BIG_PICTURE)
|
|
15
|
+
# Use .refresh to apply any new changes after .send
|
|
9
16
|
BIG_TEXT = "big_text"
|
|
10
|
-
|
|
11
17
|
LARGE_ICON = "large_icon"
|
|
12
18
|
BIG_PICTURE = "big_picture"
|
|
13
19
|
BOTH_IMGS = "both_imgs"
|