Technologies Used
To develop the Game Price Comparison App, a combination of modern programming languages, frameworks, and tools were utilized to ensure efficiency, scalability, and a smooth user experience. These technologies were carefully chosen to meet the requirements of the project, such as dynamic data fetching, responsive design, and seamless integration with external APIs. Below is an overview of the technologies used:
Programming Language
Java
The app is primarily developed using Java
Framworks and Libraries
Android SDK
The core framework for building Android apps, providing essential tools for UI design, interaction, and data management.
Picasso
A powerful image loading library for Android, used to display game cover images efficiently and handle image caching.
SAX Parser
Used for parsing XML data in a lightweight manner to fetch and interpret API responses.
APIs
Steam API
The Steam Web API provides access to game details, including prices, descriptions, and app IDs.
IsThereAnyDeal API
Retrieves price data from various third-party platforms to offer the best deals for games.
Other Tools
GitHub Pages
Gradle
Implementation Details
Architecture
The application follows a modular architecture, separating concerns across different classes to ensure maintainability and scalability. Key components include:
MainActivity
Serves as the entry point of the app and manages user interactions. It initializes the UI elements and handles click events for the "Compare Prices" functionality.
GamePrice
Represents the data model for games, encapsulating information such as the game title, price, description, and cover image.
NetworkUtils
Handles all network-related operations, such as making API calls to fetch game details and parsing responses. This class ensures efficient and error-handling-compliant communication with external APIs.
MyRSSsaxHandler
Implements SAX parsing to process XML data retrieved from APIs, providing a lightweight and fast solution for parsing structured data.
Data Fetching and Display
Fetching
When a user enters a game name and clicks "Compare Prices," the app triggers network requests via NetworkUtils to external APIs (e.g., Steam API, IsThereAnyDeal API).
These APIs return data in JSON or XML format, which is then processed by the respective parsers.
Parsing
JSON responses are parsed into Java objects for easy manipulation.
For XML data, the MyRSSsaxHandler processes the response and extracts the required fields.
Displaying
The parsed data is passed back to the MainActivity, where it updates the UI elements such as game title, prices, and cover image using tools like Picasso.
Data Flow
Input
User enters a game name and clicks the "Compare Prices" button.
Network Request
NetworkUtils sends API calls to retrieve game data.
Data Parsing
API responses are parsed into usable data formats (e.g., Java objects).
UI Update
The app updates UI components in MainActivity with the retrieved data.