Insider's Guide To Udacity Android Developer Nanodegree Part 4 - Build it Bigger |
Written by Nikos Vaggalis | |||||
Monday, 02 October 2017 | |||||
Page 2 of 4
Build It Bigger ProjectThis project required building an app that diversifies through multiple flavors (paid and free) and connects to multiple libraries and endpoints:
The app should fetch a joke from the GCE module and pass it on to the Android Library to display it on screen and in the end be subjected to a few Instrumentation tests. A question that immediately sprung to mind, was why do we have to go through the extra intermediate step of the GCE and not just have our Android library call into our Java joke providing library?.I raised this question in the forums and here follows the dialogue I had with the forum's mentors: Forum mentor Nikos App(click button)–>GCE–>Java joke library–>GCE–>Android library Forum mentor GCE -> App -> Android Library because I’d open the Activity implemented in the Android Library only after receiving the joke from the GCE. Nikos Forum mentor Nikos GCE -> App -> Android Library how does the GCE call into my App? Or is it just my App calling the GCE endpoint and retrieving the response (the joke) of the GCE ? Forum mentor When we receive the result in our AsyncTask we then launch the Activity from our Android library. Does that make sense? Nikos forum mentor GCE Backend Server <--AsyncTask--> App There is two-way communication happening here.
So the project structure I've followed was:
Locating the missing dependencyThe first incident involving Gradle was Android Studio complaining for the missing dependency on class AndroidHTTP when about to add support for the GCE backend.
Putting on the detective's hat, this was the procedure I've followed: First tried looking it up on the Google Developers web site:
Following the link brought up the Class's screen:
but since interested only in the package containing the class, I followed 'Package'
which brought up the Overview of the package list in "Google HTTP Client Library for Java"
|
|||||
Last Updated ( Monday, 20 November 2017 ) |