To view the project code, you need to install Android Studio.
To run the project code, you need to install the Android Emulator.
Follow the steps below to open the project files in Android Studio:
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.
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");
}
}
}
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.
Once you finished all above steps, sync the project in Android Studio and run the project on the Android emulator.
That's it! You can now finally view the entire project running in your local development environment.