Android的自动回复申请 [英] Android Autoreply Application

查看:156
本文介绍了Android的自动回复申请的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建一个Android应用程序,如果用户正忙,将自动回复别人收到的短信。将有两个选项供用户选择自己的状态可用或忙碌。因此,一旦用户将他作为忙碌状态,所有接收到的SMS的将收到一封自动回复(通过SMS),告诉他们说:我不能回答,我很忙。我被困在一个条件虽然。我也有,以确保自动回复发送到该号码后,如果我再次获得相同数量的短信,我不应该自动回复回到了那个号码,如果有两个SM的该号码收到之间的时间间隔不超过10分钟,如果时间间隔超过10分钟,就应该发送一个自动回复。我不知道如何去了解这一点。有人可以解释我如何code这一点,也用来做什么逻辑?

I am creating an android application that will send automatic replies to sms received from others if the user is busy. There will be two options for the user to select his status-available or busy. So once the user sets his status as busy, all the incoming sms's will receive an automatic reply (via sms) telling them that" I cant reply, I am busy". I am stuck on one condition though. I also have to make sure that after sending autoreply to that number if I again get an sms from the same number I should not autoreply back to that number if the time interval between two sms's recieved from that number is less than 10 mins and if the time interval exceeds 10 mins, it should send an autoreply. I dont know how to go about this. Can someone explain me the logic about how to code this and also what to use to do this?

推荐答案

我刚刚更新罗伊斯顿·平托的回答一定程度::

I just updated Royston Pinto's answer to some level::


  • 有一个监听器扫描收到的短信的(很多code对计算器可用)

  • 获取从短信的数量,检查其有效数字(短信确实来自网络提供商,没有一点回答他们)

  • 保存接收邮件的PHONENUMBERS和时间进入一个的HashMap

  • 比较传入的SMS号码与你的HashMap中,如发现不到10分钟无动作,否则添加到HashMap和发送消息。

  • 将定期检查的时间条目更新HashMap中。如果时间过去认为的条目比删除HashMap的该条目超过10分钟(U可以使一个功能,这和它的处理程序每​​分钟左右称呼它)

请参阅第3ñ5点..

See 3rd n 5th point..

这篇关于Android的自动回复申请的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