{"id":25396321,"url":"https://github.com/droidchef/joketeller","last_synced_at":"2025-04-10T21:24:08.854Z","repository":{"id":71849299,"uuid":"44726889","full_name":"droidchef/JokeTeller","owner":"droidchef","description":null,"archived":false,"fork":false,"pushed_at":"2015-10-26T09:41:03.000Z","size":240,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-02-15T20:59:23.511Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/droidchef.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-10-22T06:40:21.000Z","updated_at":"2015-10-24T01:20:35.000Z","dependencies_parsed_at":"2023-03-11T11:29:20.098Z","dependency_job_id":null,"html_url":"https://github.com/droidchef/JokeTeller","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/droidchef%2FJokeTeller","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/droidchef%2FJokeTeller/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/droidchef%2FJokeTeller/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/droidchef%2FJokeTeller/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/droidchef","download_url":"https://codeload.github.com/droidchef/JokeTeller/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248299498,"owners_count":21080534,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-02-15T20:59:26.559Z","updated_at":"2025-04-10T21:24:08.834Z","avatar_url":"https://github.com/droidchef.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Gradle for Android and Java Final Project\n\nIn this project, you will create an app with multiple flavors that uses\nmultiple libraries and Google Could Endpoints. The finished app will consist\nof four modules. A Java library that provides jokes, a Google Could Endpoints\n(GCE) project that serves those jokes, an Android Library containing an\nactivity for displaying jokes, and an Android app that fetches jokes from the\nGCE module and passes them to the Android Library for display.\n\n## Why this Project\n\nAs Android projects grow in complexity, it becomes necessary to customize the\nbehavior of the Gradle build tool, allowing automation of repetitive tasks.\nParticularly, factoring functionality into libraries and creating product\nflavors allow for much bigger projects with minimal added complexity.\n\n##What Will I Learn?\n\nYou will learn the role of Gradle in building Android Apps and how to use Gradle to manage apps of increasing complexity. You'll learn to:\n\n* Add free and paid flavors to an app, and set up your build to share code between them\n* Factor reusable functionality into a Java library\n* Factor reusable Android functionality into an Android library\n* Configure a multi project build to compile your libraries and app\n* Use the Gradle App Engine plugin to deploy a backend\n* Configure an integration test suite that runs against the local App Engine development server\n\n##How Do I Complete this Project?\n\n### Step 0: Starting Point\n\nThis is the starting point for the final project, which is provided to you in the [course repository](https://github.com/udacity/ud867/tree/master/FinalProject).\nIt contains an activity with a banner ad and a button that purports to tell a\njoke, but actually just complains. The banner ad was set up following the\ninstructions here:\n\nhttps://developers.google.com/mobile-ads-sdk/docs/admob/android/quick-start\n\nYou may need to download the Google Repository from the Extras section of the\nAndroid SDK Manager.\n\nWhen you can build an deploy this starter code to an emulator, you're ready to\nmove on.\n\n### Step 1: Create a Java library\n\nYour first task is to create a Java library that provides jokes. Create a new\nGradle Java project either using the Android Studio wizard, or by hand. Then\nintroduce a project dependency between your app and the new Java Library. If\nyou need review, check out demo 4.01 from the course code.\n\nMake the button display a toast showing a joke retrieved from your Java joke\ntelling library.\n\n### Step 2: Create an Android Library\n\nCreate an Android Library containing an Activity that will display a joke\npassed to it as an intent extra. Wire up project dependencies so that the\nbutton can now pass the joke from the Java Library to the Android Library.\n\nFor review on how to create an Android library, check out demo 4.03. For a\nrefresher on intent extras, check out;\n\nhttp://developer.android.com/guide/components/intents-filters.html\n\n### Step 3: Create GCE Module\n\nThis next task will be pretty tricky. Instead of pulling jokes directly from\nour Java library, we'll set up a Google Cloud Endpoints development server,\nand pull our jokes from there. Follow the instructions in the following\ntutorial to add a Google Could Endpoints module to your project:\n\nhttps://github.com/GoogleCloudPlatform/gradle-appengine-templates/tree/master/HelloEndpoints\n\nIntroduce a project dependency between your Java library and your GCE module,\nand modify the GCE starter code to pull jokes from your Java library. Create\nan Async task to retrieve jokes. Make the button kick off a task to retrieve a\njoke, then launch the activity from your Android Library to display it.\n\n### Step 4: Add Functional Tests\n\nAdd code to test that your Async task successfully retrieves a non-empty\nstring. For a refresher on setting up Android tests, check out demo 4.09.\n\n### Step 5: Add a Paid Flavor\n\nAdd free and paid product flavors to your app. Remove the ad (and any\ndependencies you can) from the paid flavor.\n\n## Optional Tasks\n\nTo exceed expectations, do the following:\n\n### Add Interstitial Ad\n\nFollow these instructions to add an interstitial ad to the free version.\nDisplay the add after the user hits the button, but before the joke is shown.\n\nhttps://developers.google.com/mobile-ads-sdk/docs/admob/android/interstitial\n\n### Add Loading Indicator\n\nAdd a loading indicator that is shown while the joke is being retrieved and\ndisappears when the joke is ready. The following tutorial is a good place to\nstart:\n\nhttp://www.tutorialspoint.com/android/android_loading_spinner.htm\n\n### Configure Test Task\n\nTo tie it all together, create a Gradle task that:\n\n1. Launches the GCE local development server\n2. Runs all tests\n3. Shuts the server down again\n\n# Rubric\n\n### Required Components\n\n* Project contains a Java library for supplying jokes\n* Project contains an Android library with an activity that displays jokes passed to it as intent extras.\n* Project contains a Google Cloud Endpoints module that supplies jokes from the Java library. Project loads jokes from GCE module via an async task.\n* Project contains connected tests to verify that the async task is indeed loading jokes.\n* Project contains paid/free flavors. The paid flavor has no ads, and no unnecessary dependencies.\n\n### Required Behavior\n\n* App retrieves jokes from Google Cloud Endpoints module and displays them via an Activity from the Android Library.\n\n### Optional Components\n\nTo receive \"exceeds specifications\", your app must fully implement all of the following items.\n\n* The free app variant displays interstitial ads between the main activity and the joke-displaying activity.\n* The app displays a loading indicator while the joke is being fetched from the server.\n* The root build.gradle file contains a task that will start up the GCE development server, run all Android tests, then shutdown the development server.\n\n### Developer\n\n* Ishan Khanna\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdroidchef%2Fjoketeller","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdroidchef%2Fjoketeller","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdroidchef%2Fjoketeller/lists"}