mirror of https://codeberg.org/tom79/Fedilab
Merge pull request 'Bump android-embedded_fcm_distributor to 2.1.3' (#320) from s1m/Fedilab:bump/unifiedpush into main
Reviewed-on: https://codeberg.org/tom79/Fedilab/pulls/320pull/434/head
commit
882c1bf6cd
@ -1,11 +1,16 @@
|
||||
package app.fedilab.android.services;
|
||||
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.unifiedpush.android.embedded_fcm_distributor.EmbeddedDistributorReceiver;
|
||||
|
||||
public class EmbeddedDistrib extends EmbeddedDistributorReceiver {
|
||||
public EmbeddedDistrib() {
|
||||
super(new HandlerFCM());
|
||||
@Override
|
||||
public @NotNull String getEndpoint(@Nullable Context context, @NotNull String token, @NotNull String instance) {
|
||||
return "https://gotify.fedilab.app/FCM?token=" + token + "&instance=" + instance;
|
||||
}
|
||||
|
||||
}
|
@ -1,18 +0,0 @@
|
||||
package app.fedilab.android.services;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.unifiedpush.android.embedded_fcm_distributor.GetEndpointHandler;
|
||||
|
||||
|
||||
public class HandlerFCM implements GetEndpointHandler {
|
||||
|
||||
@Override
|
||||
public @NotNull String getEndpoint(@Nullable Context context, @NotNull String token, @NotNull String instance) {
|
||||
return "https://gotify.fedilab.app/FCM?token=" + token + "&instance=" + instance;
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in new issue