h3u / builditbigger Goto Github PK
View Code? Open in Web Editor NEWUse Gradle for Android and Java to build a joke telling android app (Udacity Nanodegree Project 4)
Use Gradle for Android and Java to build a joke telling android app (Udacity Nanodegree Project 4)
Follow these instructions to add an interstitial ad to the free version. Display the add after the user hits the button, but before the joke is shown.
https://developers.google.com/mobile-ads-sdk/docs/admob/android/interstitial
Add free and paid product flavors to your app. Remove the ad (and any dependencies you can) from the paid flavor.
Create an Android Library containing an Activity that will display a joke passed to it as an intent extra. Wire up project dependencies so that the button can now pass the joke from the Java Library to the Android Library.
For review on how to create an Android library, check out demo 4.03. For a refresher on intent extras, check out;
http://developer.android.com/guide/components/intents-filters.html
Add a loading indicator that is shown while the joke is being retrieved and disappears when the joke is ready. The following tutorial is a good place to start:
http://www.tutorialspoint.com/android/android_loading_spinner.htm
To tie it all together, create a Gradle task that:
This next task will be pretty tricky. Instead of pulling jokes directly from our Java library, we'll set up a Google Cloud Endpoints development server, and pull our jokes from there. Follow the instructions in the following tutorial to add a Google Could Endpoints module to your project:
https://github.com/GoogleCloudPlatform/gradle-appengine-templates/tree/master/HelloEndpoints
Introduce a project dependency between your Java library and your GCE module, and modify the GCE starter code to pull jokes from your Java library. Create an Async task to retrieve jokes. Make the button kick off a task to retrieve a joke, then launch the activity from your Android Library to display it.
Create a new Gradle Java project either using the Android Studio wizard, or by hand. Then introduce a project dependency between your app and the new Java Library. If you need review, check out demo 4.01 from the course code.
Make the button display a toast showing a joke retrieved from your Java joke telling library.
Add code to test that your Async task successfully retrieves a non-empty string. For a refresher on setting up Android tests, check out demo 4.09.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.