Sending SMS and MMS - android

I'm looking at replacing the default Android text messing app with my own, but I don't exactly know how to send SMS and MMS text messages. I would like to at least get it so that I can send SMS first, since I would assume that sending MMS would be much more difficult.
So, what exactly should be done when sending messages of these types? Any code examples that would be easy enough to understand?
Thanks!

Check the android-smspopup source code.

So, what exactly should be done when sending messages of these types? Any code examples that
would be easy enough to understand?
Use SmsManager. Here is a sample project showing the basics of sending an SMS, either through the default client or by using SmsManager. I do not believe there is a public API to send MMS, though.

Related

Embed hidden text in Android `SmsMessage`

As the title of my questions suggests, I am looking for a way to embed hidden text inside of a SMS message. I am unsure if this is possible and have spent a fair amount of time scouring the documentation from Android at http://developer.android.com/reference/android/telephony/SmsMessage.html.
This following link provides information about the structure of an SMS message http://www.smartposition.nl/resources/sms_pdu.html as it may be of use to the reader.
I am seeking the confirmation or rejection that this is possible, and if it is, will the method provided be platform/application independent?
Thanks all for you help and expertise.
That's not really possible. You have no control over how any given SMS app chooses to display received messages. It may be possible to encode something within the text using non-printing characters, but it would have to be your app that receives and decodes the message. The same goes for any kind of encoding or encryption you might implement. No standard SMS client is going to know to specially handle your messages.

Using/Obtaining SMS short code for application

I have searched google and have not found the answer I was looking for only bits and pieces. I would like to create an application where a user could text a SMS shortcode number with a certain string of text "example: IN" which would then run a command on a server if it matches a specific keyword. Basically it would update a database and then send a message back to the user. My questions are how do I obtain a SMS Short code number? How do I link that with a server? What programming language is the most efficient and effective for accomplishing the task? I have a little bit of programming experience in "HTML, JavaScript, PHP and C" and am willing to learn more languages if required. If someone could answer these questions for me I would be grateful.
Twilio offers this along with their other telephony services. I haven't actually used their SMS service, but I've heard good things about the company in general.
For less than 1/100 of the price of a dedicated shortcode, you can start with a "shared shortcode" provider like TextMarks.
TextMarks owns the "41411" shortcode, and you can lease keywords on it for use with your own applications.
You configure a callback URL, and any incoming SMS messages starting with your keyword get routed to your own web server as HTTP requests. If you respond with anything, your message even goes back to the user as another SMS response.
More info:
TextMarks SMS auto-responder API overview
[Disclosure: I built a large portion of the TextMarks API! Ask me anything.]
You will need a SMS server which is not very common. So you should look for providers like SMSMode or Essendex. But you'll have to pay to receive and send SMS.

Android - How to send/read vCard via SMS/MMS?

I'm looking for any way to send/read a vCard via SMS in my app. I've read a lot of articles, web-pages, forums etc. There is still not even a clue how to do that.
Here is transaction.
User selects some specific contact
App generates a vCard for it
User types a number to send vCard to
App sends SMS with that vCard(?)
Addressee recievs SMS with vCard and asked to browse contact/add to
contacts(?)
Here is some posts in stackoverflow with the same issue: this and this. Still nothing helpful...
I've found this nice library to work .vcf files(both write and read). But is there any way to send it to another phone (and read properly of course)? Just send this as a string maybe?
HERE is a nice stack post about handling data from recieved SMS sent by SMSManager.sendDataMessage() method
Please help! I'll be happy to get any clue, useful library or a proof that it's impossible on Android. If there is no way via SMS can you give me advice how to do that via MMS?
What's interesting, that there is a lot of apps with that functionality, so I guess this is possible.
Thanks anyone who responds. Have a good day.
You don't have to read MMS from code, when you have system for that.
To send MMS with vCard, you need to attach .vcf file to it.
Here is an answer how to do that.

Integrating MMS in android application

I have found few examples in stackoverflow for integrating MMS with my android application. But nothing worked fine.
If some one can send me a good link for MMS integration in my application, i shall be very much thankful.
Looking forward for your response.
Thank you.
For reading mms: How to Read MMS Data in Android?
For writing mms try using this example: http://maximbogatov.wordpress.com/2011/08/15/mms-in-android-part-2-working-with-mms-storage/
It adds the mmsdata to the tables, but there is still an issue with the message not showing in the native message application.
Hopefully this will get you started on the right track anyway.

Get Picture Messages To C++ program

I'm currently thinking of setting up a picture message import project. Something like this:
Client Mobile Device [picture message] -> our Server Device
Server Device [picture && number -> Server Computer
However I don't know if there's a possible way to do this. I could set up a google voice account and use something like this in order to retrieve messages, however this doesn't allow picture messages...
So I was thinking of perhaps making an android or iPhone application to redirect picture messages. Though I don't know if this is possible. If it is, how would I go about gathering the messages? The networking is simple enough, however I'm not familiar with the android system, nor the message system of the iPhone.
On the other hand, I could make a simple email server to receive messages from the cell phone provider's email system.
Is any of the above viable? The image as well as the origin number are both needed.
This sounds like a typical client/server application actually, except the commands sent to the server contain binary data.
There are many ways to do this, and many protocols you can use. Email (gmail) is just one example.
What I would do is use HTTP to post binary messages to your web server. This is cool because it manages authentication, data transfer, etc, are all available.
Here's a short example: Secure HTTP Post in Android
Just add authentication on top of that and you're in business!
You would have to do some web server development too.
I hope this helps.
Emmanuel
Ok I think this is possible. I'm not sure how it works but I'll do my best.
First you have to be notified when an SMS is received by listening to SMS_RECEIVED events. BroadcastReceiver + SMS_RECEIVED
Second, you have to read the SMS attachment as explained here: Get attachment from unread MMS messages
Does this help?

Categories

Resources