Loading app/build.gradle +2 −11 Original line number Diff line number Diff line Loading @@ -144,9 +144,9 @@ dependencies { implementation "ch.acra:acra-limiter:5.9.3" implementation "ch.acra:acra-dialog:5.9.6" implementation "com.madgag.spongycastle:bctls-jdk15on:1.58.0.0" implementation 'com.github.UnifiedPush:android-connector:2.0.1' implementation 'com.github.UnifiedPush:android-connector:2.1.1' // implementation 'com.github.UnifiedPush:android-foss_embedded_fcm_distributor:1.0.0-beta1' playstoreImplementation('com.github.UnifiedPush:android-embedded_fcm_distributor:2.1.3') { playstoreImplementation('com.github.UnifiedPush:android-embedded_fcm_distributor:2.2.0') { exclude group: 'com.google.firebase', module: 'firebase-core' exclude group: 'com.google.firebase', module: 'firebase-analytics' exclude group: 'com.google.firebase', module: 'firebase-measurement-connector' Loading Loading @@ -191,20 +191,11 @@ dependencies { playstoreImplementation "androidx.mediarouter:mediarouter:1.3.0" playstoreImplementation 'com.google.android.gms:play-services-cast-framework:21.0.1' playstoreImplementation "com.google.android.gms:play-services-cast-tv:19.0.1" playstoreImplementation "com.google.android.gms:play-services-cast:21.0.1" playstoreImplementation "androidx.mediarouter:mediarouter:1.3.0" playstoreImplementation 'com.google.android.gms:play-services-cast-framework:21.0.1' //----> Other flavors fdroidImplementation 'su.litvak.chromecast:api-v2:0.11.3' fdroidImplementation 'com.fasterxml.jackson.core:jackson-core:2.12.0' fdroidImplementation 'org.slf4j:slf4j-simple:1.7.30' fdroidImplementation 'com.github.evozi:Cyanea:1.0.7' fdroidImplementation 'su.litvak.chromecast:api-v2:0.11.3' fdroidImplementation 'com.fasterxml.jackson.core:jackson-core:2.12.0' fdroidImplementation 'org.slf4j:slf4j-simple:1.7.30' } def getCurrentFlavor() { Loading app/src/main/java/app/fedilab/android/mastodon/client/endpoints/MastodonNotificationsService.java +4 −2 Original line number Diff line number Diff line Loading @@ -75,7 +75,8 @@ public interface MastodonNotificationsService { @Field("data[alerts][status]") boolean status, @Field("data[alerts][update]") boolean update, @Field("data[alerts][admin.sign_up]") boolean admin_sign_up, @Field("data[alerts][admin.report]") boolean admin_report @Field("data[alerts][admin.report]") boolean admin_report, @Field("data[policy]") String policy ); Loading @@ -93,7 +94,8 @@ public interface MastodonNotificationsService { @Field("data[alerts][favourite]") boolean favourite, @Field("data[alerts][reblog]") boolean reblog, @Field("data[alerts][mention]") boolean mention, @Field("data[alerts][poll]") boolean poll @Field("data[alerts][poll]") boolean poll, @Field("data[policy]") String policy ); @DELETE("push/subscription") Loading app/src/main/java/app/fedilab/android/mastodon/client/entities/api/PushSubscription.java +2 −0 Original line number Diff line number Diff line Loading @@ -22,6 +22,8 @@ public class PushSubscription { public String id; @SerializedName("endpoint") public String endpoint; @SerializedName("policy") public String policy; @SerializedName("alerts") public Alerts alerts; @SerializedName("server_key") Loading app/src/main/java/app/fedilab/android/mastodon/helper/PushNotifications.java +1 −1 Original line number Diff line number Diff line Loading @@ -95,7 +95,7 @@ public class PushNotifications { notif_status, notif_updates, notif_signup, notif_report); notif_report, "all"); if (pushSubscriptionCall != null) { try { Response<PushSubscription> pushSubscriptionResponse = pushSubscriptionCall.execute(); Loading app/src/main/java/app/fedilab/android/mastodon/services/CustomReceiver.java +3 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package app.fedilab.android.mastodon.services; import android.content.Context; import android.content.Intent; import android.util.Log; import androidx.annotation.NonNull; Loading @@ -23,6 +24,7 @@ import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import org.unifiedpush.android.connector.MessagingReceiver; import app.fedilab.android.mastodon.helper.Helper; import app.fedilab.android.mastodon.helper.NotificationsHelper; import app.fedilab.android.mastodon.helper.PushNotifications; Loading @@ -38,6 +40,7 @@ public class CustomReceiver extends MessagingReceiver { @Override public void onMessage(@NotNull Context context, @NotNull byte[] message, @NotNull String slug) { // Called when a new message is received. The message contains the full POST body of the push message Log.v(Helper.TAG, "onMessage: " + slug); new Thread(() -> { try { /*Notification notification = ECDHFedilab.decryptNotification(context, slug, message); Loading Loading
app/build.gradle +2 −11 Original line number Diff line number Diff line Loading @@ -144,9 +144,9 @@ dependencies { implementation "ch.acra:acra-limiter:5.9.3" implementation "ch.acra:acra-dialog:5.9.6" implementation "com.madgag.spongycastle:bctls-jdk15on:1.58.0.0" implementation 'com.github.UnifiedPush:android-connector:2.0.1' implementation 'com.github.UnifiedPush:android-connector:2.1.1' // implementation 'com.github.UnifiedPush:android-foss_embedded_fcm_distributor:1.0.0-beta1' playstoreImplementation('com.github.UnifiedPush:android-embedded_fcm_distributor:2.1.3') { playstoreImplementation('com.github.UnifiedPush:android-embedded_fcm_distributor:2.2.0') { exclude group: 'com.google.firebase', module: 'firebase-core' exclude group: 'com.google.firebase', module: 'firebase-analytics' exclude group: 'com.google.firebase', module: 'firebase-measurement-connector' Loading Loading @@ -191,20 +191,11 @@ dependencies { playstoreImplementation "androidx.mediarouter:mediarouter:1.3.0" playstoreImplementation 'com.google.android.gms:play-services-cast-framework:21.0.1' playstoreImplementation "com.google.android.gms:play-services-cast-tv:19.0.1" playstoreImplementation "com.google.android.gms:play-services-cast:21.0.1" playstoreImplementation "androidx.mediarouter:mediarouter:1.3.0" playstoreImplementation 'com.google.android.gms:play-services-cast-framework:21.0.1' //----> Other flavors fdroidImplementation 'su.litvak.chromecast:api-v2:0.11.3' fdroidImplementation 'com.fasterxml.jackson.core:jackson-core:2.12.0' fdroidImplementation 'org.slf4j:slf4j-simple:1.7.30' fdroidImplementation 'com.github.evozi:Cyanea:1.0.7' fdroidImplementation 'su.litvak.chromecast:api-v2:0.11.3' fdroidImplementation 'com.fasterxml.jackson.core:jackson-core:2.12.0' fdroidImplementation 'org.slf4j:slf4j-simple:1.7.30' } def getCurrentFlavor() { Loading
app/src/main/java/app/fedilab/android/mastodon/client/endpoints/MastodonNotificationsService.java +4 −2 Original line number Diff line number Diff line Loading @@ -75,7 +75,8 @@ public interface MastodonNotificationsService { @Field("data[alerts][status]") boolean status, @Field("data[alerts][update]") boolean update, @Field("data[alerts][admin.sign_up]") boolean admin_sign_up, @Field("data[alerts][admin.report]") boolean admin_report @Field("data[alerts][admin.report]") boolean admin_report, @Field("data[policy]") String policy ); Loading @@ -93,7 +94,8 @@ public interface MastodonNotificationsService { @Field("data[alerts][favourite]") boolean favourite, @Field("data[alerts][reblog]") boolean reblog, @Field("data[alerts][mention]") boolean mention, @Field("data[alerts][poll]") boolean poll @Field("data[alerts][poll]") boolean poll, @Field("data[policy]") String policy ); @DELETE("push/subscription") Loading
app/src/main/java/app/fedilab/android/mastodon/client/entities/api/PushSubscription.java +2 −0 Original line number Diff line number Diff line Loading @@ -22,6 +22,8 @@ public class PushSubscription { public String id; @SerializedName("endpoint") public String endpoint; @SerializedName("policy") public String policy; @SerializedName("alerts") public Alerts alerts; @SerializedName("server_key") Loading
app/src/main/java/app/fedilab/android/mastodon/helper/PushNotifications.java +1 −1 Original line number Diff line number Diff line Loading @@ -95,7 +95,7 @@ public class PushNotifications { notif_status, notif_updates, notif_signup, notif_report); notif_report, "all"); if (pushSubscriptionCall != null) { try { Response<PushSubscription> pushSubscriptionResponse = pushSubscriptionCall.execute(); Loading
app/src/main/java/app/fedilab/android/mastodon/services/CustomReceiver.java +3 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package app.fedilab.android.mastodon.services; import android.content.Context; import android.content.Intent; import android.util.Log; import androidx.annotation.NonNull; Loading @@ -23,6 +24,7 @@ import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import org.unifiedpush.android.connector.MessagingReceiver; import app.fedilab.android.mastodon.helper.Helper; import app.fedilab.android.mastodon.helper.NotificationsHelper; import app.fedilab.android.mastodon.helper.PushNotifications; Loading @@ -38,6 +40,7 @@ public class CustomReceiver extends MessagingReceiver { @Override public void onMessage(@NotNull Context context, @NotNull byte[] message, @NotNull String slug) { // Called when a new message is received. The message contains the full POST body of the push message Log.v(Helper.TAG, "onMessage: " + slug); new Thread(() -> { try { /*Notification notification = ECDHFedilab.decryptNotification(context, slug, message); Loading