All Projects → aliumujib → Nibo

aliumujib / Nibo

Licence: mit
Android Place picker dependent on Google places, made a custom version so I could style it anyway I wanted for my current project, WIP

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Nibo

Eon Map
Realtime maps with PubNub and MapBox.
Stars: ✭ 121 (-28.82%)
Mutual labels:  google-maps
Virtual Walk
Virtual walks in Google Street View using PoseNet and applying Deep Learning models to recognize actions.
Stars: ✭ 142 (-16.47%)
Mutual labels:  google-maps
Aerialbot
A simple yet highly configurable bot that tweets geotagged aerial imagery of a random location in the world.
Stars: ✭ 157 (-7.65%)
Mutual labels:  google-maps
Laravelgooglemaps
Laravel Google Maps Package
Stars: ✭ 124 (-27.06%)
Mutual labels:  google-maps
Simplemap
A beautifully simple map field type for Craft CMS.
Stars: ✭ 136 (-20%)
Mutual labels:  google-maps
Alfred Gcal
View Google Calendar events in Alfred
Stars: ✭ 147 (-13.53%)
Mutual labels:  google-maps
Google Maps React
Companion code to the "How to Write a Google Maps React Component" Tutorial
Stars: ✭ 1,542 (+807.06%)
Mutual labels:  google-maps
Angular Google Maps
Angular 2+ Google Maps Components
Stars: ✭ 1,982 (+1065.88%)
Mutual labels:  google-maps
Arcarmovement
This is navigation example on google map. Here Marker move as vehicles moves with turns as uber does in their app. Using old and new coordinates animating bearing value the markers are moving.
Stars: ✭ 137 (-19.41%)
Mutual labels:  google-maps
Explore Flutter Firestore
This is a Flutter App with Firebase's Cloud FireStore Database and Google Map. This app represents that Beautiful UI can be implemented with the Best Performance.
Stars: ✭ 152 (-10.59%)
Mutual labels:  google-maps
Placepicker
Free Android Map Place Picker alternative using Geocoder instead of Google APIs
Stars: ✭ 126 (-25.88%)
Mutual labels:  google-maps
Track My Location
Android real-time location tracker app (learn using Firebase 🔥, Google Maps & Location Api) 🌐
Stars: ✭ 136 (-20%)
Mutual labels:  google-maps
Airmapview
A view abstraction to provide a map user interface with various underlying map providers
Stars: ✭ 1,824 (+972.94%)
Mutual labels:  google-maps
Mapdrawingtools
this library Drawing polygon, polyline and points in Google Map and return coordinates to your App
Stars: ✭ 122 (-28.24%)
Mutual labels:  google-maps
Meetinthemiddle
👬 Meet In The Middle
Stars: ✭ 158 (-7.06%)
Mutual labels:  google-maps
Googlemap
Google Map to use create path on map and play vehicle on path like Uber and Ola
Stars: ✭ 112 (-34.12%)
Mutual labels:  google-maps
Benmaps.fr
Web maps that don't track you.
Stars: ✭ 147 (-13.53%)
Mutual labels:  google-maps
Load Google Maps Api
🌏 A lightweight Promise-returning helper for loading the Google Maps JavaScript API
Stars: ✭ 166 (-2.35%)
Mutual labels:  google-maps
Anymaps
Easily switch between Google, Baidu and OSM maps
Stars: ✭ 164 (-3.53%)
Mutual labels:  google-maps
Track Ip
Advanced Ip Tracker Tool
Stars: ✭ 150 (-11.76%)
Mutual labels:  google-maps

Nibo library for Android

Android library that provides UI for a customizable place picker, origin and destination picker and Google Places autocomplete searchview

Current stable version - 2.0

This version uses Google Play Services 11.6.0 and RxJava 2.0.+

What can you do with this?

  • Easily add a Google Places autocomplete searchview widget to your project
  • Pick a location from a map
  • Can be customized to match the theme of your app
  • Can use customized map markers
  • Can drag map marker to select location
  • Can search for location names
  • uses a fragment which you can overide and add extra functionality
  • Pick a origin location and a destination location (like Uber)
  • Can be customized to match the theme of your app
  • Can use custom map markers for each location
  • Get directions, distance and time from a location with directions API

What does the UI look like?

ROW 1 ROW 2

How do I use this?

Using NiboPlaceAutoCompleteSearchView

Simple. All you need is to do is:

  • Add the following to your layout (You can change the values as you wish)
<com.alium.nibo.autocompletesearchbar.NiboPlacesAutoCompleteSearchView
       android:id="@+id/autocompletesearchbar"
       android:layout_width="match_parent"
       android:layout_height="wrap_content"
       android:elevation="4dp"
       app:niboSV_customToolbarHeight="?attr/actionBarSize"
       app:niboSV_displayMode="screen_toolbar"
       app:niboSV_editHintText="Search"
       app:niboSV_editHintTextColor="#757575"
       app:niboSV_editTextColor="#757575"
       app:niboSV_homeButtonMode="nibo_burger"
       app:niboSV_searchCardElevation="2dp"
       app:niboSV_searchTextColor="#757575" />
  • In your fragment or activity, implement NiboAutocompleteSVProvider, and return a valid GoogleAPIClient object and an instance of NiboPlacesAutoCompleteSearchView.SearchListener (see example app for better explanation)

  • Call setmProvider(this) on your seachview.

