Skip to content

Commit

Permalink
Updated sample
Browse files Browse the repository at this point in the history
Signed-off-by: Rafael Chagas <[email protected]>
  • Loading branch information
rtchagas committed Jul 12, 2019
1 parent c7e250a commit 40e5ab8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
11 changes: 5 additions & 6 deletions sample/src/main/java/com/rtchagas/pingsample/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,19 @@ class MainActivity : AppCompatActivity() {

private fun showPlacePicker() {

val pingBuilder = PingPlacePicker.IntentBuilder()
val builder = PingPlacePicker.IntentBuilder()

pingBuilder.setAndroidApiKey(getString(R.string.key_google_apis_android))
pingBuilder.setMapsApiKey(getString(R.string.key_google_apis_geocoding))
builder.setAndroidApiKey(getString(R.string.key_google_apis_android))
.setMapsApiKey(getString(R.string.key_google_apis_maps))

// If you want to set a initial location
// rather then the current device location.
// pingBuilder.setLatLng(LatLng(37.4219999, -122.0862462))

try {
val placeIntent = pingBuilder.build(this)
val placeIntent = builder.build(this)
startActivityForResult(placeIntent, pingActivityRequestCode)
}
catch (ex: Exception) {
} catch (ex: Exception) {
toast("Google Play Services is not Available")
}
}
Expand Down
2 changes: 1 addition & 1 deletion sample/src/main/res/values/keys.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@

<!-- TODO: Move to Firebase remote configs -->
<string name="key_google_apis_android" translatable="false">@string/key_android</string>
<string name="key_google_apis_geocoding" translatable="false">@string/key_maps</string>
<string name="key_google_apis_maps" translatable="false">@string/key_maps</string>

</resources>

0 comments on commit 40e5ab8

Please sign in to comment.