我很困惑应该在 Angular 14 Ionic 6 Capacitor 4 应用程序中实现哪些包,以便在应用程序用户之间发送和接收通知。我需要能够处理传入的消息:
我最初的方法是使用@capacitor/push-notifications来实现,并实现两个监听器:
pushNotificationReceived
pushNotificationActionPerformed
Run Code Online (Sandbox Code Playgroud)
然而,我发现这种方法存在以下缺点:
然后我遇到了 [firebase/messaging Service Worker][1] 方法。
我还没有实现它,但在我看来,虽然提供了onBackgroundMessage捕获和处理后台通知的方法,但还不够:
此时我有些困惑:
谢谢你![1]: https: //firebase.google.com/docs/cloud-messaging/js/receive
push-notification firebase-cloud-messaging firebase-notifications angular
以下 URL 返回包含美元汇率的 XML:
http://www.boi.org.il/currency.xml?curr=01
Run Code Online (Sandbox Code Playgroud)
我需要调用并提取(通过解析结果)Excel VBA 返回的汇率。
在浏览器中手动调用后在 VBA 中调用时 - 它工作正常。但是,经过一定时间后,它不再通过 VBA 工作,除非首先在浏览器中再次手动调用。相反,它返回此字符串作为结果:
<html><body><script>document.cookie='ddddddd=978a2f9dddddddd_978a2f9d; path=/';window.location.href=window.location.href;</script></body></html>
Run Code Online (Sandbox Code Playgroud)
我用来调用的VBA是这样的:
Function GetExchangeRate(ByVal curr As Integer, Optional ByVal exDate As Date = 0) As Single
Dim strCurrCode As String
Dim strExDate As String
Dim strDateParamURL As String
Dim intStartPos As Integer
Dim intEndPos As Integer
Dim sngRate As Single
sngRate = -1
On Error GoTo FailedCurr
strDateParamURL = ""
strCurrCode = Format(curr, "00")
If (exDate > 0) Then
strExDate = Format(exDate, "yyyymmdd")
strDateParamURL …Run Code Online (Sandbox Code Playgroud)