IanTDuncan / MealTime

Project for CSC 480
0 stars 0 forks source link

Database Implementation #64

Closed aaleksandraristic closed 8 months ago

aaleksandraristic commented 9 months ago

This is the guidance for implementing a database and integrating data fetched from an existing website into the app. Specifically, I am planning to create the database helper class, define the data model, and handle the process of fetching and storing data from the website.

I will probably use Firebase as an alternative to SQLite for our Android app's database. Firebase provides a real-time NoSQL database called the Firebase Realtime Database, as well as other services like Firestore. All the steps will be written below:

aaleksandraristic commented 9 months ago

Setting Up Firebase in an Android App:

Pulling Data from an API:

aaleksandraristic commented 9 months ago

What could be some of the problems:

aaleksandraristic commented 9 months ago

image

aaleksandraristic commented 9 months ago

Firebase Documentation - let's see what extensions do we want to include in our app:

https://firebase.google.com/docs/samples?hl=en&authuser=0&_gl=1*1c009rl*_ga*MTAxMTc1MTE4My4xNzA2NDcxNjk5*_ga_CW55HF8NVT*MTcwNjQ5Nzk5OS4yLjEuMTcwNjUwMDU1Ni42MC4wLjA.

aaleksandraristic commented 9 months ago

Firebase ML Kit

Firebase offers machine learning services through Firebase ML Kit, which allows you to easily integrate machine learning capabilities into your Android app without extensive knowledge of machine learning. Here are some Firebase ML Kit features that you could potentially use for your project:

Text Recognition: Firebase ML Kit provides Text Recognition APIs that allow you to extract text from images. This could be useful if your app needs to analyze nutrition information from images containing text.

Image Labeling: Image Labeling allows you to identify and label objects in images. For example, you could use this feature to analyze images of food items and label them based on their contents.

Barcode Scanning: If your nutrition app involves scanning barcodes on food products, Firebase ML Kit's Barcode Scanning API can help extract information from barcodes efficiently.

Face Detection: Face Detection can be useful if your app involves analyzing user images, such as taking pictures of meals. This feature can help identify and analyze faces within the images.

Smart Replies: Smart Reply is a feature that suggests quick responses based on the input text. If your app involves communication or user interaction, this feature can enhance the user experience.

Firebase ML Kit Documentation: https://firebase.google.com/docs/ml-kit Firebase ML Kit provides a user-friendly way to incorporate machine learning into your app without requiring you to build and train complex models from scratch.

aaleksandraristic commented 9 months ago

I have talked to Ian about food database API - that would probably be part of his work since he's doing all the rest of APIs. I am now going to take care of user information storage.

aaleksandraristic commented 9 months ago

Firebase RealtTime Database Implementation Code:

image image