Social Sharing

Sharing is Caring

In most apps, especially on mobile platforms, you typically want to provide the user with the ability to share their recordings. For this, we provide our open-source NatShare API for mobile cross-platform social sharing:

Sharing Recordings

NatShare allows for sharing media at a specific URL. As a result, we can use the recording path from NatCorder to present a share sheet to the user.

// Finish recording
var path = await recorder.FinishWriting();
// And present the share sheet
var payload = new SharePayload();
payload.AddMedia(path);
payload.Commit();

NatShare allows for sharing multiple media items at once. This can enhance the user experience.

// Finish recording
var path = await recorder.FinishWriting();
// Share!
new SharePayload().AddText("I won!!!").AddMedia(path).Commit();

Saving to the Camera Roll

NatShare also allows for saving media items to the camera roll.

// Finish recording
var path = await recorder.FinishWriting();
// Save the recording to the camera roll
// We can save it to a specific album in the camera roll
var payload = new SavePayload("My Awesome App"); // album name here
payload.AddMedia(path);
payload.Commit();

Last updated