Electric App is a mobile application made on Android Studio that utilized the National Renewable Energy Laboratory (PV Watts) API to locate utility companies and electricity rates within a given location.
Login Demo | Register Demo | Request Demo | Request Rate Demo |
---|---|---|---|
![]() |
![]() |
![]() |
![]() |
Aplogies for the Gif quality, this was the best I could do, my virtual device is glitchy, so I had to use a third party tool.
Splash Page | Login Page | Register Page |
---|---|---|
![]() |
![]() |
![]() |
Utility Tool Page | Utility Info Page | Utility Rate Page |
![]() |
![]() |
![]() |
Utility Rate Result Page | Utility Info Result Page | |
![]() |
![]() |
- Firebase Authentication
- Usage of NREL API
- Works Across Locations in U.S
GET /api/utility_rates/v3.format?parameters
Parameter | Required | Type | Description |
---|---|---|---|
format |
Yes |
string |
The output response format |
api_key |
Yes |
string |
Your API key |
address |
Depends |
string |
The address to use. Required if lat/lon not provided. |
lat |
Depends |
decimal |
The latitude for the location to use. Required if address not given. |
lon |
Depends |
decimal |
The longitude for the location to use. Required if address not given. |
radius |
No |
decimal |
The radius (in miles) around the search location to search for utility rates with intersecting boundaries. With the default radius of 0, only utility rates whose boundaries contain the search location point will be returned. |
limit |
No |
decimal |
The maximum number of results to return. If no limit is specified then all matching results will be returned. |
Field | Value | Description |
---|---|---|
utility_name |
string |
The name of the utility company. If there are multiple utility companies serving the location, the names will be returned as a pipe-delimited string. |
company_id |
integer |
The ID of the utility company. If there are multiple utility companies serving the location, the IDs will be returned as a pipe-delimited string. |
utility_info |
collection |
An array of hashes containing the name(s) and ID(s) of the utility company or companies serving the location. |
residential |
decimal |
The residential electricity rate ($/kWh). |
commercial |
decimal |
The commercial electricity rate ($/kWh). |
industrial |
decimal |
The industrial electricity rate ($/kWh). |
To run this project, you will need to add the following environment variables to your UtilityCompanyActivity.java & UtilityRateActivity.java file
API_KEY
From API Key Usage
Clone the project
git clone https://github.com/musa211/ElectricApp
Open with Android Studio
Run using your AVD (virtual device)
Start the server
What did you learn while building this project? What challenges did you face and how did you overcome them?
This is my first significant project utilizing Android Studio. I learned how to implement
- Firebase Authentication
- Sending JSON Request
- Recycler View & Adapter
- Email Validation Using Regex
- Interactive UI
- Activities & Intents
- Clickable Images
- Input Controls
- Menus and Pickers
- User Navigation
I faced issue with handling the JSON output file and working with the different layouts. JSON issue was overcomed through appropriate logging. I just used trial and error for issues with the layouts.
Yes, but I provided a default key to use but feel free create your own.
Android Studio, and make sure to install an AVD.
Add badges from somewhere like: shields.io