public abstract class

AttachmentAction

extends Object
java.lang.Object
   ↳ com.sap.cloud.mobile.fiori.attachment.AttachmentAction
Known Direct Subclasses
Known Indirect Subclasses

Class Overview

An abstract class representing action to choose different types of attachments.

Structure

  • Title
  • A String representing the name of the attachment action. This string is used, while generating the attachment action dialogue. See setTitle(String).

  • AttachmentFormCell
  • An attachment formcell to which the AttachmentAction object belongs to.

Summary

Constants
String ATTACH_ACTION_PERMISSIONS_REQ
String ATTACH_ACTION_PERMISSIONS_RESULT
Fields
protected boolean isSelectMultiple
protected AttachmentFormCell mAttachmentFormCell The attachment-form cell this action belongs to.
Public Constructors
AttachmentAction(String title, AttachmentFormCell attachmentFormCell)
Public Methods
DialogInterface.OnDismissListener getDismissListener()
Get the action to be performed on dismissing the options
Drawable getIcon()
abstract Intent getSelectingIntent()
Get the intent to be used to perform the selection of the attachment items.
String getTitle()
Get the title of the action
boolean isAvailable()
Is this attachment action available for end user.
boolean isSelectMultiple()
Does this action provide multi select feature
abstract String[] requiredPermissions()
Get all the permission required to perform this attachment action
void setSelectMultiple(boolean selectMultiple)
Set the multiple select feature on this action
void setTitle(String title)
Set the title of the action
Protected Methods
List<Uri> getAttachmentUris(Intent intent)
User provided mechanism to get the uri's from the intent.
List<IntentFilter> getIntentFilter()
Create the intent filters to be used to filter the broadcasts data received as response of this action
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final String ATTACH_ACTION_PERMISSIONS_REQ

Constant Value: "ATTACH_ACTION_PERMISSIONS_REQ"

public static final String ATTACH_ACTION_PERMISSIONS_RESULT

Constant Value: "ATTACH_ACTION_PERMISSIONS_RESULT"

Fields

protected boolean isSelectMultiple

protected AttachmentFormCell mAttachmentFormCell

The attachment-form cell this action belongs to.

Public Constructors

public AttachmentAction (String title, AttachmentFormCell attachmentFormCell)

Public Methods

public DialogInterface.OnDismissListener getDismissListener ()

Get the action to be performed on dismissing the options

Returns
  • DialogInterface.OnDismissListener

public Drawable getIcon ()

public abstract Intent getSelectingIntent ()

Get the intent to be used to perform the selection of the attachment items.

public String getTitle ()

Get the title of the action

Returns
  • String

public boolean isAvailable ()

Is this attachment action available for end user.

Returns
  • boolean true, when the action is available, false: action is not available and user will not be able to trigger this option

public boolean isSelectMultiple ()

Does this action provide multi select feature

Returns
  • boolean

public abstract String[] requiredPermissions ()

Get all the permission required to perform this attachment action

public void setSelectMultiple (boolean selectMultiple)

Set the multiple select feature on this action

Parameters
selectMultiple boolean

public void setTitle (String title)

Set the title of the action

Parameters
title String

Protected Methods

protected List<Uri> getAttachmentUris (Intent intent)

User provided mechanism to get the uri's from the intent.

In some cases uris are stored as key-value pairs in bundles within the Intent. User can override this method to read data from bundle and provide the uris.

See: AttachmentActionTakePicture

Parameters
intent Intent
Returns
  • List of uris

protected List<IntentFilter> getIntentFilter ()

Create the intent filters to be used to filter the broadcasts data received as response of this action