简体   繁体   中英

Send sms automatically for incoming calls and messages

我是一名UG学生.....我正在创建一个Android应用程序,因为我的项目工作是...在日历中设置事件....我的应用程序从日历中获取开始时间和结束时间并静音在该时间段内收到的呼叫和消息,并在需要时自动将短信发送到呼叫和消息。...我已经编码直到使呼叫和消息静音。并且我保留了用于答复和答复复选框短信,但如果用户选中复选框,我不了解如何发送消息

  • you can store the user preferences in a database (or shared preferences, or any other way ), on the basis of the checkbox
  • check for the preferences, whenever an event for which you could send a message occurs and send a message programmatically with the following code

      SmsManager sms = SmsManager.getDefault(); try { sms.sendTextMessage(phoneNumber, null, messageText, null, null); } catch(IllegalArgumentException e) { } 

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM