A library for reverse geocoding coordinates in Android

Overview

📍 AndroidReverseGeocoder

A library for reverse geocoding coordinates in Android. The library is built on top of android's Geocoder library. AndroidReverseGeocoder implements results caching mechanism to prevent repetitive processing of an already reverse geocoded coordinates. AndroidReverseGeocoder also incorporates Java's ExecutorService for simultaneous reverse geocoding of coordinates. AndroidReverseGeocoder also handles errors that may be thrown by the original Geocoder library.

Add AndroidReverseGeocoder library 📙

Add in build.gradle file

allprojects {
  repositories {
    ...
    maven { url 'https://jitpack.io' }
  }
}

Add in build.gradle (app level) file

dependencies {
  implementation 'com.github.ShimShim27:AndroidReverseGeocoder:v1.0'
}

Sample Usage 🧞

  1. Show a toast of the name of place associated with coordinates 10.68532, -146.69885
val reverseGeocoder = ReverseGeocoder(nThreads = 1, nCoordinatesCached = 50)

reverseGeocoder.reverse(
  context = this,
  lat = 10.68532,
  long = -146.69885,
  onAddressResult = {addressName:String->
      runOnUiThread {
          Toast.makeText(this,"The address is $addressName", Toast.LENGTH_SHORT).show()
      }
  }
  1. Reverse geocoding two coordinates at a time
val reverseGeocoder = ReverseGeocoder(nThreads = 2, nCoordinatesCached = 50)
        
val coordinates = listOf(Pair(-55.45134, 153.48612), Pair(65.57829, -116.16070), Pair(-25.15858, -117.67318), Pair(-55.45134, 153.48612))

for (coords in coordinates){
    reverseGeocoder.reverse(
        context = this,
        lat = coords.first,
        long = coords.second,
        onAddressResult = {addressName:String->
            print("The address is $addressName")
        })
}

Note 🤫

Always call shutdownAll() in ReverseGeocoder instance to cancel all reverse geocoding processes (especially when the current activity is destroyed). After shutdownAll() is called, function reverse() will not work properly if called again from the same instance of ReverseGeocoder. The function createNew() should be called in this case to re-enable reverse() function or create a new instance of ReverseGeocoder function.

You might also like...
Membuat Aplikasi Pencarian Bengkel dan Tambal Ban dengan Android Studio
Membuat Aplikasi Pencarian Bengkel dan Tambal Ban dengan Android Studio

Tambal-Ban Membuat Aplikasi Pencarian Bengkel dan Tambal Ban dengan Android Studio Tutorial Build with Android Studio https://youtu.be/82L7az6hdVI Tut

🍃 Organic Maps is an Android & iOS offline maps app for travelers, tourists, hikers, and cyclists based on top of crowd-sourced OpenStreetMap data and curated with love by MapsWithMe founders.
🍃 Organic Maps is an Android & iOS offline maps app for travelers, tourists, hikers, and cyclists based on top of crowd-sourced OpenStreetMap data and curated with love by MapsWithMe founders.

🍃 Organic Maps is an Android & iOS offline maps app for travelers, tourists, hikers, and cyclists based on top of crowd-sourced OpenStreetMap data and curated with love by MapsWithMe founders. No ads, no tracking, no data collection, no crapware.

Dual Camera, IMU, and GPS data recorder for Android

Dual Camera, IMU, and GPS data recorder for Android

Demo de uso de google maps en Android, charla para el GDG Chimbote

mapasbasico Demo de uso de google maps en Android, charla para el GDG Chimbote Puedes usar este proyecto como base para trabajar con mapas en Android.

An android app that uses Google Maps API and SDK to track a user's location and calculate the total distance travelled
An android app that uses Google Maps API and SDK to track a user's location and calculate the total distance travelled

Bike Rush is an android app that uses Google Maps API and SDK to track a user's location and calculate the total distance travelled by him or her along with time and average speed.

Traccar Client is an Android GPS tracking application.

Traccar Client is an Android GPS tracking application. It can work with Traccar open source server software.

Android application for department navigation
Android application for department navigation

DepNav – Department Navigator DepNav is an Android application for viewing indoor maps of departments and searching for specific rooms on them. The fo

Pengembangan mobile presensi berbasis GPS dan Geocoding menggunakan metode haversine
Pengembangan mobile presensi berbasis GPS dan Geocoding menggunakan metode haversine

Team ID: CSD-040 Nama Anggota: A195R4154 - EDO JULIANTIO A007R6017 - GUNA DERMAWAN Tema : Utilitas Judul Proyek : Pengembangan mobile presensi berbasi

A Virtual Machine For Assessing Android applications, Reverse Engineering and Malware Analysis

Androl4b AndroL4b is an android security virtual machine based on ubuntu-mate includes the collection of latest framework, tutorials and labs from dif

Android Reverse-Engineering Workbench for VS Code
Android Reverse-Engineering Workbench for VS Code

APKLab The ultimate Android RE experience right inside your VS Code. APKLab seamlessly integrates the best open-source tools: Quark-Engine, Apktool, J

Android Reverse-Engineering Workbench for VS Code
Android Reverse-Engineering Workbench for VS Code

APKLab The ultimate Android RE experience right inside your VS Code. APKLab seamlessly integrates the best open-source tools: Quark-Engine, Apktool, J

Some reverse engineering for an Android calculator using AllWinner A50.

Calculator AllWinnerA50 This is a repository stored some reverse engineering for an Android calculator using AllWinner A50. Install Force-stop the ori

Add new features for reverse engineering, such as: renaming of classes, fields, methods, variables, reference graphs and more.
Add new features for reverse engineering, such as: renaming of classes, fields, methods, variables, reference graphs and more.

Super JADX features Add new features for reverse engineering, such as: renaming of classes, fields, methods, variables, reference graphs and more. bas

UNIX-like reverse engineering framework and command-line toolset
UNIX-like reverse engineering framework and command-line toolset

Radare2: The Libre Unix-Like Reverse Engineering Framework See the Releases page for downloads. The current git master branch is 5.7.7, next will be 5

Starter-Android-Library - Starter Android Library is an Android Project with Modular Architecture.
Starter-Android-Library - Starter Android Library is an Android Project with Modular Architecture.

Starter-Android-Library - Starter Android Library is an Android Project with Modular Architecture.

Repo of the Open Source Android library : RoboSpice. RoboSpice is a modular android library that makes writing asynchronous long running tasks easy. It is specialized in network requests, supports caching and offers REST requests out-of-the box using extension modules. Lynx is an Android library created to show a custom view with all the information Android logcat is printing, different traces of different levels will be rendererd to show from log messages to your application exceptions. You can filter this traces, share your logcat to other apps, configure the max number of traces to show or the sampling rate used by the library.
Custom font library for android | Library to change/add font of Entire Android Application at once without wasting your time - TextViews, EditText, Buttons, Views etc.,

AppFontChanger In a Single shot change font of Entire Android Application - TextViews, EditText, Buttons, Views etc., Kindly use the following links t

ActionsContentView is an standalone library implements actions/content swiping view (AKA Side Navigation UI Pattern, AKA Facebook side menu).  The library doesn't use any specific code introduced in new Android SDK versions. This allows develop an application with an action/content swiping view for every version of Android from 2.2 and up.
Releases(v1.0)
Owner
ShimShim27
A human being 🧐.
ShimShim27
Android library project that lets you manage the location updates to be as painless as possible

Smart Location Library Android library project that intends to simplify the usage of location providers and activity recognition with a nice fluid API

Nacho Lopez 1.6k Dec 29, 2022
Curve-Fit is an Android library for drawing curves on Google Maps

Curve-Fit Android library for drawing curves on Google Maps. This library uses Bezier cubic equation in order to compute all intermediate points of a

Sarweshkumar C R 63 Mar 7, 2021
Maps SDK for Android Utility Library

Maps SDK for Android Utility Library Description This open-source library contains utilities that are useful for a wide range of applications using th

Google Maps 3.4k Dec 30, 2022
Android library that allows you to determine your location in a few of lines

locsimple Android library that allows you to determine your location in some lines! Benefits: automatic processing of permissions processing of enabli

Dmitry 7 Aug 31, 2022
Maps application in Android Studio using the Maps SDK for android

Google-Maps-Application Maps application in Android Studio using the Maps SDK for android. This app was initially developed in Java, but then was conv

Kyle McInnis 0 Nov 30, 2021
Scale bar for Android Maps (Google Maps, OSM, MapBox, Yandex)

Map Scale View Scale view for any Android Maps SDK (not only Google Maps) Contributing I encourage you to participate in this project. Feel free to op

Stas Parshin 109 Nov 18, 2022
malik dawar 87 Sep 18, 2022
Interactive, thoroughly customizable maps in native Android powered by vector tiles and OpenGL.

Interactive, thoroughly customizable maps in native Android powered by vector tiles and OpenGL.

Mapbox 247 Dec 27, 2022
Positional is a location information app for Android with Compass, Clock, Level, Sun and Moon and many other features.

Positional is a location based app that utilizes the device's GPS and fetches various details of the current latitude and longitude data like Altitude, Speed, Address and similar other information and show it in easily understandable format to the user. Alongside this main functionality of being a location app, Positional also provides a separate panel for Compass and Clock, and they serve their own purpose as their name suggests.

Hamza Rizwan 85 Dec 28, 2022
This is a repo for implementing Map pan or drag (up, down, right ,left) to load more places on the Google Map for Android

Challenge Display restaurants around the user’s current location on a map ○ Use the FourSquare Search API to query for restaurants: https://developer.

Mahmoud Ramadan 7 Jul 30, 2022