Stay organized with collections
Save and categorize content based on your preferences.
RxJava is a reactive programming library for composing asynchronous and event-based programs by
using observable sequences.
The Places Rx library
lets you receive observable sequences for asynchronus events on the Maps SDK for Android
and Places SDK for Android so you can take advantage of the rich set of RxJava features.
Installation
To install the Places Rx library in your Google Maps project:
Add the following dependencies to your module-level build.gradle file:
dependencies {// RxJava bindings for the Maps SDKimplementation("com.google.maps.android:maps-rx:1.0.0")// RxJava bindings for the Places SDKimplementation("com.google.maps.android:places-rx:1.0.0")// It is recommended to also include the latest Maps SDK, Places SDK and RxJava so you// have the latest features and bug fixes.implementation("com.google.android.gms:play-services-maps:19.2.0")implementation("com.google.android.libraries.places:places:4.4.1")implementation("io.reactivex.rxjava3:rxjava:3.1.11")
Rebuild your project in Android Studio to sync these changes.
Example Usage
The following example shows how you can receive a
Single,
and subscribe to it, when fetching place details:
placesClient.fetchPlace(placeId = "thePlaceId",placeFields = listOf(Place.Field.ID, Place.Field.NAME, Place.Field.ADDRESS),actions = {}).subscribe({ response ->
Log.d("PlacesRx", "Successfully got place ${response.place.id}")},{ error ->
Log.e("PlacesRx", "Could not get place:${error.message}")})}
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-03 UTC."],[[["\u003cp\u003eThe Places Rx library enables the use of RxJava features for asynchronous events in the Maps SDK and Places SDK for Android.\u003c/p\u003e\n"],["\u003cp\u003eIt provides observable sequences for events like fetching place details, allowing developers to handle them reactively.\u003c/p\u003e\n"],["\u003cp\u003eYou need to add specific dependencies to your \u003ccode\u003ebuild.gradle\u003c/code\u003e file to integrate the Places Rx library into your project.\u003c/p\u003e\n"],["\u003cp\u003eRefer to the official GitHub project page and API reference for further details and usage examples.\u003c/p\u003e\n"]]],[],null,["# RxJava Library\n\nRxJava is a reactive programming library for composing asynchronous and event-based programs by\nusing observable sequences.\n\nThe [Places Rx library](https://github.com/googlemaps/android-maps-rx)\nlets you receive observable sequences for asynchronus events on the Maps SDK for Android\nand Places SDK for Android so you can take advantage of the rich set of RxJava features.\n\nInstallation\n------------\n\n| **Note:** See the [Places Rx library](https://github.com/googlemaps/android-maps-rx) documentation on GitHub for the latest system requirements and installation instructions.\n\nTo install the Places Rx library in your Google Maps project:\n\n1. Add the following dependencies to your module-level `build.gradle` file:\n\n ```yaml\n dependencies {\n // RxJava bindings for the Maps SDK\n implementation(\"com.google.maps.android:maps-rx:1.0.0\")\n\n // RxJava bindings for the Places SDK\n implementation(\"com.google.maps.android:places-rx:1.0.0\")\n\n // It is recommended to also include the latest Maps SDK, Places SDK and RxJava so you\n // have the latest features and bug fixes.\n implementation(\"com.google.android.gms:play-services-maps:19.2.0\")\n implementation(\"com.google.android.libraries.places:places:4.4.1\")\n implementation(\"io.reactivex.rxjava3:rxjava:3.1.11\")\n ```\n2. Rebuild your project in Android Studio to sync these changes.\n\nExample Usage\n-------------\n\nThe following example shows how you can receive a\n[Single](https://reactivex.io/documentation/single.html),\nand subscribe to it, when fetching place details: \n\n```yaml\n placesClient.fetchPlace(\n placeId = \"thePlaceId\",\n placeFields = listOf(Place.Field.ID, Place.Field.NAME, Place.Field.ADDRESS),\n actions = {}\n ).subscribe(\n { response -\u003e\n Log.d(\"PlacesRx\", \"Successfully got place ${response.place.id}\")\n },\n { error -\u003e\n Log.e(\"PlacesRx\", \"Could not get place: ${error.message}\")\n }\n )\n}\n```\n\nWhat's next\n-----------\n\n- View the [Places Rx library](https://github.com/googlemaps/android-maps-rx) GitHub project page.\n- View the [Places Rx library API reference](https://googlemaps.github.io/android-maps-rx/)."]]