How to send SMS

Put your problem here if it does not fit any of the other categories.

Postby mijalko » Fri Feb 19, 2010 8:51 pm

I have found where is the problem
It is bug in a tattoo:

http://stackoverflow.com/questions/2285 ... double-sms
mijalko
Freshman
Freshman
 
Posts: 2
Joined: Wed Feb 17, 2010 8:00 pm

Top

Postby nithin_in » Fri Feb 26, 2010 12:58 pm

mijalko wrote:I have found where is the problem
It is bug in a tattoo:

http://stackoverflow.com/questions/2285 ... double-sms


Oh Device problem huh???anyways i have question...

"sendTextMessage" is used to send text message to another emulator port but is there any way to send sms to specific application port on another emulator.

i found "sendDataMessage" is used to send sms on specific application port but failed to use it successfully.
i also set permissions in manifest but once again failed. I dont know where i am wrong.

Actually i want to develop an application that receives the sms send on the specific port. those sms should not go to inbox. i found no way "how to send sms on specific port" and "how to register my application to specific port".

plz help me if u know any way. Thanks in advance.


What do you say about this is it possible or not????
Pls reply..
thankz
nithin_in
Freshman
Freshman
 
Posts: 7
Joined: Fri Feb 19, 2010 9:43 am

Postby hasitharandika » Mon May 10, 2010 12:26 pm

hi guys,

this sends two sms with same content to the receiver.

don't know why??

this works in the emulator, but in real device this sends two messages?

i'm using a HTC tattoo

String msg = "Testing";
SmsManager sms = SmsManager.getDefault();
PendingIntent pi = PendingIntent.getBroadcast(this, 0, new Intent(), 0);
sms.sendTextMessage("7723", null, msg, pi, pi);

regards,
Randuja
hasitharandika
Developer
Developer
 
Posts: 45
Joined: Mon Feb 15, 2010 8:37 am
Location: Sri Lanka

Re: How to send SMS

Postby griffinshi » Sat Jun 05, 2010 9:06 am

hi all,

Code: Select all
PendingIntent pi = PendingIntent.getActivity(this, 0,
            new Intent(this, SMSNew.class), 0);   
        SmsManager sms = SmsManager.getDefault();
       
        sms.sendTextMessage(phoneNumber, null, message, pi, null);


the code work WELL, but i could moniter it via ContentObserver, but i would like to do this, how to do? :D
new to anddev:)
griffinshi
Experienced Developer
Experienced Developer
 
Posts: 71
Joined: Fri Feb 26, 2010 8:53 am
Location: cn

Re: How to send SMS

Postby hasitharandika » Sat Jun 05, 2010 10:13 am

hi guys it's a bug in the HTC TATTOO, you have to send the sms as multiplemessage
hasitharandika
Developer
Developer
 
Posts: 45
Joined: Mon Feb 15, 2010 8:37 am
Location: Sri Lanka

Re:

Postby mapiko » Wed Jun 23, 2010 1:26 pm

Nemat wrote:Hi,

I am trying to send sms on device.but my sms is sent twice.Here is my code:

SmsManager sms = SmsManager.getDefault();
sms.sendTextMessage(destination,null, "This is test message",null, null);


Hello!

I'm wondering how sis String destination written?
is it:"+386xxxxxx" or some other way?

tnx
mapiko
Senior Developer
Senior Developer
 
Posts: 106
Joined: Sat May 15, 2010 5:19 pm

Top

Re: How to send SMS

Postby sblantipodi » Sun Jul 18, 2010 8:25 pm

this code

SmsManager sm = SmsManager.getDefault();
sm.sendTextMessage("5554", null, "this is a test", null, null);

launch an exception when running on my emulator, why?
thanks.
sblantipodi
Senior Developer
Senior Developer
 
Posts: 122
Joined: Fri Mar 26, 2010 1:41 pm

Re: How to send SMS

Postby mapiko » Sun Jul 18, 2010 9:07 pm

Did you write premissions in your manifest file?
mapiko
Senior Developer
Senior Developer
 
Posts: 106
Joined: Sat May 15, 2010 5:19 pm

Re: How to send SMS

Postby sblantipodi » Sun Jul 18, 2010 9:10 pm

mapiko wrote:Did you write premissions in your manifest file?


I have this in it.
<uses-permission android:name="android.permission.SEND_SMS" />
<uses-permission android:name="android.permission.RECEIVE_SMS" />
sblantipodi
Senior Developer
Senior Developer
 
Posts: 122
Joined: Fri Mar 26, 2010 1:41 pm

Re: How to send SMS

Postby mapiko » Sun Jul 18, 2010 9:22 pm

Can I see code? (all files..)
mapiko
Senior Developer
Senior Developer
 
Posts: 106
Joined: Sat May 15, 2010 5:19 pm

Re: How to send SMS

Postby sblantipodi » Sun Jul 18, 2010 9:29 pm

mapiko wrote:Can I see code? (all files..)


it' really too big :)
do you have an idea on why it throws the force close?

I execute this code from the keyPressed methods.
sblantipodi
Senior Developer
Senior Developer
 
Posts: 122
Joined: Fri Mar 26, 2010 1:41 pm

Re: How to send SMS

Postby sblantipodi » Sun Jul 18, 2010 10:36 pm

Ok I noticed that the force close is thrown only in 1.5 emulator, on 2.1 it works well...
I'm sorry for this.
sblantipodi
Senior Developer
Senior Developer
 
Posts: 122
Joined: Fri Mar 26, 2010 1:41 pm

Re: How to send SMS

Postby umairca » Sun May 29, 2011 7:19 am

Hi guys ... nice conversation. I've tried the code for sending sms emulator to emulator. Could any one guide me that i want to send sms by connecting my andriod phone to PC and then send sms through ecclips to other mobile.?

I am using sms.sendDataMessage(phoneNumber, null, port, a2_bytes , pi, null);
my android is connected through usb cable.
any one tell me how would i know that my andriod is connected on which port? from where i can check this.


please correct me if i am wrong
umairca
Once Poster
Once Poster
 
Posts: 1
Joined: Sun May 29, 2011 7:13 am

Re: How to send SMS

Postby jjj » Fri Dec 23, 2011 11:33 am

hi guys,

I try to send a SMS with my HTC wildfire to a HTC Desire.
But this is not working.
I think the problem is the destination address.
i've been trying +31632223424 and 0632223424 but its still not working.

Has anybody the solution for me?

thnx
jjj
Once Poster
Once Poster
 
Posts: 1
Joined: Fri Dec 23, 2011 11:29 am

Top
Previous

Return to Other Coding-Problems

Who is online

Users browsing this forum: No registered users and 15 guests