An agent-based framework for building mobile applications