The MessageComposer class provides a standard interface for composing and sending SMS or MMS messages.
More...
|
void | SetRecipients (params string[] values) |
| Sets the initial recipients of the message..
|
|
void | SetSubject (string value) |
| Sets the initial subject of the message.
|
|
void | SetBody (string value) |
| Sets the initial content of the message.
|
|
void | AddScreenshot (string fileName) |
| Captures a screenshot and adds it as an attachment of the message.
|
|
void | AddImage (Texture2D image, string fileName, TextureEncodingFormat textureEncodingFormat=TextureEncodingFormat.JPG) |
| Adds specified image as an attachment of the message.
|
|
void | AddAttachment (byte[] data, string mimeType, string fileName) |
| Adds the specified data as an attachment of the message.
|
|
void | SetCompletionCallback (EventCallback< MessageComposerResult > callback) |
| Specify the action to execute after the composer is dismissed.
|
|
void | Show () |
| Shows the message composer interface with values initially set.
|
|
|
static MessageComposer | CreateInstance () |
| Initializes a new instance of the MessageComposer class.
|
|
static bool | CanSendText () |
| Returns a Boolean value indicating whether the current device is capable of sending text messages.
|
|
static bool | CanSendAttachments () |
| Returns a Boolean value indicating whether or not messages can include attachments.
|
|
static bool | CanSendSubject () |
| Returns a Boolean value indicating whether or not messages can include subject lines.
|
|
Before presenting the interface, populate the fields with the set of initial recipients and the message you want to send. After presenting the interface, the user can edit your initial values before sending the message.
The following code example shows how to compose text message.
using UnityEngine;
using System.Collections;
public class ExampleClass : MonoBehaviour
{
public void Start()
{
{
newComposer.
SetBody(
"Lorem ipsum dolor sit amet");
}
else
{
}
}
{
}
}
The MessageComposer class provides a standard interface for composing and sending SMS or MMS messages...
Definition MessageComposer.cs:54
static MessageComposer CreateInstance()
Initializes a new instance of the MessageComposer class.
Definition MessageComposer.cs:68
static bool CanSendText()
Returns a Boolean value indicating whether the current device is capable of sending text messages.
Definition MessageComposer.cs:81
void SetCompletionCallback(EventCallback< MessageComposerResult > callback)
Specify the action to execute after the composer is dismissed.
Definition MessageComposer.cs:314
void Show()
Shows the message composer interface with values initially set.
Definition MessageComposer.cs:326
void SetBody(string value)
Sets the initial content of the message.
Definition MessageComposer.cs:223
This class contains the result of the user action which caused MessageComposer interface to dismiss.
Definition MessageComposerResult.cs:12
Namespace for essential kit features. You need to import this namespace along with VoxelBusters....
Definition AddressBook.cs:8
◆ CanSendText()
static bool CanSendText |
( |
| ) |
|
|
static |
- Returns
true
, if the device can send text messages, false
otherwise.
◆ CanSendAttachments()
static bool CanSendAttachments |
( |
| ) |
|
|
static |
◆ CanSendSubject()
static bool CanSendSubject |
( |
| ) |
|
|
static |
◆ SetRecipients()
void SetRecipients |
( |
params string[] | values | ) |
|
- Parameters
-
values | An array of string values containing the initial recipients of the message. |
◆ SetSubject()
void SetSubject |
( |
string | value | ) |
|
- Parameters
-
value | The initial subject for a message. |
◆ SetBody()
void SetBody |
( |
string | value | ) |
|
- Parameters
-
value | The initial content in the body of a message. |
◆ AddScreenshot()
void AddScreenshot |
( |
string | fileName | ) |
|
- Parameters
-
fileName | The preferred filename to associate with the image. |
◆ AddImage()
void AddImage |
( |
Texture2D | image, |
|
|
string | fileName, |
|
|
TextureEncodingFormat | textureEncodingFormat = TextureEncodingFormat::JPG ) |
- Parameters
-
image | The image that has to be added as an attachment. |
fileName | The preferred filename to associate with the image. |
textureEncodingFormat | Texture encoding format. |
◆ AddAttachment()
void AddAttachment |
( |
byte[] | data, |
|
|
string | mimeType, |
|
|
string | fileName ) |
- Parameters
-
data | The data of the file that has to be added as an attachment. |
mimeType | The MIME type of the specified data. |
fileName | The filename of the specified data. |
◆ SetCompletionCallback()
- Parameters
-
callback | The action to be called on completion. |