I'm making a contacts program replacement and would like the same functionality as the existing one.
My specific case example, is I have my loved ones Home, Mom, Mobile, and Dad's numbers under the same contact with different names indicating which is which. Without the names, I can't tell which number to use other than the main one.
And for addresses, I want a button to pull up a google map
Dang. I'm also having trouble getting SMS messages using the ID from the contact. I keep getting zero results.
API.EnumSMSmessages(tempContact.Id)
B4X:
Sub EnumSMSmessages(PersonID As Int) As List
Dim SmsMessages1 As SmsMessages, List1 As List
If PersonID=-1 Then
List1 = SmsMessages1.GetUnreadMessages
Else
List1 = SmsMessages1.GetByPersonId(PersonID)
End If
'debug
Log(List1.Size & " messages found for person " & PersonID)
For i = 0 To List1.Size - 1
Dim theSms As Sms
theSms = List1.Get(i)
Log(theSms.Body)
Next
Return List1
End Sub