Messages Sent By You...

treehousefrog

Member
Licensed User
Longtime User
Hey guys...

I'm writing an app that has an SMS function - the ability to retrieve and send messages. I get the sender of the message by comparing the sms.personid to the contact.id. and this works most of the time:

For iii = 0 To listOfContacts.Size - 1
Contact = listOfContacts.Get(iii)
If Contact.id = Sms.PersonId Then sender = Contact.displayname
Next

Unfortunately there's one problem which is getting it to differentiate between messages sent by the user and messages sent from unknown numbers. When I send a message the contact.id is -1, and when I receive one from an unknown number it's also -1... I tried looking at the address but unfortunately the address is their address when you send it...

Is there a way to find out whether the stored message was one sent or received? Or a way to retrieve the phone number of the phone the app is installed on? Thanks very much in advance and sorry if there's any dumbness here...
 
Top