Java代写:CSCI571 Event Search Android App



  • Become familiar with Java, XML, Android Lifecycle and Android Studio for Android app development.
  • Build a good-looking Android app.
  • Learn to use the Google Maps APIs and Android SDK.
  • Get familiar with third party libraries like Picasso, Glide and Volley.


Android Studio

Android Studio is the official Integrated Development Environment (IDE) for Android application development, based on IntelliJ IDEA - a powerful Java IDE. On top of the capabilities you expect from IntelliJ, Android Studio offers:

  • Flexible Gradle - based build system.
  • Build variants and multiple apk file generation.
  • Code templates to help you build common app features.
  • Rich layout editor with support for drag and drop theme editing.
  • Lint tools to catch performance, usability, version compatibility, and other problems.
  • ProGuard and app-signing capabilities.
  • Built-in support for Google Cloud Platform, making it easy to integrate Google Cloud Messaging and App Engine.

More information about Android Studio can be found at:


Android is a mobile operating system initially developed by Android Inc., a firm purchased by Google in 2005. Android is based upon a modified version of the Linux kernel. As of Nov 2018, Android was the number 1 mobile OS, in unit sales, surpassing iOS, while iOS was still the most profitable platform.
The Official Android home page is located at:
The Official Android Developer home page is located at:


This homework requires the use of the following components:

  • Download and install Android Studio. Technically, you may use any other IDE other than Android Studio such as Eclipse, but the latest SDKs may not be supported with Eclipse. We will not be providing any help on problems arising due to your choice of alternate IDEs.
  • You must use the emulator. Everything should just work out of the box. Before you start, you need to manually set the emulator’s longitude and latitude nearby
    USC. An example is shown in Figure 1.

High Level Design

This homework is a mobile app version of Homework 8. In this exercise, you will develop an Android application, which allows users to search for the event ticket, look at information about it, save some as favorites and post on Twitter about the event. You should reuse the Node.js backend service you developed in Homework 8 and follow the same API call requirements.


Search Form

The initial interface is shown in Figure 2. There are two tabs in this interface: search and favorite.

For the search tab, it has the following fields:

  • Keyword: An AutoCompleteTextView component allowing the user to enter the keyword. It provides the autocomplete function as shown in Figure 3. Make sure you use the same API as Homwork 8. See section 6.3.5 for hints.
  • Category: A Spinner view allowing the user to choose a category. When the user taps on this field, a dropdown list should display for selecting a category, as shown in Figure 4. Make sure you include all the categories in homework 8.
  • Distance: An EditText (type:number) view allowing the user to enter the distance and the default value is 10. A Spinner for the user to select unit: “miles” or “kilometers”.
  • From: Two Radio Buttons to select “Current Location” or “Other”. You should get the location from your emulator for users that choose “Here”. See section 6.2. An EditText component allowing the user to enter a location for “Other”. The EditText should only be enabled when the corresponding Radio Button is checked.
  • Search: A button to get the input information of each field, after validation. If the validation is successful, then the events would be fetched from the server. However, if the validation is unsuccessful, appropriate messages should be displayed and no further requests would be made to the server.
  • Clear: A button to clear the input fields and reset them to default values when applicable. It should also remove any validation error messages.

The validation for an empty keyword has to be implemented. If the user does not enter anything in the EditText or just enters some empty spaces, when he/she presses the Search button you need to display an appropriate message to indicate the error, as shown in Figure 5. The same should be done when “From” location is not entered, and that option in enabled using the radio button as shown in Figure 6.

Search Results

When the user taps the SEARCH button and all validations pass, your app loads the search results page. Before you get the data from your backend server, a progress bar should display on the screen. After you get the data from your backend, hide the ProgressBar and display the result page as a list using RecyclerView or ListView, as shown in Figure 7. The RecyclerView or ListView must be scrollable. They also provide a ‘back button’ to navigate back the search/favorite interface.

Each of the item in the list should have the following:

  • Category image (See the mapping between segment and icons on section 6. 1)
  • Name of the event
  • Name of the venue
  • Date and Time of the event
  • A heart-shaped “Favorite” button See homework 8 for more details about these fields.

Tapping the favorite button (the heart) would add the corresponding event into the favorites list, and a message should be displayed at the bottom of the app using a Toast, as shown in Figure 9. Tapping the button again would remove that event from the favorites list, and a similar message should also be displayed to indicate the event has been removed from the favorites list, as shown in Figure 10.

Event Details

Tapping on an item in the result list should show details of that event with four tabs: Event, Artists, Venue and Upcoming. Note that the ProgressBar should be shown on each tab before you are ready to display the corresponding tab.

The tabs should be attached to the ActionBar and a ViewPager should be used to host all the tabs, as shown in Figure 11. Users should be able to switch between tabs by both swiping and tapping on a tab. The ActionBar should also include the following elements:

  • A back button, which navigates back to the search results list.
  • A title, which is the name of the event.
  • A favorite button to add/remove the event to/from the favorite list, and display a Toast at the bottom of the screen. See video for more detail.
  • A twitter button, to share the event details on Twitter. Once the button is tapped, a web page should open to allow the user to share the event information on Twitter, as shown in Figure 12. This should work the same as homework 8.

Event Tab

The fields in Figure 11 should be shown in the Event tab. See homework 8 for more details about each field. In homework 9, the seat map will be the URL of the image and when user click on this URL, it will go to the browser to show the seat map.

Artist(s) Tab

Same as in homework 8. But for multiple artists in homework #9, you could only show the first two artist’s music profiles (if applicable) and corresponding photos (at most 8 photos for each artist/team). See Figure 13, Figure 14 and Figure 15.

You could use Volley Network ImageView, Picasso or Glide to load the image. See more on section 6.3.

Venue Tab

As shown in Figure 16 and 17, there are two elements in this tab:

Upcoming Tab

This tab displays the upcoming events of the venue, same as homework 8. Please note, in homework #9, you need to get at most 5 (first 5) upcoming events from your
NodeJS server.

As shown in Figure 18 and 19, you should use two Spinners to switch sort base and also its order. One Spinner allow users to sort the upcoming events by default order, event name, time, artist and type. Another provides the sort in ascending or descending order. When “Default” is selected, the Ascending or Descending should be disabled.

The upcoming events are shown in a list using a RecyclerView. Note that each of the cells can be tapped and then a web page should be opened and navigates to the tapped upcoming events, see video for more detail and Figure 20.

In the case of no upcoming data, show “no records” in the center of the screen, as shown in Figure 21.

Favorite list

Use Tabs with a ViewPager on the main screen to switch between the search page and the favorite page. The favorite events should be displayed in a list using a RecyclerView/ListView. Each of the items in the list includes an event catalog image, event name, venue name and time, as shown in Figure 22. If there are no favorite events, “No Favorites” should be displayed at the center of the screen, as shown in Figure 23.

Like in search results, pressing the favorite icon here should remove the event from the favorites list. See video for more detail.

Error handling

If no events are found given a keyword, a “no results” should be displayed, as shown in Figure 24.

If for any reason an error occurs (no network, API failure, cannot get location etc.), an appropriate error messages should be displayed at the bottom of screen using a Toast.


For things not specified in the document, grading guideline, or the video, you can make your own decisions. But keep in mind about the following points:

  • Always display a proper message and don’t crash if an error happens.
  • Always display a loading message if the data is loading.
  • You can only make HTTP requests to your backend Node.js on AWS/GAE/Azure and use the Google Map SDK for Android.
  • All HTTP requests should be asynchronous and should not block the main UI thread. You can use third party libraries like Volley to achieve this in a simple manner.