Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
skydoves committed Dec 13, 2020
1 parent 6f832b9 commit 18e1755
Show file tree
Hide file tree
Showing 132 changed files with 6,322 additions and 34 deletions.
43 changes: 9 additions & 34 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# Built application files
*.apk
*.aar
*.ap_
*.aab

# Files for the ART/Dalvik VM
*.dex
Expand All @@ -14,13 +12,16 @@
bin/
gen/
out/
# Uncomment the following line in case you need and you don't have the release build type files in your app
# release/

# Gradle files
/.idea
.gradle/
build/

# DS_Store
*.DS_Store
**/DS_Store

# Local configuration file (sdk path, etc)
local.properties

Expand All @@ -36,50 +37,24 @@ proguard/
# Android Studio captures folder
captures/

# IntelliJ
# Intellij
*.iml
.idea/workspace.xml
.idea/tasks.xml
.idea/gradle.xml
.idea/assetWizardSettings.xml
.idea/dictionaries
.idea/libraries
# Android Studio 3 in .gitignore file.
.idea/caches
.idea/modules.xml
# Comment next line if keeping position of elements in Navigation Editor is relevant for you
.idea/navEditor.xml

# Keystore files
# Uncomment the following lines if you do not want to check your keystore files in.
#*.jks
#*.keystore
*.jks

# External native build folder generated in Android Studio 2.2 and later
.externalNativeBuild
.cxx/

# Google Services (e.g. APIs or Firebase)
# google-services.json
google-services.json

# Freeline
freeline.py
freeline/
freeline_project_description.json

# fastlane
fastlane/report.xml
fastlane/Preview.html
fastlane/screenshots
fastlane/test_output
fastlane/readme.md

# Version control
vcs.xml

# lint
lint/intermediates/
lint/generated/
lint/outputs/
lint/tmp/
# lint/reports/
freeline_project_description.json
90 changes: 90 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
<h1 align="center">Pokedex-AR</h1>

<p align="center">
<a href="https://opensource.org/licenses/Apache-2.0"><img alt="License" src="https://img.shields.io/badge/License-Apache%202.0-blue.svg"/></a>
<a href="https://android-arsenal.com/api?level=24"><img alt="API" src="https://img.shields.io/badge/API-24%2B-brightgreen.svg?style=flat"/></a>
<a href="https://github.com/skydoves/Pokedex-AR/actions"><img alt="Build Status" src="https://github.com/skydoves/Pokedex/workflows/Android%20CI/badge.svg"/></a>
<a href="https://proandroiddev.com/exploring-dagger-hilt-and-whats-main-differences-with-dagger-android-c8c54cd92f18"><img alt="Profile" src="https://skydoves.github.io/badges/skydoves.svg"/></a>
</p>

<p align="center">
Pokedex-AR is a small demo application based on AR, modern Android application tech-stacks, <br>and MVVM architecture. This project focuses on ARCore and SceneForm. <br>Also fetching data from the network and integrating persisted data from the database via repository pattern.
</p>
</br>

<p align="center">
<img src="/previews/screenshot.jpg"/>
</p>

