How to test "Simple Send SMS " app?

General topics about the Android-Platform itself.
Coding issues please to the subforum right below.

How to test "Simple Send SMS " app?

Postby anditch » Sat Jan 19, 2008 2:51 pm

Hello,

This question might have been asked zillion times. And I have surfed quite a lot to find the answer. But here I am asking the same thing if someone has the answer :

How can I test "Sending an SMS application" using the emulator?

There's smsManager which provides the API to send SMS. But testing that if my SMS was sent successfully is difficult. Any idea how I can test my small application?

Please help!!!!!!!!!!

Regards!
anditch
Freshman
Freshman
 
Posts: 2
Joined: Sun Jan 13, 2008 1:00 pm

Top

Postby plusminus » Sat Jan 19, 2008 3:02 pm

Hello anditch,

unfortunately I currently have no time to try it on myself, but you can add Intents you want to receive on impotant points in the lifetime of the sms, like when sending failed or succeded. I don't know if this is already fully implemented by Google.

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. void sendTextMessage(String destination, String source, String text, Intent sentIntent, Intent deliveryIntent, Intent failedIntent)
  2.  
  3.         - Send a text based SMS.
Parsed in 0.031 seconds, using GeSHi 1.0.8.4


Regards,
plusminus
Image
Image | Android Development Community / Tutorials
User avatar
plusminus
Site Admin
Site Admin
 
Posts: 2688
Joined: Wed Nov 14, 2007 8:37 pm
Location: Schriesheim, Germany

Postby anditch » Sat Jan 19, 2008 4:22 pm

That was a quick reply!! Thanks a lot!!

I would try using the intents and see if that helps.

Thanks and Regards,
Anditch
anditch
Freshman
Freshman
 
Posts: 2
Joined: Sun Jan 13, 2008 1:00 pm

In order to avoid an StringIndexOutOfBoundsException

Postby edouard.mercier » Thu Feb 21, 2008 10:17 pm

Just to indicate that the destination address (first argument of the "sendTextMessage()" method) should contain a valid phone number otherwise you will get an "StringIndexOutOfBoundsException" exception.

Moreover, you need to leave the source address argument (the second argument) null; otherwise, you will get the same exception.

Hope this help those, that have been blocked just by me.

Cheers,
Edouard
edouard.mercier
Once Poster
Once Poster
 
Posts: 1
Joined: Thu Feb 21, 2008 10:10 pm

Top

Return to General

Who is online

Users browsing this forum: No registered users and 3 guests