-
Notifications
You must be signed in to change notification settings - Fork 2
E mail
levching edited this page Apr 14, 2020
·
6 revisions
You can allow users to sed pre-defined e-mails with device mail app using the UM_EmailDialogBuilder. See the example below.
For this example, we will generate a sample image using SA_IconManager. However, you can use any image or images you like. The only limitation, this image has to be readable.
using SA.Foundation.Utility;
using SA.CrossPlatform.Social;
...
var client = UM_SocialService.SharingClient;
var dialog = new UM_EmailDialogBuilder();
dialog.SetSubject("Subject");
dialog.SetText("Hello World!");
dialog.SetUrl("https://stansassets.com/");
//Juts generating smaple red tuxture with 32x32 resolution
Texture2D sampleRedTexture = SA_IconManager.GetIcon(Color.red, 32, 32);
dialog.AddImage(sampleRedTexture);
dialog.AddRecipient("[email protected]");
client.ShowSendMailDialog(dialog, (result) => {
if (result.IsSucceeded) {
Debug.Log("Sharing started ");
} else {
Debug.Log("Failed to share: " + result.Error.FullMessage);
}
});Reliable and high-quality Unity Development service. Let's Talk!
Website | AssetStore | LinkedIn | Youtube | Scripting Reference
- Application
- Dark Mode
- Native Dialogs
- Native Preloader
- Date Picker Dialog
- Time Picker Dialog
- Rate Us Dialog
- Build Info
- Locale
- Permissions
- Wheel Picker Dialog
- Getting Started
- Connecting to The Service
- Purchase flow
- Transactions Validation
- Test Inside the Editor
- Advanced use cases
- Getting Started
- Enabling the Ads Service
- Banner Ads
- Non-rewarded Ads
- Rewarded Ads
- Unity Ads
- Google AdMob
- Chartboost
- Getting Started
- Analytics API
- Automatic Tracking
- Unity Analytics
- Firebase Analytics
- Facebook Analytics