Log in

View Full Version : O2 XDAII ...SMS application cant work!!!!


Twins_sasa
03-30-2006, 01:48 PM
my pocket is O2 XDAII.

i had downloaded a SMS application from this link:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnppcgen/html/sms_apps2.asp

i run it in my pocket PC, the sms could not be sent!!

I am from malaysia, the mobile phone number in malaysia is like 012-1234567.
so in international format will be +60121234567.

i had change this to phone number in the source code:

if (0 == SMSHelper.SendSMS("+60121234567", txtMessage.Text))

but the sms could not be sent!!.
why??

Twins_sasa
03-31-2006, 05:40 AM
hello,

i cant find any function in the source code to let me specify the Service message center number. is this the cause why i cant use this application to send SMS?


MemoryStream ms = new MemoryStream();
XmlTextWriter xmlw = new XmlTextWriter(ms, System.Text.Encoding.UTF8);
xmlw.WriteStartDocument();
xmlw.WriteStartElement("Delivery");
//xmlw.WriteElementString("PackageID", lblPackageID.Text);
xmlw.WriteElementString("Delivered", txtDelivered.Text);
xmlw.WriteEndElement();
xmlw.WriteEndDocument();
xmlw.Flush();
ms.Seek(0, SeekOrigin.Begin);
StreamReader sr = new StreamReader(ms);
txtMessage.Text = sr.ReadLine();
txtMessage.Text = "INTRUSION!! HELP!! House Address: 468,jln 26,Kepong Baru,52100 K.L SIN JUN FEI";
lblMessage.Text = "Message (" + txtMessage.Text.Length.ToString() + " chars):";
this.Refresh();
xmlw.Close();
sr.Close();

// Send message
if (0 == SMSHelper.SendSMS("+60121234567", txtMessage.Text))
MessageBox.Show("Message sent!", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1);
else
MessageBox.Show("Could not send message!", this.Text);



correct me pls..