Cross Platform Native Plugins
A true cross platform tool for Unity which provides unique and unified way to access native functionality on mobile platforms.
Public Member Functions | Properties | List of all members
MessageShareComposer Class Reference

Provides an interface to compose and send text messages. More...

Public Member Functions

 MessageShareComposer ()
 Initializes a new instance of the MessageShareComposer class. More...
 

Properties

string Body [get, set]
 The initial content of the message. More...
 
string[] ToRecipients [get, set]
 An array of strings containing the initial recipients of the message. More...
 
- Properties inherited from IShareView
bool IsReadyToShowView [get]
 A bool value that indicates whether this instance is ready to present composer view. (read-only) More...
 

Detailed Description

Provides an interface to compose and send text messages.

The following code example shows how to compose text message.

using System.Collections;
public class ExampleClass : MonoBehaviour
{
public void ShareViaMessage ()
{
if (NPBinding.Sharing.IsMessagingServiceAvailable())
{
// Create new instance and populate fields
_composer.Body = "This is a test message.";
// Show composer
NPBinding.Sharing.ShowView(_composer, OnFinishedSharing);
}
else
{
// Device doesn't support sending messages
}
}
private void OnFinishedSharing (eShareResult _result)
{
// Insert your code
}
}

Constructor & Destructor Documentation

Initializes a new instance of the MessageShareComposer class.

Property Documentation

string Body
getset

The initial content of the message.

string [] ToRecipients
getset

An array of strings containing the initial recipients of the message.