An android app built using Kotlin that consumes Pixabay API to display images and their details.

Overview

AdanianAndroidTest

An android app built using Kotlin that consumes Pixabay API to display images and their details. It has been built following Clean Architecture Principle, MVVM Architecture and Jetpack components.

Download the apk here

Architecture (Clean Architecture).

Clean Architecture combines a group of practices that produce systems with the following characteristics:

  • Testable.
  • UI-independent (the UI can easily be changed without changing the system).
  • Independent of databases, frameworks, external agencies, and libraries.

The following scheme presents the architecture from the UI to the backend or database:

Clean Architecture Diagram

As you can see in the image, an Android application with Clean Architecture gathers the layers into three modules:

  1. Presentation - presents data to a screen and handle user interactions.

    • Components:
      • Activities/ Fragments
      • ViewModels
  2. Domain - which contains business logic

    • Components:
      • Models (Entities)
      • Usecases
      • Repositories Implementation
  3. Data - which manages application data eg. retrieve data from the network, manage data cache.

    • Components:
      • Local data sources
      • Remote data sources
      • Repositories Interfaces

Tech Stack.

  • Kotlin - Kotlin is a programming language that can run on JVM. Google has announced Kotlin as one of its officially supported programming languages in Android Studio; and the Android community is migrating at a pace from Java to Kotlin
  • Lifecycle - Perform actions in response to a change in the lifecycle status of another component, such as activities and fragments.
  • Viewmodel -The ViewModel class is designed to store and manage UI-related data in a lifecycle conscious way
  • LiveData - A lifecycle-aware data holder with the observer pattern
  • Kotlin Coroutines - A concurrency design pattern that you can use on Android to simplify code that executes asynchronously.
  • Room Database - The Room persistence library provides an abstraction layer over SQLite to allow fluent database access while harnessing the full power of SQLite
  • View Binding - Allows you to bind UI components in your layouts to data sources in your app using a declarative format rather than programmatically.
  • Retrofit - Retrofit is a REST Client for Java and Android by Square inc under Apache 2.0 license. Its a simple network library that used for network transactions. By using this library we can seamlessly capture JSON response from web service/web API.
  • GSON - JSON Parser,used to parse requests on the data layer for Entities and understands Kotlin non-nullable and default parameters.
  • Flow - In coroutines, a flow is a type that can emit multiple values sequentially, as opposed to suspend functions that return only a single value.
  • Hilt - A dependency injection library for Android that reduces the boilerplate of doing manual dependency injection in your project
  • Navigation Components - Helps you implement navigation, from simple button clicks to more complex patterns, such as app bars and the navigation drawer.
  • Logging Interceptor - logs HTTP request and response data.
  • Material Libarary - Modular and customizable Material Design UI components for Android
  • Glide- An image loading and caching library for Android focused on smooth scrolling.
  • SavedStateHandle - Getting results from a destination when navigating from one fragment to another.
  • MockWebServer - A mock web server is a program that mocks the behavior of an actual remote server but doesn’t make calls over the internet.
  • JUnit - JUnit is a simple framework to write repeatable tests. It is an instance of the xUnit architecture for unit testing frameworks.
  • Espresso - write concise, beautiful, and reliable Android UI tests.

Pixabay API

Sign up for the API key on the following Link https://pixabay.com/api/docs/#api_search_images

Screenshots

These are the app's screenshots:

Demo

