diff --git a/library/src/main/java/com/rtchagas/pingplacepicker/model/SimplePlace.kt b/library/src/main/java/com/rtchagas/pingplacepicker/model/SimplePlace.kt index 35b240b..1ee8161 100644 --- a/library/src/main/java/com/rtchagas/pingplacepicker/model/SimplePlace.kt +++ b/library/src/main/java/com/rtchagas/pingplacepicker/model/SimplePlace.kt @@ -9,13 +9,13 @@ data class SimplePlace( @Json(name = "geometry") val geometry: Geometry, @Json(name = "name") - val name: String, + val name: String = "", @Json(name = "photos") val photos: List = emptyList(), @Json(name = "place_id") val placeId: String, @Json(name = "types") - val types: List, + val types: List = emptyList(), @Json(name = "vicinity") - val vicinity: String + val vicinity: String = "" ) \ No newline at end of file diff --git a/sample/src/main/java/com/rtchagas/pingsample/MainActivity.kt b/sample/src/main/java/com/rtchagas/pingsample/MainActivity.kt index d4c8c5d..e9d3efc 100644 --- a/sample/src/main/java/com/rtchagas/pingsample/MainActivity.kt +++ b/sample/src/main/java/com/rtchagas/pingsample/MainActivity.kt @@ -48,7 +48,7 @@ class MainActivity : AppCompatActivity() { val place: Place? = PingPlacePicker.getPlace(data!!) - toast("You selected: ${place?.name}") + toast("You selected: ${place?.name}\n ${place?.id}") } } }