DeckApi.java 1.0 KB

123456789101112131415161718192021222324252627
  1. package com.nextcloud.client.integration.deck;
  2. import android.app.PendingIntent;
  3. import com.nextcloud.client.account.User;
  4. import com.nextcloud.java.util.Optional;
  5. import com.owncloud.android.lib.resources.notifications.models.Notification;
  6. import androidx.annotation.NonNull;
  7. /**
  8. * This API is for an integration with the <a href="https://github.com/stefan-niedermann/nextcloud-deck">Nextcloud
  9. * Deck</a> app for android.
  10. */
  11. public interface DeckApi {
  12. /**
  13. * Creates a PendingIntent that can be used in a NotificationBuilder to start the Deck app
  14. *
  15. * @param notification Notification object that should be processed
  16. * @param user The user that is affected by the notification
  17. * @return Optional with a PendingIntent or an empty Optional if the notification is not from the
  18. * <a href="https://apps.nextcloud.com/apps/deck">Deck server app</a>.
  19. */
  20. @NonNull
  21. Optional<PendingIntent> createForwardToDeckActionIntent(@NonNull final Notification notification, @NonNull final User user);
  22. }