Advertisement
Guest User

Untitled

a guest
May 27th, 2015
251
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.22 KB | None | 0 0
  1. # ShopKonnect © 2014-2015 - Shopper App
  2.  
  3. ## Description
  4.  
  5. In ShopKonnect application we can distinguish few main sections like Offers, Merchants, Branches, Friends, Profile, Outlets. Below is the explanation of those sections, the navigation flow and other details.
  6.  
  7. ### Main Activity
  8.  
  9. The Main Activity is divided into two screens - Market and Places. Both screens are divided into four sections. In Market screen we have Nearby, My Offers, Suggested and Wishlist sections. Every section has offers list.
  10.  
  11. - In Nearby section we have offers from outlets that are 10 or 25 miles away from user.
  12. - In My Offers section we have offers assigned to the user by merchant
  13. - In Suggested section we have offers suggested by merchant
  14. - In Wishlist section we have offers that have been added to the wishlist by the user
  15.  
  16. In Places screen we have four other sections - Nearby, Followed, Suggested and All. Every section has merchants list.
  17.  
  18. - In Nearby section we have merchants that are 10 or 25 miles away from user.
  19. - In Followed section we have merchants that have been added to the follow list by user.
  20. - In Suggested section we have list of suggested merchants
  21. - In All section we have list of all of the merchants
  22.  
  23. Offer cards and Merchant cards have sliding menu for navigation. ShopKonnect logo has search bar and dialog fragment with notifications (when user is logged in and has at least one notification). On the left we have navigation drawer with user data (avatar and e-mail) and navigation menu - Profile, Rewards, Friends list and Settings.
  24.  
  25. ### Offer
  26.  
  27. To offer details we can navigate from main activity, notification and list in merchant details. In this screen we have description, nearest place we can redeem in, address and map marker with location. We have also possibility to add this offer to wishlist.
  28.  
  29. ### Outlet
  30.  
  31. To outlet details we can navigate from offer details, other branches list, merchant details. In this screen we have an option to use external application for navigation; we have opening hours, address and distance to the outlet. We have also a list of facebook reviews from other users and rating of the outlet.
  32.  
  33. ### Merchant
  34.  
  35. To merchant details we can navigate from main activity. There we have address to nearest outlet, marker on map with the nearest outlet, navigation to program (if its active) and offers list. There is also a sliding menu for navigation. We can use to follow this merchant, go to other branches section, loyalty program. If we are logged in with facebook account, we can also like the merchant and check-in.
  36.  
  37. ### Branches list
  38.  
  39. It is a list of all of the branches for specific merchant. We can navigate to it from outlet details and sliding menu in merchant card. On the branch card we have information about distance, opening hours, where it is on the map and address. We can also call there by clicking on the phone number.
  40.  
  41. ### Rewards
  42.  
  43. When you have a reward, you can show/use it from rewards list. You can navigate there from navigation drawer. You can also transfer it to your friend from the sliding menu.
  44.  
  45. ### Friends List
  46.  
  47. You can navigate there from navigation drawer. You can add your friends with plus button which is on the right of the toolbar. You can also transfer a reward by selecting appropriate menu item.
  48.  
  49. ### Loyalty Program
  50.  
  51. If merchant has active program, you can navigate to it from sliding menu in market section (main activity) and merchant details. In this section you have description, rewards list, terms and conditions of the program and stamps list. Also from there you can transfer the reward to your friend
  52.  
  53. ## Libraries (In progress...)
  54.  
  55. 1. RxJava
  56.  
  57. *This library is used to combine requests and transform api responses into final data.*
  58.  
  59. > Link: [https://github.com/ReactiveX/RxJava](https://github.com/ReactiveX/RxJava)
  60.  
  61. 2. Retrofit
  62.  
  63. *Retrofit library is used to handle REST architecture in android app.*
  64.  
  65. > Link: [http://square.github.io/retrofit/](http://square.github.io/retrofit/)
  66.  
  67. 3. Support Libraries
  68.  
  69. *Support libraries are used for backward compatibility with older android's versions.*
  70.  
  71. > Link: [http://developer.android.com/tools/support-library/index.html](http://developer.android.com/tools/support-library/index.html)
  72.  
  73. 4. Butterknife
  74.  
  75. *This library is used to annotate fields for finding and casting corresponding views.*
  76.  
  77. > Link: [http://jakewharton.github.io/butterknife/](http://jakewharton.github.io/butterknife/)
  78.  
  79. 5. Picasso
  80.  
  81. *This library is used to maintain image loading and processing in android.*
  82.  
  83. > Link: [http://square.github.io/picasso/](http://square.github.io/picasso/)
  84.  
  85. 6. Calligraphy
  86.  
  87. *Library used to declare custom fonts in XML files.*
  88.  
  89. > Link: [https://github.com/chrisjenx/Calligraphy](https://github.com/chrisjenx/Calligraphy)
  90.  
  91. 7. Google Play Services
  92.  
  93. *Google Play Services are required for Google Maps, GCM Services, Directions Api and so on.*
  94.  
  95. > Link: [https://developer.android.com/google/play-services/index.html](https://developer.android.com/google/play-services/index.html)
  96.  
  97. 8. JodaTime
  98.  
  99. *This library provides many features for time and date classes.*
  100.  
  101. > Link: [http://www.joda.org/joda-time/](http://www.joda.org/joda-time/)
  102.  
  103. 9. Active Android
  104.  
  105. *ORM for android.*
  106.  
  107. > Link: [http://www.activeandroid.com/](http://www.activeandroid.com/)
  108.  
  109. 10. Event Bus
  110.  
  111. *EventBus is publish/subscribe event bus optimized for Android.*
  112.  
  113. > Link: [https://github.com/greenrobot/EventBus](https://github.com/greenrobot/EventBus)
  114.  
  115. 11. RetroLambda
  116.  
  117. *It is a backport of lambda expressions in Java 5,6, and 7.*
  118.  
  119. > Link: [https://github.com/orfjackal/retrolambda](https://github.com/orfjackal/retrolambda)
  120.  
  121. 12. Material Edit Text
  122.  
  123. *Library that provides edit texts in new Material Design style.*
  124.  
  125. > Link:[https://github.com/rengwuxian/MaterialEditText](https://github.com/rengwuxian/MaterialEditText)
  126.  
  127. 13. Sliding Up Panel
  128.  
  129. *Library that provides dragging sliding up panel.*
  130.  
  131. > Link: [https://github.com/umano/AndroidSlidingUpPanel](https://github.com/umano/AndroidSlidingUpPanel)
  132.  
  133.  
  134. 14. OkHttp
  135.  
  136. *Second library used to handle REST architecture in ShopKonnect. Especially for XPERIA phones*
  137.  
  138. > Link: [https://github.com/square/okhttp](https://github.com/square/okhttp)
  139.  
  140. 15. Timber
  141.  
  142. *Library used for* **Log** *class improvement.*
  143.  
  144. > Link: [https://github.com/JakeWharton/timber](https://github.com/JakeWharton/timber)
  145.  
  146. 16. Reactive Location
  147.  
  148. *Small library that wraps Google Play Services API in brilliant RxJava Observables reducing boilerplate to minimum.*
  149.  
  150. > Link: [https://github.com/mcharmas/Android-ReactiveLocation](https://github.com/mcharmas/Android-ReactiveLocation)
  151.  
  152. 17. ACRA
  153.  
  154. *ACRA is a library enabling Android Application to automatically post their crash reports to a GoogleDoc form*
  155.  
  156. > Link: [http://www.acra.ch/](http://www.acra.ch/)
  157.  
  158. 18. Expendable Text View
  159.  
  160. *Library that allows developer to create text view that collapse/expand.*
  161.  
  162. > Link: [https://github.com/Manabu-GT/ExpandableTextView](https://github.com/Manabu-GT/ExpandableTextView)
  163.  
  164. 19. ASNE
  165.  
  166. *With this library we can manage social networks api's, such like Facebook, Google Plus, LinkedIn etc.*
  167.  
  168. > Link: [https://github.com/gorbin/ASNE](https://github.com/gorbin/ASNE)
  169.  
  170. 20. Smooth Progress Bar
  171.  
  172. *This library allows developer to create progress bar in material design style*
  173.  
  174. > Link: [https://github.com/castorflex/SmoothProgressBar](https://github.com/castorflex/SmoothProgressBar)
  175.  
  176. 21. QRCodeReaderView
  177.  
  178. *Library for QR Code detection in portrait mode in android.*
  179.  
  180. > Link: [https://github.com/dlazaro66/QRCodeReaderView](https://github.com/dlazaro66/QRCodeReaderView)
  181.  
  182. ## Project Structure (For v2.0)
  183.  
  184. Below is an explanation of the project structure. The project is divided into main sections - data, user interface and utilities.
  185.  
  186. ### Data Section
  187.  
  188. In this section we can find classes that handle REST architecture (Retrofit), events (EventBus) and preferences (SharedPreferences). There is also package with POJO model objects, which are received from api responses.
  189.  
  190. #### API
  191.  
  192. As mentioned above, we are using Retrofit and OkHttp to handle REST architecture. We divided it into ApiAdapter, ApiManager and ApiService.
  193.  
  194. - ApiAdapter class wraps RestAdapter and adds all of the headers and other features needed to connect successfully with server.
  195. - ApiManager is a class where we have all of the RxJava methods that returns Observables with API responses.
  196. - ApiService is an interface with Retrofit methods (plain REST methods).
  197.  
  198. #### Events
  199.  
  200. In this package we have events that are populated with EventBus. We specified NotificationEvent class for notifications and CommonStatusEvent for handling errors (offline mode and problems with server connection).
  201.  
  202. #### Model
  203.  
  204. This is place where POJO's are.
  205.  
  206. #### Preferences
  207.  
  208. In this package we have UserPreferences class and LocationPreferences class. UserPreference is used for saving user data (after successfully connected to server and created a session). LocationPreferences is used to save last known location.
  209.  
  210. ### User Interface
  211.  
  212. In this section we can find all of the user interface classes, such as activities, fragments, adapters, controllers.
  213.  
  214. #### Default Architecture
  215.  
  216. Most of the fragments (except Login/Registration) are bind to its own activity. We make api calls in fragments. If there are not Recycle Views and other adapters, the views are set also in fragments. Some of them (Reset Password, Change Password, Profile and Settings) have also been developed with MVP pattern. In those fragments, all of the logic is done in Presenters.
  217.  
  218. All of the activities extends BaseActivity; all of the fragments extends BaseFragment. This allows us to easily implement EventBus and QRCodeSlidingPanel for example.
  219.  
  220. ### Utils Section
  221.  
  222. In this section we can find utilities that are created to handle common android operations and omit boilerplate code. For example there is a DisplayMetricsUtils class that converts dp to px / px to dp or UnitConverter class which converts kilometers to miles / miles to kilometers and returns proper units that were chosen by the user.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement