Skip to content

Nearby application is intended for anyone who wants to quickly and easily find nearby locations, such as restaurants, ATMs, or other points of interest.

Notifications You must be signed in to change notification settings

sunkusaarthak/Near-By

Repository files navigation

Introduction

It doesn't matter what you're looking for a restaurant, an ATM, or anything else as long as it's listed online, Nearby can help you locate it. Nearby is an Android app. Anyone looking to quickly and conveniently discover local establishments, such as eateries, ATMs, or other areas of interest, should use the Nearby application.

Table of Content

Purpose

While studying Android development, I wanted to check out the Google Cloud Place API, so I created this application as part of my "experiments with Android". To understand how to deal with APIs and link Google Cloud services with Android, I constructed a simple application.

Implementation

Tech Stack

The Nearby Places application is developed using
* Kotlin
* XML
* Google Cloud Place API. 
* Fused Location Provider API.  

Architecture

The Nearby Places application follows a standard Android app architecture, with a single main activity and map fragments for displaying search results on the map.

Key Design Decisions

Some of the key design decisions made during the development of the Nearby Places application include using the Google Cloud Place API for location search and implementing a map view to display search results. Even it sends notifications to all users within 3km proximity when a user presses a button on their phone.

Features

Keyword search

The Nearby Places application allows users to search for nearby locations by entering a keyword, such as "Restaurants", "ATMs"...

Map view

The Nearby Places application displays search results on a map, with markers for each location.

Location details

Users can view details about a specific location, including its name, and make directions.

Notify Users

Sends notifications to all users within 3km proximity when a user presses a button

Working

Technically, the application will acquire GPS Location, through Fused Location Provider API and show the location on the map view. when the user types a keyword and clicks on the button this process will be executed -
  1. Current Location along with the searched Keyword is sent to the Google Place API
  2. The Place API will analyse the input parameters and will generate an appropriate result
  3. Place API will return JSON data containing locations near the user
  4. Map will be updated with the Markers on the result locations

How to Use

If you want to play around with what I've done, you may download and run it on your Android device. Please feel free to use the code as well. You only need a basic understanding of how to interact with APIs to begin working on something similar or to advance my program check out Contribute for more details

  1. Open the Application

    • A default Map will be shown
    • You can Wait or Turn On the GPS by yourself

  2. Wait for Acquiring your Location

    • FusedLocationProvider API will access the Location

  3. Search for any keyword like atm, restaurants, hotels...

    • UserLocation along with the search Keyword is sent to Google Place API
    • API processes the data and returns a JSON File

  4. Access Your Near By Locations

    • The locations returned by Place API are Marked on the map
    • and the Map is updated

  5. 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.

    • Users located Near the current user are mapped.
    • Notification is sent to those users by Firebase Cloud Messaging.
photo_2023-02-14_16-50-24 photo_2023-02-14_16-50-22 photo_2023-02-14_16-50-21

Contribute

Prerequisites

There are the Prerequisite you required to contribute to this project

  • Kotlin
  • Working with JSON Data
  • Knowledge of using API's

Getting Started

  1. Clone the Project
    • https://github.com/sunkusaarthak/Near-By.git
  2. Add your API key in the local.properties file in the name API_KEY

  3. Solve the Issue 😉

About

Nearby application is intended for anyone who wants to quickly and easily find nearby locations, such as restaurants, ATMs, or other points of interest.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages