diff --git a/demo-java/app/build.gradle b/demo-java/app/build.gradle
index 217686b7..2a05ad0f 100644
--- a/demo-java/app/build.gradle
+++ b/demo-java/app/build.gradle
@@ -8,8 +8,8 @@ android {
compileSdk 34
defaultConfig {
applicationId "com.example.placesdemo"
- minSdkVersion 21
- targetSdkVersion 34
+ minSdkVersion 23
+ targetSdkVersion 35
multiDexEnabled true
versionCode 1
versionName "1.0"
@@ -28,21 +28,21 @@ android {
}
dependencies {
- implementation 'androidx.appcompat:appcompat:1.6.1'
- implementation 'com.google.android.material:material:1.11.0'
+ implementation 'androidx.appcompat:appcompat:1.7.0'
+ implementation 'com.google.android.material:material:1.12.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
- implementation 'androidx.navigation:navigation-fragment:2.7.6'
- implementation 'androidx.navigation:navigation-ui:2.7.6'
- implementation "androidx.activity:activity:1.8.2"
- implementation "androidx.fragment:fragment:1.6.2"
+ implementation 'androidx.navigation:navigation-fragment:2.8.1'
+ implementation 'androidx.navigation:navigation-ui:2.8.1'
+ implementation "androidx.activity:activity:1.9.2"
+ implementation "androidx.fragment:fragment:1.8.3"
implementation 'com.android.volley:volley:1.2.1'
implementation "com.github.bumptech.glide:glide:4.16.0"
- implementation "com.android.databinding:viewbinding:8.2.2"
+ implementation "com.android.databinding:viewbinding:8.6.1"
// Places and Maps SDKs
- implementation 'com.google.android.libraries.places:places:3.3.0'
- implementation 'com.google.android.gms:play-services-maps:18.2.0'
- implementation 'com.google.maps.android:android-maps-utils:3.8.0'
+ implementation 'com.google.android.libraries.places:places:4.0.0'
+ implementation 'com.google.android.gms:play-services-maps:19.0.0'
+ implementation 'com.google.maps.android:android-maps-utils:3.8.2'
}
secrets {
diff --git a/demo-java/app/src/main/java/com/example/placesdemo/CurrentPlaceActivity.java b/demo-java/app/src/main/java/com/example/placesdemo/CurrentPlaceActivity.java
index a66c9d1d..4dcf0e8a 100644
--- a/demo-java/app/src/main/java/com/example/placesdemo/CurrentPlaceActivity.java
+++ b/demo-java/app/src/main/java/com/example/placesdemo/CurrentPlaceActivity.java
@@ -103,6 +103,8 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
Field.CURRENT_OPENING_HOURS,
Field.DELIVERY,
Field.DINE_IN,
+ Field.EDITORIAL_SUMMARY,
+ Field.INTERNATIONAL_PHONE_NUMBER,
Field.OPENING_HOURS,
Field.PHONE_NUMBER,
Field.RESERVABLE,
@@ -114,8 +116,8 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
Field.SERVES_LUNCH,
Field.SERVES_VEGETARIAN_FOOD,
Field.SERVES_WINE,
- Field.UTC_OFFSET,
Field.TAKEOUT,
+ Field.UTC_OFFSET,
Field.WEBSITE_URI,
Field.WHEELCHAIR_ACCESSIBLE_ENTRANCE
);
diff --git a/demo-java/build.gradle b/demo-java/build.gradle
index 152d0da9..bbcd0cb5 100644
--- a/demo-java/build.gradle
+++ b/demo-java/build.gradle
@@ -6,7 +6,7 @@ buildscript {
mavenCentral()
}
dependencies {
- classpath 'com.android.tools.build:gradle:8.2.2'
+ classpath 'com.android.tools.build:gradle:8.6.1'
classpath "com.google.android.libraries.mapsplatform.secrets-gradle-plugin:secrets-gradle-plugin:2.0.1"
}
}
diff --git a/demo-java/gradle/wrapper/gradle-wrapper.properties b/demo-java/gradle/wrapper/gradle-wrapper.properties
index 593a7572..b90f43be 100644
--- a/demo-java/gradle/wrapper/gradle-wrapper.properties
+++ b/demo-java/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
#Mon Mar 28 15:43:44 PDT 2022
distributionBase=GRADLE_USER_HOME
-distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
diff --git a/demo-kotlin/app/build.gradle.kts b/demo-kotlin/app/build.gradle.kts
index 6a4d31b6..1ea5cfde 100644
--- a/demo-kotlin/app/build.gradle.kts
+++ b/demo-kotlin/app/build.gradle.kts
@@ -7,21 +7,22 @@ plugins {
android {
namespace = "com.example.placesdemo"
- compileSdk = 34
+ compileSdk = 35
defaultConfig {
applicationId = "com.example.placesdemo"
- minSdk = 21
- targetSdk = 34
+ minSdk = 23
+ targetSdk = 35
versionCode = 1
versionName = "1.0"
multiDexEnabled = true
}
- compileOptions {
- sourceCompatibility = JavaVersion.VERSION_17
- targetCompatibility = JavaVersion.VERSION_17
+ java {
+ toolchain {
+ languageVersion.set(JavaLanguageVersion.of(21))
+ }
}
buildFeatures {
@@ -40,7 +41,7 @@ dependencies {
implementation(libs.multidex)
// Google Places
- implementation(libs.places.ktx)
+ implementation(libs.places)
implementation(libs.maps.utils.ktx)
}
diff --git a/demo-kotlin/app/src/main/java/com/example/placesdemo/CurrentPlaceActivity.kt b/demo-kotlin/app/src/main/java/com/example/placesdemo/CurrentPlaceActivity.kt
index 9df20a0e..8d2eb79e 100644
--- a/demo-kotlin/app/src/main/java/com/example/placesdemo/CurrentPlaceActivity.kt
+++ b/demo-kotlin/app/src/main/java/com/example/placesdemo/CurrentPlaceActivity.kt
@@ -79,6 +79,7 @@ class CurrentPlaceActivity : AppCompatActivity() {
Place.Field.DELIVERY,
Place.Field.DINE_IN,
Place.Field.EDITORIAL_SUMMARY,
+ Place.Field.INTERNATIONAL_PHONE_NUMBER,
Place.Field.OPENING_HOURS,
Place.Field.PHONE_NUMBER,
Place.Field.RESERVABLE,
@@ -93,7 +94,7 @@ class CurrentPlaceActivity : AppCompatActivity() {
Place.Field.TAKEOUT,
Place.Field.UTC_OFFSET,
Place.Field.WEBSITE_URI,
- Place.Field.WHEELCHAIR_ACCESSIBLE_ENTRANCE
+ Place.Field.WHEELCHAIR_ACCESSIBLE_ENTRANCE,
)
fieldSelector = FieldSelector(
binding.useCustomFields,
diff --git a/demo-kotlin/app/src/main/java/com/example/placesdemo/PlacesDemoApplication.kt b/demo-kotlin/app/src/main/java/com/example/placesdemo/PlacesDemoApplication.kt
index e2f5d88e..3448943e 100644
--- a/demo-kotlin/app/src/main/java/com/example/placesdemo/PlacesDemoApplication.kt
+++ b/demo-kotlin/app/src/main/java/com/example/placesdemo/PlacesDemoApplication.kt
@@ -1,3 +1,17 @@
+// Copyright 2024 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
package com.example.placesdemo
import android.app.Application
@@ -16,4 +30,4 @@ class PlacesDemoApplication : Application() {
Places.initialize(applicationContext, BuildConfig.PLACES_API_KEY)
}
-}
\ No newline at end of file
+}
diff --git a/demo-kotlin/app/src/main/java/com/example/placesdemo/model/AutocompleteEditText.kt b/demo-kotlin/app/src/main/java/com/example/placesdemo/model/AutocompleteEditText.kt
index 4535f32c..d796cc15 100644
--- a/demo-kotlin/app/src/main/java/com/example/placesdemo/model/AutocompleteEditText.kt
+++ b/demo-kotlin/app/src/main/java/com/example/placesdemo/model/AutocompleteEditText.kt
@@ -1,33 +1,47 @@
-package com.example.placesdemo.model
-
-import android.content.Context
-import android.util.AttributeSet
-import android.view.MotionEvent
-import androidx.appcompat.widget.AppCompatEditText
-
-class AutocompleteEditText : AppCompatEditText {
- constructor(context: Context?) : super(context!!) {}
- constructor(context: Context?, attrs: AttributeSet?) : super(
- context!!, attrs
- ) {
- }
-
- override fun onTouchEvent(event: MotionEvent): Boolean {
- super.onTouchEvent(event)
- when (event.action) {
- MotionEvent.ACTION_DOWN -> return true
- MotionEvent.ACTION_UP -> {
- performClick()
- return true
- }
- }
- return false
- }
-
- // Because we call this from onTouchEvent, this code will be executed for both
- // normal touch events and for when the system calls this using Accessibility
- override fun performClick(): Boolean {
- super.performClick()
- return true
- }
-}
\ No newline at end of file
+// Copyright 2024 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package com.example.placesdemo.model
+
+import android.content.Context
+import android.util.AttributeSet
+import android.view.MotionEvent
+import androidx.appcompat.widget.AppCompatEditText
+
+class AutocompleteEditText : AppCompatEditText {
+ constructor(context: Context?) : super(context!!) {}
+ constructor(context: Context?, attrs: AttributeSet?) : super(
+ context!!, attrs
+ ) {
+ }
+
+ override fun onTouchEvent(event: MotionEvent): Boolean {
+ super.onTouchEvent(event)
+ when (event.action) {
+ MotionEvent.ACTION_DOWN -> return true
+ MotionEvent.ACTION_UP -> {
+ performClick()
+ return true
+ }
+ }
+ return false
+ }
+
+ // Because we call this from onTouchEvent, this code will be executed for both
+ // normal touch events and for when the system calls this using Accessibility
+ override fun performClick(): Boolean {
+ super.performClick()
+ return true
+ }
+}
diff --git a/demo-kotlin/app/src/main/res/layout/place_autocomplete_activity.xml b/demo-kotlin/app/src/main/res/layout/place_autocomplete_activity.xml
index 185d1cae..b8dfa1d6 100644
--- a/demo-kotlin/app/src/main/res/layout/place_autocomplete_activity.xml
+++ b/demo-kotlin/app/src/main/res/layout/place_autocomplete_activity.xml
@@ -42,7 +42,9 @@
android:hint="@string/autocomplete_location_origin_hint"
android:autofillHints=""
android:imeOptions="actionNext"
- android:inputType="text"/>
+ android:inputType="numberDecimal|numberSigned"
+ android:digits="0123456789.,- "
+ />
+ android:inputType="numberDecimal|numberSigned"
+ android:digits="0123456789.,- "
+ />
+ android:inputType="numberDecimal|numberSigned"
+ android:digits="0123456789.,- "
+ />
+ android:inputType="numberDecimal|numberSigned"
+ android:digits="0123456789.,- "
+ />
+ android:inputType="numberDecimal|numberSigned"
+ android:digits="0123456789.,- "
+ />