An Android library for picking location in Bangladesh

Overview

BDLocationChooser

An Android library for picking location in Bangladesh

Example Screenshot :

Implement Library

The library is available on JitPack, for implementing, just go to your project-level or root level build.gradle file and add the below code if not added already :

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

Then go to your app level build.gradle file and add this line :

dependencies {
	  implementation 'com.github.SharifRafid:BDLocationPicker:1.0.0' //Add this line in the dependencies
	}

Usage Of Library

Java :

 new BdLocationChooser.Create(this)
                .setPickerTitle("Choose a location")
                .setLanguage("english")     // Default Bangla
                .setListener(new LocationChooseListener() {
                    @Override
                    public void onLocationChoose(@NonNull Division division, @NonNull District district, @NonNull Upazila upazila) {
                        Toast.makeText(JavaActivity.this, division.getName()+","+district.getName()+","+upazila.getName(), Toast.LENGTH_SHORT).show();
                    }

                    @Override
                    public void onCancelled() {
                        Log.e("LocationPicker","Cancelled");
                    }
                }).showDialog();

Kotlin :

BdLocationChooser.Create(this)
        .setPickerTitle("Choose a location")
        .setLanguage("english")     // Default Bangla
        .setListener(object : LocationChooseListener{
            override fun onLocationChoose(division: Division,district: District,upazila: Upazila) {
                    Toast.makeText(this@MainActivity, division.name+","+district.name+","+upazila.name,Toast.LENGTH_SHORT).show()
            }

            override fun onCancelled() {
              Log.e("LocationPicker","Cancelled")
            }

         }).showDialog()

Or you can also use the library to get the lists of the divisions/districts/upazilas and make your own custom picker with the data :

Example :

Java :


// Get All the upazilas
ArrayList
   
     upazilasList = new BdLocationChooser.Create(this).getUpazilasList();

// Get All the districts
ArrayList
    
      districtsList = new BdLocationChooser.Create(this).getDistrictsList();

// Get All the divisions
ArrayList
     
       divisionsList = new BdLocationChooser.Create(this).getDivisionsList();

     
    
   

Kotlin:

// Get All the upazilas
val upazilaList = BdLocationChooser.Create(this).upazilasList as ArrayList
   
    

// Get All the districts
val districtList = BdLocationChooser.Create(this).districtsList as ArrayList
    
     

// Get All the divisions
val divisionList = BdLocationChooser.Create(this).divisionsList as ArrayList
     

     
    
   

The json formatted data of the divisions/districts/upazillas are collected from fahimxyz and his awesome repo : https://github.com/fahimxyz/bangladesh-geojson .

Thanks A Lot to fahimxyz for his hardwork.

You might also like...
Location-permission-handler - Location Permission Handler For Android
Location-permission-handler - Location Permission Handler For Android

Location Permission Handler Easy way to check location permissions for Android 9

A TODO list app with location reminders that remind the user to do something when the user is at a specific location

Project Title Location Reminder Getting Started A TODO list app with location reminders that remind the user to do something when the user is at a spe

Google map location tracker uploading current to realtime database and displaying location information from firebase realtime.

WEEK-8-SQ009-ANDROID LOCATION - GROUP WORK (2) Problem Description Track your partner(s). Implementation 1: You are to build a map application to show

Location-history-viewer - Small compose-desktop app to view data from google's location history

Google Location History Takeout Viewer This application provides a minimalistic

A Todo list app with location reminders that remind the user to do something when he reaches a specific location.

A Todo list app with location reminders that remind the user to do something when he reaches a specific location.

Xposed module which will set location where you want without effect mock location.
Xposed module which will set location where you want without effect mock location.

GPS Setter Support/Discussion: XDA thread As most of GPS spoof app not working anymore coz some are old and some are not proper implement with current

FilePicker - Android library to facilitate files picking up process and ability to convert them to request bodies

FilePicker - Android library to facilitate files picking up process and ability to convert them to request bodies

Standalone Android widget for picking a single date from a calendar view.
Standalone Android widget for picking a single date from a calendar view.

TimesSquare for Android Standalone Android widget for picking a single date from a calendar view. Usage Include CalendarPickerView in your layout XML.

A material-styled android view that provisions picking of a date, time & recurrence option, all from a single user-interface.
A material-styled android view that provisions picking of a date, time & recurrence option, all from a single user-interface.

