A chat application in Android Studio using Firestore and Firebase Cloud Messaging
Prerequisites:
- Enable Firestore and Could Messaging in Android Studio IDE
1.1) Since Android Studio IDE is constantly gets updated the manual of the set up which is given in Firebase website is outdated in particular aspects. For instance, configuration of Firebase files and corresponding SDK requires less coding now but on Firebase website users are still advised to follow the old steps. Therefore, it is advisable to set up Firebase through Android Studio IDE.
- Set up server key for the push notification feature:
On Firebase go to the project setting -> open Cloud Messaging tab -> copy a server key -> Open Utilities folder in a project (in Android Studio IDE) -> pasted copied key in Constants.java (make sure "key=" is written at the beginning)
PS
Please note that push notification works on Android version up to 11. So, make sure you are installing emulator with appropriate version.