diff --git a/app/build.gradle b/app/build.gradle index 347ec31cf..a7b9f5aeb 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -46,17 +46,17 @@ dependencies { compile 'com.android.support:support-v13:25.3.1' compile 'com.android.support:design:25.3.1' compile 'com.android.support:exifinterface:25.3.1' + compile 'com.squareup.retrofit2:retrofit:2.2.0' + compile 'com.squareup.retrofit2:converter-gson:2.1.0' compile 'com.squareup.picasso:picasso:2.5.2' compile 'com.squareup.okhttp3:okhttp:3.7.0' compile 'com.jakewharton.picasso:picasso2-okhttp3-downloader:1.1.0' compile 'com.pkmmte.view:circularimageview:1.1' compile 'com.github.peter9870:sparkbutton:master' compile 'com.mikhaellopez:circularfillableloaders:1.2.0' - compile 'com.squareup.retrofit2:retrofit:2.2.0' - compile 'com.squareup.retrofit2:converter-gson:2.1.0' compile 'com.github.chrisbanes:PhotoView:1.3.1' compile 'com.mikepenz:google-material-typeface:3.0.1.0.original@aar' - compile 'com.github.arimorty:floatingsearchview:2.0.3' + compile 'com.github.arimorty:floatingsearchview:2.0.4' compile 'com.theartofdev.edmodo:android-image-cropper:2.4.0' compile 'com.jakewharton:butterknife:8.4.0' googleCompile 'com.google.firebase:firebase-messaging:10.0.1' @@ -65,6 +65,4 @@ dependencies { annotationProcessor 'com.jakewharton:butterknife-compiler:8.4.0' } - - apply plugin: 'com.google.gms.google-services' \ No newline at end of file diff --git a/app/src/main/java/com/keylesspalace/tusky/BaseActivity.java b/app/src/main/java/com/keylesspalace/tusky/BaseActivity.java index da7ecd656..5bbe7ba13 100644 --- a/app/src/main/java/com/keylesspalace/tusky/BaseActivity.java +++ b/app/src/main/java/com/keylesspalace/tusky/BaseActivity.java @@ -32,7 +32,6 @@ import android.text.Spanned; import android.util.TypedValue; import android.view.Menu; -import com.google.firebase.iid.FirebaseInstanceId; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -198,7 +197,8 @@ public class BaseActivity extends AppCompatActivity { protected void enablePushNotifications() { if (BuildConfig.USES_PUSH_NOTIFICATIONS) { - tuskyAPI.register(getBaseUrl(), getAccessToken(), FirebaseInstanceId.getInstance().getToken()).enqueue(new Callback() { + String token = com.google.firebase.iid.FirebaseInstanceId.getInstance().getToken(); + tuskyAPI.register(getBaseUrl(), getAccessToken(), token).enqueue(new Callback() { @Override public void onResponse(Call call, retrofit2.Response response) { Log.d(TAG, "Enable push notifications response: " + response.message());