From 7e51e8f9fb1a9ea48c1951d3ccf0273010a5ecf5 Mon Sep 17 00:00:00 2001 From: Corey Hulen Date: Fri, 11 May 2018 07:47:20 -0700 Subject: [PATCH] Fixing droid push notifications --- .gitignore | 3 ++- app/build.gradle | 6 +++--- .../main/java/com/mattermost/service/MattermostService.java | 5 +++-- build.gradle | 2 +- gradle/wrapper/gradle-wrapper.properties | 4 ++-- 5 files changed, 11 insertions(+), 9 deletions(-) diff --git a/.gitignore b/.gitignore index 25b457b..ab33ff8 100644 --- a/.gitignore +++ b/.gitignore @@ -16,4 +16,5 @@ proguard/ .navigation/ captures/ signing-key.jks -google-services.json \ No newline at end of file +google-services.json +app/release/ \ No newline at end of file diff --git a/app/build.gradle b/app/build.gradle index d8311b0..8787c41 100755 --- a/app/build.gradle +++ b/app/build.gradle @@ -2,7 +2,7 @@ apply plugin: 'com.android.application' android { compileSdkVersion 26 - buildToolsVersion "26.0.2" + buildToolsVersion '27.0.3' defaultConfig { applicationId "com.mattermost.mattermost" @@ -12,8 +12,8 @@ android { * convert application icon to meet desired lollipop guidelines, that is icon should be * flat and white*/ targetSdkVersion 20 - versionCode 398 - versionName "3.10.2" + versionCode 399 + versionName "3.10.3" } buildTypes { release { diff --git a/app/src/main/java/com/mattermost/service/MattermostService.java b/app/src/main/java/com/mattermost/service/MattermostService.java index d458bd1..fefffc1 100755 --- a/app/src/main/java/com/mattermost/service/MattermostService.java +++ b/app/src/main/java/com/mattermost/service/MattermostService.java @@ -31,6 +31,7 @@ import retrofit.http.Body; import retrofit.http.POST; import retrofit.http.GET; +import retrofit.http.PUT; @@ -111,7 +112,7 @@ public Promise attachDevice() { user.deviceId = "android:" + deviceId.toString(); if (this.isV4()) { - return apiClient.attachDeviceV3(user); + return apiClient.attachDeviceV4(user); } else{ return apiClient.attachDeviceV3(user); } @@ -171,7 +172,7 @@ public interface MattermostAPI { Promise attachDeviceV3(@Body User user); @Headers("X-Requested-With: XMLHttpRequest") - @POST("/api/v4/users/attach_device") + @PUT("/api/v4/users/sessions/device") Promise attachDeviceV4(@Body User user); @Headers("X-Requested-With: XMLHttpRequest") diff --git a/build.gradle b/build.gradle index 6229013..7dcf333 100755 --- a/build.gradle +++ b/build.gradle @@ -6,7 +6,7 @@ buildscript { google() } dependencies { - classpath 'com.android.tools.build:gradle:3.0.1' + classpath 'com.android.tools.build:gradle:3.1.2' classpath 'com.google.gms:google-services:3.1.1' // NOTE: Do not place your application dependencies here; they belong diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 33ebb4f..37849f2 100755 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Mon Jan 15 14:07:55 PST 2018 +#Fri May 11 07:08:44 PDT 2018 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip