This repository contains a sample Android application that implements MVVM Android architecture component using: Kotlin, LiveData, Android Navigation Component(single Activity), ViewModel, Repository pattern, Observable Pattern, Room, File provider, RxJava and Android Test.
Sample APK: http://devcast.ir/1.0.7_muLight-debug.apk
- Kotlin as Main language(modern and clean codes-null safe-developing easier than Java)
- MVVM as architecture
- Android navigation component for single Activity and user more fragment instead of Activities(better performance-have reusable codes)
- Android LiveData (avoid memory leak - remove direct connections between layers)
- Repository pattern(have reusable, clean and independent codes)
- Room as ORM (because it support LiveData very well)
- File provider(to access Storage)
- Junit for Android test
- Fix: Take photo and store image bug fixed. now i am using External storage and File provider.
- Add: Image viewer not support zoom in/zoom out but multi touching.
- Challenge: I wanted to take and store photo in Internal Storage for avoid get new permission(Write External Storage), but i figured out that, Android just save low quality of images in Internal Storage as a thumbnail. If i want to have high quality of images, i should use External storage and get extra permission. Using external storage is not easy like before, i should use File Provider.
- Add: Complete Android Tests. Add Image Viewer and clean codes.
- Add: Android Test by JUnit 4. 2 Test module has been added to test DatabaseDAO(CRUD) and Public methods (Store file in Storage)
- Add: Store image in Internal storage.
- Add: Store image data in Local database by room.
- Note: I'm using Room because it supports LiveData and Observable pattern very perfect.
- Add: TakePhotoFragment and it's ViewModel (Observable pattern with RX and Android Life Cycle). connect dashboard Fragment to TakePhoto in Android Navigation
- Challenge: I don't want to ask many permissions of users. I am looking for a way to store photos in internal storage to avoid asking WRITE EXTERNAL Storage permission. i want to use ROOM as Database manager for storing data, because ROOM supports RX.
- Add: Extensions.kt to add some functions to my primitive classes like Activity or ImageView or String. thank you Kotlin :)
- Add: Gradle libraries I am using Android Navigation Component with Single Activity Concept (MVVM). I'v added Nav Graph for define project schema and navigation Also some base classes like Application, CustomTextView, Constants class and my single activity : Container Activity
First commit.
AmirHossein Teymoori [email protected]