This project is a native Android app that sends notifications to all users within 3km proximity when a user presses a button on their phone. Clicking on the notification leads the user to an activity with the broadcast message.
- Sends notifications to all users within 3km proximity when a user presses a button
- Clicking on the notification leads the user to an activity with the broadcast message
- Uses Firebase Firestore for the database
- Uses Firebase Cloud Messaging for sending notifications
- Uses an open source UI template
- Android Studio
- Firebase Account
- Google Play Services SDK
- Clone the repository from GitHub.
- Open the project in Android Studio.
- Configure Firebase by following the steps in the Firebase documentation.
- Build and run the app on an emulator or physical device.
To use this app, follow these steps:
- Press the button in the app to send a notification to all users within 3km proximity.
- Click on the notification to view the broadcast message.
The app has the following directory structure:
app/src/main/java/com/example/castneat/
- contains the Java source code for the appapp/src/main/res/layout/
- contains the XML layout files for the app's user interfaceapp/src/main/res/values/
- contains XML files that define values used throughout the app
The following files are the most important for understanding the app:
MainActivity.java
- contains the code for the main activity that sends the notification to all users within 3km proximityBroadcastActivity.java
- contains the code for the activity that displays the broadcast messageactivity_main.xml
- contains the layout for the main activityactivity_broadcast.xml
- contains the layout for the broadcast activity
The app uses Firebase Firestore to store information about users' proximity and Firebase Cloud Messaging to send targeted notifications. The sendNotification()
method in MainActivity.java
uses a cloud function to send the notification to all users within 3km proximity.
- Implement unit tests for the app
- Improve the UI with custom graphics and animations
Contributions to this project are welcome! To contribute, please follow these steps:
- Fork the repository on GitHub.
- Create a new branch.
- Make your changes.
- Test your changes.
- Create a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.