How can I process incoming MMS messages - android

I want our app to examine incoming SMS and MMS messages, examine their contents, then if they are something we are interested in, log and display them. Then block them from going to the standard messaging app. We've had this working with SMS messages for a while, but I can't find any samples or documentation explaining how to retrieve data content from incoming MMS messages.
All I've found are apps that retrieve MMS contents from the Messaging content provider. I suppose we wait till it gets there then retrieve the content and remove it. But that seems kind of backward.

Check this project
http://code.google.com/p/android-notifier/
It contain MMS parser implementation. But it support only header, so you can get information about type of MMS, sender phone number, etc.

Clone this GIT repository:
https://android.googlesource.com/platform/frameworks/base
And look to this folder core\java\com\google\android\mms\pdu\
Here is MMS header and body parser. If you can see example how to use it download also this GIT repository:
https://android.googlesource.com/platform/packages/apps/Mms

Related

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.

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?

Can I send periodic messages to my Android app users?

Is it possible to make a app on Android such that whoever downloads this app receives a message from me weekly? I want to be the only person who can write on this message board and no one else. If this is possible, where should I start looking for tutorials about doing this sort of stuff?
You can create a RSS/Atom feed for yourself. Your android app can then just sync to this feed. Update the feed as often as you like. If you like this approach I can give more details.
yes , you can send periodic messages see this
in that SendMessage(); function is there so you have to make code for send message to recipient

Sending SMS and MMS

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.

Categories

Resources