Essential Kit Tutorials
DocumentationDownload
Latest(v3)
Latest(v3)
  • Introduction
  • Features Overview
  • Whats new in v3
    • Version 3 vs Version 2
    • Release Notes
    • Upgrade from V2
  • Plugin Overview
    • Settings
    • Folder Structure
    • Installation FAQ
    • Upgrade Guide
  • Features
    • 📒Address Book
      • Setup
      • Usage
      • Testing
      • FAQ
    • App Shortcuts
      • Setup
      • Usage
    • 🆕App Updater
      • Setup
      • Usage
    • 💲Billing Services
      • Setup
        • iOS
        • Android
      • Usage
      • Testing
        • iOS
        • Android
      • FAQ
    • ☁️Cloud Services
      • Setup
        • iOS
        • Android
      • Usage
      • Testing
      • FAQ
    • 🔗Deep Link Services
      • Setup
        • iOS
        • Android
      • Usage
      • Testing
      • FAQ
    • 🛠️Utilities (Extras)
      • Usage
    • 💯Game Services
      • Setup
        • iOS
        • Android
      • Usage
      • FAQ
    • 📸Media Services
      • Setup
      • Usage
      • FAQ
    • 📆Native UI
      • Setup
      • Usage
      • FAQ
      • Examples
        • Login Dialog
    • Network Services
      • Setup
      • Usage
      • FAQ
    • ⏰Notification Services
      • Setup
        • iOS
        • Android
      • Usage
      • Examples
        • Nudge to come-back to the game
      • FAQ
    • ⭐Rate My App
      • Setup
      • Usage
      • FAQ
    • 🤝Sharing
      • Setup
      • Usage
        • Message Composer
        • Mail Composer
        • Social Share Composer
        • Share Sheet
      • FAQ
      • Examples
        • Add Attachment Example
    • Task Services
      • Setup
      • Usage
    • 🌏Web View
      • Setup
      • Usage
      • FAQ
      • Examples
        • Loading Pdf File
  • Notes
    • Resolving Android Gradle Build Errors
    • Google Play Services Authentication
    • Target API Level vs Min API Level
    • Handling Refunds for In-App Purchases (Billing Services)
Powered by GitBook
On this page
  • Share a screenshot
  • Share a text message
  • Share an image

Was this helpful?

Edit on GitHub
  1. Features
  2. Sharing
  3. Usage

Message Composer

Once after importing the name space, you can share a message with MessageComposer class.

You can set the following to the MessageComposer.

  • Recipients

  • Subject

  • Body

  • Screenshot/Image

  • Attachment (any file)

Before accessing any of the MessageComposer features you need to check if it's allowed to share messages through messaging apps on the user's device.

bool canSendText = MessageComposer.CanSendText();
bool canSendAttachments = MessageComposer.CanSendAttachments();
bool canSendSubject = MessageComposer.CanSendSubject();

Once you get the results from above methods, you need to add content to the message composer based on the above status.

Share a screenshot

MessageComposer composer = MessageComposer.CreateInstance();
composer.SetRecipients(new string[2]{"abc@gmail.com", 9138393x03});
composer.SetSubject("Subject");
composer.SetBody("Body");
composer.AddScreenshot("screenshot file name");
composer.SetCompletionCallback((result, error) => {
    Debug.Log("Message composer was closed. Result code: " + result.ResultCode);
});
composer.Show();

Share a text message

MessageComposer composer = MessageComposer.CreateInstance();
composer.SetRecipients(new string[2]{"abc@gmail.com", 9138393x03});
composer.SetSubject("Subject");
composer.SetBody("Body");
composer.SetCompletionCallback((result, error) => {
    Debug.Log("Message composer was closed. Result code: " + result.ResultCode);
});
composer.Show();

Share an image

MessageComposer composer = MessageComposer.CreateInstance();
composer.SetRecipients(new string[2]{"abc@gmail.com", 9138393x03});
composer.AddImage(image, "name");
composer.SetCompletionCallback((result, error) => {
    Debug.Log("Message composer was closed. Result code: " + result.ResultCode);
});
composer.Show();
PreviousUsageNextMail Composer

Last updated 5 months ago

Was this helpful?

🤝