What's in your fridge?

An android mobile application intended to keep and manage a list of items in a user’s fridge and help the user with groceries and recipes.

project main picture

Team

Ivy Wong

Role

Visual Design
Wireflows
SQLite database

Tools

Android studio
Java
Github

Timeline

3 week academic project for an upper division development course.

Overview

What’s in your Fridge keeps and manages a list of items in the user’s fridge, pantry, and kitchen. The application is intended to be a virtual fridge that users can bring to the grocery store or cook a meal with they have. It suggests recipes based on what is in the fridge, and for each ingredient that gets added, the user can put its quantity, type, and picture, to keep track of the brands preferred. The application also notifies the user via vibration when the fridge is empty, and the device can be shaken to change the colour of the ingredient names.

UI Sketches + wireframes
sketch 1
Early sketches
sketch 1
High-fidelity wireframes
sketch 1
Mid-fidelity wireframes
sketch 1
High-fidelity wireframes
Database development

One of my roles while developing this mobile application was to create the SQLite Database which stores the ingredient’s details. The acronym that I utilize to remember the four functionalities of a storage system is CRUD: create, read, update, delete.

Create

The database table created contains the id, name, type, quantity, and image of the ingredient shown in the first figure, and the database is created with the method (.execSQL). Also, the database can be better seen in the last figure with id, name, type, quantity, and image.

create 1
Creating the ingredient specifications for the database table.
create 2
Execution of the database by the software application with the method (.execSQL).
create 3
Database Table. Annotated with red circles indicating the name of the rows.

Add ingredient/ Read

To add data into the database, I make sure to include the user values in which have the values of Banana, Fruit, and 4 shown in the figure above, and this is accomplished with the method (.insert) in the figure below. Also, the addition can be seen in the mobile interface in the last figure.

create 3
Adding the ingredient in the database table. Annotated with a red rectangle and circle to indicate where the method is located.
create 3
Final Application Interface. Annotated with 3 red circles indicating the user input for ingredient name, type, and quantity.

Update

An ingredient is updated using the method (.update). The quantity is changed from 4 to 20, illustrated in the figure below it. Finally, the last image shows how the update is seen in the mobile interface.

create 3
Updating the ingredient in the database table. Annotated with a red rectangle and circle indicating the method for editing the item and put it in the database.
create 3
Final Application Interface.

Remove

To delete an ingredient I used the method (.delete) in which identifies the position in the database that the item is located in. Additionally, the figure below its shows how banana is deleted from the database while alerting the user that the action has been made.

create 3
Removing the ingredient in the database table.
create 3
Final Application Interface.

Final database

The completed database is illustrated on the images below. They show how the user added Banana, Potato, and Kiwi, how Banana was updated to quantity 30, and how Potato was deleted from the list.

create 3
Final Database with all the user input.
create 3
Final Database updating the quantity of the Banana ingredient from 4 to 30.
create 3
Final Database deleting the Potato ingredient of the list.
create 3
Final Application Interface with all user input.
Challenge
create 3
Error when getting the binary numbers of the image.
create 3
Error-free code when getting the binary numbers of the image.

I had an error with implementing the camera functionality to the database by converting the image into a sequence of 0’s and 1’s. In the left figure, the error shows in ingredientImage. I kept putting the object where the image was going to be located, therefore the error persisted. The figure on the right shows how I got rid of the error after rereading the code repeatedly by putting the row name where the image was located.

Reflection

With this project, I learned that a mobile application can be accessible and interactive. The process involved consecutive testing to prevent unexpected program behaviour. For example, an image into the SQL Database would appear in one page and not in the other, therefore locating the issue required attention to detail and problem-solving.

Since one of the biggest roles on this project was to focus on completing the SQL Database, I gained confidence in developing an android mobile application having more attention to detail of the database due to understanding the code after working on it throughout the length of this process. Knowing where the errors appear and how to fix them.

See source code
Go to github