How to send MMS messages to phones using a java programme

Introduction

Have you ever tried to send messages to your mobile phone using java? If not this blog is for you. You may have seen some programs send SMS and MMS notifications to phones. I also wanted to know the technique use by them. Finally I found the way to send MMS notifications to mobile phones.

I’m very happy to say that this is not any thing newer than an advance version of my previous post. So in this post I’m going to show one use of it. A Scheduled Mobile Messaging System.

I also learned many more things other than sending MMS through this project. So I would like to invite you to comment on that and give suggestions on improving it.

Advantages

There are few advantages of using MMS to send notifications.

  1. Can include images,audios
  2. Can send through an email account
  3. Can sent to many parties at once
  4. Only receiver has to pay ( just only few cents 😉 refer package details )

Basics behind this technique

Have you ever sent MMS using an email account? That’s the basic. Let’s see how to do it.

Suppose your phone number is 5555555 and service provider is Mobitel. First you have to open a window to send new mail and type the message you want.

Now type the receiver’s address as shown below and click Send.

Receiver's Address

In this address ’94’ is the country code for Sri Lanka, ’71’ is the code for Mobitel numbers and again ‘mobitel.lk’ is also for Mobitel. Now you can guess what are the addresses for any other phone numbers.

Creating a system for scheduled tasks

In my previous post I showed how to send emails using a java program. So I thought of using that method to send scheduled messages to phones using a java program. Here how it works.

Main Menu

In this program you need to set Settings by clicking “Settings” button.

Settings Window

Then you can create new tasks by clicking “Add New Task” button.

New Task Window
You can also view the scheduled tasks by clicking “Scheduled Tasks” button.

Scheduled Tasks Window

I think you can make more user attractive applications integrating this type of notification system.

You can also download my project from here and refer it for further details.

P.S:   According to my knowledge in Sri Lanka mobile service providers only allowed to send MMS using this system.But If you know the way to send SMS  using java, please let me know.

Advertisements

25 thoughts on “How to send MMS messages to phones using a java programme

  1. Good job!!

    You can send/receive SMS using AT commands from PC connected mobile device or GSM/GPRS/EDGE/HSDPA modem. Use java serial programming.

    For more infomation, write to me or contact via +94 777 891 566

    Cheers!!
    Nandika

  2. There are several method to send/receive SMS through Java based on the resources & the requirement you have.

    These are the practical experience which I had through the leading telecommunication service providers,

    1. Using PC connected device (eg: phone, GSM/GPRS/EDGE/HSDPA modem..etrc) :
    You have to write java Serial code to communicate via the COM port which assigned to the connected mobile device. Use AT Commands to initiate the service.

    2. TCP/IP : (for CDMA switch)
    Using a TCP socket programe, you can access a SMSC (SMS Center) from any CDMA service provider like SLT/Suntel or Lankabell,

    3. SMPP : (Short Message Peer to Peer)
    This is for GSM service providers (ie. Dialog/Mobitel/Etisalat ..etc). You have to write a application using SMPP protocol & implement a subscriber and publisher to deal with the GSM switch.

    Write to me for more info.

    cheers!!

    1. chndn,

      In the example I showed how to send an mms using your gmail account.
      In one of my previous post I’ve shown how to send an email using a gmail account. The only change need is the change need is changing “To” email address.You can have the code from that post.
      In addition to that you have to implement “Automatically” part.

      1. ok i got your complete code of java………. if you get any idea for sending mms automatically then please inform me as i needed it for my project purpose….. thannx for your reply…….. have a great life……..

  3. something good u have done but explain me clearly if possible and i am in india (what all changes should be made).

    1. Hi Subramanian,
      I think your intention is about email address. In my application I added data required for Sri Lanka. The only change you have to do is change country code, service provider’s code and relevant email domain (in here it’s mms.mobitel.lk). You can easily find them through service providers web sites. Rest of the application will remains same. If you need more clarification feel free to contact me 🙂

    1. Hi Esra,
      I assume you want to send MMS using a computer connected mobile (or modem) device
      I’ve look some forums and the answer is no. eg:
      [1] http://developer.nokia.com/Community/Discussion/showthread.php/31824-Is-there-any-way-to-send-MMS-using-AT-commands
      [2] http://www.edaboard.com/thread71500.html

      But, it seems there are vendor specific solutions are available. Following are some links I found.
      [1] http://www.hmangas.com/Electronica/Datasheets/GSM/Q2686/MMS%20Sample%20Application.pdf
      [2] http://www.soselectronic.com/a_info/microsite_docs/QUECTEL/GSM_MMS_ATC_V1.02.pdf
      [3] http://www.nowsms.com/discus/messages/12/2242.html

      Hope those will be helpful to you.

      Cheers !

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s