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.
- Can include images,audios
- Can send through an email account
- Can sent to many parties at once
- 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.
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.
In this program you need to set Settings by clicking “Settings” button.
Then you can create new tasks by clicking “Add New Task” button.
You can also view the scheduled tasks by clicking “Scheduled Tasks” button.
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.
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
Thank you very much for your appreciations…..
It would be more useful if you can share your knowledge about AT commands here ………. because anyone can see it ……….
nice work machan!! use a web server to automate this as it will run without a pc running
Thank you Pasindu ………………….. I tried that also
I want to know how to send the sms using java application
Some mobile services allow to send SMS as a similar way like MMS.
You can contact Nandika (who commented here) for further information.
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!!
HI,
I want to know how to send a sms from a phone to computer.
Can you help me on this?
Thanks.
Hi,
You’ll get the necessary things through the following links
1. Using AT commands : http://www.developershome.com/sms/howToReceiveSMSUsingPC.asp
2. Free software/tools and libraries : http://www.developershome.com/sms/freeLibForSMS.asp
( Customized software for various modems are also available )
Thanks!
You are welcome !
Your the best ❤
Thank you 😀
Good Information!!! but i would like to send mms using at command do you know how???? please help me!!!
Hi Mauricio,
I’m not sure about sending MMS using AT commands. (According to http://www.edaboard.com/thread71500.html you can’t)
But you can send SMS using AT commands as given here : http://www.developershome.com/sms/sendSmsByAtCommands.asp
can u give me a code for sending mms to mobile via pc automatically ?
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.
but have prepared any code in java for sending the mms or used directly the GUI shown in the images…???
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……..
thanks
you are welcome Pankaj !
something good u have done but explain me clearly if possible and i am in india (what all changes should be made).
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 🙂
thanks but how can send mms from computer to phone via GSM automatically pleas help me
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 !