Pixabay Photo Viewer is a modern Android application that allows users to browse and view images fetched from the Pixabay API. The app is built with a clean architecture, follows Material Design principles, and supports both light and dark modes.
- User Authentication: Login and registration with basic validation.
- Login credentials:
- Email:
[email protected] - Password:
password123
- Email:
- Login credentials:
- Browse Images: Fetches images from the Pixabay API with pagination support.
- Image Details: Displays detailed information about the selected image.
- Dark Mode Support: The app UI adapts to the system's light or dark theme.
- Secure Storage: Credentials are securely stored using encrypted shared preferences.
- Kotlin
- Coroutines and Flow
- Jetpack Components: ViewModel, LiveData, Navigation Component, and Data Binding
- Clean Architecture: Layers separated into
presentation,domain, anddata. - MVVM (Model-View-ViewModel)
- Retrofit: For network requests
- OkHttp: For HTTP client
- Hilt: For dependency injection
- Glide: For image loading
- MockWebServer: For testing API responses
- Google Truth: For assertions in test cases
- Espresso: For UI testing
- Mockito: For mocking dependencies
- Android Studio (Latest version recommended)
- Minimum SDK: 21 (Android 5.0 Lollipop)
- Target SDK: 33 (Android 13)
- Clone the repository:
git clone https://github.com/your-username/pixabay-photo-viewer.git cd pixabay-photo-viewer - Open the project in Android Studio.
- Sync the Gradle files.
- Replace the API key in
BuildConfigwith your Pixabay API key:const val API_KEY = "YOUR_API_KEY_HERE"
- Run the app on an emulator or device.
- Login:
- Use the provided credentials:
- Email:
[email protected] - Password:
password123
- Email:
- Use the provided credentials:
- Register:
- Create a new user by providing an email, password, and age (18–99).
- Browse Images:
- Scroll through a list of images retrieved from the Pixabay API.
- View Image Details:
- Tap an image to view details like:
- Image size, type, tags, uploader info, views, likes, comments, and more.
- Tap an image to view details like:
- Logout:
- Use the dropdown menu in the toolbar to log out.