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

com.github.kaiwinter.androidremotenotifications.model.buttonaction.ButtonAction Maven / Gradle / Ivy

There is a newer version: 1.1.5
Show newest version
package com.github.kaiwinter.androidremotenotifications.model.buttonaction;

import android.content.Context;

import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.github.kaiwinter.androidremotenotifications.model.buttonaction.impl.ExitAppButtonAction;
import com.github.kaiwinter.androidremotenotifications.model.buttonaction.impl.OpenStoreButtonAction;
import com.github.kaiwinter.androidremotenotifications.model.buttonaction.impl.OpenUrlButtonAction;

/**
 * Provides an action which will be carried out by the selection of a button.
 */
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type")
@JsonSubTypes({ //
        @JsonSubTypes.Type(value = OpenStoreButtonAction.class),//
        @JsonSubTypes.Type(value = OpenUrlButtonAction.class), //
        @JsonSubTypes.Type(value = ExitAppButtonAction.class) //
})
public interface ButtonAction {

    /**
     * Executes the action of this button.
     *
     * @param context the application context
     */
    void execute(Context context);

    @Override
    int hashCode();

    @Override
    boolean equals(Object obj);
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy