Skip to content

Commit 8281861

Browse files
authored
Update README.md
1 parent 66cb83f commit 8281861

File tree

1 file changed

+58
-1
lines changed

1 file changed

+58
-1
lines changed

README.md

+58-1
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,61 @@ dependency `com.unity.mobile.notifications-2.3.2` and `com.cysharp.unitask-2.5.5
3737
## Use
3838

3939
- Add define symbol `VIRTUESKY_NOTIFICATION`
40-
-
40+
- Create `NotificationChanel` (via `Create` > `Unity-Common` > `Notification Chanel`)
41+
42+
43+
![Unity_Sc8gP1veiY](https://github.com/user-attachments/assets/62050ab1-36a2-40c2-af80-3b4898bde874)
44+
45+
46+
![Screenshot 2024-08-28 135421](https://github.com/user-attachments/assets/0e4688ac-b718-4f2a-b8bb-9875ba628953)
47+
48+
- `Identifier`
49+
- `Minute` (after t minute notification will be sent)
50+
- `Repeat` (is it repeatable or not)
51+
- `Pig Picture` (only android)
52+
- `Name Picture` (name pig picture notification)
53+
`Note: File big picture must be place in folder StreamingAsset, Name Picture must contains file extension ex .jpg`
54+
55+
![mJSRu](https://github.com/user-attachments/assets/d50145c2-1d6f-4d25-9ec3-424211eff43c)
56+
57+
- `Override Icon`
58+
- `Small Icon` (custom small icon)
59+
- `Large Icon` (custom large icon)
60+
61+
- `NotificationPrepare`
62+
Attach NotificationPrepare to scene to prepare notification android bigpicture, RequestUserPermission android and schedule
63+
64+
![Screenshot 2024-08-28 140819](https://github.com/user-attachments/assets/8a905a11-7b17-4d36-bea5-61fd9f412484)
65+
66+
- Send notification
67+
68+
```csharp
69+
public NotificationChanel notificationChanel;
70+
71+
private void Start()
72+
{
73+
notificationChanel.Send();
74+
}
75+
```
76+
- Schedule notification
77+
78+
```csharp
79+
public NotificationChanel notificationChanel;
80+
81+
private void Start()
82+
{
83+
notificationChanel.Schedule();
84+
}
85+
```
86+
- Cancel All Scheduled
87+
88+
```csharp
89+
public NotificationChanel notificationChanel;
90+
91+
private void Start()
92+
{
93+
notificationChanel.CancelAllScheduled();
94+
}
95+
```
96+
97+

0 commit comments

Comments
 (0)