Skip to content

ga-adi-macaron/sync-adapters-lab

Repository files navigation

title type duration creator
Sync Adapters Lab
lab
1:25
name city
Drew Mahrt
NYC

Sync Adapters Lab

Introduction

Note: This should be done in pairs.

In this lab, you will be setting up a sync adapter to get the latest stock prices for the companies in your stock portfolio app (the Content Provier lab) using the MarkIt On Demand API. The prices should update every minute.

In addition, stocks that are on the NASDAQ should be shown differently than the other stocks (ie making the background green).

You will be making a new app for this lab, separate from the content providers lab.

Exercise

Requirements

  • Display stock prices from your portfolio app
  • Update the stock price every minute using a Sync adapter
  • Store the prices after each update in a local database
  • Display the NASDAQ stocks in a unique manner
  • Display the last updated time on the screen

Hint: You can use the Content Provider from the first app to retrieve and update data for the stocks. There is no need to create a new content provider or database.

The files you need to create:

  • MainActivity
  • Authenticator Service
  • Authenticator
  • Stock object (for displaying in the RecyclerView)
  • RecyclerView Adapter
  • Sync Adapter
  • Sync Service
  • authenticator.xml
  • syncadapter.xml

Bonus:

  • Allow the user to set the sync period
  • Allow the user to choose which stock exchange shows up differently (NASDAQ must be an option)

Starter code

Solution code from the Content-Providers lab has been given to you, including the contract you need to access its content provider. You are welcome to use your own solution code if you want to.

Deliverable

An app that meets the above requirements.


Licensing

  1. All content is licensed under a CC­BY­NC­SA 4.0 license.
  2. All software code is licensed under GNU GPLv3. For commercial use or alternative licensing, please contact legal@ga.co.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages