Now that we have the storage and backend sorted, we finally need to perform the messenger part. This is split into four parts:
Compose
Send/Receive
Contacts
Push
Messages are just a list of uneven table items. If we attach an ID to each message list from each contact, we can display the conversation. The conversation is still just a list of uneven table items. These are the simplest of tasks, so there is not much need to spend time on it.
The difficult part is the first message. If we have an ID on each message object that points to parent
/previous ID
, we can keep going backwards down the list. If parent
/previousID
is "-1"
, then it is at the top of the list.
For the conversations, if we have a list of all the objects with parentID
of "-1"
, then we will have the initial message display.