How haruple97/dodobot works
Project Type and Purpose
• This is a native Android mobile application.
• It is designed to serve as an AI chatbot application (using IBM Watson Assistant) with additional features like providing school-related information (academic schedules, campus maps, building details) for Daegu University.
• Other integrations include using the Naver Map API to show campus maps.
Analyzing the File Structure
• The top-level “app” folder shows that this is an Android Studio project with standard structure – AndroidManifest.xml, source Java files, resources (layouts, drawables, fonts, values), and tests.
• Under src/main/java/org/justice/dodobot, you see many Activity classes (e.g., IntroActivity, MainActivity, Chatbot_Activity, MapFragmentActivity) plus fragments/adapters (e.g., ChatAdapter, various pointAdapter files, MyAdapter) that are used to bind data to UI components.
• The resources directory contains layout files and drawable assets that represent the visual aspects of the UI (including the splash screen, chat item layouts, map screen layout, etc.).
• The inclusion of gradle files indicates standard build and dependency management.
Main Components of the System
a. User Interface Layer:
• Activities & Fragments: SplashActivity, IntroActivity, MainActivity, Chatbot_Activity, Chatbot_way, MapFragmentActivity.
• UI Components: Layout XMLs for chat views, campus map, introductory screens, card news, etc.
• Adapters: ChatAdapter, pointAdapter_X series and MyAdapter which bind data to UI components (likely for RecyclerViews or ListViews).
b. Integration/Service Layer:
• AI Chatbot Service: Integration with Watson Assistant API used within the Chatbot modules.
• Service: Integration with the Naver Map API for building location and mapping features.
c. Data and Business Logic:
• Data Models: Classes like Message encapsulate the information exchanged in chats.
• Utility Classes / Click Listeners: Classes like ClickListener and RecyclerTouchListener handle user interactions.
Relationships and Interactions
• User interactions are handled through Activities and Fragments.
• When a user starts the application (SplashActivity → IntroActivity → MainActivity), they can navigate to different features:
– Chat feature: Chatbot_Activity collects user input, sends it via an adapter/service to the Watson Assistant API, and then displays the response.
– Campus map: MapFragmentActivity leverages the Naver Map API; users select buildings (with pointAdapter binding the list of buildings/points) and the map view updates accordingly.
• The adapters (for instance, the series of pointAdapter files) indicate that there may be different representations or configurations for mapping points (perhaps varying by building or zoom level).
Architectural Patterns and Design Principles
• The structure hints at a separation of concerns between UI, adapters (data binding) and integration logic for external APIs.
• MVC or MVP-like patterns can be inferred; Views (Activities/Fragments and layouts), Controllers/Presenters (handling user input and API requests), and Models (e.g., Message class, data provided by Watson or Map APIs).
• Clear layering encourages reusability and ease of maintenance.