颤音:使用电话包的传入SMS的时间戳是错误的

发布于 2025-01-26 17:34:59 字数 377 浏览 2 评论 0原文

我正在使用电话软件包开发一个在颤抖中的SMS应用程序。在此应用程序中,应用程序正在收听传入的消息并在其上进行一些处理。处理后,我想在本地数据库中存储一些针对此特定SMS的唯一标识符,以便当我必须通过处理的结果向用户显示此消息时,我可以从本地数据库中使用此ID,并从收件箱中使用过滤SMS。我尝试遵循几个逻辑,但它不起作用:

1-从收件箱到本地db的SMSID,但它并不可靠,好像从收件箱中删除了特定消息一样,新的传入SMS与已删除的SMSID相同。

2-(时间戳记和地址)传入的SMS,但问题是我获得了与从收件箱中获得的少1秒钟的传入SMS的时间戳。例如,实际时间戳是收件箱中的12:10:32,但在接收到传入的短信的情况下,是12:10:31。我不知道有什么问题。

请帮助我为此找到解决方案。

I am developing a SMS app in flutter using telephony package. In this app, app is listening an incoming messages and doing some processing on it. After processing, I want to store some unique identifier for this particular SMS in local database so that when I have to display this message to user with processed result, I can use this ID from local database and filter SMS from Inbox. I tried following few logic but it did not work :

1- smsID from Inbox to local DB but it is not reliable as if particular message is deleted from inbox, new incoming sms get same smsID as deleted one.

2- (time stamp and address) of incoming sms but the problem is that I am getting the timestamp of incoming sms with around 1 second less than what I am getting from Inbox. e.g the actual time stamp is 12:10:32 in inbox but in the case of receiving incoming sms, it is 12:10:31. I don't know what is the problem.

Please help me find a solution for this.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文