Firebase Expert

🔥FireApp Documentation

What you need to install to get FireApp working

1. Download and install the Android Studio IDE

To view the project code, you need to install Android Studio.

2. Install the emulator

To run the project code, you need to install the Android Emulator.

3. Open FireApp in Android Studio

Follow the steps below to open the project files in Android Studio:

4. Add Firebase to your FireApp Android Project

Please follow the steps described in the official documentation for adding Firebase to your Android project. Download the google-services.json file and add it to your app folder inside the FireApp project directory.

5. Enable Firebase Products inside Firebase Console

Open the Firebase Console and select your project. Go to:


rules_version = '2';

service cloud.firestore {
  match /databases/{database}/documents {
    match /users/{uid} {
      allow create: if request.auth != null;
      allow read, update, delete: if request.auth != null && request.auth.uid == uid;
        match /books/{bookId} {
        allow read, write: if request.auth != null;
      } 
    }   
  }
}


{
  "rules": {
    "purchaseInfo": {
      ".read": "auth !== null",
      ".write": "auth !== null"
    }
  }
}


rules_version = '2';

service firebase.storage {
  match /b/{bucket}/o {
    match /images/{image} {
      allow read, write: if request.auth != null && image.matches(request.auth.uid + ".jpg");
    }
  }
}

6. Make Cloud Functions for Firebase work

Download and install Node.js on your computer. When the installation is complete, set up Node.js and the Firebase CLI. Once you complete the steps above, open the FireApp folder from the location where you extracted the project files. Then open the firebase-functions/functions folder and copy the index.js file to the folder where you installed Firebase Functions. Basically, you have to overwrite the default index.js file with the one in the project archive.

7. Sync Project in Android Project

Once you finished all above steps, sync the project in Android Studio and run the project on the Android emulator.

Yey!

That's it! You can now finally view the entire project running in your local development environment.