Sample Social Sharing

Stable Version 1.0.0 (OutSystems 11)
Published on 20 Feb by 
Created on 20 Feb
Details
Since version 5.1.0 (for iOS and Android) it's recommended to use shareWithOptions as it's the most feature rich way to share stuff cross-platform. It will also tell you if sharing to an app completed and which app that was.
Read More

Description

  • Works on Android, version 2.3.3 and higher till 6.0 (For Version 7 and 8 still in progress)
  • Works on iOS6 and up.
  • Works on Windows Phone 8 since v4.0 of this plugin.
  • Share text, a link, images (or other files like pdf). A Subject is also supported when the receiving app supports it.


Supported platforms

  • Android
  • iOS
  • WP8

Highlights

  • isAvailable : isAvailable(callback)
  • SocialSharing : It accepts an options object and callbacks. socialsharing(options, callback)
  • Options :
    • message - String // Not supported on some apps (Facebook, Instagram)
    • subject – String // For Email
    • files – [] // An array of filenames either locally or remotely (Dynamic And Customize)
    • url - String
    • chooserTitle - String // Android only, you can override the default share sheet title.
    • appPackageName - String // Android only, you can provide id of the App you want to share with
  • Callback : Return button index clicked.


Usage on iOS and Android

You can share text, a subject (in case the user selects the email application), (any type and location of) file (like an image), and a link. However, what exactly gets shared, depends on the application the user chooses to complete the action. A few examples:

  • Mail: message, subject, file.
  • Twitter: message, image (other filetypes are not supported), link (which is automatically shortened if the Twitter client deems it necessary).
  • Google+ / Hangouts (Android only): message, subject, link
  • facebook
  • Instagram
  • Whatsapp
  • SMS

If Facebook, Twitter, Instagram, WhatsApp, SMS or Email is not available, the errorCallback is called with the text 'not available'.

You can still use the older SHARE method as well

  • Twitter
  • Facebook
  • Instagram
  • Whatsapp
  • Mail
  • SMS


NOTE:

For Whatsapp

  • On iOS when sharing an image and text, only the image is shared.
  • On Android you can only send a 'text' and 'url' directly to someone, so files are ignored.

For SMS

  • On Android, SMS via Hangouts may not behave correctly.

For Twitter

  • A lot of apps support sharing multiple files, but Twitter just doesn't accept more that one file.


 Suggestions are most welcome !!

Reviews (0)
Category
Applications, Samples & How-tos
Support Options
This component is not supported by OutSystems. You may use the discussion forums to leave suggestions or obtain best-effort support from the community, including from Viraj Kataria who created this component.
Dependencies
See all 3 dependencies
Requirements
Platform
11.0.0.200
Database
All
Stack
.NET
Component Consumers
No consumers yet.
Weekly Downloads 
Related Components
OutSystems Now
OutSystems R&D
OutSystems Now brings your OutSystems experience to any device.
9235
OutSystems UI Mobile
OutSystems R&D
Create amazing native mobile applications using this fully integrated UI framework for OutSystems, with dozens of UI patterns ready to use.
10078
Infosistema DMM
Infosistema Solutions
Infosistema Data Migration Manager (DMM) - With DMM you reduce costs by saving hundreds of hours building custom scripts, increase quality and allow unprecedented flexibility in managing your data. DMM enables data migration across OutSystems environments or servers (v9 or v10) using a simple user interface without the need of building custom scripts. It also supports features like data anonymization and data scramble, essential to comply with GDPR.
348
More from Viraj Kataria
Rapid Strings
assif_tiger
Customize & JS Strings Manipulation Function Other then Outsystems for Easy to implement and makes coding more lowcode
7
Android iOS Shared User Preferences
assif_tiger
An interface to the user’s defaults database, where you store key-value pairs persistently across launches of your app. - Supports both Android [ Shared Preferences ] & iOS [ User Preferences ]
24
iRoot - Android iOS Jailbreak/Root Detection
assif_tiger
Cordova Jailbreak/Root Detection 
6