If you find this extension useful and wish to support further development, you can support us via: PayPal.Me
License: Developed by Kenneth Mark Morales using Fast builder.
You can download the aix extension provided bellow.
ChatBox aix extension Download Link:
Version: 1 com.kenmor.chatbox.aix (18.6 KB)
aia file: chatboxtest.aia (1.8 MB)
Version: 2 com.kenmor.chatbox.aix (26.3 KB)
ChatBox App Inventor Extension Documentation Update Version: 2
This update to the ChatBox extension introduces robust message interaction features, better message management, and a shift towards utilizing App Inventor's native input components for greater flexibility.
I. Important Change: External Input Components Required
To provide developers with more control over the user input interface and align with App Inventor's design philosophy, the internal TextBox and Send Button functionality has been removed from the ChatBox extension.
Use App Inventor's built-in UI components (e.g., TextBox for input and Button for sending) in your App Inventor Designer to create the message input area. You will then connect these components to the ChatBox's SendMessage function through your App Inventor blocks. This allows for greater customization of your input field's appearance and behavior.
II. New Features & Enhancements
(Continuing from previous documentation)
A. Message Interaction Events
The extension now allows your app to respond to user gestures on individual message bubbles. The messageIndex in these events refers to the current, dynamic position of the message in the chat, which is automatically updated even after deletions.
Purpose: Triggers when a user performs a long press (press and hold) gesture on any message bubble in the chat. This is ideal for implementing context-sensitive actions like "copy message," "delete message," or "forward message."
Parameters:
messageIndex (number): The current 0-based index of the message that was long-pressed.
messageText (text): The full text content of the long-pressed message.
isSentByMe (boolean): True if the long-pressed message was sent by the current user, False if it was received.
Usage Example: Use this event to display a pop-up menu or confirm deletion.
Purpose: Removes a specific message from the chat display based on its current index.
Parameters:
messageIndex (number): The 0-based index of the message you wish to delete.
Important Note: When a message is deleted, the indices of all subsequent messages in the chat list will automatically shift down by one. Always use the messageIndex provided by the MessageLongPressed, MessageSwipedLeft, or MessageSwipedRight events for accurate deletion after a user interaction.
ClearAllMessages()
Purpose: Removes all messages currently displayed within the chatbox, clearing the entire conversation history from the UI.
Parameters: None.
C. Message Management Events
These events provide feedback on the outcome of message management operations.
MessageDeleted(deletedIndex)
Purpose: Fired immediately after a message has been successfully removed from the chat using the DeleteMessage function.
Parameters:
deletedIndex (number): The index of the message that was just deleted.
Usage Example: Confirm to the user that the message has been removed, or update any external data structures your app might be using.
AllMessagesCleared()
Purpose: Fired after all messages have been successfully cleared from the chat using the ClearAllMessages function.
Parameters: None.
Usage Example: Reset other UI elements or data related to the chat session.
ohh nice but i think RecyclerView is the best option for handling large amount of data,
RecyclerView only keeps views for visible items and reuses them as you scroll. This drastically reduces memory usage and improves performance, especially with long conversations.
Thank you for suggestion. Maybe I'll try the recyclerview later for advance features purposes, basically this is what i have for now for my small project, like talk to a.i project and record the conversation for visual purpose.