Portfolio Essay Example

  • Category:
    Logic & Programming
  • Document type:
    Research Paper
  • Level:
  • Page:
  • Words:

Unit code/name

Report Writing Android App Details

IOS App Description

The purpose of building this android app project was to add some monitoring functions to traditional fridges. One of the functions would be keeping the foods fresh and avoiding waste. This android app works with a redesigned fridge that follows the idea of internet of things (IoT). The smart fridge will involve new circuit design and implementation. An android smart phone was used to develop the application. The android application would allow the user to scan the product barcode by smart phone. At the same time, it would send a notification to a user’s smart phone indicating that a new product has entered the fridge.

The application should also be able to track product expiry date by relying on the date that the product was put in the fridge, and the expiry date indicated alongside every barcode. After some days, depending on the product date expiry date, the application should be able to send another notification to the user. The application would be uploaded on Google drive so that any customer can download it on his smartphone.

This android application would be accessible via the web. It would also rely on a central database that is easily updateable. These features enhance the quality, dynamism and efficiency of the system. It also minimizes the workload involved. A user can easily access their profile from any place, as long as they have internet access. They would only need their password and username to log in. The services provided by the system would include checking of expiry date for food stuff, management of the food stock, viewing remaining time for expiry, and generation of total food stock in the fridge.

The smart fridge application is poised to monitor expiry dates for food stored in it. It does this by scanning barcodes when foodstuff is inserted into the fridge cabinets. It then sends the barcode in real time through the RFID reader. The RFID reader then sends the information to a small database that keeps tables for food items based on their RFID tag. The database also stores information on each item’s expiry date based on their unique RFID tag. A remote user can use a client computer or smartphone to request the information on the food stocks in the fridge and their expiry dates. It sends a daily report on the expiry durations of the remaining foods in the fridge. The application software should be downloadable over the internet.


A relational database would be needed to store unique profiles of RFID tags. MySQL is the most suitable way of implementing the database It would involve commands for creating various tables such as CREATE DATABASE rfid, CREATE TABLE favourite_food, CREATE TABLE rfid_store, CREATE TABLE add_new_food.

Connecting the RFID reader with the personal computer would require PHP code

How to connect the RFID reader with the PC.

“$socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP)”, “socket_connect($socket, $destination_ip,$destination_port)”. The “$socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP)”

Logging in and retrieving data from the socket

$output = “reader.login(login=admin, pwd=readeradmin)”. “rn”;

if (!socket_send($socket, $output, strlen($output),0))

{ echo(“Initialisation failed: ” . socket_last_error());


$input = socket_read ($socket, 50008);

Building the User Interface

time.php” file

date_default_timezone_set (‘Brussels’);

echo «<div align=’center’><h2> This is a smart fridge application n </h2>»; echo ‘<br>’;

$today=getdate(); echo $today[‘weekday’].», «.$today[‘hours’].’

:’.$today[‘minutes’].’ ‘.’ ,

‘. $today [‘mday’].’.’.$today [‘month’].’.’.$today [‘year’];

echo ‘</div>’;

javascript code for “food expiry date” and “food needed to buy” is presented below.

<script type= “text/javascript”>

function show_hide (id) {

var v =document.getElementById (id);

if (v. style .display== ‘block’)

v.style.display = ‘none’;

else v.style.display = ‘block’;


Form for adding food to the fridge

<form action= ‘<?php $_SERVER[‘PHP_SELF’]?>’method= ‘post’>

<input type= ‘text’ name= ‘num’ id= ‘num’/>

<input type= ‘submit’ name= ‘submit_num’ value= ‘submit’ id= ‘submit_num’ expiry_date= ‘submit’/>

Editing food entries

<input type= “radio” name= “choose” value= “open”/> open food product <br/ >

<input type= “radio” name= “choose” value= “remove”/> remove food product <br/>

<input type= “radio” name= “choose” value= “update”/> update <br/>

<input type=”radio” name= “choose” value= “item waiting”/> item waiting <br/><form>

The software needs would be met by the interaction of the smartphone client application, and the database on the smartfridge’s processor. The system would run a web server integrated with a database server that runs a database for storing barcode records and names of each single food item that is stored in the smart fridge. The system’s functionalities are captured in piece of code below. To illustrate some of the functionalities of the smartfridge android application, a simulator graphic video can be used to explain how the application works. It simulates the functionality of the real system, though the actual system would run on a processor on the smartfridge, and a client application on the smartphone. System tests can be carried on the application by feeding sample food stocks into the smart fridge to understand the android application’s functionality and behaviour.