Skip to content
This repository was archived by the owner on Jun 24, 2025. It is now read-only.

Commit e834fe3

Browse files
committed
Fixes a crash on devices running Android 4
1 parent 5efe176 commit e834fe3

6 files changed

Lines changed: 10 additions & 14 deletions

File tree

CedarMapsSDK/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apply plugin: 'signing'
33
apply plugin: 'com.github.dcendents.android-maven'
44

55
group = "com.cedarmaps"
6-
version = "4.2.0"
6+
version = "4.2.1"
77
def siteUrl = 'http://cedarmaps.com'
88
def gitUrl = 'http://cedarmaps.com/git'
99

@@ -18,8 +18,8 @@ android {
1818

1919
dependencies {
2020
api 'com.mapbox.mapboxsdk:mapbox-android-sdk:8.4.0'
21-
implementation 'com.squareup.okhttp3:okhttp:4.2.2'
22-
implementation 'com.google.code.gson:gson:2.8.5'
21+
implementation 'com.squareup.okhttp3:okhttp:3.12.6' //We should stop at 3.12.x since later versions run on API 21+ only
22+
implementation 'com.google.code.gson:gson:2.8.6'
2323
}
2424

2525
// From https://raw.github.com/mcxiaoke/gradle-mvn-push/master/gradle-mvn-push.gradle

CedarMapsSDK/src/main/java/com/cedarstudios/cedarmapssdk/AuthenticationManager.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
import com.cedarstudios.cedarmapssdk.listeners.AccessTokenListener;
1313
import com.mapbox.mapboxsdk.Mapbox;
1414

15-
import org.jetbrains.annotations.NotNull;
1615
import org.json.JSONObject;
1716

1817
import java.io.IOException;
@@ -249,7 +248,7 @@ private void fetchAccessTokenFromServer(final AccessTokenListener completionHand
249248
client.newCall(request).enqueue(new Callback() {
250249

251250
@Override
252-
public void onResponse(@NotNull Call call, @NotNull final Response response) {
251+
public void onResponse(Call call, final Response response) {
253252
ResponseBody body = response.body();
254253
if (body == null) {
255254
handler.post(new Runnable() {
@@ -338,7 +337,7 @@ public void run() {
338337
}
339338

340339
@Override
341-
public void onFailure(@NotNull Call call, @NotNull final IOException e) {
340+
public void onFailure(Call call, final IOException e) {
342341
handler.post(new Runnable() {
343342
@Override
344343
public void run() {

CedarMapsSDK/src/main/java/com/cedarstudios/cedarmapssdk/CedarOkHttpClient.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
import android.os.Build;
66
import androidx.core.os.ConfigurationCompat;
77

8-
import org.jetbrains.annotations.NotNull;
9-
108
import java.io.IOException;
119
import java.util.Locale;
1210
import java.util.concurrent.TimeUnit;
@@ -27,9 +25,8 @@ static OkHttpClient getSharedInstance(final Context applicationContext) {
2725
.connectTimeout(30, TimeUnit.SECONDS)
2826
.readTimeout(30, TimeUnit.SECONDS)
2927
.addNetworkInterceptor(new Interceptor() {
30-
@NotNull
3128
@Override
32-
public Response intercept(@NotNull Chain chain) throws IOException {
29+
public Response intercept(Chain chain) throws IOException {
3330
String userAgent;
3431
if (userAgent(applicationContext) != null) {
3532
userAgent = userAgent(applicationContext);

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@ Then, add this to the `build.gradle` of your **app** module:
3838

3939
```groovy
4040
dependencies {
41-
implementation 'com.cedarmaps:CedarMapsSDK:4.2.0'
41+
implementation 'com.cedarmaps:CedarMapsSDK:4.2.1'
4242
}
4343
```
4444

45-
**Note:** CedarMaps is using `AndroidX` from version `4.2.0`. The last version to support old `AppCompat` is `4.1.0`.
45+
**Note:** CedarMaps is using `AndroidX` from version `4.2.0`. The last version to support old `Support Library` is `4.1.0`.
4646

4747
### Java 8
4848

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ buildscript {
66
google()
77
}
88
dependencies {
9-
classpath 'com.android.tools.build:gradle:3.5.1'
9+
classpath 'com.android.tools.build:gradle:3.5.2'
1010
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
1111

1212
// NOTE: Do not place your application dependencies here; they belong

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
android.enableJetifier=true
22
android.useAndroidX=true
33
GROUP=com.cedarmaps
4-
VERSION_NAME=4.2.0
4+
VERSION_NAME=4.2.1
55

66
# Project-wide Gradle settings.
77

0 commit comments

Comments
 (0)