颤音:使用电话包的传入SMS的时间戳是错误的
我正在使用电话软件包开发一个在颤抖中的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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论