-
This commit is contained in:
@@ -26,13 +26,13 @@ repositories {
|
||||
apply plugin: 'realm-android'
|
||||
|
||||
android {
|
||||
compileSdkVersion 28
|
||||
compileSdkVersion 27
|
||||
buildToolsVersion '28.0.2'
|
||||
|
||||
defaultConfig {
|
||||
applicationId "de.beyondsoft.ownchat"
|
||||
minSdkVersion 19
|
||||
targetSdkVersion 28
|
||||
targetSdkVersion 27
|
||||
versionCode 26
|
||||
versionName "1.26"
|
||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||
|
||||
@@ -33,8 +33,8 @@ public class MessagingInstanceIdService extends FirebaseInstanceIdService {
|
||||
public void onTokenRefresh() {
|
||||
InjectionHelper.getMessagingComponent(sAndroidContext).inject(this);
|
||||
String refreshedToken = FirebaseInstanceId.getInstance().getToken();
|
||||
Log.d(TAG, "Refreshed token: " + refreshedToken);
|
||||
Utils.makeFirebaseLogEntry("MessagingInstanceIdService: onTokenRefresh");
|
||||
// Log.d(TAG, "Refreshed token: " + refreshedToken);
|
||||
// Utils.makeFirebaseLogEntry("MessagingInstanceIdService: onTokenRefresh");
|
||||
sendRegistrationToServer(refreshedToken);
|
||||
}
|
||||
|
||||
@@ -44,19 +44,16 @@ public class MessagingInstanceIdService extends FirebaseInstanceIdService {
|
||||
.subscribe(new Subscriber<RegisterResponse>() {
|
||||
@Override
|
||||
public void onCompleted() {
|
||||
Utils.makeFirebaseLogEntry("MessagingInstanceIdService: sendRegistrationToServer onCompleted");
|
||||
Log.d(TAG, "onCompleted: " + token);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
Utils.makeFirebaseLogEntry("MessagingInstanceIdService: sendRegistrationToServer onError: " + (e != null ? e.toString() : "throwable is null!"));
|
||||
Log.d(TAG, "onError: ");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(RegisterResponse registerResponse) {
|
||||
Utils.makeFirebaseLogEntry("MessagingInstanceIdService: sendRegistrationToServer onNext");
|
||||
Log.d(TAG, "onNext: ");
|
||||
}
|
||||
});
|
||||
|
||||
@@ -20,8 +20,6 @@ public class NotificationUtils extends ContextWrapper {
|
||||
|
||||
public void createNotificationChannel() {
|
||||
if(android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O) {
|
||||
Utils.makeFirebaseLogEntry("createNotificationChannel because Android version is higher than 8.0 (Oreo)");
|
||||
|
||||
NotificationChannel androidChannel = new NotificationChannel(getString(R.string.default_notification_channel_id), getString(R.string.default_notification_channel_name), NotificationManager.IMPORTANCE_HIGH);
|
||||
androidChannel.enableLights(true);
|
||||
androidChannel.enableVibration(true);
|
||||
@@ -32,8 +30,6 @@ public class NotificationUtils extends ContextWrapper {
|
||||
}
|
||||
|
||||
public NotificationManager getManager() {
|
||||
Utils.makeFirebaseLogEntry("NotificationUtils: getManager");
|
||||
|
||||
if(mManager == null) {
|
||||
mManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);
|
||||
}
|
||||
|
||||
@@ -5,9 +5,6 @@ import java.lang.annotation.RetentionPolicy;
|
||||
|
||||
import javax.inject.Qualifier;
|
||||
|
||||
/**
|
||||
* Created by imarneanu on 2/10/17.
|
||||
*/
|
||||
@Qualifier
|
||||
@Retention(RetentionPolicy.SOURCE)
|
||||
public @interface AppPrefs {
|
||||
|
||||
Reference in New Issue
Block a user