20211214230326.mp4
Comments
  • fixed some minor issues

    fixed some minor issues

    • Some minor fixed to the Repositories - I had interchanged them.
    • Made the height of the search view to be wrap content.
    • Changed the outline color of the search view in the themes
    opened by JoelKanyi 0
  • wrote some tests to test the UI and the Api

    wrote some tests to test the UI and the Api

    Here I worked on writing some Unit test to test if some View are displayed in ImagesFragment and ImageDetailsFragment Also I wrote a MockWebServer to test the PixabayApi

    opened by JoelKanyi 0
  • Worked on image details in `ImageDetailsFragment`

    Worked on image details in `ImageDetailsFragment`

    In this commit:

    1. I worked on displaying image details when an image is clicked:
      • I added several icons to represent the image details
      • Worked on the ImageDetailsViewModel, ImageDetailsFragment.
      • Worked on the MainActivity to setup navigation so as to display theToolbar` back button.
      • Polished the image details UI.
    opened by JoelKanyi 0
  • worked on displaying the images

    worked on displaying the images

    In this commit, I worked on:

    1. Created a navigation graph and added the two Fragments.
    2. Created some two helper extension functions,hideSoftKeyboard, showSnackbar
    3. Worked on the ImagesAdapter
    4. Modified some files in the data, domain and presentation layer.
    opened by JoelKanyi 0
  • Domain Layer, Presentation Layer and Provide Dependencies

    Domain Layer, Presentation Layer and Provide Dependencies

    1. Worked on the domain layer where: - I implemented the ImageRepository and created a GetImages usecase.
    2. Worked on the presentation layer where: - I created a package called images that contains ImagesFragment, ImagesState and the ImagesViewModel
    3. Added all the necessary dependencies in the AppModule
    opened by JoelKanyi 0
  • hilt setup and worked on data package

    hilt setup and worked on data package

    1. Hilt setup in the application class and added in the manifest file, also added the internet permissions
    2. Worked on the data package: - In the local package - I defined the ImageEntity, the ImageDao and the ImageDatabase - In the remote package - I defined the PixabayApi interface, also defined ImageDto having a mapper function inside it. - In the repository package - I define the ImageRepository Interface that contains getImages function.
    opened by JoelKanyi 0
Owner
Joel Kanyi
Android Developer | Kotlin | Java
Joel Kanyi
Kotlin Multiplatform Mobile application built using that consumes WakaTime API

Kotlin Multiplatform Mobile application built using that consumes WakaTime API ⏱️ to display user's coding stats such as day's or day's of weeks coding time, coding time for various programming languages or worked on projects etc. on various platforms.

Victor Kabata 17 Nov 30, 2022
UserLoc - A API call using Retrofit to obtain list of users details and show on UI in recycler view and google map

UserLoc This uses a API call using Retrofit to obtain list of users details and

Rohit Kumar 0 Jun 22, 2022
🔥🖼 Display images stored in Cloud Storage for Firebase using Coil

firecoil firecoil allows you to load images from Cloud Storage for Firebase in your Android app (through a StorageReference) , using the image loading

Rosário Pereira Fernandes 35 Oct 4, 2022
A simple e-market application that allows users to view the store details and products, add products to the basket, and place an order.

E-Market Application Features : Store details & products screen Fetch the store detail from an endpoint and display this upper part of the screen. Fet

Amit Kumar guha 2 Jun 27, 2022
🏞 A simple android app to show random images with Lorem Picsum API.

LoremPicsum A simple android app to show random images with Lorem Picsum API. Used skills Android Multi-Module RecyclerView MVVM with AAC ViewModel &

Haenala Shin 2 Feb 25, 2022
Workout Journal is a mobile app based on Multi-Module and Clean Architecture for those who want to track their progress over a workout and a calendar period.

Workout-Journal Workout Journal is a mobile app for those who want to track their progress over a workout and a calendar period. The app allows you to

Maxim Smolyakov 4 Oct 23, 2022
Astha Nayak 4 Oct 10, 2022
A sample app showing different kind of memory leaks and their solutions

MemoryLeakApp A sample app showing different kind of memory leaks and their solutions. Make sure to check the source code to understand the concept of

Moradious 11 Oct 28, 2022
A native android app that shows how much calories one must consume based on their profile

Healtify is a native android app which allows the user to track the amout of Calories they are consuming. It not only tracks the calories but also shows how much of fat, protein and carbs they have consumed and how much they should be doing.

Anindya Ray 9 Aug 20, 2022
Monitor products on the Ubiquiti Store and receive notifications when their availability changes.

UI Spy Monitor products on the Ubiquiti Store and receive notifications when their availability changes. Available as a binary and Docker container. U

Jake Wharton 40 Nov 22, 2022
Notes-App-Kotlin - Notes App Built Using Kotlin

Notes-App-Kotlin Splash Screen Home Page Adding New Notes Filter Feature Search

Priyanka 4 Oct 2, 2022
Kotlin DALL·E 2 is a new AI system that can create realistic images and art from a description in natural language.

OpenAI Dall•E AI Kotlin Mobile App OpenAI Dall•E Application Build With Kotlin MVVM (Model - View - ViewModel) Clean Architecture, Beautiful Design UI

Murat ÖZTÜRK 15 Jan 1, 2023
Adds loveable red pandas into Minecraft! Who doesn't love a Red Panda in their world?

?? Akali Adds loveable red pandas into Minecraft! Who doesn't love a Red Panda in their world? :3 This is a Forge and Fabric mod under their respected

Noel ʕ •ᴥ•ʔ 4 Jul 4, 2022
WallPaperApplication - An android wallpaper app which displays images

WallPaperApp App description An android wallpaper App which displayes free image

Srihitha Tadiparthi 3 Aug 8, 2022
Make interesting books for your kids, usint text and images from simple.wikipedia.org

Baby Book Builder Baby Book Builder is an Android app and a website for creating books to help your growing child learn. Contributing Donations Baby B

Baby Apps 11 Nov 19, 2022
Unsplash application for Android, Desktop and Web. Built using Kotlin Multiplatform and Compose

Unsplash Unsplash application for Android, Desktop and Web. Built using Kotlin Multiplatform and Compose with ❤️ ?? Presentation Set up the environmen

Carlos Mota 15 Nov 11, 2022
Klimatic is an android app built using Kotlin. It try to showcase all the latest technologies used in android.

Klimatic Klimatic is an android app built using Kotlin. It try to showcase all the latest technologies used in android. Built using Android Architectu

Shivam Satija 34 Oct 11, 2022
Fetch random dog images

RandomDogImages Show Random Dog Images Demo application built in 100% Kotlin and implementing some Jetpack Components. This app was developed for as a

ValentineRutto 5 Dec 7, 2022
Display code with syntax highlighting :sparkles: in native way.

CodeView (Android) CodeView helps to show code content with syntax highlighting in native way. Description CodeView contains 3 core parts to implement

Kirill Biakov 827 Dec 22, 2022