com.github.kaiwinter.androidremotenotifications.model.UserNotification Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of android-remote-notifications Show documentation
Show all versions of android-remote-notifications Show documentation
Pulls notifications from a remote JSON file and shows them in your app.
package com.github.kaiwinter.androidremotenotifications.model;
import android.content.Context;
import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.github.kaiwinter.androidremotenotifications.model.impl.AlertDialogNotification;
import com.github.kaiwinter.androidremotenotifications.model.impl.NotificationConfiguration;
import com.github.kaiwinter.androidremotenotifications.model.impl.ToastNotification;
/**
* Interface for different types of Notifications.
*/
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type")
@JsonSubTypes({ //
@JsonSubTypes.Type(value = ToastNotification.class),//
@JsonSubTypes.Type(value = AlertDialogNotification.class), //
})
public interface UserNotification {
/**
* Returns the {@link NotificationConfiguration} of this Notification.
*
* @return the {@link NotificationConfiguration} of this Notification.
*/
NotificationConfiguration getNotificationConfiguration();
/**
* Shows the Notification to the user.
*
* @param context the {@link Context} of the app.
*/
void show(Context context);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy