问题标签 [sender-id]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
3391 浏览

variables - 在服务工作者(Firebase)中设置变量messagingSenderId

我想在我的服务工作者中设置一个变量 messingsSenderId 值,而不是硬编码的值。可能吗?

我像这样注册我的服务人员:

在我的 firebase-messaging-sw.js 中,我像这样初始化 firebase

问题是我找不到如何将数据传递给我的服务工作者文件。任何想法?

谢谢

0 投票
0 回答
59 浏览

ruby-on-rails - AWS SNS SMS senderID is behaving somewhat erratically

I'm trying to send alert to clients from our rails application and I would like the sender id to be our company name. I've tried setting the DefaultID using the dashboard, the ruby SDK, and setting the SenderId on each publish. However, in all cases the SenderId randomly (at least I can't find a pattern) changes between "notify", our company name, and a 4 digit code.

I've tried things like setting the default SenderId for the SNS before each publish, I've tried setting after each publish, Ive tried several different Sender ID.

I just can't figure out any reason why it would work sometimes and not others. I've got my setting for sms as transactional. The only thing I can think of is that the NZ (in this case 2 Degrees) could just be failing. I.e. have a bad system. I know there can be country specific rules around SenderIDs and their formats etc. But it works sometimes so surely my settings are alright.

0 投票
1 回答
370 浏览

amazon-web-services - 使用相同的电话号码从 AWS SNS 发送 SMS,无需 Sender ID。

我在加拿大,我们的应用正在发布不同的短信。例如,我们可以向用户发送一条测试短信,我们针对不同的事件发送短信提醒等等......

我从这个列表中看到加拿大不支持发件人 ID:https ://docs.aws.amazon.com/sns/latest/dg/sms_supported-countries.html 。因此,SMS 是从一个随机数发送的。

有没有办法告诉 AWS SNS 始终从同一个号码发送我们的短信?

0 投票
2 回答
1056 浏览

android - 用于 Android 推送通知的动态 Firebase SenderID

我有一个带有 Firebase 的 react-native 应用程序,它在构建时不使用 google-services.json,然后在应用程序运行后手动调用 FirebaseApp.initializeApp() 在我的 google-services.json 中传递正确的值。但在这种情况下,我无法为 Android 用户发送推送通知,因为 SenderID 不在 google-services.json 上,有一些 Firebase 函数可以知道我的 SenderID 吗?或者是另一种在没有 SenderID 的情况下以 react-native 在 Android 上发送推送通知的方法?

0 投票
0 回答
461 浏览

bash - 如何在 dbus-monitor 中检测通知的发送者和目的地?

我的目标是过滤来自不同应用程序的通知(主要来自不同的浏览器窗口)。

我发现在 dbus-monitor 的帮助下,我可以编写一个小脚本来过滤我感兴趣的通知消息。过滤器脚本运行良好,但我有一个小问题:

我从

命令。我必须添加“destination=':1.40'”,因为在 Ubuntu 20.04 上,我总是收到两次相同的通知。以下输出

证明原因:

正如您所看到的,发件人 :1.277 首先发送到 :1.56,这将是发件人到 :1.40 的目的地。(只是notify-send hello发送了测试消息)

我的脚本正在以这种方式工作,但是每次系统启动时,我都必须检查目标号码并相应地修改我的脚本才能正常工作。

我有两个问题:

  1. 如何自动发现目标字符串?(上例中为:1.40)
  2. 如何防止系统两次发送相同的消息?(如果这个问题能得到回答,那么第 1 点下的问题就变得毫无意义了。)
0 投票
2 回答
165 浏览

android - Android 手机不显示 SMS 发件人 ID

我的 Android 手机不显示 SMS 发件人 ID,例如,如果我的联系人列表中的一位朋友给我发短信,我的手机不会显示发件人的姓名(保存在我的联系人列表中),它只显示手机发件人的号码。但是当他们打电话给我时,我的手机会显示来电显示姓名(保存在我的联系人列表中)。任何解决此问题的帮助将不胜感激。