fix(guide): simplify directory structure

This commit is contained in:
Mrugesh Mohapatra
2018-10-16 21:26:13 +05:30
parent f989c28c52
commit da0df12ab7
35752 changed files with 0 additions and 317652 deletions

View File

@ -0,0 +1,44 @@
---
title: connecting-to-firebase
---
# Prerequisites
1. The Latest Version of Android Studio
<br>
The easiest way to connect to firebase is to use the firebase assistant.
# 1. Connecting using Firebase Assistant
1. Create an account in the [Firebase Console](https://console.firebase.google.com).
Click add project to add your Android Studio project to it.
2. Install Google Repository
You can do this by adding the dependency into your project-level build.gradle file like this:
```java
allprojects{
repositories {
maven {
url "https://maven.google.com" // Google's Maven repository
}
}
}
```
Alternatively, you could do that [using the GUI](https://developer.android.com/studio/write/firebase).
3. Go to Tools > Firebase and select Connect to Firebase
If you wish to connect to firebase manually, detailed instructions are available [here](https://firebase.google.com/docs/android/setup).
<br>
Having connected your Android Studio project to Firebase, you can either
1. click on a product in the firebase assistant and get taken to the Google docs where you will be told how to proceed
2. go to desired product in **Project Overview** in the Console and click on **Get Started**
3. go to the [Firebase docs](https://www.firebase.com/docs/android/quickstart.html) to see how to setup individual products in your project
Reading a combination of all three will enable you to setup the product, which includes adding suitable dependencies to your build.gradle file.
**If You Encounter Gradle Sync**
Try To Change The Firebase-core Version or Firebase-database version

View File

@ -0,0 +1,51 @@
---
title: Setting up Firebase Storage
---
# Setting up Firebase Storage
## Prerequisites
1. The latest version of Android Studio
2. Have connected with Firebase manually or via Firebase Assistant (See [Connecting to Firebase](guide/src/pages/android-development/firebase/connecting-to-firebase)).
It is recommended that you do this so as to not be confused by partial instructions related to this in the docs mentioned below.
## Setting it up with Android Studio
After adding Firebase to your project, you will need to add extra dependencies and do some other things in order to setup
the Firebase Storage. There are following documentation about this:
* [Firebase](https://firebase.google.com/docs/storage/android/start)
There may be chance of confusion in that documentation or if you are new to firebase then you may face little bit hard to understand it.
So follow the belows steps carefully:
**Add Gradle Dependencies**
In your app-level build.gradle file, add the following
```java
dependencies {
implementation 'com.google.firebase:firebase-storage:16.0.2'
}
```
## Installation of Firebase Android SDK, permissions and setup code
Detailed instructions for these can be found [here](https://firebase.google.com/docs/android/setup).
## Resources
To learn about how to read from and write to the storage in your Android application, refer to the docs listed below.
* [Upload files from Android
Firebase Guide](https://firebase.google.com/docs/storage/android/upload-files)
* [Download files to Android
Firebase Guide](https://firebase.google.com/docs/storage/android/download-files)
## Sample Projects from Firebase Developers
You can follow up these samples from Firebase developers to get started Firebase storage
Firebase Quickstart-Android [android-sample](https://github.com/firebase/quickstart-android/tree/master/storage)
## Note
Google now deprecated 'compile' and in place of that you need to use 'implementation'.

View File

@ -0,0 +1,54 @@
---
title: Setting up Firebase Realtime Database
---
# Prerequisites
1. The latest version of Android Studio
2. Have connected with Firebase manually or via Firebase Assistant(See [Connecting to Firebase](guide/src/pages/android-development/firebase/connecting-to-firebase)).
<br>
It is recommended that you do this so as to not be confused by partial instructions related to this in the docs mentioned below.
# Setting it up with Android Studio
<br>
After adding Firebase to your project, you will need to add extra dependencies and do some other things in order to setup
the Realtime Database. There are two documentations about this:
1. Firebase quickstart [docs](https://www.firebase.com/docs/android/quickstart.html)
2. Google [docs](https://firebase.google.com/docs/database/android/start/)
There are some discrepancies between the two.
To make up for them, you can follow the Firebase docs, but instead of just using the gradle dependencies listed there, use the following list.
That way, you will not miss any steps from either documentation.
<br>
**Add Gradle Dependencies**<sup>1</sup>
<br>
In your app-level build.gradle file, add the following
<br>
```java
dependencies {
implementation 'com.firebase:firebase-client-android:2.5.2+'
implementation 'com.google.firebase:firebase-database:15.0.0'
}
```
# Installation of Firebase Android SDK, permissions and setup code
Detailed instructions for these can be found [here](https://www.firebase.com/docs/android/quickstart.html).
# Resources
To learn about how to read from and write to the database in your Android application, refer to the two docs listed in References.
<br>
You can also find out how to use Firebase products in the Google documentation, but again it is probably a good idea to look at the Firebase docs as well, or anything that might be helpful.
# References
- FIREBASE, _Android Quickstart_, 17/04/2018, 07/05/2018, https://www.firebase.com/docs/android/quickstart.html
- GOOGLE, _Set up Firebase Realtime Database for Android_, 05/04/2018, 07/05/2018, https://firebase.google.com/docs/database/android/start/
# Footnote
The first line comes from the Firebase [docs](https://www.firebase.com/docs/android/quickstart.html) on setting up realtime db in Android Studio.
<br>
In the docs, 'compile' is used but that is deprecated and replaced by 'implementation'.
<br>
The second line comes from the Google [docs](https://firebase.google.com/docs/database/android/start/) on setting up realtime db in Android Studio.
<br>
If it is actually redundant to add both, please correct this article.