- java.lang.Object
-
- com.gluonhq.attach.share.impl.IOSShareService
-
- All Implemented Interfaces:
ShareService
public class IOSShareService extends java.lang.Object implements ShareService
-
-
Constructor Summary
Constructors Constructor Description IOSShareService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
share(java.lang.String contentText)
Allows sharing a message, selecting from the suitable apps available in the user device.void
share(java.lang.String type, java.io.File file)
Allows sharing a file, selecting from the suitable apps available in the user device.void
share(java.lang.String subject, java.lang.String contentText)
Allows sharing a message, selecting from the suitable apps available in the user device.void
share(java.lang.String subject, java.lang.String contentText, java.lang.String type, java.io.File file)
Allows sharing a file, selecting from the suitable apps available in the user device.
-
-
-
Method Detail
-
share
public void share(java.lang.String contentText)
Description copied from interface:ShareService
Allows sharing a message, selecting from the suitable apps available in the user device.- Specified by:
share
in interfaceShareService
- Parameters:
contentText
- A string with the content to be shared
-
share
public void share(java.lang.String subject, java.lang.String contentText)
Description copied from interface:ShareService
Allows sharing a message, selecting from the suitable apps available in the user device. Intended to add a subject to the message, for instance, when it is shared with an email application.- Specified by:
share
in interfaceShareService
- Parameters:
subject
- A string with the subject of the messagecontentText
- A string with the content to be shared
-
share
public void share(java.lang.String type, java.io.File file)
Description copied from interface:ShareService
Allows sharing a file, selecting from the suitable apps available in the user device. Note: On Android, the file has to be located in a public folder (see StorageService#getPublicStorage), or sharing it won't be allowed.- Specified by:
share
in interfaceShareService
- Parameters:
type
- On Android only, the MIME type of the file. It can be '∗/∗', but not empty. On iOS it can be null. Usual types are:- application/xml
- application/zip
- application/pdf
- text/css
- text/html
- text/csv
- text/plain
- image/png
- image/jpeg
- image/gif
- image/*
file
- A valid file to be shared.
-
share
public void share(java.lang.String subject, java.lang.String contentText, java.lang.String type, java.io.File file)
Description copied from interface:ShareService
Allows sharing a file, selecting from the suitable apps available in the user device. A message will be also added. Note: On Android, the file has to be located in a public folder (see StorageService#getPublicStorage), or sharing it won't be allowed.- Specified by:
share
in interfaceShareService
- Parameters:
subject
- A string with the subject of the messagecontentText
- A string with the content to be sharedtype
- On Android only, the MIME type of the file. It can be '∗/∗', but not empty. On iOS it can be null. Usual types are:- application/xml
- application/zip
- application/pdf
- text/css
- text/html
- text/csv
- text/plain
- image/png
- image/jpeg
- image/gif
- image/*
file
- A valid file to be shared.
-
-