Air is one of the most important entities for living beings. However, with the increase in pollution, particulate matter, smog, etc. the quality of air has been deteriorating day by day. As it is becoming a crucial environmental issue that needs to be addressed, there arises a dire need to check the quality of air around us.

With the expansion of technology, there have been numerous developments to monitor the quality of air. People are seeking a reliable source that can provide them information about the local air quality index and pollution control.

The growth of mobile phones has led to the development of several mobile applications that can help display real-time air quality data to the users.

In the wake of this, our iOS app development agency built an iPhone air quality App that can display whether the quality of air inside a specific environment is good, unhealthy or hazardous.

How we developed an Air Quality Monitor iOS App with BLE Device Integration?

Our iPhone app developers at The Brihaspati Infotech got an opportunity to build an Air Quality iOS App with BLE Device Integration for one of the clients.

The basic idea behind building this app using the IOS platform is to help identify and understand the source of pollution in order to drive actions towards sustainable solutions.  

This can help the user find a better place to live in by checking the quality of air where a user can view the current recorded values to determine the air quality.

These values can be obtained through certain search parameters that the client obtain from various government bodies.

In order to feed the information into the iPhone application, we used the Bluetooth Low Energy device (BLE device) which is based on the Bluetooth technology.  

Now the main purpose is to record the air quality parameters generate from the Device to the app.

These quality parameters are having some predefine parameter value to judge good air quality, when the app record the parameters the application will compare the data with predefined value and display the air quality condition of the area where BLE device is located.

BLE device consumes significantly low power. It is used to record parameters and the values which decide the air quality in the surrounding atmosphere. It can be placed anywhere in the office, house, or other places.

The following conditions are predefined in the BLE device:

Table-of-Air-Quality-Values

Each parameter condition is assigned some predefined value under different sections like PM2.5, PM10, and VOC, where PM stands for the Particulate Matter and VOC stands for Volatile Organic Compound. Each parameter condition is recognized with a unique color as illustrated below:

Color Coding of the Air Quality App in iPhone

This IOS App is developed to record the parameters condition with its value. There are two scales that are used to record the parameter values:

  • PPM (Parts Per Million)
  • AQI (Air Quality Index)

By default, the PPM scale is selected to record the values for determining the quality of air.

However, if any user wants to display values into AQI scale our iPhone developers have provided the options in the App setting area to change the scale.

An Air Quality Index refers to communicating the complicated data in a very meaningful and understanding way. It is designed to make decisions about their modifying activities based on air quality surrounding them.

To convert PPM values data to AQI values equation converter formula is used.

AQI Formula

IOS Framework & Libraries used to build Air Quality Monitor iOS App with BLE Device Integration

1. Core Bluetooth (Used for scanning BLE device and to connect with it)

The Core Bluetooth framework provides the classes needed for your apps to communicate with devices that are equipped with Bluetooth low energy wireless technology. We have used the CB Central Manager to scan, discover and connect/synchronize to remote peripherals.

2. PNChart

PNCharts is a simple chart library that is used for iOS app development in Swift. We used this library to use the iOS Charts API for creating beautiful line graphs. These charts help the users to understand the data in an easy way (manner).

The look of these charts can be further customized by changing its attributes.

Key features of our Air Quality iOS App with BLE Device Integration

(i) Add Multiple User accounts: A user can simply create the sign-up/ log in by entering Email id and Password. What makes our air quality app unique is that after registration or logging in, the user can add multiple accounts, each individual account can be connected to the Single BLE Device.

(ii) Attached Single account to Multiple BLE Devices: Facility is available in the app to connect Multiple BLE devices to one single account through Bluetooth technology.

(iii) Bluetooth Connectivity: After app login, the application will look if the Bluetooth option of the user Mobile device is toggled ‘OFF’ then it ask for them to switch it ‘ON’, if Bluetooth is ‘ON’ then the app will search for the nearby BLE device, display the device name on the popup message, user can select any of the devices as per the requirements.

(iv) Existing devices check: When ready to establish a connection with the BLE device, the app will perform the following actions:

It will check the unique ID of the BLE device linked up on the existing device list on the app. If the device is found, the application will search for another available device for connection, if not then the application will establish the link between itself and the device.

(v) Environment Parameter display: With its value on the home screen once the device is connected, the application by default will display the PPM Scales values along with current air quality condition with specific color display.

(vi) Chart/Graph View: The graph in our iPhone air quality App will display all the three parameters recorded i.e PM2.5, VOC, PM10 The X-axis will be present the time frame, and the Y-axis will display the values. The Graph also displays the color combination depending on the data fetch according to the time-frame and values fetched from the device.

(vii) Cloud Synchronized: Once the app comes in connection with Wi-Fi connectivity the application will sync the data and store on the cloud server.

(viii) Re-fresh Option: Once the user selects a refresh option, The app will display the fresh data fetch from the cloud server and display on the table and chart view.

(ix) Info Pop: Info Pop section of the app will display the BLE device details connected with the application with the following information.

  • Device name
  • Accounts email id
  • Benchmark
  • WI-FI SSID
  • Firmware
  • MAC Address

User has the option to change the following details – Device name, Benchmark details.

(x) Map View: The air quality monitor iPhone app will display the location details of the BLE devices. The user can select the device and view three values PM2.5, VOC, PM10.

(xi) Sharing Feature: The application will allow the user to share the data on a social media platform like Facebook, what’s App, Message through Phone.

Challenges that we faced

1. The major challenge that we came across the app development is the connection with Bluetooth device. To overcome this, the iOS development team used the Core Bluetooth framework. This provides classes that are needed for the app to communicate with devices equipped with Bluetooth low energy wireless technology. We have used the CB Central Manager to scan, discover and connect to remote peripherals. By doing this we successfully developed an iOS App with BLE Device Integration.

2. Another challenge was to have a chart display. To achieve this, we integrated a PN chart library with the app.

Mobile phones have definitely been a great source of protecting the environment when this type of intelligent apps are created. Using the indoor air quality meter can help people devise some compelling measures that can reduce pollution inside their houses and offices. This app also works well in the outdoors.  

Final thoughts on the Air Quality App

Our iPhone air quality App has been successful in monitoring the right value of air components. Just by installing the application in the iPhones and buying the BLE device you can analyze the idea of the amount of toxic air and people can analyze the air in real-time and get forecasts.

In case you are also looking for iPhone app development services, hire iOS developers from us today.

Stay Tuned for Latest Updates

Fill out the form to subscribe to our newsletter

Ellipsis-1s-200px