Skip to content
Snippets Groups Projects
Commit 6ac55a35 authored by Himali Aryal's avatar Himali Aryal
Browse files

Merge branch 'readme_update' into 'master'

Readme update

See merge request !7
parents 37651012 075bbcd9
No related branches found
No related tags found
1 merge request!7Readme update
# flutter_app
A new Flutter application.
## Usage
## Getting Started
You can build and run this app by yourself. You'll need [Git](https://git-scm.com), [Flutter](https://flutter.dev/docs/get-started/install), [NPM](https://www.npmjs.com/get-npm) and [Android Studio](https://developer.android.com/studio) installed.
This project is a starting point for a Flutter application.
Building this app for yourself needs 2 steps:
A few resources to get you started if this is your first Flutter project:
1. Basic Setup
2. Firebase Integration
- [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab)
- [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook)
I'll describe these steps in detail.
For help getting started with Flutter, view our
[online documentation](https://flutter.dev/docs), which offers tutorials,
samples, guidance on mobile development, and a full API reference.
### 1. Basic Setup
First of all, clone this project by running command:
```
$ git clone https://git.gvk.idi.ntnu.no/haryal/stress_detection.git
```
Open cloned directory with Android Studio and it'll notify you to run `Packages get` to install dependencies. Do that.
### 2. Firebase Integration
This app uses various features of Firebase, including [Firebase Authentication](https://firebase.google.com/docs/auth/), [Firebase Realtime Database](https://firebase.flutter.dev/docs/database/overview/), [Cloud Firestore](https://firebase.google.com/docs/firestore/). If Firebase is not set up, you *can* still build the app, but you won't be able to save the data, see the first screen.
#### (1) Create Firebase project
First, you have to create a new project in [Firebase Console](https://console.firebase.google.com/). Click on the *Create a project*
![Firebase console](./images/screenshot/firebase%20console.png)
Set a project name (or it can be anything else) and creat a project.
**Image here**
![Set a project name](./images/screenshot/Project_name.png)
Go into your newly created project. Click **Android** button:
![Select android for android project setup](./images/screenshot/select_android.png)
Register your app in the firebase console.
Go to the *android>app>build.gradle* and copy the *applicationID* and use that to register the app.
![Add firebase to your app](./images/screenshot/Add_firebase_to_app.png)
Download the config file and put in the *android>app>* along with *build.gradle* file.
Then Click on **Next**
Flutter app is now connected with the firebase.
You can see the realtime database on the left side of the firebase console page. Once you save the data to the database, the result will be reflected in the database.
![Data on the realtime firebase database](./images/screenshot/Data_on_realtime_database.png)
\ No newline at end of file
images/screenshot/Add_firebase_to_app.png

238 KiB

images/screenshot/Data_on_realtime_database.png

126 KiB

images/screenshot/Project_name.png

210 KiB

images/screenshot/firebase console.png

62.9 KiB

images/screenshot/select_android.png

217 KiB

0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment