The messenger application
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
What about displaying the messages?
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.
The message composition
This can be done via a text entry on a keyboard or speech to text. To prevent excessive message sizes, we can set an arbitrary limit...