SublimePicker A customizable view that provisions picking of a date, time & recurrence option, all from a single user-interface. You can also view 'Su

Simple(vanilla) yet 'Do it all' place picker for your place picking needs in Android
Simple(vanilla) yet 'Do it all' place picker for your place picking needs in Android

Vanilla Place Picker Vanilla Place Picker provides a UI that displays an interactive map to get the place details and Autocomplete functionality, whic

Standalone Android widget for picking a single date from a calendar view.
Standalone Android widget for picking a single date from a calendar view.

TimesSquare for Android Standalone Android widget for picking a single date from a calendar view. Usage Include CalendarPickerView in your layout XML.

A material-styled android view that provisions picking of a date, time & recurrence option, all from a single user-interface.
A material-styled android view that provisions picking of a date, time & recurrence option, all from a single user-interface.

SublimePicker A customizable view that provisions picking of a date, time & recurrence option, all from a single user-interface. You can also view 'Su

 NumberPickerView - Custom Android View to provide a user friendly way of picking numbers. 🧪
NumberPickerView - Custom Android View to provide a user friendly way of picking numbers. 🧪

🚀 Custom view for Android which provides a modern design and gestures for picking numbers in a user friendly way.

A colorful SeekBar for picking color
A colorful SeekBar for picking color

ScreenShot: Attrs attr format default colorSeeds references colorBarPosition integer 0 alphaBarPosition integer 0 maxPosition integer 100 bgColor colo

Order picking with QR codes

Order PiQR Order picking with QR codes Open the project in Android Studio and run. First step was to create a new simple project in Android Studio. Th

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

Whereabouts: an android library which leverages Kotlin concurrency to streamline location fetching

Whereabouts Whereabouts is an android library which leverages Kotlin concurrency

Android library that allows you to determine your location in a few of lines
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

A powerful library for easy implementation of HMS Location Kit.

AdvancedLocation A powerful library for easy implementation of HMS Location Kit. 💙 Request location with couple lines of code (no more boilerplate) C

Releases(1.0.0)
Owner
Sharif Rafid Ur Rahman
Android App Developer <3
Sharif Rafid Ur Rahman
Unicorn File Picker is a library designed to package a powerful file selector for android.

A simple, documented, and contribution-friendly File Picker for Android.

Abhishek Tiwari 62 Dec 5, 2022
Built the ccp code on compose. Country Code Picker is an android library which provides an easy way to search and select country or international phone code.

Built the ccp code on compose. Country Code Picker is an android library which provides an easy way to search and select country or international phone code.

utku glsvn 7 Oct 23, 2022
AndroidFilePicker - android library which will help you to pick any type of media file in your application

AndroidFilePicker is android library which will help you to pick any type of media file in your application. No need to manage any kind of extra permission or result method override. Just create library class instance and use it or also modify ui as your requirement.

null 4 Sep 12, 2022
Easy to use and configurable library to Pick an image from the Gallery or Capture image using Camera.

Easy to use and configurable library to Pick an image from the Gallery or Capture image using Camera.

Simform Solutions 201 Jan 5, 2023
Media Picker is an Android Libary that lets you to select multiple images or video

Media Picker Please let me know if your application go to production via this link Media Picker is an Android Libary that lets you to select multiple

Abdullah Alhazmy 264 Nov 10, 2022
Image Picker for Android 🤖

Android Image Picker No config yet highly configurable image picker for Android Screenshot Click to see how image picker looks… Download Add this to y

Esa Firman 1k Jan 7, 2023
Simple, Powerful and Beautiful Android Image/Video/Audio Picker 😎

Simple, Powerful and Beautiful Android Image/Video/Audio Picker ?? Features ?? No need check storage permission ?? Single and multiple selection Suppo

Majid Arabi 34 Jan 2, 2023
Block picker is Android app to help Minecraft player choose blocks for their build.

Block Picker Ever trying to make a build in Minecraft and you just can't find the perfect color palette? Block Picker will help jumpstart your creativ

Ramim Alam 2 May 8, 2022
Durim Aliu 0 Feb 1, 2022
An Awesome Kotlin Location library to retrieve location merely in 3 lines of code

An Awesome Kotlin Location library to retrieve location merely in 3 lines of code

Birju Vachhani 288 Dec 30, 2022