Skip to content

tundisi/flickr

Repository files navigation

Flickr

This application shows the use of the Flickr API without the need to use its SDK.

Run Project!

To run the project you only have to do the following steps:

  • Clone project.
  • Import project in android studio with sdk compile version + 25.
  • Build project.
  • Run project.
  • Done! :)

Run Unit Test

Steps to run the unit tests:

  • In android studio you must click on run and then edit configurations.
  • You must click on Add new configuration (simbol +) and then android test.
  • In module select app, and in especific instrumentation runner to write com.etermax.flickr.mock.MockTestRunner
  • Put the phone in airplane mode
  • Run!

About Flickr

Flickr uses an architecture based on an model view presenter custom (MVP), composed as follows:

api: This folder contains the calls to retrofit and their respective manipulation in the controllers.

data: Contains the retrofit responses and models.

di: Contains all components and modules the dagger.

ui: Contains adapters, dialogs, bases and all views the application.

utils: Contains all utils the application.

Dependencies used

  • Dagger 2 - dependency injection framework!
  • Butterknife - injection views framework!
  • RxJava - a library for composing asynchronous and event-based.
  • RxAndroid - Reactive Extensions for Android
  • Retrofit 2 - A type-safe HTTP client for Android and Java.
  • Logging-interceptor - An OkHttp interceptor which logs HTTP request and response data.
  • Glide - Glide is a fast and efficient open source media management and image loading framework for Android.
  • RxJava Adapter - An Adapter for adapting RxJava 1.x types.
  • TabGroup - A beautiful android tag group widget.
  • Mockito - Tasty mocking framework for unit tests in Java.

Why use model view presenter?

The presenter view model prevents the view from saturating in the waiting for logical responses, dividing the logical layer and the design layer.

Why inject dependences?

Because to inject a dependency avoids the creation of instances in the classes, avoiding the bad use of memory.

Why use dagger?

Dagger allows you to inject dependencies throughout the application so that you can reuse instances and avoid creating them every time you need to use them.

Why use RxJava?

http://blog.feedpresso.com/2016/01/25/why-you-should-use-rxjava-in-android-a-short-introduction-to-rxjava.html

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages