How vremsoftwaredevelopment/wifianalyzer works
Project Type and Purpose
• This is an Android mobile application that performs WiFi network analysis. Its primary objectives include scanning for nearby WiFi access points, analyzing channel signal strengths, graphing signal data over time, and applying various filters and exports.
• The README emphasizes core features (e.g., access point identification, graphing of channels, export functionality, filtering by WiFi band/signal strength) and clearly indicates that the application is not meant for WiFi cracking but for network analysis.
Key Components from the File Structure
• The “src/main” folder includes many packages organized by functionality. For instance:
‒ UI and Navigation: Packages like com/vrem/wifianalyzer/navigation (handling NavigationMenu, DrawerNavigation, etc.), and fragment packages like “about” and settings.
‒ WiFi-Related Domains: Multiple subpackages under com/vrem/wifianalyzer/wifi that are further segregated into modules for access point handling, scanning, filtering, graphing (graphutils), and managing WiFi functionalities.
‒ Utility Classes: Located under util, which include helper classes for string manipulation, file and build utilities.
‒ External libraries: There is inclusion of a “jjoe64/graphview” package indicating use of graphing libraries.
• The “src/test” and “src/androidTest” directories contain comprehensive test suites (both unit and instrumented tests), indicating a strong emphasis on code quality.
• Other build files (build.gradle, settings.gradle) and CI/CD configurations (GitHub workflows, fastlane metadata) show that the project is setup with modern Android development practices.
Interpreting the Architecture and Components
• UI/Presentation Layer:
• MainActivity along with various fragments (e.g., AboutFragment, SettingsFragment) make up the user interface.
• Layout resources and menus structured under “res/layout”, “res/menu”, etc., are used to define the views.
• Domain and Business Logic Layer:
• Packages under “wifi/model” define data models like WiFiData, WiFiDetail, and related models.
• The “wifi/filter” and “wifi/navigation” packages implement logic for filtering and navigating between different views and functionalities.
• The “wifi/scanner” package contains classes such as Scanner, ScannerCallback, and services that interface with the Android WiFi system.
• Data/Integration Layer:
• The “wifi/manager” package encapsulates interactions with Android's WiFiManager.
• Utility classes (for file handling, build utilities, etc.) provide reusable functionality across features.
• External Libraries and Frameworks:
• Use of third-party libraries such as GraphView (com/jjoe64/graphview) for rendering analytics and charts.
• Gradle and fastlane support for building and deployment.
Relationships and Interactions
• The UI layer (activities/fragments) triggers scanning and data collection by invoking services in the WiFi scanner and manager packages.
• Scanning services, upon receiving data from the device’s WiFi hardware, pass network details to filtering modules which can then be used for graphing.
• The graphutils module is responsible for translating raw data into visual representations, using GraphView.
• Navigation components (drawer, bottom navigation) enable switching between different presentations of data (e.g., detailed views vs. compact views) and settings.
• Utility and helper classes support various layers by abstracting common functionalities.
Architectural Patterns and Design Principles
• While the project does not explicitly state a design pattern, the clear separation between UI (activities/fragments), domain (models, business logic in filtering and scanning), and integration (WiFi managers) suggests a layered architecture.
• There’s a modular organization where each major feature (e.g., graphing, filtering, exporting) has its own dedicated package. This modularity supports ease of testing as revealed by the extensive test directories.