# Class EmailShare

java.lang.Object
com.codename1.ui.Command
com.codename1.share.ShareService
com.codename1.share.EmailShare

All Implemented Interfaces:
  `ActionListener<ActionEvent>`

public class EmailShare extends ShareService
Email sharing service.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `EmailShare()`
  Default Constructor

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `canShareImage()`
  The implementing service needs to declare if it is capable to share an image
  `Image`
  `getIcon()`
  Returns the icon representing the command
  `void`
  `share(String toShare)`
  This is the sharing method which should be implemented by the service.
  `void`
  `share(String toShare, String image, String mimeType)`
  This is the image sharing method which should be implemented by the service, if the service returned true on the canShareImage() method Notice not all services are able to share text and image together, in this case the image sharing will be preferred by these services

  ### Methods inherited from class ShareService

  `actionPerformed, deliverResult, finish, getOriginal, getShareResultListener, setImage, setMessage, setOriginalForm, setShareResultListener`

  ### Methods inherited from class Command

  `create, createMaterial, equals, getClientProperty, getCommandName, getDisabledIcon, getIconFont, getIconGapMM, getId, getMaterialIcon, getMaterialIconSize, getPressedIcon, getRolloverIcon, hashCode, isDisposesDialog, isEnabled, putClientProperty, setCommandName, setDisabledIcon, setDisposesDialog, setEnabled, setIcon, setIconFont, setIconGapMM, setMaterialIcon, setMaterialIconSize, setPressedIcon, setRolloverIcon, toString`

  ### Methods inherited from class Object

  `clone, getClass, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### EmailShare

    public EmailShare()
    Default Constructor

- ## Method Details

  - ### getIcon

    public Image getIcon()
    Description copied from class: `Command`

    Returns the icon representing the command

    ###### Returns

    an icon representing the command

    Overrides:
      `getIcon` in class `Command`

  - ### share

    public void share(String toShare, String image, String mimeType)

    This is the image sharing method which should be implemented by the service, if the service returned true on the canShareImage() method Notice not all services are able to share text and image together, in this case the image sharing will be preferred by these services

    ###### Parameters

    - `text`: text to share

    - `image`: image to share

    Overrides:
      `share` in class `ShareService`

  - ### share

    public void share(String toShare)

    This is the sharing method which should be implemented by the service.

    ###### Parameters

    - `text`: text to share
    Specified by:
      `share` in class `ShareService`

  - ### canShareImage

    public boolean canShareImage()

    The implementing service needs to declare if it is capable to share an image

    ###### Returns

    true if the service can share images

    Specified by:
      `canShareImage` in class `ShareService`