mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-03-09 06:02:33 +01:00
🎨 Support sending notifications on Android https://github.com/siyuan-note/siyuan/issues/17114
Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
parent
487e27cb00
commit
51295adb4b
3 changed files with 10 additions and 2 deletions
|
|
@ -26,7 +26,7 @@ export const onMessage = (app: App, data: IWebSocketData) => {
|
|||
break;
|
||||
case "sendDeviceNotification":
|
||||
if (window.JSAndroid.sendNotification) {
|
||||
window.JSAndroid.sendNotification(data.data.title, data.data.body, data.data.delayInSeconds);
|
||||
window.JSAndroid.sendNotification(data.data.channel, data.data.title, data.data.body, data.data.delayInSeconds);
|
||||
}
|
||||
break;
|
||||
case "backgroundtask":
|
||||
|
|
|
|||
2
app/src/types/index.d.ts
vendored
2
app/src/types/index.d.ts
vendored
|
|
@ -255,7 +255,7 @@ interface Window {
|
|||
getScreenWidthPx(): number
|
||||
exit(): void
|
||||
setWebViewFocusable(enable: boolean): void
|
||||
sendNotification(title: string, body: string, delayInSeconds: number): void
|
||||
sendNotification(channel: string, title: string, body: string, delayInSeconds: number): void
|
||||
};
|
||||
JSHarmony: {
|
||||
showKeyboard(): void
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue