Sending SMS
Sending SMS
- Subject: Sending SMS
- From: Ivan Myrvold <email@hidden>
- Date: Sun, 8 Jun 2003 14:16:34 +0200
I am modifying the SendVCard to send SMS message instead of sending a
vCard to the mobile.
The vCardData holds the vCard to be transferred in an NSData variable,
so I commented out the
vCardData = [window CreateVCardFromTextFieldData];
and constructed a vMsg instead:
vmsgstring =
@"BEGIN:VMSG\r\nVERSION:1.0\r\nBEGIN:VCARD\r\nVERSION:2.1\r\nN:Ivan\r\nT
EL:91316356\r\nEND:VCARD\r\nBEGIN:VENV\r\nBEGIN:VCARD\r\nVERSION:2.1\r\n
N:JORUND\r\n
TEL:90631191\r\nEND:VCARD\r\nBEGIN:VENV\r\nBEGIN:VBODY\r\nSu
bject:Test\r\nKan du svare hvis du fikk
denne?\r\nEND:VBODY\r\nEND:VENV\r\nEND:VENV\r\nEND:VMSG\r\n";
vCardData = [vmsgstring dataUsingEncoding:NSASCIIStringEncoding];
...
status = OBEXSessionPut( window->mOBEXSessionRef,
TRUE,
(void*) CFDataGetBytePtr( window->mHeadersData ),
CFDataGetLength( window->mHeadersData ),
(void*) [vCardData bytes],
[vCardData length],
PutCallback,
window );
if( status != kIOReturnSuccess )
{
[window->TextFieldStatus setStringValue:[NSString
stringWithFormat:@"OBEXSessionPut failed. Error = %x.", status ]];
goto errorExit;
}
It looks like the code runs without any errors, but absolutely nothing
is happening on the mobile itself. Is this the correct way of sending
an SMS?
Ivan
_______________________________________________
bluetooth-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/bluetooth-dev
Do not post admin requests to the list. They will be ignored.