All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.kaiwinter.androidremotenotifications.model.UserNotification Maven / Gradle / Ivy

There is a newer version: 1.1.5
Show newest version
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