GithubBrower - Github Browser Sample with Android Architecture Components

Related tags

App githubBrower
Overview

Github Browser Sample with Android Architecture Components

This is a sample app that uses Android Architecture Components with Dagger 2.

NOTE It is a relatively more complex and complete example so if you are not familiar with Architecture Components, you are highly recommended to check other examples in this repository first.

Introduction

Functionality

The app is composed of 3 main screens.

SearchFragment

Allows you to search repositories on Github. Each search result is kept in the database in RepoSearchResult table where the list of repository IDs are denormalized into a single column. The actual Repo instances live in the Repo table.

Each time a new page is fetched, the same RepoSearchResult record in the Database is updated with the new list of repository ids.

NOTE The UI currently loads all Repo items at once, which would not perform well on lower end devices. Instead of manually writing lazy adapters, we've decided to wait until the built in support in Room is released.

RepoFragment

This fragment displays the details of a repository and its contributors.

UserFragment

This fragment displays a user and their repositories.

Building

You can open the project in Android studio and press run.

Testing

The project uses both instrumentation tests that run on the device and local unit tests that run on your computer. To run both of them and generate a coverage report, you can run:

./gradlew fullCoverageReport (requires a connected device or an emulator)

Device Tests

UI Tests

The projects uses Espresso for UI testing. Since each fragment is limited to a ViewModel, each test mocks related ViewModel to run the tests.

Database Tests

The project creates an in memory database for each database test but still runs them on the device.

Local Unit Tests

ViewModel Tests

Each ViewModel is tested using local unit tests with mock Repository implementations.

Repository Tests

Each Repository is tested using local unit tests with mock web service and mock database.

Webservice Tests

The project uses MockWebServer project to test REST api interactions.

Libraries

License

Copyright 2017 The Android Open Source Project, Inc.

Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

You might also like...
A secure, open source web browser for Android.
A secure, open source web browser for Android.

README Styx Browser Help to Translate To help us translate Styx, press the image below. We would be very happy if you help us with the translation. In

An Android mobile app for viewing device screen in your web browser
An Android mobile app for viewing device screen in your web browser

Screen Stream over HTTP An Android mobile app for viewing device screen in your web browser. Developed by Dmitriy Krivoruchko · If there are any issue

Proof of concept of custom widgets and apps running on the Z Flip3 cover screen. Adds a widget to Z Flip3 cover screen that lets you launch a web browser-like app on the cover.

SubUI-browser Proof of concept of custom widgets and apps running on the Z Flip3 cover screen. Adds a widget to Z Flip3 cover screen that lets you lau

A plugin about embedded browser for IntelliJ IDEA.
A plugin about embedded browser for IntelliJ IDEA.

browser English | 简体中文 This plugin provides embedded browser (based on Java Chromium Embedded Framework) support for IntelliJ IDEA. Get from Marketpla

Firefox Focus: The privacy browser - Browse like no one’s watching.
Firefox Focus: The privacy browser - Browse like no one’s watching.

Firefox Focus for Android Browse like no one’s watching. The new Firefox Focus automatically blocks a wide range of online trackers — from the moment

restrict the URLs that the user enters in their browser.
restrict the URLs that the user enters in their browser.

Accessibility Service example Filter url from browser by using accessibility service Accessibility services should only be used to assist users with d

Integration of ONNX with Kotlin JS - Deep Learning running in the browser
Integration of ONNX with Kotlin JS - Deep Learning running in the browser

Integration of ONNX with Kotlin JS - Deep Learning running in the browser

A Simple Privacy Browser - Some ScreenShots(Actual App Even Looks Better 😃 ):
A Simple Privacy Browser - Some ScreenShots(Actual App Even Looks Better 😃 ):

Lets_Browse A Simple Privacy Browser. Some ScreenShots(Actual App Even Looks Better 😃 ): Features 👇 : Bookmark Webpage Save Webpage as Pdf(Once Page

Open Super dApp - Your gateway to the new digital commons. Integrated mobile messenger, Ethereum wallet, and Web 3.0 browser built on open, decentralized, and encrypted protocols.
Open Super dApp - Your gateway to the new digital commons. Integrated mobile messenger, Ethereum wallet, and Web 3.0 browser built on open, decentralized, and encrypted protocols.

A fully open source, open standard, decentralized "super app" including a secure, encrypted Matrix compatible messenger based off of the Element Messenger, and an Ethereum crypto wallet and web3 browser based off of Alpha Wallet.

Owner
KuanTing
KuanTing
📚 Sample Android Components Architecture on a modular word focused on the scalability, testability and maintainability written in Kotlin, following best practices using Jetpack.

Android Components Architecture in a Modular Word Android Components Architecture in a Modular Word is a sample project that presents modern, 2020 app

Madalin Valceleanu 2.3k Jan 3, 2023
:movie_camera: Movie discovery app showcasing Android best practices with Google's recommended architecture: MVVM + Repository + Offline support + Android Architecture Components + Paging library & Retrofit2.

Popular Movies Stage 1 + Stage 2 Discover the most popular and top rated movies playing. Movies data fetched using themoviedb.org API. ✨ Screenshots M

Yassin AJDI 189 Nov 26, 2022
🛒A Minimal Expense E-Commerce App built to demonstrate the use of modern android architecture components [Navigation, Room, MotionLayout, etc..] with MVVM Architecture. ✔

E-Store A Simple E-Commerce App ?? built to demonstrate the use of modern android architecture component with MVVM Architecture ?? . Made with love ❤️

Ameen Essa 14 Nov 3, 2022
Weather application example with Android Architecture components and Clean Architecture

Weather application example with Android Architecture components and Clean Architecture Weather app that shows how to architect an android app in a cl

null 2 Dec 3, 2021
Github-Api-Pagination-Example - Pagination 3 Example using Github Api

Github-Api-Pagination Pagination 3 Example using Github Api Tech Stack 100% Kotl

Anggoro Beno Lukito 2 Aug 22, 2022
GithubUsersGalleryApp - Github users app consumed Github API

GithubUsersApp ✨ Github users app consumed Github API ✨ Architecture Using Moder

Ali Azaz Alam 1 Feb 20, 2022
GitHub application fetches events, repositories and profile using GitHub APIs

GitHub application using GitHub REST API Dagger MVVM architecture Mockk Jetpack Compose Kotlin Coroutines Application pages Attention If you want to u

Marjan DavoodiNejad 6 Oct 17, 2022
A lightweight Android browser with modern navigation

Lightning Browser Speed, Simplicity, Security Download Master Branch Dev Branch Features Bookmarks History Multiple search engines (Google, Bing, Yaho

Anthony Restaino 1.9k Dec 28, 2022
A secure, open source web browser for Android.

SmartCookieWeb A secure, free and open source WebView-based web browser for Android. Beta Releases • Docs • Website Important note: Google recently an

null 224 Jan 1, 2023
Slide is an open sourced, ad free Reddit browser for Android

Slide Slide is an open source, ad free Reddit browser for Android. It is based around the Java Reddit API Wrapper. Slide is available on the Google Pl

Carlos Crane 1.7k Jan 9, 2023