Skip to content

Asteroid Radar is an app to view the asteroids detected by NASA that pass near Earth.

Notifications You must be signed in to change notification settings

msamy98/Asteroid-Radar

Repository files navigation

Asteroid Radar Application (Using open-source NASA API)

If you are an asteroids enthusiast, well this application is for you.

Project Overview

Asteroid Radar is an app to view the asteroids detected by NASA that pass near Earth, you can view all the detected asteroids given a period of time with data such as the size, velocity, distance to earth and if they are potentially hazardous. In this project, you will apply the skills such as fetching data from the internet, saving data to a database, and display the data in a clear, compelling UI.

You will need the NEoWs API which is a free, open source API provided by NASA JPL Asteroid team, as they explain it: “Is a RESTful web service for near earth Asteroid information. With NeoWs a user can: search for Asteroids based on their closest approach date to Earth, lookup a specific Asteroid with its NASA JPL small body id, as well as browse the overall data-set.”

Features:

  • Main screen to show list of clickable asteroids code names along with close-to-earth date.
  • Details screen displays all the data of the choosen asteroid such as the size, velocity, distance to earth and if they are potentially hazardous.
  • Downloads the data from the NASA API (NeoWS) and parse it.
  • The application caches all the coming week data using WorkManager in the background only when the mobile is charging, connected to wifi and idel.
  • The application also provide excellent talk back experience

Using NASA API:

  • First you need to get your own API key which is provided by NASA API.
  • Then add your API key in the local.proerties file as apiKey = "Your API Key"

Dependencies

The most important dependencies used are:

  • Retrofit to download the data from the Internet.
  • Moshi to convert the JSON data we are downloading to usable data in form of custom classes.
  • Picasso to download and cache images.
  • RecyclerView to display the asteroids in a list.

The following components from the Jetpack library are used:

  • ViewModel
  • Room
  • LiveData
  • Data Binding
  • Navigation

Built With

  • Android Studio - Default IDE used to build android apps
  • Kotlin - Default language used to build this project
  • Navigation Component - Android Jetpack's Navigation component, used for Fragment-based navigation
  • Retrofit - a type-safe HTTP client for Android and Java
  • Moshi - a modern JSON library for Android and Java, that makes it easy to parse JSON into Java or Kotlin objects
  • Picasso - A powerful image downloading and caching library for Android
  • Android Architecture Components - a collection of libraries that help design robust, testable, and maintainable apps: Room (a SQLite object mapping library), LiveData (builds data objects that notify views when the underlying database changes), ViewModel (stores UI-related data that isn't destroyed on app rotations)
  • Data Binding - a Jetpack support library that allows to bind UI components in your layouts to data sources in your app using a declarative format rather than programmatically
  • MVVM - the architecture pattern

Application Screenshots

main_screen_Asteroid Radar main_screen_filtering_Asteroid Radar potentially_hazard_asteroid_details_Asteroid Radar safe_asteroid_details_Asteroid Radar unit_info_Asteroid Radar

Udacity Code Review

image image image image image image image image image image image image image