Activity Diagram of WhatsApp
An Activity Diagram visually represents the flow of control or data within a system. In the case of WhatsApp, the activity diagram outlines how users interact with the system—from launching the app to sending and receiving messages, handling notifications, and media.
Key Activities in WhatsApp System
Start Point:
- The activity begins when the user opens the WhatsApp application on their device.
Step-by-Step Flow:
Launch WhatsApp Application
- User clicks on the app icon.
- The system loads user profile and chat history.
Check User Authentication
- If the user is not logged in, they must verify their phone number via OTP.
- If the user is already logged in, they are directed to the home screen (chat list).
User Chooses Action
Decision point where the user may:
- Open an existing chat.
- Start a new chat.
- View a status.
- Change settings.
- Use search.
Compose and Send Message
- User types a message or selects media (image, video, document, etc.).
- Message is encrypted.
- Message is sent to the recipient through WhatsApp servers.
Message Delivery Process
- If the recipient is online, the message is delivered instantly.
- If offline, the message is queued on the server and delivered when they come online.
Receive Message (on Recipient Side)
- Recipient device decrypts the message.
- The message appears in the chat window.
- Notification is triggered if the app is in the background.
User Actions on Received Message
- User can read, reply, forward, react, or delete the message.
Media Upload & Download (if applicable)
- Uploading media includes compression and transfer to the server.
- Downloading media happens either automatically or when the user clicks “Download”.
Logout or Close App (Optional)
- User may exit the app.
- Background services may still run (e.g., for message sync and push notifications).
End Point:
- Activity ends when the user closes the application or no further interaction occurs.
Diagram Elements to Include (for Drawing):
- Initial Node: Black circle representing the start.
- Action States: Rectangles with rounded edges like “Launch App”, “Check Login”, “Send Message”.
- Decision Nodes: Diamond shapes, e.g., “Is user authenticated?”.
- Control Flows: Arrows connecting actions.
- Merge Node: When multiple paths come back to one.
- Final Node: Encircled black dot indicating the end of the flow.