## Download
Go to the [Releases](https://github.com/skydoves/Pokedex-AR/releases) to download the latest APK.


<img src="/previews/preview.gif" align="right" width="32%"/>

## Tech stack & Open-source libraries
- Minimum SDK level 24.
- [Kotlin](https://kotlinlang.org/) based, [Coroutines](https://github.com/Kotlin/kotlinx.coroutines) + [Flow](https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.flow/) for asynchronous.
- [ARCore](https://github.com/google-ar/arcore-android-sdk) - ARCore SDK for Android.
- [SceneForm](https://github.com/google-ar/sceneform-android-sdk) - Sceneform SDK for Android.
- Hilt (alpha) for dependency injection.
- JetPack
- LiveData - notify domain layer data to views.
- Lifecycle - dispose of observing data when lifecycle state changes.
- ViewModel - UI related data holder, lifecycle aware.
- Room Persistence - construct a database using the abstract layer.
- Architecture
- MVVM Architecture (View - DataBinding - ViewModel - Model)
- Repository pattern
- [Retrofit2 & OkHttp3](https://github.com/square/retrofit) - construct the REST APIs and paging network data.
- [Sandwich](https://github.com/skydoves/Sandwich) - construct lightweight http API response and handling error responses.
- [Moshi](https://github.com/square/moshi/) - A modern JSON library for Kotlin and Java.
- [Glide](https://github.com/bumptech/glide), [GlidePalette](https://github.com/florent37/GlidePalette) - loading images.
- [WhatIf](https://github.com/skydoves/whatif) - checking nullable object and empty collections more fluently.
- [Bundler](https://github.com/skydoves/bundler) - Android Intent & Bundle extensions that insert and retrieve values elegantly.
- [Balloon](https://github.com/skydoves/balloon) - A lightweight popup like tooltips, fully customizable with an arrow and animations.
- [Timber](https://github.com/JakeWharton/timber) - logging.
- [Material-Components](https://github.com/material-components/material-components-android) - Material design components like ripple animation, cardView.
- Custom Views
- [Rainbow](https://github.com/skydoves/rainbow) - An easy way to apply gradations and tinting for Android.
- [AndroidRibbon](https://github.com/skydoves/androidribbon) - A simple way to implement a beautiful ribbon with the shimmering on Android.
- [ProgressView](https://github.com/skydoves/progressview) - A polished and flexible ProgressView, fully customizable with animations.

## Architecture
Pokedex-AR is based on MVVM architecture and a repository pattern.

![architecture](https://user-images.githubusercontent.com/24237865/77502018-f7d36000-6e9c-11ea-92b0-1097240c8689.png)

## 3D Model Licenses
Creative Commons licenses provide a standard way for content creators to grant someone else permission to use their work. If you allow remixing, your content will be published under a CC-BY 3.0 license. These creations are then accessible to other Poly users for use, even commercially, in their own creations, provided they give attribution to the original author.

- [Tipatat Chennavasin](https://poly.google.com/user/8ri62AdjHrC) - Pokemons and Poke-ball.
- [Poly by Google](https://poly.google.com/user/4aEd8rQgKu2) - Garden.

## Open API

<img src="https://user-images.githubusercontent.com/24237865/83422649-d1b1d980-a464-11ea-8c91-a24fdf89cd6b.png" align="right" width="21%"/>

Pokedex-AR using the [PokeAPI](https://pokeapi.co/) for constructing RESTful API.<br>
PokeAPI provides a RESTful API interface to highly detailed objects built from thousands of lines of data related to Pokémon.

## Find this repository useful? :heart:
Support it by joining __[stargazers](https://github.com/skydoves/Pokedex-AR/stargazers)__ for this repository. :star: <br>
And __[follow](https://github.com/skydoves)__ me for my next creations! 🤩

# License
```xml
Designed and developed by 2020 skydoves (Jaewoong Eum)

Licensed 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.
```
1 change: 1 addition & 0 deletions app/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
163 changes: 163 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
//Designed and developed by 2020 skydoves (Jaewoong Eum)
//
//Licensed 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.
plugins {
id 'com.android.application'
id 'kotlin-android'
id 'kotlin-parcelize'
id 'kotlin-kapt'
id 'dagger.hilt.android.plugin'
id 'com.google.ar.sceneform.plugin'
}

apply from: '../dependencies.gradle'

sceneform.asset('sampledata/Garden.obj',
'default',
'sampledata/garden/garden.sfa',
'sampledata/garden/garden')

android {
compileSdkVersion versions.compileSdk
defaultConfig {
applicationId "com.skydoves.pokedexar"
minSdkVersion versions.minSdk
targetSdkVersion versions.compileSdk
versionCode versions.versionCode
versionName versions.versionName
vectorDrawables.useSupportLibrary = true
testInstrumentationRunner "com.skydoves.pokedex.AppTestRunner"
javaCompileOptions {
annotationProcessorOptions {
arguments += ["room.schemaLocation": "$projectDir/schemas".toString()]
}
}
javaCompileOptions {
annotationProcessorOptions {
arguments["dagger.hilt.disableModulesHaveInstallInCheck"] = "true"
}
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
buildFeatures {
dataBinding true
}
lintOptions {
abortOnError false
}
testOptions {
unitTests {
includeAndroidResources = true
returnDefaultValues = true
}
}
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/notice.txt'
exclude 'META-INF/ASL2.0'
exclude("META-INF/*.kotlin_module")
}
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
kotlinOptions.freeCompilerArgs += ["-Xopt-in=kotlin.time.ExperimentalTime"]
kotlinOptions.freeCompilerArgs += ["-Xopt-in=kotlinx.coroutines.ExperimentalCoroutinesApi"]
}
}

dependencies {
// android supports
implementation "com.google.android.material:material:$versions.materialVersion"
implementation "androidx.constraintlayout:constraintlayout:$versions.constraintVersion"

// architecture components
implementation "androidx.fragment:fragment-ktx:$versions.fragmentVersion"
implementation "androidx.lifecycle:lifecycle-extensions:$versions.lifecycleVersion"
implementation "androidx.lifecycle:lifecycle-livedata-ktx:$versions.lifecycleVersion"
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$versions.lifecycleVersion"
implementation "androidx.lifecycle:lifecycle-viewmodel-savedstate:$versions.lifecycleVersion"
implementation "androidx.room:room-runtime:$versions.roomVersion"
implementation "androidx.room:room-ktx:$versions.roomVersion"
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation 'androidx.appcompat:appcompat:1.2.0'
kapt "androidx.room:room-compiler:$versions.roomVersion"
testImplementation "androidx.arch.core:core-testing:$versions.archCompomentVersion"

// startup
implementation "androidx.startup:startup-runtime:$versions.startupVersion"

// hilt
implementation "com.google.dagger:hilt-android:$versions.hiltCoreVersion"
implementation "androidx.hilt:hilt-common:$versions.hiltVersion"
implementation "androidx.hilt:hilt-lifecycle-viewmodel:$versions.hiltVersion"
kapt "com.google.dagger:hilt-compiler:$versions.hiltCoreVersion"
kapt "androidx.hilt:hilt-compiler:$versions.hiltVersion"
androidTestImplementation "com.google.dagger:hilt-android-testing:$versions.hiltCoreVersion"
kaptAndroidTest "com.google.dagger:hilt-compiler:$versions.hiltCoreVersion"

// network
implementation "com.github.skydoves:sandwich:$versions.sandwichVersion"
implementation "com.squareup.retrofit2:retrofit:$versions.retrofitVersion"
implementation "com.squareup.retrofit2:converter-moshi:$versions.retrofitVersion"
implementation "com.squareup.okhttp3:logging-interceptor:$versions.okhttpVersion"
testImplementation "com.squareup.okhttp3:mockwebserver:$versions.okhttpVersion"

// moshi
implementation "com.squareup.moshi:moshi-kotlin:$versions.moshiVersion"
kapt "com.squareup.moshi:moshi-kotlin-codegen:$versions.moshiVersion"

// coroutines
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$versions.coroutinesVersion"
testImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$versions.coroutinesVersion"
testImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-test:$versions.coroutinesVersion"

// glide
implementation "com.github.bumptech.glide:glide:$versions.glideVersion"
implementation "com.github.florent37:glidepalette:$versions.glidePaletteVersion"
kapt "com.github.bumptech.glide:compiler:$versions.glideVersion"

// recyclerView
implementation "androidx.recyclerview:recyclerview:$versions.recyclerView"

// whatIf
implementation "com.github.skydoves:whatif:$versions.whatIfVersion"

// balloon
implementation "com.github.skydoves:balloon:$versions.balloonVersion"

// bundler
implementation "com.github.skydoves:bundler:$versions.bundlerVersion"

// gradation
implementation "com.github.skydoves:rainbow:$versions.rainbowVersion"

// custom views
implementation "com.github.skydoves:androidribbon:$versions.androidRibbonVersion"
implementation "com.github.skydoves:progressview:$versions.progressViewVersion"

// debugging
implementation "com.jakewharton.timber:timber:$versions.timberVersion"

implementation project(":pokedexar-core")
}

apply from: '../spotless.gradle'
8 changes: 8 additions & 0 deletions app/sampledata/Garden.mtl
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
newmtl Garden1:Garden_mat
illum 4
Kd 0.50 0.50 0.50
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00

map_Kd Garden_BaseColor.png
Binary file added app/sampledata/Garden_BaseColor.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 18e1755

Please sign in to comment.