开发者

Sms Application Android develop

I need to develop an android application which when receive a message reply automatically to the sender of the message(without pressing any button) with a predefined text like(thank you for contacting we will contact you soon). Any links,suggestions most welcome. If anybody explain in brief what should i do then it will help me a lot. I already read visit http://mobiforge.com/developing/story/s开发者_如何转开发ms-messaging-android link. It help me but eclipse say The type SmsManager is deprecated. so what another type should be use?


That's true that SmsManager in android.telephony.gsm package was deprecated. This class has been replaced by SmsManager class from android.telephony package. I resolve this problem by change imported package android.telephony.gsm to android.telephony for SmsManager class. You can read the documentation. This is SmsManager documentation from android.telephony.gsm package and this is SmsManager documentation from android.telephony package.


Try this:

  1. First listen for incoming sms.
  2. Send sms.

Parts 1 and 2 are well tested with Android 2.3.


Yes android.telephony.SmsManager is depreciated . You should use android.telephony.gsm.SmsManager to send SMS and to send SMS automatically you have to use BroadcaseReceiver for incoming SMS.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