android:add notification

This commit is contained in:
pengfei.zhou
2020-01-08 20:07:59 +08:00
committed by osborn
parent b520ffb5df
commit cdaebe46cd
3 changed files with 163 additions and 1 deletions

View File

@@ -22,7 +22,7 @@ export function notification(context: BridgeContext) {
}
return context.notification.publish(args)
},
subscribe: (args: { biz: string, name: string, callback: (data?: object) => void, androidSystem?: boolean }) => {
subscribe: (args: { biz: string, name: string, callback: (data?: any) => void, androidSystem?: boolean }) => {
(args as any).callback = (context as any).function2Id(args.callback)
return context.notification.subscribe(args) as Promise<string>
},