Using NiboOriginDestinationPickerUI

  • Add the following to your manifest file. NiboOrigDestTheme.NoActionBar gives you the default (white and black) styling.
<activity
           android:name="com.alium.nibo.origindestinationpicker.NiboOriginDestinationPickerActivity"
           android:label="@string/title_activity_origin_destination_picker"
           android:theme="@style/NiboOrigDestTheme.NoActionBar" />

  • To use a custom style, see NiboActivityStyle style in the niboexample project. Make sure your theme has NiboOrigDestTheme.NoActionBar as a parent.

  • To start the activity:

Intent intent = new Intent(this, NiboOriginDestinationPickerActivity.class);

        NiboOriginDestinationPickerActivity.NiboOriginDestinationPickerBuilder config = new NiboOriginDestinationPickerActivity.NiboOriginDestinationPickerBuilder()
                .setDestinationMarkerPinIconRes(R.drawable.ic_map_marker_black_36dp)
                .setOriginMarkerPinIconRes(R.drawable.ic_map_marker_black_36dp)
                .setOriginEditTextHint("Input pick up location")
                .setPrimaryPolyLineColor(R.color.colorPrimary)
                .setSecondaryPolyLineColor(R.color.colorAccent)
                .setDestinationEditTextHint("Input destination")
                .setStyleEnum(NiboStyle.SUBTLE_GREY_SCALE);

        NiboOriginDestinationPickerActivity.setBuilder(config);
        startActivityForResult(intent, REQUEST_CODE);
  • You can customize it other things like the directions Polyline color using the NiboOriginDestinationPickerBuilder as shown above.

Using NiboPlacePickerUI

  • To start the activity:
Intent intent = new Intent(this, NiboPlacePickerActivity.class);
 NiboPlacePickerActivity.NiboPlacePickerBuilder config = new NiboPlacePickerActivity.NiboPlacePickerBuilder()
         .setSearchBarTitle("Search for an area")
         .setConfirmButtonTitle("Pick here bish")
         .setMarkerPinIconRes(R.drawable.ic_map_marker_black_36dp)
         .setStyleEnum(NiboStyle.NIGHT_MODE);
         .setStyleFileID(R.raw.retro);
 NiboPlacePickerActivity.setBuilder(config);
 startActivityForResult(intent, REQUEST_CODE);
  • To retrieve the results:
Intent intent = new Intent(this,
        if (resultCode == Activity.RESULT_OK && requestCode == 300) {
            NiboSelectedPlace selectedPlace = data.getParcelableExtra(NiboConstants.SELECTED_PLACE_RESULT);
            Toast.makeText(this, selectedPlace.getPlaceAddress(), Toast.LENGTH_LONG).show();

            Toast.makeText(this, selectedPlace.getLatitude(), Toast.LENGTH_LONG).show();

              Toast.makeText(this, selectedPlace.getLongitude(), Toast.LENGTH_LONG).show();
        } else if (resultCode == Activity.RESULT_OK && requestCode == 200) {
            NiboSelectedOriginDestination selectedOriginDestination = data.getParcelableExtra(NiboConstants.SELECTED_ORIGIN_DESTINATION_RESULT);
            Toast.makeText(this, selectedOriginDestination.getOriginFullName() + " - " + selectedOriginDestination.getDestinationFullName(), Toast.LENGTH_LONG).show();
        } else {
            Toast.makeText(this, "Error getting results", Toast.LENGTH_LONG).show();
        }

  • You can customize it other things like the directions Polyline color using the NiboPlacePickerBuilder as shown above.

How to add to your project?

Gradle

Step 1. Add the JitPack repository to your build file

Add it in your root build.gradle at the end of repositories:

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

Step 2. Add the dependency

dependencies {
     compile 'com.github.aliumujib:Nibo:2.0'
}

Nibo requires at minimum Android 4.1 (API Level 15).

Manual

  • download project source
  • import new module to your project
  • compile path(":modulename")

Sample

Sample usage is available in niboexample directory.

Directions, Places and Maps APIs require API Key. Before running samples you need to create project on API console and obtain API Key from here. Obtained key should used to replace string named: google_places_key in google_maps_api.xml file.

TODO

  • Add better example
  • Add options transport type to DirectionsFinder

References

If you need the SearchView without all the Google Places stuff, look at PersistentSearchView .

Other Notes

Nibo means “Where?” in my native language (Yoruba), so yeah, Nigeria to the world baby!! Also Nibo is a work in progress and I will keep updating it, suggestions (and issues) are welcome. Tweet them at me @aliumujib on twitter or email me.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].