An Android application to fetch air quality from Aqicn.
- Show all saved cities with air quality level fetched from Aqicn.
- Add/delete any city.
- French & English support.
- Special display on tablet/smartphone (fragmented layout).
- Share air quality level by email.
- Playing sound according to air quality level.
- Content provider allowing to add/remove a city from other app (see content provider).
- Air quality chart (powered by Hello Chart Android).
- 3 themes available (dark, light, sunset).
- Automatic night mode (apply dark theme automatically).
- Display nearest city from user's location.
- Refresh in background all saved cities (see background service).
- Send push notifications when air quality is higher than 100.
- Display informations about city.
- Widget of favorite city (see widget).
Min. version | Targeted version | Compiled version | Android Studio v. used |
---|---|---|---|
Android 4.4 | Android 5.1 | Android 5.1 | 2.3 |
Working on :
- Smartphone
- Tablet
- Clone this repository.
git clone git@github.com:istornz/AirChecker.git
- Open the project with Android Studio
- Build & run the project.
- Profit 🎉
- Add a new city by touching the "magnifying glass" icon at top right.
- Type your city on the search field and click on "OK".
- Select on the list your city.
- To delete a city, swipe right/left on it and choose "Yes".
- On the top of list, this is the nearest city (gray background).
- Add a new city (see basic usage).
- Select the city cell in list and touch "Favorite" button at the bottom of details page.
- Add the widget on your homescreen/launchscreen.
- Enjoy 🎉
- You can add a new city by using the insert() method. Pass the city identifier as identifier key.
ContentValues aqi = new ContentValues();
aqi.put("identifier", "IDENTIFIER_HERE");
getContentResolver().insert(AirCheckerProvider.CONTENT_URI, aqi);
- You can delete a city by using the delete() method. Pass the city identifier as selection argument.
getContentResolver().delete(AirCheckerProvider.CONTENT_URI, "IDENTIFIER_HERE", null);
You can easily change the refresh rate of the background task service.
You can find all params in the BackgroundRefresher class.
// Delay value between two request .
private static final int delay = 1800000;
// Air quality level (Greater than or equal fire a notification).
private static final int limit = 100;
To get your keys, please go on the Air Quality Open Data Platform register page.
© Dessus Dimitri - 3/04/2017