This app is part of the Udacity's Android Developer Nanodegree. The started code can be found here
The application uses different modules (see below section) to present jokes to the user. It is also possible to share them.
There are two flavors:
-
free Flavor: Shows adds at the bottom of MainActivity and when the "joke button" is pressed
-
paid Flavour: No adds
This android project contains the following modules:
- funnyJoke: Java library that provides jokes
- funnyJokeAndroid: Android library with an Activity that displays a joke received via intent
- backend: Google Cloud Endpoints (GCE) that uses the funnyJoke java library to obtain the jokes
- app: Contains the logic of the application. The jokes are obtained from the GCE (backend module) and displayed using the funnyJokeAndroid lbirary
The relationship between the modules can be seen in this diagram:
Image obtained from the Udacity's Android Developer Nanodegree
First of all you need to start the Google Cloud Endpoint (backend module) to retrieve the jokes. It is configured to be deployed locally, so some configuration needs to be done:
- In GetJokeAndLaunchJokeActivity.java line 64 you need to set the ip of your machine
- To use the free Flavor, you need set a valid application ID in its Manifest file . More information about this here
The next step is to deploy the GCE0
Open the Gradle tab in Android Studio and run the gradle task backend > appengineStart.
To stop the GCE, use backend > appengineStop
As mentioned before the app has two flavors, free and paid.
The source Flavor, from where both inherit, doesn't contains adds. For this reason the paid Flavor uses this resources instead of creating specific ones. See here
On the other hand, for the free one there are some specific resources that can be found here
To install the fee Flavour use the gradle task app > tasks > install > installFreeDebug
To install the paid Flavour use app > tasks > install > installPaidDebug
Please be aware that the tests related to ads may fail due to timing issues. if so, rerun the tests.
The logos used in this applications are the following:
-
ic_jester.xml Obtained from flaticon and made by Elias Bikbulatov