From the diagram below its quite clear how Postman works:
- Postman intercepts all messages that come to the phone.
- When a message arrives it gets scanned to see if it matches any one of the multiple filters set by the user.
- Every filter has a set of actions associated with it.
- When a match occurs, an action is added to the Postman Action Queue
- If no match occurs, postman just forwards the message to the phone's default messaging application.
Postman has everything from
- android services
- broadcast receivers
- single action queue
- customized views
- notifications etc etc.....
The underlying data storage of Postman is a SQLite database.Ive attached the diagram of it below:
The entire code base of Postman is up at https://github.com/reinwald/Postman .Ive tried my best to make it as easily pluggable as possible. If you guys want to add custom actions when filter matches occur its as simple as following some contracts defined ,then adding the custom action object to the action queue and letting postman handle the rest.
Till next time ...