Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

joyjit

macrumors newbie
Original poster
Aug 8, 2008
3
0
Hi,
Is it possible to code to send & receive SMS using the iPhone SDK??
If Yes, please provide a sample code for it..

Thanks in advance... :)
 
I also search

this information
I posted this question on expert exchange
 
It's possible to get the SMS send screen to appear and you can pre-fill it only with the telephone number (unfortunately).

You use an SMS URL (don't have the code here, but google it and you'll find examples.)

So, it's kind of a solution, but a half-baked one at that.
 
Require API to send SMS in iPhone

Thanks for your response...
From your info I understand that using some API, the SMS send screen would appear with the recipient/s telephone prefilled and using SMS URL I can send the SMS content to some third party (based on that URL) to forward the request to the Service Provider.

But I actually wanted an API (if there is one exist in the iPhone SDK ;)) that can be used in a third party application developed for iPhone to send the SMS with its content to the Gateway of the Service Provider directly and probably not using the way of SMS URL ie forwarding the request to another Third Party and then they fwd it to the gateway.

Please correct me if I've understood or interpret anything incorrectly.

Thanks in advance... :)
 
So, we can only call inner message application of IPhone,
Has IPhone SDK API as J2ME for listen of incoming SMS?
 
Thanks for your response...
From your info I understand that using some API, the SMS send screen would appear with the recipient/s telephone prefilled and using SMS URL I can send the SMS content to some third party (based on that URL) to forward the request to the Service Provider.

But I actually wanted an API (if there is one exist in the iPhone SDK ;)) that can be used in a third party application developed for iPhone to send the SMS with its content to the Gateway of the Service Provider directly and probably not using the way of SMS URL ie forwarding the request to another Third Party and then they fwd it to the gateway.

Please correct me if I've understood or interpret anything incorrectly.

Thanks in advance... :)

Actually, he was answering your question... the iPhone uses URLs as an IPC mechanism, so (for example) one calls openURL on the UIApplication passing in a URL starting with "tel:" to dial the phone for example. I believe the URL scheme for SMS messages is "sms:", however this will only launch the SMS application and allow the user to start typing; there is no way to "drive" the SMS application (other than possibly identifying the intended recipient of the potential text message).

There is no way to "intercept" sms messages sent to the phone for processing in your application. The built in iPhone SMS application will always handle this.

rob.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.