EatStreet2 is a location-based Android application that allows users to discover nearby restaurants using Google Maps and Google Places API. Users must sign in via Firebase Authentication to access the app. After logging in, the app displays the user's location on a map and lists nearby restaurants, showing their name, rating, and photo if available.
- 📌 Shows the user's current location on a Google Map.
- 🏪 Displays nearby restaurants fetched via Google Places API.
- ⭐ Shows name, rating, photo, and number of user reviews.
- 🔁 Allows refreshing location and nearby restaurant list.
- 🔐 Firebase Authentication integration (login protection).
- 📲 Smooth and responsive UI with RecyclerView.
| Component | Technology |
|---|---|
| Language | Java |
| Location Services | FusedLocationProviderClient |
| Maps | Google Maps SDK |
| Places Data | Google Places API |
| UI | RecyclerView, CardView |
| Backend/Auth | Firebase Authentication |
| Networking | OkHttp |
| JSON Parsing | org.json |
git clone https://github.com/yourusername/EatStreet2.git
cd EatStreet2-
Go to Google Cloud Console
-
Enable the following APIs:
- Maps SDK for Android
- Places API
-
Generate an API Key
-
Add the API Key to
res/values/strings.xml:
<string name="maps_api_key">YOUR_API_KEY_HERE</string>- Go to Firebase Console
- Create a new Firebase project
- Register your Android app (package:
com.example.eatstreet2) - Download
google-services.jsonand place it inside theapp/directory - Enable Email/Password Authentication in Firebase > Authentication
- Open the project in Android Studio
- Sync Gradle and build the project
- Run on an emulator or a real Android device (location enabled)
The app requests the following runtime permissions:
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.INTERNET"/>These are required to:
- Get the device's current location
- Make API calls to Google Maps and Places
EatStreet2/
├── activities/
| ├── DetailActivity.java
| ├── LoginActivity.java
| ├── MainActivity.java
| ├── PlaceItem.java
| └── PlacesAdapter.java
├── res/
│ ├── layout/
│ │ └── activity_main.xml
│ ├── values/
│ │ └── strings.xml
│ ├── drawable/
│
├── AndroidManifest.xml
├── build.gradle (Module)
├── google-services.json
└── README.md
Example URL:
https://maps.googleapis.com/maps/api/place/nearbysearch/json
?location=LATITUDE,LONGITUDE
&radius=1500
&type=restaurant
&key=YOUR_API_KEY
Fields used:
nameratinguser_ratings_totalphotos.photo_referenceplace_id
This project is licensed under the MIT License - see the LICENSE file for details.