Skip to content
Android client for ESP32 hpma115s0 sensor project and map publisher
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
app
assets/googleplay
gradle/wrapper
libtoolscommon
screenshots
.gitignore
LICENSE
README.md
build.gradle
gradle.properties
gradlew
gradlew.bat
settings.gradle

README.md

CanAir.io Air quality Reporter

CanAirIO is a citizen science initiative for air quality tracking, visualization and dissemination by using PM2.5 particulate material sensors paired with your smartphone via bluetooth.

This code is for CanAir.io Android client and reporter for esp32-hpma115s0 pollution sensor.

Full guide (Hackster.io): English | Spanish


TODO

  • BLE scanning and connecting
  • BLE auto connect and reconnect
  • Receive data via BLE notification
  • Basic chart for PM 2.5 data
  • BLE persist connection on background service
  • Recoding data in the phone
  • List recorded tracks fragment
  • Open Street map fragment
  • Connect list records to record track
  • Connect Open Street Maps to pollution data
  • Firebase connection for publish reports
  • Osmdroid clusters (for static points)
  • Osmdroid routes (for line or dinamic points)
  • Export data to json or others

Dependencies

  • Android SDK and NDK
  • Tested with gradle 4.4, SDK tools 26 and NDK 15
  • CMake

Requirements

This application uses a Firebase Database instance to store air quality reports.

For local development, you will need to create a database in the Firebase Console using hpsaturn.pollutionreporter as the application identifier and retrieve a google-services.json file. See instructions here.

Compiling

  • Create a local keystore:

keytool -genkey -v -keystore my-release-key.keystore -alias alias_name -keyalg RSA -keysize 2048 -validity 10000

  • Add a reference to the keystore to your environment variables by adding the following to ~/.bash_profile or ~/.bashrc depending on your local setup.
export airStoreFile=<your_test.keystore>
export airStorePassword=<your_test_keystore_password>
export airKeyAlias=<your_test_keystore_alias>
export airKeyPassword=<your_key_password>
git clone https://github.com/kike-canaries/android-hpma115s0.git
cd android-hpma115s0.git && ./gradlew assembleDebug

Credits

Icons made by Prosymbols from www.flaticon.com is licensed by CC 3.0 BY
You can’t perform that action at this time.