levching edited this page Apr 14, 2020
·
5 revisions
Sharing approach is the no different from sharing to another social media with Ultimate Mobile.
using SA.Foundation.Utility;
using SA.CrossPlatform.Social;
...
var client = UM_SocialService.SharingClient;
var builder = new UM_ShareDialogBuilder();
//Juts generating smaple red tuxture with 32x32 resolution
Texture2D sampleRedTexture = SA_IconManager.GetIcon(Color.red, 32, 32);
builder.AddImage(sampleRedTexture);
client.ShareToInstagram(builder, (result) => {
if(result.IsSucceeded) {
Debug.Log("Sharing started ");
} else {
Debug.Log("Failed to share: " + result.Error.FullMessage);
}
});
Please note, that you can use native sharing only if the application you want to share with is installed on a user device. There is no cross-platform API for detecting if the application is installed on the device since approaches of iOS and Android are very different. But both platforms provide the way to detect if the application is installed, check out the per-platform guides:
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