Skip to content

Commit

Permalink
Update latest lib play-services-location:21.0.1, places:3.1.0 and tar…
Browse files Browse the repository at this point in the history
…get API level 33
  • Loading branch information
dzungpv committed Jun 19, 2023
1 parent b5b967f commit f4f178c
Show file tree
Hide file tree
Showing 5 changed files with 137 additions and 13 deletions.
16 changes: 8 additions & 8 deletions library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ apply plugin: 'maven-publish'

android {

compileSdkVersion 32
compileSdkVersion 33

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}

kotlinOptions {
Expand All @@ -23,8 +23,8 @@ android {
}

defaultConfig {
minSdkVersion 19
targetSdkVersion 32
minSdkVersion 21
targetSdkVersion 33
vectorDrawables.useSupportLibrary = true
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
Expand Down Expand Up @@ -64,10 +64,10 @@ dependencies {
implementation 'androidx.lifecycle:lifecycle-common-java8:2.5.1'

// Google Play Services
implementation 'com.google.android.gms:play-services-location:20.0.0'
implementation 'com.google.android.gms:play-services-location:21.0.1'
implementation 'com.google.android.gms:play-services-maps:18.1.0'
implementation 'com.google.maps.android:android-maps-utils:2.2.5'
implementation 'com.google.android.libraries.places:places:2.6.0'
implementation 'com.google.maps.android:android-maps-utils:3.4.0'
implementation 'com.google.android.libraries.places:places:3.1.0'

// Koin for Android
implementation 'io.insert-koin:koin-android:3.1.5'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import com.google.android.gms.maps.model.LatLng
import com.google.android.gms.maps.model.LatLngBounds
import com.google.android.libraries.places.api.model.*
import kotlinx.parcelize.Parcelize
import com.google.android.libraries.places.api.model.Place.BooleanPlaceAttributeValue.UNKNOWN

@Parcelize
internal class CustomPlace(
Expand Down Expand Up @@ -36,6 +37,58 @@ internal class CustomPlace(
return null
}

override fun getCurbsidePickup(): BooleanPlaceAttributeValue {
return UNKNOWN
}

override fun getDelivery(): BooleanPlaceAttributeValue {
return UNKNOWN
}

override fun getDineIn(): BooleanPlaceAttributeValue {
return UNKNOWN
}

override fun getReservable(): BooleanPlaceAttributeValue {
return UNKNOWN
}

override fun getServesBeer(): BooleanPlaceAttributeValue {
return UNKNOWN
}

override fun getServesBreakfast(): BooleanPlaceAttributeValue {
return UNKNOWN
}

override fun getServesBrunch(): BooleanPlaceAttributeValue {
return UNKNOWN
}

override fun getServesDinner(): BooleanPlaceAttributeValue {
return UNKNOWN
}

override fun getServesLunch(): BooleanPlaceAttributeValue {
return UNKNOWN
}

override fun getServesVegetarianFood(): BooleanPlaceAttributeValue {
return UNKNOWN
}

override fun getServesWine(): BooleanPlaceAttributeValue {
return UNKNOWN
}

override fun getTakeout(): BooleanPlaceAttributeValue {
return UNKNOWN
}

override fun getWheelchairAccessibleEntrance(): BooleanPlaceAttributeValue {
return UNKNOWN
}

override fun getId(): String {
return placeId
}
Expand All @@ -44,6 +97,10 @@ internal class CustomPlace(
return placePhotos
}

override fun getSecondaryOpeningHours(): MutableList<OpeningHours>? {
return null
}

override fun getWebsiteUri(): Uri? {
return null
}
Expand All @@ -68,6 +125,10 @@ internal class CustomPlace(
return null
}

override fun getCurrentOpeningHours(): OpeningHours? {
return null
}

override fun getAttributions(): MutableList<String> {
return mutableListOf()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import com.google.android.gms.maps.model.LatLng
import com.google.android.gms.maps.model.LatLngBounds
import com.google.android.libraries.places.api.model.*
import kotlin.math.absoluteValue
import com.google.android.libraries.places.api.model.Place.BooleanPlaceAttributeValue.UNKNOWN

/**
* Place without any additional info. Just latitude and longitude.
Expand Down Expand Up @@ -42,6 +43,58 @@ internal class PlaceFromCoordinates(
return null
}

override fun getCurbsidePickup(): BooleanPlaceAttributeValue {
return UNKNOWN
}

override fun getDelivery(): BooleanPlaceAttributeValue {
return UNKNOWN
}

override fun getDineIn(): BooleanPlaceAttributeValue {
return UNKNOWN
}

override fun getReservable(): BooleanPlaceAttributeValue {
return UNKNOWN
}

override fun getServesBeer(): BooleanPlaceAttributeValue {
return UNKNOWN
}

override fun getServesBreakfast(): BooleanPlaceAttributeValue {
return UNKNOWN
}

override fun getServesBrunch(): BooleanPlaceAttributeValue {
return UNKNOWN
}

override fun getServesDinner(): BooleanPlaceAttributeValue {
return UNKNOWN
}

override fun getServesLunch(): BooleanPlaceAttributeValue {
return UNKNOWN
}

override fun getServesVegetarianFood(): BooleanPlaceAttributeValue {
return UNKNOWN
}

override fun getServesWine(): BooleanPlaceAttributeValue {
return UNKNOWN
}

override fun getTakeout(): BooleanPlaceAttributeValue {
return UNKNOWN
}

override fun getWheelchairAccessibleEntrance(): BooleanPlaceAttributeValue {
return UNKNOWN
}

override fun getId(): String? {
return null
}
Expand All @@ -50,6 +103,10 @@ internal class PlaceFromCoordinates(
return mutableListOf()
}

override fun getSecondaryOpeningHours(): MutableList<OpeningHours>? {
return null
}

override fun getWebsiteUri(): Uri? {
return null
}
Expand All @@ -74,6 +131,10 @@ internal class PlaceFromCoordinates(
return null
}

override fun getCurrentOpeningHours(): OpeningHours? {
return null
}

override fun getAttributions(): MutableList<String> {
return mutableListOf()
}
Expand Down
10 changes: 5 additions & 5 deletions sample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@ apply plugin: 'kotlin-android-extensions'

android {

compileSdkVersion 32
compileSdkVersion 33

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}

defaultConfig {
applicationId "com.rtchagas.pingsample"
minSdkVersion 21
targetSdkVersion 32
targetSdkVersion 33
versionCode 1
versionName "1.0"

Expand Down Expand Up @@ -46,7 +46,7 @@ dependencies {
implementation 'com.google.android.material:material:1.6.1'

// Places library
implementation 'com.google.android.libraries.places:places:2.6.0'
implementation 'com.google.android.libraries.places:places:3.1.0'

// Other
implementation 'com.github.mcginty:material-colors:1.1.0'
Expand Down
2 changes: 2 additions & 0 deletions sample/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<resources>
<string name="app_name">Ping Sample</string>
<string name="show_picker">Ping!</string>
<string name="key_maps" translatable="false">"your_maps_key"</string>
<string name="key_android" translatable="false">"your_android_key"</string>
</resources>

0 comments on commit f4f178c

Please sign in to comment.