public override void OnEnter() { #if USES_SHARING // Create composer WhatsAppShareComposer _composer = new WhatsAppShareComposer(); switch (shareOption) { case eShareOption.ShareText: _composer.Text = text.Value; break; case eShareOption.ShareScreenshot: _composer.AttachScreenShot(); break; case eShareOption.ShareImage: _composer.AttachImage((Texture2D)image.Value); break; case eShareOption.ShareImageAtPath: _composer.AttachImageAtPath(imagePath.Value); break; default: Log("[Sharing] Unhandled option."); break; } // Show share view NPBinding.Sharing.ShowView(_composer, FinishedSharing); #endif }
private void ShareScreenshotOnWhatsApp() { // Create composer WhatsAppShareComposer _composer = new WhatsAppShareComposer(); _composer.AttachScreenShot(); // Show share view NPBinding.Sharing.ShowView(_composer, FinishedSharing); }