├── .editorconfig ├── .gitattributes ├── .gitignore ├── .vs └── config │ └── applicationhost.config ├── Art ├── chrome.gif └── safari.gif ├── Common ├── SharePlugin │ ├── component │ │ ├── Details.md │ │ ├── GettingStarted.md │ │ ├── License.md │ │ ├── SharePlugin-3.0.1.xam │ │ ├── SharePlugin_128x128.png │ │ ├── SharePlugin_512x512.png │ │ └── component.yaml │ └── samples │ │ ├── .vs │ │ └── config │ │ │ └── applicationhost.config │ │ ├── ShareSample.sln │ │ └── ShareSample │ │ ├── ShareSample.Droid │ │ ├── Assets │ │ │ └── AboutAssets.txt │ │ ├── MainActivity.cs │ │ ├── Properties │ │ │ ├── AndroidManifest.xml │ │ │ └── AssemblyInfo.cs │ │ ├── Resources │ │ │ ├── AboutResources.txt │ │ │ ├── Resource.Designer.cs │ │ │ ├── drawable-hdpi │ │ │ │ └── icon.png │ │ │ ├── drawable-xhdpi │ │ │ │ └── icon.png │ │ │ ├── drawable-xxhdpi │ │ │ │ └── icon.png │ │ │ └── drawable │ │ │ │ └── icon.png │ │ ├── ShareSample.Droid.csproj │ │ └── packages.config │ │ ├── ShareSample.WinPhone │ │ ├── App.xaml │ │ ├── App.xaml.cs │ │ ├── Assets │ │ │ ├── Logo.scale-240.png │ │ │ ├── SmallLogo.scale-240.png │ │ │ ├── SplashScreen.scale-240.png │ │ │ ├── Square71x71Logo.scale-240.png │ │ │ ├── StoreLogo.scale-240.png │ │ │ └── WideLogo.scale-240.png │ │ ├── MainPage.xaml │ │ ├── MainPage.xaml.cs │ │ ├── Package.appxmanifest │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ ├── ShareSample.WinPhone.csproj │ │ └── packages.config │ │ ├── ShareSample.iOS │ │ ├── AppDelegate.cs │ │ ├── Entitlements.plist │ │ ├── Info.plist │ │ ├── Main.cs │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ ├── Resources │ │ │ ├── Default-568h@2x.png │ │ │ ├── Default-Portrait.png │ │ │ ├── Default-Portrait@2x.png │ │ │ ├── Default.png │ │ │ ├── Default@2x.png │ │ │ ├── Icon-60@2x.png │ │ │ ├── Icon-60@3x.png │ │ │ ├── Icon-76.png │ │ │ ├── Icon-76@2x.png │ │ │ ├── Icon-Small-40.png │ │ │ ├── Icon-Small-40@2x.png │ │ │ ├── Icon-Small-40@3x.png │ │ │ ├── Icon-Small.png │ │ │ ├── Icon-Small@2x.png │ │ │ ├── Icon-Small@3x.png │ │ │ └── LaunchScreen.storyboard │ │ ├── ShareSample.iOS.csproj │ │ ├── iTunesArtwork │ │ ├── iTunesArtwork@2x │ │ └── packages.config │ │ └── ShareSample │ │ ├── App.cs │ │ ├── GettingStarted.Xamarin │ │ ├── Properties │ │ └── AssemblyInfo.cs │ │ ├── ShareSample.csproj │ │ └── packages.config ├── plugin_share.png ├── plugin_share_512.png └── xamarin-component.exe ├── LICENSE.md ├── README.md ├── Share.Plugin.nuspec ├── Share.sln ├── Share.userprefs ├── Share ├── Share.Plugin.Abstractions │ ├── BrowserOptions.cs │ ├── IShare.cs │ ├── Share.Plugin.Abstractions.csproj │ ├── ShareAppControlType.cs │ ├── ShareColor.cs │ ├── ShareMessage.cs │ ├── ShareOptions.cs │ ├── ShareRectangle.cs │ └── ShareUIActivityType.cs ├── Share.Plugin.Android │ ├── MainApplication.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── Resources │ │ ├── AboutResources.txt │ │ └── Resource.Designer.cs │ ├── Share.Plugin.Android.csproj │ ├── Share.Plugin.Android.csproj.bak │ ├── ShareColorExtensions.cs │ ├── ShareImplementation.cs │ └── packages.config ├── Share.Plugin.Tizen │ ├── Share.Plugin.Tizen.csproj │ └── ShareImplementation.cs ├── Share.Plugin.UWP │ ├── Properties │ │ ├── AssemblyInfo.cs │ │ └── Plugin.Share.rd.xml │ ├── Share.Plugin.UWP.csproj │ ├── ShareImplementation.cs │ ├── project.json │ └── project.lock.json ├── Share.Plugin.iOS │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── Share.Plugin.iOS.csproj │ ├── ShareActivityItemSource.cs │ ├── ShareColorExtensions.cs │ └── ShareImplementation.cs └── Share.Plugin │ ├── CrossShare.cs │ └── Share.Plugin.csproj ├── ShareAll.sln ├── ShareTest ├── ShareTest.Droid │ ├── Assets │ │ └── AboutAssets.txt │ ├── MainActivity.cs │ ├── MainApplication.cs │ ├── Properties │ │ ├── AndroidManifest.xml │ │ └── AssemblyInfo.cs │ ├── Resources │ │ ├── AboutResources.txt │ │ ├── Resource.Designer.cs │ │ ├── drawable-hdpi │ │ │ └── icon.png │ │ ├── drawable-xhdpi │ │ │ └── icon.png │ │ ├── drawable-xxhdpi │ │ │ └── icon.png │ │ └── drawable │ │ │ └── icon.png │ ├── ShareTest.Droid.csproj │ └── packages.config ├── ShareTest.Tizen │ ├── ShareTest.Tizen.cs │ ├── ShareTest.Tizen.csproj │ ├── shared │ │ └── res │ │ │ └── ShareTest.Tizen.png │ └── tizen-manifest.xml ├── ShareTest.UWP │ ├── App.xaml │ ├── App.xaml.cs │ ├── Assets │ │ ├── LockScreenLogo.scale-200.png │ │ ├── SplashScreen.scale-200.png │ │ ├── Square150x150Logo.scale-200.png │ │ ├── Square44x44Logo.scale-200.png │ │ ├── Square44x44Logo.targetsize-24_altform-unplated.png │ │ ├── StoreLogo.png │ │ └── Wide310x150Logo.scale-200.png │ ├── MainPage.xaml │ ├── MainPage.xaml.cs │ ├── Package.appxmanifest │ ├── Properties │ │ ├── AssemblyInfo.cs │ │ └── Default.rd.xml │ ├── ShareTest.UWP.csproj │ ├── ShareTest.UWP.nuget.props │ ├── ShareTest.UWP.nuget.targets │ ├── project.json │ └── project.lock.json ├── ShareTest.iOS │ ├── AppDelegate.cs │ ├── Entitlements.plist │ ├── Info.plist │ ├── Main.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── Resources │ │ ├── Default-568h@2x.png │ │ ├── Default-Portrait.png │ │ ├── Default-Portrait@2x.png │ │ ├── Default.png │ │ ├── Default@2x.png │ │ ├── Icon-60@2x.png │ │ ├── Icon-60@3x.png │ │ ├── Icon-76.png │ │ ├── Icon-76@2x.png │ │ ├── Icon-Small-40.png │ │ ├── Icon-Small-40@2x.png │ │ ├── Icon-Small-40@3x.png │ │ ├── Icon-Small.png │ │ ├── Icon-Small@2x.png │ │ ├── Icon-Small@3x.png │ │ └── LaunchScreen.storyboard │ ├── ShareTest.iOS.csproj │ ├── iTunesArtwork │ ├── iTunesArtwork@2x │ └── packages.config └── ShareTest │ ├── App.cs │ ├── GettingStarted.Xamarin │ ├── Page1.xaml │ ├── Page1.xaml.cs │ ├── Properties │ └── AssemblyInfo.cs │ ├── ShareTest.csproj │ ├── VisualElementExtensions.cs │ └── packages.config ├── appveyor.yml ├── build.cake ├── build.ps1 ├── build.sh ├── cake.packages.config ├── docs ├── Architecture.md ├── Clipboard.md ├── GettingStarted.md ├── OpenBrowser.md ├── README.md └── ShareMessageAndLinks.md └── install-android-sdk.ps1 /.editorconfig: -------------------------------------------------------------------------------- 1 | # Suppress: EC112 2 | # top-most EditorConfig file 3 | root = true 4 | 5 | # Don't use tabs for indentation. 6 | [*] 7 | indent_style = tab 8 | # (Please don't specify an indent_size here; that has too many unintended consequences.) 9 | 10 | # Code files 11 | [*.{cs,csx,vb,vbx}] 12 | indent_size = 4 13 | 14 | # Xml project files 15 | [*.{csproj,vbproj,vcxproj,vcxproj.filters,proj,projitems,shproj}] 16 | indent_size = 2 17 | 18 | # Xml config files 19 | [*.{props,targets,ruleset,config,nuspec,resx,vsixmanifest,vsct}] 20 | indent_size = 2 21 | 22 | # JSON files 23 | [*.json] 24 | indent_size = 2 25 | 26 | # Dotnet code style settings: 27 | [*.{cs,vb}] 28 | # Sort using and Import directives with System.* appearing first 29 | dotnet_sort_system_directives_first = false 30 | # Avoid "this." and "Me." if not necessary 31 | dotnet_style_qualification_for_field = false:suggestion 32 | dotnet_style_qualification_for_property = false:suggestion 33 | dotnet_style_qualification_for_method = false:suggestion 34 | dotnet_style_qualification_for_event = false:suggestion 35 | 36 | # Use language keywords instead of framework type names for type references 37 | dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion 38 | dotnet_style_predefined_type_for_member_access = true:suggestion 39 | 40 | # Suggest more modern language features when available 41 | dotnet_style_object_initializer = true:suggestion 42 | dotnet_style_collection_initializer = true:suggestion 43 | dotnet_style_coalesce_expression = true:suggestion 44 | dotnet_style_null_propagation = true:suggestion 45 | dotnet_style_explicit_tuple_names = true:suggestion 46 | 47 | # Naming Conventions: 48 | # Pascal Casing 49 | dotnet_naming_symbols.method_and_property_symbols.applicable_kinds= method,property,enum 50 | dotnet_naming_symbols.method_and_property_symbols.applicable_accessibilities = * 51 | dotnet_naming_style.pascal_case_style.capitalization = pascal_case 52 | 53 | dotnet_naming_rule.methods_and_properties_must_be_pascal_case.severity = warning 54 | dotnet_naming_rule.methods_and_properties_must_be_pascal_case.symbols = method_and_property_symbols 55 | dotnet_naming_rule.methods_and_properties_must_be_pascal_case.style = pascal_case_style 56 | 57 | # Non-public members must be lower-case 58 | dotnet_naming_symbols.non_public_symbols.applicable_kinds = property,method,field,event,delegate 59 | dotnet_naming_symbols.non_public_symbols.applicable_accessibilities = private 60 | dotnet_naming_style.all_lower_case_style.capitalization = camel_case 61 | 62 | dotnet_naming_rule.non_public_members_must_be_lower_case.severity = warning 63 | dotnet_naming_rule.non_public_members_must_be_lower_case.symbols = non_public_symbols 64 | dotnet_naming_rule.non_public_members_must_be_lower_case.style = all_lower_case_style 65 | 66 | # CSharp code style settings: 67 | [*.cs] 68 | # Do not prefer "var" everywhere 69 | csharp_style_var_for_built_in_types = true:suggestion 70 | csharp_style_var_when_type_is_apparent = true:suggestion 71 | csharp_style_var_elsewhere = true:suggestion 72 | 73 | # Prefer method-like constructs to have a block body 74 | csharp_style_expression_bodied_methods = true:suggestion 75 | csharp_style_expression_bodied_constructors = true:none 76 | csharp_style_expression_bodied_operators = true:none 77 | 78 | # Prefer property-like constructs to have an expression-body 79 | csharp_style_expression_bodied_properties = true:suggestion 80 | csharp_style_expression_bodied_indexers = true:none 81 | csharp_style_expression_bodied_accessors = true:none 82 | 83 | # Suggest more modern language features when available 84 | csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion 85 | csharp_style_pattern_matching_over_as_with_null_check = true:suggestion 86 | csharp_style_inlined_variable_declaration = true:suggestion 87 | csharp_style_throw_expression = true:suggestion 88 | csharp_style_conditional_delegate_call = true:suggestion 89 | 90 | # Newline settings 91 | csharp_new_line_before_open_brace = all 92 | csharp_new_line_before_else = true 93 | csharp_new_line_before_catch = true 94 | csharp_new_line_before_finally = true 95 | csharp_new_line_before_members_in_object_initializers = true 96 | csharp_new_line_before_members_in_anonymous_types = true 97 | 98 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Set default behavior to automatically normalize line endings. 3 | ############################################################################### 4 | * text=auto 5 | 6 | ############################################################################### 7 | # Set default behavior for command prompt diff. 8 | # 9 | # This is need for earlier builds of msysgit that does not have it on by 10 | # default for csharp files. 11 | # Note: This is only used by command line 12 | ############################################################################### 13 | #*.cs diff=csharp 14 | 15 | ############################################################################### 16 | # Set the merge driver for project and solution files 17 | # 18 | # Merging from the command prompt will add diff markers to the files if there 19 | # are conflicts (Merging from VS is not affected by the settings below, in VS 20 | # the diff markers are never inserted). Diff markers may cause the following 21 | # file extensions to fail to load in VS. An alternative would be to treat 22 | # these files as binary and thus will always conflict and require user 23 | # intervention with every merge. To do so, just uncomment the entries below 24 | ############################################################################### 25 | #*.sln merge=binary 26 | #*.csproj merge=binary 27 | #*.vbproj merge=binary 28 | #*.vcxproj merge=binary 29 | #*.vcproj merge=binary 30 | #*.dbproj merge=binary 31 | #*.fsproj merge=binary 32 | #*.lsproj merge=binary 33 | #*.wixproj merge=binary 34 | #*.modelproj merge=binary 35 | #*.sqlproj merge=binary 36 | #*.wwaproj merge=binary 37 | 38 | ############################################################################### 39 | # behavior for image files 40 | # 41 | # image files are treated as binary by default. 42 | ############################################################################### 43 | #*.jpg binary 44 | #*.png binary 45 | #*.gif binary 46 | 47 | ############################################################################### 48 | # diff behavior for common document formats 49 | # 50 | # Convert binary document formats to text before diffing them. This feature 51 | # is only available from the command line. Turn it on by uncommenting the 52 | # entries below. 53 | ############################################################################### 54 | #*.doc diff=astextplain 55 | #*.DOC diff=astextplain 56 | #*.docx diff=astextplain 57 | #*.DOCX diff=astextplain 58 | #*.dot diff=astextplain 59 | #*.DOT diff=astextplain 60 | #*.pdf diff=astextplain 61 | #*.PDF diff=astextplain 62 | #*.rtf diff=astextplain 63 | #*.RTF diff=astextplain 64 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | 4 | # User-specific files 5 | *.suo 6 | *.user 7 | *.sln.docstates 8 | 9 | # Build results 10 | [Dd]ebug/ 11 | [Dd]ebugPublic/ 12 | [Rr]elease/ 13 | [Rr]eleases/ 14 | x64/ 15 | x86/ 16 | build/ 17 | bld/ 18 | [Bb]in/ 19 | [Oo]bj/ 20 | 21 | # Roslyn cache directories 22 | *.ide/ 23 | 24 | .vs/ 25 | 26 | # MSTest test Results 27 | [Tt]est[Rr]esult*/ 28 | [Bb]uild[Ll]og.* 29 | 30 | #NUNIT 31 | *.VisualState.xml 32 | TestResult.xml 33 | 34 | # Build Results of an ATL Project 35 | [Dd]ebugPS/ 36 | [Rr]eleasePS/ 37 | dlldata.c 38 | .nuget/ 39 | 40 | *_i.c 41 | *_p.c 42 | *_i.h 43 | *.ilk 44 | *.meta 45 | *.obj 46 | *.pch 47 | *.pdb 48 | *.pgc 49 | *.pgd 50 | *.rsp 51 | *.sbr 52 | *.tlb 53 | *.tli 54 | *.tlh 55 | *.tmp 56 | *.tmp_proj 57 | *.log 58 | *.vspscc 59 | *.vssscc 60 | .builds 61 | *.pidb 62 | *.svclog 63 | *.scc 64 | 65 | # Chutzpah Test files 66 | _Chutzpah* 67 | 68 | # Visual C++ cache files 69 | ipch/ 70 | *.aps 71 | *.ncb 72 | *.opensdf 73 | *.sdf 74 | *.cachefile 75 | 76 | # Visual Studio profiler 77 | *.psess 78 | *.vsp 79 | *.vspx 80 | 81 | # TFS 2012 Local Workspace 82 | $tf/ 83 | 84 | # Guidance Automation Toolkit 85 | *.gpState 86 | 87 | # ReSharper is a .NET coding add-in 88 | _ReSharper*/ 89 | *.[Rr]e[Ss]harper 90 | *.DotSettings.user 91 | 92 | # JustCode is a .NET coding addin-in 93 | .JustCode 94 | 95 | # TeamCity is a build add-in 96 | _TeamCity* 97 | 98 | # DotCover is a Code Coverage Tool 99 | *.dotCover 100 | 101 | # NCrunch 102 | _NCrunch_* 103 | .*crunch*.local.xml 104 | 105 | # MightyMoose 106 | *.mm.* 107 | AutoTest.Net/ 108 | 109 | # Web workbench (sass) 110 | .sass-cache/ 111 | 112 | # Installshield output folder 113 | [Ee]xpress/ 114 | 115 | # DocProject is a documentation generator add-in 116 | DocProject/buildhelp/ 117 | DocProject/Help/*.HxT 118 | DocProject/Help/*.HxC 119 | DocProject/Help/*.hhc 120 | DocProject/Help/*.hhk 121 | DocProject/Help/*.hhp 122 | DocProject/Help/Html2 123 | DocProject/Help/html 124 | 125 | # Click-Once directory 126 | publish/ 127 | 128 | # Publish Web Output 129 | *.[Pp]ublish.xml 130 | *.azurePubxml 131 | # TODO: Comment the next line if you want to checkin your web deploy settings 132 | # but database connection strings (with potential passwords) will be unencrypted 133 | *.pubxml 134 | *.publishproj 135 | 136 | # NuGet Packages 137 | *.nupkg 138 | # The packages folder can be ignored because of Package Restore 139 | **/packages/* 140 | # except build/, which is used as an MSBuild target. 141 | !**/packages/build/ 142 | # If using the old MSBuild-Integrated Package Restore, uncomment this: 143 | #!**/packages/repositories.config 144 | 145 | # Windows Azure Build Output 146 | csx/ 147 | *.build.csdef 148 | 149 | # Windows Store app package directory 150 | AppPackages/ 151 | 152 | # Others 153 | sql/ 154 | *.Cache 155 | ClientBin/ 156 | [Ss]tyle[Cc]op.* 157 | ~$* 158 | *~ 159 | *.dbmdl 160 | *.dbproj.schemaview 161 | *.pfx 162 | *.publishsettings 163 | node_modules/ 164 | 165 | # RIA/Silverlight projects 166 | Generated_Code/ 167 | 168 | # Backup & report files from converting an old project file 169 | # to a newer Visual Studio version. Backup files are not needed, 170 | # because we have git ;-) 171 | _UpgradeReport_Files/ 172 | Backup*/ 173 | UpgradeLog*.XML 174 | UpgradeLog*.htm 175 | 176 | # SQL Server files 177 | *.mdf 178 | *.ldf 179 | 180 | # Business Intelligence projects 181 | *.rdl.data 182 | *.bim.layout 183 | *.bim_*.settings 184 | 185 | # Microsoft Fakes 186 | FakesAssemblies/ 187 | -------------------------------------------------------------------------------- /Art/chrome.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jguertl/SharePlugin/4cffe8cc1ad0bcc1bd056761fbe17f01c48cb35b/Art/chrome.gif -------------------------------------------------------------------------------- /Art/safari.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jguertl/SharePlugin/4cffe8cc1ad0bcc1bd056761fbe17f01c48cb35b/Art/safari.gif -------------------------------------------------------------------------------- /Common/SharePlugin/component/Details.md: -------------------------------------------------------------------------------- 1 | # Share Plugin Details 2 | 3 | Share text, links, or open a browser in Xamarin.iOS, Xamarin.Android, Windows Phone, and Windows from a single API. 4 | 5 | ### Features: 6 | 7 | * Share Text 8 | * Share Link 9 | * Open Browser 10 | 11 | Works completely from shared code or PCL projects. 12 | 13 | Learn more about Plugins for Xamarin at [http://xamarin.com/plugins](http://xamarin.com/plugins) -------------------------------------------------------------------------------- /Common/SharePlugin/component/GettingStarted.md: -------------------------------------------------------------------------------- 1 | # Getting Started with Share Plugin 2 | 3 | ### API Usage 4 | 5 | Call **CrossShare.Current** from any project or PCL to gain access to APIs. 6 | 7 | **Share** 8 | ``` 9 | /// 10 | /// Simply share text on compatible services 11 | /// 12 | /// Text to share 13 | /// Title of popup on share (not included in message) 14 | /// awaitable Task 15 | Task Share(string text, string title = null); 16 | ``` 17 | 18 | **Open Browser** 19 | ``` 20 | /// 21 | /// Open a browser to a specific url 22 | /// 23 | /// Url to open 24 | /// awaitable Task 25 | Task OpenBrowser(string url); 26 | ``` 27 | 28 | **Share Link** 29 | ``` 30 | /// 31 | /// Share a link url with compatible services 32 | /// 33 | /// Link to share 34 | /// Message to share 35 | /// Title of the popup 36 | /// awaitable Task 37 | Task ShareLink(string url, string message = null, string title = null); 38 | ``` 39 | -------------------------------------------------------------------------------- /Common/SharePlugin/component/License.md: -------------------------------------------------------------------------------- 1 | # Share Plugin license 2 | 3 | 4 | The MIT License (MIT) 5 | 6 | Copyright (c) 2015 James Montemagno / Refractored LLC / Jakob Gurtl 7 | 8 | Permission is hereby granted, free of charge, to any person obtaining a copy of 9 | this software and associated documentation files (the "Software"), to deal in 10 | the Software without restriction, including without limitation the rights to 11 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 12 | the Software, and to permit persons to whom the Software is furnished to do so, 13 | subject to the following conditions: 14 | 15 | The above copyright notice and this permission notice shall be included in all 16 | copies or substantial portions of the Software. 17 | 18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 20 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 21 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 22 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 23 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /Common/SharePlugin/component/SharePlugin-3.0.1.xam: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jguertl/SharePlugin/4cffe8cc1ad0bcc1bd056761fbe17f01c48cb35b/Common/SharePlugin/component/SharePlugin-3.0.1.xam -------------------------------------------------------------------------------- /Common/SharePlugin/component/SharePlugin_128x128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jguertl/SharePlugin/4cffe8cc1ad0bcc1bd056761fbe17f01c48cb35b/Common/SharePlugin/component/SharePlugin_128x128.png -------------------------------------------------------------------------------- /Common/SharePlugin/component/SharePlugin_512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jguertl/SharePlugin/4cffe8cc1ad0bcc1bd056761fbe17f01c48cb35b/Common/SharePlugin/component/SharePlugin_512x512.png -------------------------------------------------------------------------------- /Common/SharePlugin/component/component.yaml: -------------------------------------------------------------------------------- 1 | %YAML 1.2 2 | --- 3 | summary: Easily share text, links, or open a browse from shared code. 4 | getting-started: GettingStarted.md 5 | details: Details.md 6 | license: License.md 7 | icons: 8 | - SharePlugin_128x128.png 9 | - SharePlugin_512x512.png 10 | publisher: James Montemagno 11 | name: Share Plugin 12 | id: SharePlugin 13 | samples: 14 | iOS Sample: ../samples/ShareSample.sln 15 | Android Sample: ../samples/ShareSample.sln 16 | WindowsPhone Sample: ../samples/ShareSample.sln 17 | publisher-url: https://github.com/jguertl/SharePlugin 18 | is_shell: true 19 | packages: 20 | mobile: Plugin.Share, Version=3.0.1 21 | ios: Plugin.Share, Version=3.0.1 22 | ios-unified: Plugin.Share, Version=3.0.1 23 | android: Plugin.Share, Version=3.0.1 24 | winphone-8.0: Plugin.Share, Version=3.0.1 25 | winphone-8.1: Plugin.Share, Version=3.0.1 26 | version: 3.0.1 27 | ... 28 | -------------------------------------------------------------------------------- /Common/SharePlugin/samples/ShareSample/ShareSample.Droid/Assets/AboutAssets.txt: -------------------------------------------------------------------------------- 1 | Any raw assets you want to be deployed with your application can be placed in 2 | this directory (and child directories) and given a Build Action of "AndroidAsset". 3 | 4 | These files will be deployed with you package and will be accessible using Android's 5 | AssetManager, like this: 6 | 7 | public class ReadAsset : Activity 8 | { 9 | protected override void OnCreate (Bundle bundle) 10 | { 11 | base.OnCreate (bundle); 12 | 13 | InputStream input = Assets.Open ("my_asset.txt"); 14 | } 15 | } 16 | 17 | Additionally, some Android functions will automatically load asset files: 18 | 19 | Typeface tf = Typeface.CreateFromAsset (Context.Assets, "fonts/samplefont.ttf"); 20 | -------------------------------------------------------------------------------- /Common/SharePlugin/samples/ShareSample/ShareSample.Droid/MainActivity.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | using Android.App; 4 | using Android.Content.PM; 5 | using Android.Runtime; 6 | using Android.Views; 7 | using Android.Widget; 8 | using Android.OS; 9 | 10 | namespace ShareSample.Droid 11 | { 12 | [Activity(Label = "ShareSample", Icon = "@drawable/icon", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)] 13 | public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsApplicationActivity 14 | { 15 | protected override void OnCreate(Bundle bundle) 16 | { 17 | base.OnCreate(bundle); 18 | 19 | global::Xamarin.Forms.Forms.Init(this, bundle); 20 | LoadApplication(new App()); 21 | } 22 | } 23 | } 24 | 25 | -------------------------------------------------------------------------------- /Common/SharePlugin/samples/ShareSample/ShareSample.Droid/Properties/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Common/SharePlugin/samples/ShareSample/ShareSample.Droid/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | using Android.App; 5 | 6 | // General Information about an assembly is controlled through the following 7 | // set of attributes. Change these attribute values to modify the information 8 | // associated with an assembly. 9 | [assembly: AssemblyTitle("ShareSample.Droid")] 10 | [assembly: AssemblyDescription("")] 11 | [assembly: AssemblyConfiguration("")] 12 | [assembly: AssemblyCompany("")] 13 | [assembly: AssemblyProduct("ShareSample.Droid")] 14 | [assembly: AssemblyCopyright("Copyright © 2014")] 15 | [assembly: AssemblyTrademark("")] 16 | [assembly: AssemblyCulture("")] 17 | [assembly: ComVisible(false)] 18 | 19 | // Version information for an assembly consists of the following four values: 20 | // 21 | // Major Version 22 | // Minor Version 23 | // Build Number 24 | // Revision 25 | // 26 | // You can specify all the values or you can default the Build and Revision Numbers 27 | // by using the '*' as shown below: 28 | // [assembly: AssemblyVersion("1.0.*")] 29 | [assembly: AssemblyVersion("1.0.0.0")] 30 | [assembly: AssemblyFileVersion("1.0.0.0")] 31 | 32 | // Add some common permissions, these can be removed if not needed 33 | [assembly: UsesPermission(Android.Manifest.Permission.Internet)] 34 | [assembly: UsesPermission(Android.Manifest.Permission.WriteExternalStorage)] 35 | -------------------------------------------------------------------------------- /Common/SharePlugin/samples/ShareSample/ShareSample.Droid/Resources/AboutResources.txt: -------------------------------------------------------------------------------- 1 | Images, layout descriptions, binary blobs and string dictionaries can be included 2 | in your application as resource files. Various Android APIs are designed to 3 | operate on the resource IDs instead of dealing with images, strings or binary blobs 4 | directly. 5 | 6 | For example, a sample Android app that contains a user interface layout (main.xml), 7 | an internationalization string table (strings.xml) and some icons (drawable-XXX/icon.png) 8 | would keep its resources in the "Resources" directory of the application: 9 | 10 | Resources/ 11 | drawable-hdpi/ 12 | icon.png 13 | 14 | drawable-ldpi/ 15 | icon.png 16 | 17 | drawable-mdpi/ 18 | icon.png 19 | 20 | layout/ 21 | main.xml 22 | 23 | values/ 24 | strings.xml 25 | 26 | In order to get the build system to recognize Android resources, set the build action to 27 | "AndroidResource". The native Android APIs do not operate directly with filenames, but 28 | instead operate on resource IDs. When you compile an Android application that uses resources, 29 | the build system will package the resources for distribution and generate a class called 30 | "Resource" that contains the tokens for each one of the resources included. For example, 31 | for the above Resources layout, this is what the Resource class would expose: 32 | 33 | public class Resource { 34 | public class drawable { 35 | public const int icon = 0x123; 36 | } 37 | 38 | public class layout { 39 | public const int main = 0x456; 40 | } 41 | 42 | public class strings { 43 | public const int first_string = 0xabc; 44 | public const int second_string = 0xbcd; 45 | } 46 | } 47 | 48 | You would then use R.drawable.icon to reference the drawable/icon.png file, or Resource.layout.main 49 | to reference the layout/main.xml file, or Resource.strings.first_string to reference the first 50 | string in the dictionary file values/strings.xml. 51 | -------------------------------------------------------------------------------- /Common/SharePlugin/samples/ShareSample/ShareSample.Droid/Resources/drawable-hdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jguertl/SharePlugin/4cffe8cc1ad0bcc1bd056761fbe17f01c48cb35b/Common/SharePlugin/samples/ShareSample/ShareSample.Droid/Resources/drawable-hdpi/icon.png -------------------------------------------------------------------------------- /Common/SharePlugin/samples/ShareSample/ShareSample.Droid/Resources/drawable-xhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jguertl/SharePlugin/4cffe8cc1ad0bcc1bd056761fbe17f01c48cb35b/Common/SharePlugin/samples/ShareSample/ShareSample.Droid/Resources/drawable-xhdpi/icon.png -------------------------------------------------------------------------------- /Common/SharePlugin/samples/ShareSample/ShareSample.Droid/Resources/drawable-xxhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jguertl/SharePlugin/4cffe8cc1ad0bcc1bd056761fbe17f01c48cb35b/Common/SharePlugin/samples/ShareSample/ShareSample.Droid/Resources/drawable-xxhdpi/icon.png -------------------------------------------------------------------------------- /Common/SharePlugin/samples/ShareSample/ShareSample.Droid/Resources/drawable/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jguertl/SharePlugin/4cffe8cc1ad0bcc1bd056761fbe17f01c48cb35b/Common/SharePlugin/samples/ShareSample/ShareSample.Droid/Resources/drawable/icon.png -------------------------------------------------------------------------------- /Common/SharePlugin/samples/ShareSample/ShareSample.Droid/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /Common/SharePlugin/samples/ShareSample/ShareSample.WinPhone/App.xaml: -------------------------------------------------------------------------------- 1 |  6 | 7 | 8 | -------------------------------------------------------------------------------- /Common/SharePlugin/samples/ShareSample/ShareSample.WinPhone/App.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Runtime.InteropServices.WindowsRuntime; 6 | using Windows.ApplicationModel; 7 | using Windows.ApplicationModel.Activation; 8 | using Windows.Foundation; 9 | using Windows.Foundation.Collections; 10 | using Windows.UI.Xaml; 11 | using Windows.UI.Xaml.Controls; 12 | using Windows.UI.Xaml.Controls.Primitives; 13 | using Windows.UI.Xaml.Data; 14 | using Windows.UI.Xaml.Input; 15 | using Windows.UI.Xaml.Media; 16 | using Windows.UI.Xaml.Media.Animation; 17 | using Windows.UI.Xaml.Navigation; 18 | 19 | // The Blank Application template is documented at http://go.microsoft.com/fwlink/?LinkId=234227 20 | 21 | namespace ShareSample.WinPhone 22 | { 23 | /// 24 | /// Provides application-specific behavior to supplement the default Application class. 25 | /// 26 | public sealed partial class App : Application 27 | { 28 | private TransitionCollection transitions; 29 | 30 | /// 31 | /// Initializes the singleton application object. This is the first line of authored code 32 | /// executed, and as such is the logical equivalent of main() or WinMain(). 33 | /// 34 | public App() 35 | { 36 | this.InitializeComponent(); 37 | this.Suspending += this.OnSuspending; 38 | } 39 | 40 | /// 41 | /// Invoked when the application is launched normally by the end user. Other entry points 42 | /// will be used when the application is launched to open a specific file, to display 43 | /// search results, and so forth. 44 | /// 45 | /// Details about the launch request and process. 46 | protected override void OnLaunched(LaunchActivatedEventArgs e) 47 | { 48 | #if DEBUG 49 | if (System.Diagnostics.Debugger.IsAttached) 50 | { 51 | this.DebugSettings.EnableFrameRateCounter = true; 52 | } 53 | #endif 54 | 55 | Frame rootFrame = Window.Current.Content as Frame; 56 | 57 | // Do not repeat app initialization when the Window already has content, 58 | // just ensure that the window is active 59 | if (rootFrame == null) 60 | { 61 | // Create a Frame to act as the navigation context and navigate to the first page 62 | rootFrame = new Frame(); 63 | 64 | // TODO: change this value to a cache size that is appropriate for your application 65 | rootFrame.CacheSize = 1; 66 | 67 | Xamarin.Forms.Forms.Init(e); 68 | 69 | if (e.PreviousExecutionState == ApplicationExecutionState.Terminated) 70 | { 71 | // TODO: Load state from previously suspended application 72 | } 73 | 74 | // Place the frame in the current Window 75 | Window.Current.Content = rootFrame; 76 | } 77 | 78 | if (rootFrame.Content == null) 79 | { 80 | // Removes the turnstile navigation for startup. 81 | if (rootFrame.ContentTransitions != null) 82 | { 83 | this.transitions = new TransitionCollection(); 84 | foreach (var c in rootFrame.ContentTransitions) 85 | { 86 | this.transitions.Add(c); 87 | } 88 | } 89 | 90 | rootFrame.ContentTransitions = null; 91 | rootFrame.Navigated += this.RootFrame_FirstNavigated; 92 | 93 | // When the navigation stack isn't restored navigate to the first page, 94 | // configuring the new page by passing required information as a navigation 95 | // parameter 96 | if (!rootFrame.Navigate(typeof(MainPage), e.Arguments)) 97 | { 98 | throw new Exception("Failed to create initial page"); 99 | } 100 | } 101 | 102 | // Ensure the current window is active 103 | Window.Current.Activate(); 104 | } 105 | 106 | /// 107 | /// Restores the content transitions after the app has launched. 108 | /// 109 | /// The object where the handler is attached. 110 | /// Details about the navigation event. 111 | private void RootFrame_FirstNavigated(object sender, NavigationEventArgs e) 112 | { 113 | var rootFrame = sender as Frame; 114 | rootFrame.ContentTransitions = this.transitions ?? new TransitionCollection() { new NavigationThemeTransition() }; 115 | rootFrame.Navigated -= this.RootFrame_FirstNavigated; 116 | } 117 | 118 | /// 119 | /// Invoked when application execution is being suspended. Application state is saved 120 | /// without knowing whether the application will be terminated or resumed with the contents 121 | /// of memory still intact. 122 | /// 123 | /// The source of the suspend request. 124 | /// Details about the suspend request. 125 | private void OnSuspending(object sender, SuspendingEventArgs e) 126 | { 127 | var deferral = e.SuspendingOperation.GetDeferral(); 128 | 129 | // TODO: Save application state and stop any background activity 130 | deferral.Complete(); 131 | } 132 | } 133 | } -------------------------------------------------------------------------------- /Common/SharePlugin/samples/ShareSample/ShareSample.WinPhone/Assets/Logo.scale-240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jguertl/SharePlugin/4cffe8cc1ad0bcc1bd056761fbe17f01c48cb35b/Common/SharePlugin/samples/ShareSample/ShareSample.WinPhone/Assets/Logo.scale-240.png -------------------------------------------------------------------------------- /Common/SharePlugin/samples/ShareSample/ShareSample.WinPhone/Assets/SmallLogo.scale-240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jguertl/SharePlugin/4cffe8cc1ad0bcc1bd056761fbe17f01c48cb35b/Common/SharePlugin/samples/ShareSample/ShareSample.WinPhone/Assets/SmallLogo.scale-240.png -------------------------------------------------------------------------------- /Common/SharePlugin/samples/ShareSample/ShareSample.WinPhone/Assets/SplashScreen.scale-240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jguertl/SharePlugin/4cffe8cc1ad0bcc1bd056761fbe17f01c48cb35b/Common/SharePlugin/samples/ShareSample/ShareSample.WinPhone/Assets/SplashScreen.scale-240.png -------------------------------------------------------------------------------- /Common/SharePlugin/samples/ShareSample/ShareSample.WinPhone/Assets/Square71x71Logo.scale-240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jguertl/SharePlugin/4cffe8cc1ad0bcc1bd056761fbe17f01c48cb35b/Common/SharePlugin/samples/ShareSample/ShareSample.WinPhone/Assets/Square71x71Logo.scale-240.png -------------------------------------------------------------------------------- /Common/SharePlugin/samples/ShareSample/ShareSample.WinPhone/Assets/StoreLogo.scale-240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jguertl/SharePlugin/4cffe8cc1ad0bcc1bd056761fbe17f01c48cb35b/Common/SharePlugin/samples/ShareSample/ShareSample.WinPhone/Assets/StoreLogo.scale-240.png -------------------------------------------------------------------------------- /Common/SharePlugin/samples/ShareSample/ShareSample.WinPhone/Assets/WideLogo.scale-240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jguertl/SharePlugin/4cffe8cc1ad0bcc1bd056761fbe17f01c48cb35b/Common/SharePlugin/samples/ShareSample/ShareSample.WinPhone/Assets/WideLogo.scale-240.png -------------------------------------------------------------------------------- /Common/SharePlugin/samples/ShareSample/ShareSample.WinPhone/MainPage.xaml: -------------------------------------------------------------------------------- 1 |  11 | 12 | -------------------------------------------------------------------------------- /Common/SharePlugin/samples/ShareSample/ShareSample.WinPhone/MainPage.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Runtime.InteropServices.WindowsRuntime; 6 | using Windows.Foundation; 7 | using Windows.Foundation.Collections; 8 | using Windows.UI.Xaml; 9 | using Windows.UI.Xaml.Controls; 10 | using Windows.UI.Xaml.Controls.Primitives; 11 | using Windows.UI.Xaml.Data; 12 | using Windows.UI.Xaml.Input; 13 | using Windows.UI.Xaml.Media; 14 | using Windows.UI.Xaml.Navigation; 15 | 16 | // The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=234238 17 | 18 | namespace ShareSample.WinPhone 19 | { 20 | /// 21 | /// An empty page that can be used on its own or navigated to within a Frame. 22 | /// 23 | public sealed partial class MainPage 24 | { 25 | public MainPage() 26 | { 27 | this.InitializeComponent(); 28 | 29 | this.NavigationCacheMode = NavigationCacheMode.Required; 30 | 31 | LoadApplication(new ShareSample.App()); 32 | } 33 | 34 | /// 35 | /// Invoked when this page is about to be displayed in a Frame. 36 | /// 37 | /// Event data that describes how this page was reached. 38 | /// This parameter is typically used to configure the page. 39 | protected override void OnNavigatedTo(NavigationEventArgs e) 40 | { 41 | // TODO: Prepare page for display here. 42 | 43 | // TODO: If your application contains multiple pages, ensure that you are 44 | // handling the hardware Back button by registering for the 45 | // Windows.Phone.UI.Input.HardwareButtons.BackPressed event. 46 | // If you are using the NavigationHelper provided by some templates, 47 | // this event is handled for you. 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /Common/SharePlugin/samples/ShareSample/ShareSample.WinPhone/Package.appxmanifest: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 7 | 8 | 9 | 10 | 11 | FPCL.Windows8.WindowsPhone 12 | joaqu 13 | Assets\StoreLogo.png 14 | 15 | 16 | 17 | 6.3.1 18 | 6.3.1 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 29 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /Common/SharePlugin/samples/ShareSample/ShareSample.WinPhone/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("ShareSample.WinPhone.WindowsPhone")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("ShareSample.WinPhone.WindowsPhone")] 13 | [assembly: AssemblyCopyright("Copyright © 2015")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Version information for an assembly consists of the following four values: 18 | // 19 | // Major Version 20 | // Minor Version 21 | // Build Number 22 | // Revision 23 | // 24 | // You can specify all the values or you can default the Build and Revision Numbers 25 | // by using the '*' as shown below: 26 | // [assembly: AssemblyVersion("1.0.*")] 27 | [assembly: AssemblyVersion("1.0.0.0")] 28 | [assembly: AssemblyFileVersion("1.0.0.0")] 29 | [assembly: ComVisible(false)] -------------------------------------------------------------------------------- /Common/SharePlugin/samples/ShareSample/ShareSample.WinPhone/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Common/SharePlugin/samples/ShareSample/ShareSample.iOS/AppDelegate.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | 5 | using Foundation; 6 | using UIKit; 7 | 8 | namespace ShareSample.iOS 9 | { 10 | // The UIApplicationDelegate for the application. This class is responsible for launching the 11 | // User Interface of the application, as well as listening (and optionally responding) to 12 | // application events from iOS. 13 | [Register("AppDelegate")] 14 | public partial class AppDelegate : global::Xamarin.Forms.Platform.iOS.FormsApplicationDelegate 15 | { 16 | // 17 | // This method is invoked when the application has loaded and is ready to run. In this 18 | // method you should instantiate the window, load the UI into it and then make the window 19 | // visible. 20 | // 21 | // You have 17 seconds to return from this method, or iOS will terminate your application. 22 | // 23 | public override bool FinishedLaunching(UIApplication app, NSDictionary options) 24 | { 25 | global::Xamarin.Forms.Forms.Init(); 26 | LoadApplication(new App()); 27 | 28 | return base.FinishedLaunching(app, options); 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /Common/SharePlugin/samples/ShareSample/ShareSample.iOS/Entitlements.plist: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Common/SharePlugin/samples/ShareSample/ShareSample.iOS/Info.plist: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | UIDeviceFamily 6 | 7 | 1 8 | 2 9 | 10 | UISupportedInterfaceOrientations 11 | 12 | UIInterfaceOrientationPortrait 13 | UIInterfaceOrientationLandscapeLeft 14 | UIInterfaceOrientationLandscapeRight 15 | 16 | UISupportedInterfaceOrientations~ipad 17 | 18 | UIInterfaceOrientationPortrait 19 | UIInterfaceOrientationPortraitUpsideDown 20 | UIInterfaceOrientationLandscapeLeft 21 | UIInterfaceOrientationLandscapeRight 22 | 23 | MinimumOSVersion 24 | 6.0 25 | CFBundleDisplayName 26 | ShareSample 27 | CFBundleIdentifier 28 | com.yourcompany.ShareSample 29 | CFBundleVersion 30 | 1.0 31 | CFBundleIconFiles 32 | 33 | Icon-60@2x 34 | Icon-60@3x 35 | Icon-76 36 | Icon-76@2x 37 | Default 38 | Default@2x 39 | Default-568h@2x 40 | Default-Portrait 41 | Default-Portrait@2x 42 | Icon-Small-40 43 | Icon-Small-40@2x 44 | Icon-Small-40@3x 45 | Icon-Small 46 | Icon-Small@2x 47 | Icon-Small@3x 48 | 49 | UILaunchStoryboardName 50 | LaunchScreen 51 | 52 | 53 | -------------------------------------------------------------------------------- /Common/SharePlugin/samples/ShareSample/ShareSample.iOS/Main.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | 5 | using Foundation; 6 | using UIKit; 7 | 8 | namespace ShareSample.iOS 9 | { 10 | public class Application 11 | { 12 | // This is the main entry point of the application. 13 | static void Main(string[] args) 14 | { 15 | // if you want to use a different Application Delegate class from "AppDelegate" 16 | // you can specify it here. 17 | UIApplication.Main(args, null, "AppDelegate"); 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Common/SharePlugin/samples/ShareSample/ShareSample.iOS/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("ShareSample.iOS")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("ShareSample.iOS")] 13 | [assembly: AssemblyCopyright("Copyright © 2014")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("72bdc44f-c588-44f3-b6df-9aace7daafdd")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /Common/SharePlugin/samples/ShareSample/ShareSample.iOS/Resources/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jguertl/SharePlugin/4cffe8cc1ad0bcc1bd056761fbe17f01c48cb35b/Common/SharePlugin/samples/ShareSample/ShareSample.iOS/Resources/Default-568h@2x.png -------------------------------------------------------------------------------- /Common/SharePlugin/samples/ShareSample/ShareSample.iOS/Resources/Default-Portrait.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jguertl/SharePlugin/4cffe8cc1ad0bcc1bd056761fbe17f01c48cb35b/Common/SharePlugin/samples/ShareSample/ShareSample.iOS/Resources/Default-Portrait.png -------------------------------------------------------------------------------- /Common/SharePlugin/samples/ShareSample/ShareSample.iOS/Resources/Default-Portrait@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jguertl/SharePlugin/4cffe8cc1ad0bcc1bd056761fbe17f01c48cb35b/Common/SharePlugin/samples/ShareSample/ShareSample.iOS/Resources/Default-Portrait@2x.png -------------------------------------------------------------------------------- /Common/SharePlugin/samples/ShareSample/ShareSample.iOS/Resources/Default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jguertl/SharePlugin/4cffe8cc1ad0bcc1bd056761fbe17f01c48cb35b/Common/SharePlugin/samples/ShareSample/ShareSample.iOS/Resources/Default.png -------------------------------------------------------------------------------- /Common/SharePlugin/samples/ShareSample/ShareSample.iOS/Resources/Default@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jguertl/SharePlugin/4cffe8cc1ad0bcc1bd056761fbe17f01c48cb35b/Common/SharePlugin/samples/ShareSample/ShareSample.iOS/Resources/Default@2x.png -------------------------------------------------------------------------------- /Common/SharePlugin/samples/ShareSample/ShareSample.iOS/Resources/Icon-60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jguertl/SharePlugin/4cffe8cc1ad0bcc1bd056761fbe17f01c48cb35b/Common/SharePlugin/samples/ShareSample/ShareSample.iOS/Resources/Icon-60@2x.png -------------------------------------------------------------------------------- /Common/SharePlugin/samples/ShareSample/ShareSample.iOS/Resources/Icon-60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jguertl/SharePlugin/4cffe8cc1ad0bcc1bd056761fbe17f01c48cb35b/Common/SharePlugin/samples/ShareSample/ShareSample.iOS/Resources/Icon-60@3x.png -------------------------------------------------------------------------------- /Common/SharePlugin/samples/ShareSample/ShareSample.iOS/Resources/Icon-76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jguertl/SharePlugin/4cffe8cc1ad0bcc1bd056761fbe17f01c48cb35b/Common/SharePlugin/samples/ShareSample/ShareSample.iOS/Resources/Icon-76.png -------------------------------------------------------------------------------- /Common/SharePlugin/samples/ShareSample/ShareSample.iOS/Resources/Icon-76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jguertl/SharePlugin/4cffe8cc1ad0bcc1bd056761fbe17f01c48cb35b/Common/SharePlugin/samples/ShareSample/ShareSample.iOS/Resources/Icon-76@2x.png -------------------------------------------------------------------------------- /Common/SharePlugin/samples/ShareSample/ShareSample.iOS/Resources/Icon-Small-40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jguertl/SharePlugin/4cffe8cc1ad0bcc1bd056761fbe17f01c48cb35b/Common/SharePlugin/samples/ShareSample/ShareSample.iOS/Resources/Icon-Small-40.png -------------------------------------------------------------------------------- /Common/SharePlugin/samples/ShareSample/ShareSample.iOS/Resources/Icon-Small-40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jguertl/SharePlugin/4cffe8cc1ad0bcc1bd056761fbe17f01c48cb35b/Common/SharePlugin/samples/ShareSample/ShareSample.iOS/Resources/Icon-Small-40@2x.png -------------------------------------------------------------------------------- /Common/SharePlugin/samples/ShareSample/ShareSample.iOS/Resources/Icon-Small-40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jguertl/SharePlugin/4cffe8cc1ad0bcc1bd056761fbe17f01c48cb35b/Common/SharePlugin/samples/ShareSample/ShareSample.iOS/Resources/Icon-Small-40@3x.png -------------------------------------------------------------------------------- /Common/SharePlugin/samples/ShareSample/ShareSample.iOS/Resources/Icon-Small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jguertl/SharePlugin/4cffe8cc1ad0bcc1bd056761fbe17f01c48cb35b/Common/SharePlugin/samples/ShareSample/ShareSample.iOS/Resources/Icon-Small.png -------------------------------------------------------------------------------- /Common/SharePlugin/samples/ShareSample/ShareSample.iOS/Resources/Icon-Small@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jguertl/SharePlugin/4cffe8cc1ad0bcc1bd056761fbe17f01c48cb35b/Common/SharePlugin/samples/ShareSample/ShareSample.iOS/Resources/Icon-Small@2x.png -------------------------------------------------------------------------------- /Common/SharePlugin/samples/ShareSample/ShareSample.iOS/Resources/Icon-Small@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jguertl/SharePlugin/4cffe8cc1ad0bcc1bd056761fbe17f01c48cb35b/Common/SharePlugin/samples/ShareSample/ShareSample.iOS/Resources/Icon-Small@3x.png -------------------------------------------------------------------------------- /Common/SharePlugin/samples/ShareSample/ShareSample.iOS/Resources/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /Common/SharePlugin/samples/ShareSample/ShareSample.iOS/iTunesArtwork: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jguertl/SharePlugin/4cffe8cc1ad0bcc1bd056761fbe17f01c48cb35b/Common/SharePlugin/samples/ShareSample/ShareSample.iOS/iTunesArtwork -------------------------------------------------------------------------------- /Common/SharePlugin/samples/ShareSample/ShareSample.iOS/iTunesArtwork@2x: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jguertl/SharePlugin/4cffe8cc1ad0bcc1bd056761fbe17f01c48cb35b/Common/SharePlugin/samples/ShareSample/ShareSample.iOS/iTunesArtwork@2x -------------------------------------------------------------------------------- /Common/SharePlugin/samples/ShareSample/ShareSample.iOS/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Common/SharePlugin/samples/ShareSample/ShareSample/App.cs: -------------------------------------------------------------------------------- 1 | using Plugin.Share; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | 7 | using Xamarin.Forms; 8 | 9 | namespace ShareSample 10 | { 11 | public class App : Application 12 | { 13 | public App() 14 | { 15 | var button = new Button 16 | { 17 | Text = "Share some text" 18 | }; 19 | 20 | var button1 = new Button 21 | { 22 | Text = "Share a link" 23 | }; 24 | 25 | var button2 = new Button 26 | { 27 | Text = "Open browser" 28 | }; 29 | 30 | button.Clicked += (sender, args) => 31 | { 32 | CrossShare.Current.Share("Follow @JamesMontemagno on Twitter", "Share"); 33 | }; 34 | 35 | button1.Clicked += (sender, args) => 36 | { 37 | CrossShare.Current.ShareLink("http://motzcod.es", "Checkout my blog", "MotzCod.es"); 38 | }; 39 | 40 | button2.Clicked += (sender, args) => 41 | { 42 | CrossShare.Current.OpenBrowser("http://motzcod.es"); 43 | }; 44 | 45 | // The root page of your application 46 | MainPage = new ContentPage 47 | { 48 | Content = new StackLayout 49 | { 50 | VerticalOptions = LayoutOptions.Center, 51 | Children = { 52 | new Label { 53 | HorizontalTextAlignment = TextAlignment.Center, 54 | Text = "Welcome to Share Plugin Sample!" 55 | }, button, button1, button2 56 | 57 | } 58 | } 59 | }; 60 | } 61 | 62 | protected override void OnStart() 63 | { 64 | // Handle when your app starts 65 | } 66 | 67 | protected override void OnSleep() 68 | { 69 | // Handle when your app sleeps 70 | } 71 | 72 | protected override void OnResume() 73 | { 74 | // Handle when your app resumes 75 | } 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /Common/SharePlugin/samples/ShareSample/ShareSample/GettingStarted.Xamarin: -------------------------------------------------------------------------------- 1 | 2 | GS\XF\CS\App\GettingStarted.html 3 | false 4 | -------------------------------------------------------------------------------- /Common/SharePlugin/samples/ShareSample/ShareSample/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Resources; 2 | using System.Reflection; 3 | using System.Runtime.CompilerServices; 4 | using System.Runtime.InteropServices; 5 | 6 | // General Information about an assembly is controlled through the following 7 | // set of attributes. Change these attribute values to modify the information 8 | // associated with an assembly. 9 | [assembly: AssemblyTitle("ShareSample")] 10 | [assembly: AssemblyDescription("")] 11 | [assembly: AssemblyConfiguration("")] 12 | [assembly: AssemblyCompany("")] 13 | [assembly: AssemblyProduct("ShareSample")] 14 | [assembly: AssemblyCopyright("Copyright © 2014")] 15 | [assembly: AssemblyTrademark("")] 16 | [assembly: AssemblyCulture("")] 17 | [assembly: NeutralResourcesLanguage("en")] 18 | 19 | // Version information for an assembly consists of the following four values: 20 | // 21 | // Major Version 22 | // Minor Version 23 | // Build Number 24 | // Revision 25 | // 26 | // You can specify all the values or you can default the Build and Revision Numbers 27 | // by using the '*' as shown below: 28 | // [assembly: AssemblyVersion("1.0.*")] 29 | [assembly: AssemblyVersion("1.0.0.0")] 30 | [assembly: AssemblyFileVersion("1.0.0.0")] 31 | -------------------------------------------------------------------------------- /Common/SharePlugin/samples/ShareSample/ShareSample/ShareSample.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 10.0 6 | Debug 7 | AnyCPU 8 | {86ECEB5F-EE1A-4090-96A9-AC375E126254} 9 | Library 10 | Properties 11 | ShareSample 12 | ShareSample 13 | v4.5 14 | Profile78 15 | 512 16 | {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 17 | 18 | 19 | 20 | 21 | true 22 | full 23 | false 24 | bin\Debug\ 25 | DEBUG;TRACE 26 | prompt 27 | 4 28 | 29 | 30 | pdbonly 31 | true 32 | bin\Release\ 33 | TRACE 34 | prompt 35 | 4 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | ..\..\packages\Plugin.Share.3.0.1\lib\portable-net45+wp8+wpa81+win8+MonoAndroid10+MonoTouch10+Xamarin.iOS10+UAP10\Plugin.Share.dll 44 | True 45 | 46 | 47 | ..\..\packages\Plugin.Share.3.0.1\lib\portable-net45+wp8+wpa81+win8+MonoAndroid10+MonoTouch10+Xamarin.iOS10+UAP10\Plugin.Share.Abstractions.dll 48 | True 49 | 50 | 51 | ..\..\packages\Xamarin.Forms.2.0.0.6482\lib\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.Core.dll 52 | True 53 | 54 | 55 | ..\..\packages\Xamarin.Forms.2.0.0.6482\lib\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.Platform.dll 56 | True 57 | 58 | 59 | ..\..\packages\Xamarin.Forms.2.0.0.6482\lib\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.Xaml.dll 60 | True 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. 72 | 73 | 74 | 75 | 82 | -------------------------------------------------------------------------------- /Common/SharePlugin/samples/ShareSample/ShareSample/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Common/plugin_share.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jguertl/SharePlugin/4cffe8cc1ad0bcc1bd056761fbe17f01c48cb35b/Common/plugin_share.png -------------------------------------------------------------------------------- /Common/plugin_share_512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jguertl/SharePlugin/4cffe8cc1ad0bcc1bd056761fbe17f01c48cb35b/Common/plugin_share_512.png -------------------------------------------------------------------------------- /Common/xamarin-component.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jguertl/SharePlugin/4cffe8cc1ad0bcc1bd056761fbe17f01c48cb35b/Common/xamarin-component.exe -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Jakob Gürtl & James Montemagno/Refractored LLC 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## Share Plugin for Xamarin and Windows 2 | 3 | Simple way to share a message or link, copy text to clipboard, or open a browser in any Xamarin or Windows app. 4 | 5 | ### Library Is Deprecated 6 | 7 | I have been working on Plugins for Xamarin for a long time now. Through the years I have always wanted to create a single, optimized, and official package from the Xamarin team at Microsoft that could easily be consumed by any application. The time is now with [Xamarin.Essentials](https://docs.microsoft.com/xamarin/essentials/index?WT.mc_id=docs-github-jamont), which offers over 50 cross-platform native APIs in a single optimized package. I worked on this new library with an amazing team of developers and I highly highly highly recommend you check it out. 8 | 9 | I will continue to work and maintain my Plugins, but I do recommend you checkout Xamarin.Essentials to see if it is a great fit your app as it has been for all of mine! 10 | 11 | 12 | ### Documentation 13 | 14 | Get started by reading through the [Share Plugin documentation](docs) 15 | 16 | ### NuGet: 17 | * Available on NuGet: https://www.nuget.org/packages/Plugin.Share/ [![NuGet](https://img.shields.io/nuget/v/Plugin.Share.svg?label=NuGet)](https://www.nuget.org/packages/Plugin.Share/) 18 | 19 | 20 | ### Build: 21 | * [![Build status](https://ci.appveyor.com/api/projects/status/xuonj5weexcjk6g9?svg=true)](https://ci.appveyor.com/project/JamesMontemagno/shareplugin) 22 | 23 | 24 | ### Platform Support 25 | 26 | |Platform|Version| 27 | | ------------------- | :------------------: | 28 | |Xamarin.iOS|iOS 8+| 29 | |Xamarin.Android|API 14+| 30 | |Windows 10 UWP|10+| 31 | |Tizen|4.0+| 32 | 33 | #### License 34 | Licensed under MIT license 35 | -------------------------------------------------------------------------------- /Share.Plugin.nuspec: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Plugin.Share 5 | $version$ 6 | Share Plugin for Xamarin and Windows 7 | Jakob Gürtl,James Montemagno 8 | Jakob Gürtl,JamesMontemagno 9 | http://refractored.com/images/plugin_share.png 10 | https://github.com/jguertl/SharePlugin/blob/master/LICENSE.md 11 | https://github.com/jguertl/SharePlugin 12 | false 13 | 14 | Share Plugin for Xamarin and Windows to share text, link, copy text to clipboard, or open a browser. 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | Share Plugin for Xamarin and Windows to share text, link, or open a browser. 50 | share, open url, clipboard, sfsafariwebviewcontroller, chrome custom tabs, share text, share link, browser, xamarin, pcl, xam.pcl, windows phone, winphone, wp8, android, xamarin.forms, ios 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /Share.userprefs: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /Share/Share.Plugin.Abstractions/BrowserOptions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Plugin.Share.Abstractions 8 | { 9 | /// 10 | /// Platform specific Browser Options 11 | /// 12 | public class BrowserOptions 13 | { 14 | /// 15 | /// iOS: Gets or sets to use the SFSafariWebViewController on iOS 9+ (recommended). 16 | /// Default is true. 17 | /// 18 | public bool UseSafariWebViewController { get; set; } = true; 19 | /// 20 | /// iOS: Gets or sets to use reader mode (good for markdown files). 21 | /// Default is false. 22 | /// 23 | public bool UseSafariReaderMode { get; set; } = false; 24 | 25 | /// 26 | /// iOS: Gets or sets the color to tint the background of the navigation bar and the toolbar (iOS 10+ only). 27 | /// If null (default) the default color will be used. 28 | /// 29 | public ShareColor SafariBarTintColor { get; set; } = null; 30 | /// 31 | /// iOS: Gets or sets the color to tint the control buttons on the navigation bar and the toolbar (iOS 10+ only). 32 | /// If null (default) the default color will be used. 33 | /// 34 | public ShareColor SafariControlTintColor { get; set; } = null; 35 | 36 | /// 37 | /// Android: Gets or sets to display title as well as url in chrome custom tabs. 38 | /// Default is true 39 | /// 40 | public bool ChromeShowTitle { get; set; } = true; 41 | /// 42 | /// Android: Gets or sets the toolbar color of the chrome custom tabs. 43 | /// If null (default) the default color will be used. 44 | /// 45 | public ShareColor ChromeToolbarColor { get; set; } = null; 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /Share/Share.Plugin.Abstractions/IShare.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Threading.Tasks; 3 | 4 | namespace Plugin.Share.Abstractions 5 | { 6 | 7 | /// 8 | /// Interface for Share 9 | /// 10 | public interface IShare 11 | { 12 | /// 13 | /// Open a browser to a specific url 14 | /// 15 | /// Url to open 16 | /// Platform specific options 17 | /// True if the operation was successful, false otherwise 18 | Task OpenBrowser(string url, BrowserOptions options = null); 19 | 20 | /// 21 | /// Checks if the url can be opened 22 | /// 23 | /// Url to check 24 | /// True if it can 25 | bool CanOpenUrl(string url); 26 | 27 | /// 28 | /// Share a message with compatible services 29 | /// 30 | /// Message to share 31 | /// Platform specific options 32 | /// True if the operation was successful, false otherwise 33 | Task Share(ShareMessage message, ShareOptions options = null); 34 | 35 | /// 36 | /// Sets text of the clipboard 37 | /// 38 | /// Text to set 39 | /// Label to display (not required, Android only) 40 | /// True if the operation was successful, false otherwise 41 | Task SetClipboardText(string text, string label = null); 42 | 43 | /// 44 | /// Gets if clipboard is supported 45 | /// 46 | bool SupportsClipboard { get; } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /Share/Share.Plugin.Abstractions/Share.Plugin.Abstractions.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | netstandard1.0 5 | Plugin.Share.Abstractions 6 | Plugin.Share.Abstractions 7 | 1.0.0.0 8 | 1.0.0.0 9 | 1.0.0.0 10 | 11 | 12 | 13 | bin\Release\netstandard1.0\Plugin.Share.Abstractions.xml 14 | 15 | 16 | -------------------------------------------------------------------------------- /Share/Share.Plugin.Abstractions/ShareAppControlType.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace Plugin.Share.Abstractions 6 | { 7 | public enum ShareAppControlType 8 | { 9 | Link = 0, 10 | 11 | TextInEmail, 12 | 13 | TextInSMS, 14 | 15 | TextInMMS, 16 | 17 | FileInEmail, 18 | 19 | FileInMessage, 20 | 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Share/Share.Plugin.Abstractions/ShareColor.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Plugin.Share.Abstractions 8 | { 9 | /// 10 | /// RGB values of 0-255 for shared 11 | /// 12 | public class ShareColor 13 | { 14 | /// 15 | /// Alpha 0-255 16 | /// 17 | public int A { get; set; } 18 | /// 19 | /// Red 0-255 20 | /// 21 | public int R { get; set; } 22 | /// 23 | /// Green 0-255 24 | /// 25 | public int G { get; set; } 26 | /// 27 | /// Blue 0-255 28 | /// 29 | public int B { get; set; } 30 | 31 | /// 32 | /// Initializes a new instance of the class with default values. 33 | /// 34 | public ShareColor() 35 | { 36 | } 37 | 38 | /// 39 | /// Initializes a new instance of the class with the specified values. Alpha is set to 255 (fully opaque). 40 | /// 41 | /// Red 0-255 42 | /// Green 0-255 43 | /// Blue 0-255 44 | public ShareColor(int r, int g, int b) : this(r, g, b, 255) 45 | { 46 | } 47 | 48 | /// 49 | /// Initializes a new instance of the class with the specified values. 50 | /// 51 | /// Red 0-255 52 | /// Green 0-255 53 | /// Blue 0-255 54 | /// Alpha 0-255 55 | public ShareColor(int r, int g, int b, int a) 56 | { 57 | A = a; 58 | R = r; 59 | G = g; 60 | B = b; 61 | } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /Share/Share.Plugin.Abstractions/ShareMessage.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Plugin.Share.Abstractions 8 | { 9 | /// 10 | /// Message object to share with compatible services 11 | /// 12 | public class ShareMessage 13 | { 14 | /// 15 | /// Gets or sets the title of the message. Used as email subject if sharing with mail apps. 16 | /// 17 | public string Title { get; set; } 18 | 19 | /// 20 | /// Gets or sets the text of the message. 21 | /// 22 | public string Text { get; set; } 23 | 24 | /// 25 | /// Gets or sets the link to include with the message. 26 | /// 27 | public string Url { get; set; } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Share/Share.Plugin.Abstractions/ShareOptions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Plugin.Share.Abstractions 8 | { 9 | /// 10 | /// Platform specific Share Options 11 | /// 12 | public class ShareOptions 13 | { 14 | /// 15 | /// Android: Gets or sets the title of the app chooser popup. 16 | /// If null (default) the system default title is used. 17 | /// 18 | public string ChooserTitle { get; set; } = null; 19 | 20 | 21 | /// 22 | /// Tizen: Excluded App Types 23 | /// 24 | public ShareAppControlType ExcludedAppControlTypes { get; set; } = 0; 25 | 26 | /// 27 | /// iOS: Gets or sets the UIActivityTypes that should not be displayed. 28 | /// If null (default) the value of is used. 29 | /// 30 | public ShareUIActivityType[] ExcludedUIActivityTypes { get; set; } = null; 31 | 32 | /// 33 | /// iOS only: Gets or sets the popover anchor rectangle. 34 | /// If null (default) the option is not used. 35 | /// 36 | public ShareRectangle PopoverAnchorRectangle { get; set; } = null; 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /Share/Share.Plugin.Abstractions/ShareRectangle.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace Plugin.Share.Abstractions 6 | { 7 | public class ShareRectangle 8 | { 9 | public double X { get; set; } 10 | public double Y { get; set; } 11 | public double Width { get; set; } 12 | public double Height { get; set; } 13 | 14 | public ShareRectangle(double x, double y, double width, double height) 15 | { 16 | X = x; 17 | Y = y; 18 | Width = width; 19 | Height = height; 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Share/Share.Plugin.Abstractions/ShareUIActivityType.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Plugin.Share.Abstractions 8 | { 9 | public enum ShareUIActivityType 10 | { 11 | // iOS 6+ 12 | 13 | /// 14 | /// The object assigns the image to a contact. 15 | /// 16 | AssignToContact, 17 | /// 18 | /// The object posts the provided content to the pasteboard. 19 | /// 20 | CopyToPasteboard, 21 | /// 22 | /// The object posts the provided content to a new email message. 23 | /// 24 | Mail, 25 | /// 26 | /// The object posts the provided content to the Messages app. 27 | /// 28 | Message, 29 | /// 30 | /// The object posts the provided content to the user’s wall on Facebook. 31 | /// 32 | PostToFacebook, 33 | /// 34 | /// The object posts the provided content to the user’s Twitter feed. 35 | /// 36 | PostToTwitter, 37 | /// 38 | /// The object posts the provided content to the user’s Weibo feed. 39 | /// 40 | PostToWeibo, 41 | /// 42 | /// The object prints the provided content. 43 | /// 44 | Print, 45 | /// 46 | /// The object assigns the image or video to the user’s camera roll. 47 | /// 48 | SaveToCameraRoll, 49 | 50 | 51 | // iOS 7+ 52 | 53 | /// 54 | /// The object adds the URL to Safari’s reading list. 55 | /// Supported on iOS 7+ only. 56 | /// 57 | AddToReadingList, 58 | /// 59 | /// The object makes the provided content available via AirDrop. 60 | /// Supported on iOS 7+ only. 61 | /// 62 | AirDrop, 63 | /// 64 | /// The object posts the provided image to the user’s Flickr account. 65 | /// Supported on iOS 7+ only. 66 | /// 67 | PostToFlickr, 68 | /// 69 | /// The object posts the provided content to the user’s Tencent Weibo feed. 70 | /// Supported on iOS 7+ only. 71 | /// 72 | PostToTencentWeibo, 73 | /// 74 | /// The object posts the provided video to the user’s Vimeo account. 75 | /// Supported on iOS 7+ only. 76 | /// 77 | PostToVimeo, 78 | 79 | 80 | // iOS 9+ 81 | 82 | /// 83 | /// Supported on iOS 9+ only. 84 | /// 85 | OpenInIBooks, 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /Share/Share.Plugin.Android/MainApplication.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jguertl/SharePlugin/4cffe8cc1ad0bcc1bd056761fbe17f01c48cb35b/Share/Share.Plugin.Android/MainApplication.cs -------------------------------------------------------------------------------- /Share/Share.Plugin.Android/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | using Android.App; 5 | 6 | // General Information about an assembly is controlled through the following 7 | // set of attributes. Change these attribute values to modify the information 8 | // associated with an assembly. 9 | [assembly: AssemblyTitle("Plugin.Share")] 10 | [assembly: AssemblyDescription("")] 11 | [assembly: AssemblyConfiguration("")] 12 | [assembly: AssemblyCompany("")] 13 | [assembly: AssemblyProduct("Plugin.Share")] 14 | [assembly: AssemblyCopyright("Copyright © 2014")] 15 | [assembly: AssemblyTrademark("")] 16 | [assembly: AssemblyCulture("")] 17 | [assembly: ComVisible(false)] 18 | 19 | // Version information for an assembly consists of the following four values: 20 | // 21 | // Major Version 22 | // Minor Version 23 | // Build Number 24 | // Revision 25 | // 26 | // You can specify all the values or you can default the Build and Revision Numbers 27 | // by using the '*' as shown below: 28 | // [assembly: AssemblyVersion("1.0.*")] 29 | [assembly: AssemblyVersion("3.0.1")] 30 | [assembly: AssemblyFileVersion("3.0.1")] 31 | -------------------------------------------------------------------------------- /Share/Share.Plugin.Android/Resources/AboutResources.txt: -------------------------------------------------------------------------------- 1 | Images, layout descriptions, binary blobs and string dictionaries can be included 2 | in your application as resource files. Various Android APIs are designed to 3 | operate on the resource IDs instead of dealing with images, strings or binary blobs 4 | directly. 5 | 6 | For example, a sample Android app that contains a user interface layout (main.xml), 7 | an internationalization string table (strings.xml) and some icons (drawable-XXX/icon.png) 8 | would keep its resources in the "Resources" directory of the application: 9 | 10 | Resources/ 11 | drawable-hdpi/ 12 | icon.png 13 | 14 | drawable-ldpi/ 15 | icon.png 16 | 17 | drawable-mdpi/ 18 | icon.png 19 | 20 | layout/ 21 | main.xml 22 | 23 | values/ 24 | strings.xml 25 | 26 | In order to get the build system to recognize Android resources, set the build action to 27 | "AndroidResource". The native Android APIs do not operate directly with filenames, but 28 | instead operate on resource IDs. When you compile an Android application that uses resources, 29 | the build system will package the resources for distribution and generate a class called 30 | "Resource" that contains the tokens for each one of the resources included. For example, 31 | for the above Resources layout, this is what the Resource class would expose: 32 | 33 | public class Resource { 34 | public class drawable { 35 | public const int icon = 0x123; 36 | } 37 | 38 | public class layout { 39 | public const int main = 0x456; 40 | } 41 | 42 | public class strings { 43 | public const int first_string = 0xabc; 44 | public const int second_string = 0xbcd; 45 | } 46 | } 47 | 48 | You would then use R.drawable.icon to reference the drawable/icon.png file, or Resource.layout.main 49 | to reference the layout/main.xml file, or Resource.strings.first_string to reference the first 50 | string in the dictionary file values/strings.xml. -------------------------------------------------------------------------------- /Share/Share.Plugin.Android/Resources/Resource.Designer.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jguertl/SharePlugin/4cffe8cc1ad0bcc1bd056761fbe17f01c48cb35b/Share/Share.Plugin.Android/Resources/Resource.Designer.cs -------------------------------------------------------------------------------- /Share/Share.Plugin.Android/Share.Plugin.Android.csproj.bak: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Debug 5 | AnyCPU 6 | 8.0.30703 7 | 2.0 8 | {56A56F17-7DE1-4CA1-9617-BF32E971AC84} 9 | {EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 10 | Library 11 | Properties 12 | Share.Plugin 13 | Share.Plugin 14 | 512 15 | Resources\Resource.Designer.cs 16 | Off 17 | True 18 | True 19 | 20 | 21 | true 22 | full 23 | false 24 | bin\Debug\ 25 | DEBUG;TRACE 26 | prompt 27 | 4 28 | 29 | 30 | pdbonly 31 | true 32 | bin\Release\ 33 | TRACE 34 | prompt 35 | 4 36 | bin\Release\Share.Plugin.XML 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | CrossShare.cs 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | {6edb0588-ffc5-4ef5-8a99-9e241d0f878d} 60 | Share.Plugin.Abstractions 61 | 62 | 63 | 64 | 71 | -------------------------------------------------------------------------------- /Share/Share.Plugin.Android/ShareColorExtensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | using Android.App; 7 | using Android.Content; 8 | using Android.OS; 9 | using Android.Runtime; 10 | using Android.Views; 11 | using Android.Widget; 12 | using Android.Graphics; 13 | using Plugin.Share.Abstractions; 14 | 15 | namespace Plugin.Share 16 | { 17 | /// 18 | /// Extension class used for color conversion 19 | /// 20 | static class ShareColorExtensions 21 | { 22 | /// 23 | /// Convert object to native color 24 | /// 25 | /// The color to convert 26 | /// The converted color 27 | public static Color ToNativeColor(this ShareColor color) 28 | { 29 | if (color == null) 30 | throw new ArgumentNullException(nameof(color)); 31 | 32 | return new Color( 33 | color.R, 34 | color.G, 35 | color.B, 36 | color.A); 37 | } 38 | } 39 | } -------------------------------------------------------------------------------- /Share/Share.Plugin.Android/ShareImplementation.cs: -------------------------------------------------------------------------------- 1 | using Android.App; 2 | using Android.Content; 3 | using Android.Support.CustomTabs; 4 | using Plugin.CurrentActivity; 5 | using Plugin.Share.Abstractions; 6 | using System; 7 | using System.Collections.Generic; 8 | using System.Threading.Tasks; 9 | 10 | namespace Plugin.Share 11 | { 12 | /// 13 | /// Implementation for Feature 14 | /// 15 | public class ShareImplementation : IShare 16 | { 17 | /// 18 | /// Open a browser to a specific url 19 | /// 20 | /// Url to open 21 | /// Platform specific options 22 | /// True if the operation was successful, false otherwise 23 | public Task OpenBrowser(string url, BrowserOptions options = null) 24 | { 25 | try 26 | { 27 | if (options == null) 28 | options = new BrowserOptions(); 29 | 30 | if (CrossCurrentActivity.Current.Activity == null) 31 | { 32 | var intent = new Intent(Intent.ActionView); 33 | intent.SetData(Android.Net.Uri.Parse(url)); 34 | 35 | intent.SetFlags(ActivityFlags.ClearTop); 36 | intent.SetFlags(ActivityFlags.NewTask); 37 | Application.Context.StartActivity(intent); 38 | } 39 | else 40 | { 41 | var tabsBuilder = new CustomTabsIntent.Builder(); 42 | tabsBuilder.SetShowTitle(options?.ChromeShowTitle ?? false); 43 | 44 | var toolbarColor = options?.ChromeToolbarColor; 45 | if (toolbarColor != null) 46 | tabsBuilder.SetToolbarColor(toolbarColor.ToNativeColor()); 47 | 48 | var intent = tabsBuilder.Build(); 49 | intent.LaunchUrl(CrossCurrentActivity.Current.Activity, Android.Net.Uri.Parse(url)); 50 | } 51 | 52 | return Task.FromResult(true); 53 | } 54 | catch (Exception ex) 55 | { 56 | Console.WriteLine("Unable to open browser: " + ex.Message); 57 | return Task.FromResult(false); 58 | } 59 | } 60 | 61 | 62 | /// 63 | /// Share a message with compatible services 64 | /// 65 | /// Message to share 66 | /// Platform specific options 67 | /// True if the operation was successful, false otherwise 68 | public Task Share(ShareMessage message, ShareOptions options = null) 69 | { 70 | if (message == null) 71 | throw new ArgumentNullException(nameof(message)); 72 | 73 | try 74 | { 75 | var items = new List(); 76 | if (message.Text != null) 77 | items.Add(message.Text); 78 | if (message.Url != null) 79 | items.Add(message.Url); 80 | 81 | var intent = new Intent(Intent.ActionSend); 82 | intent.SetType("text/plain"); 83 | intent.PutExtra(Intent.ExtraText, string.Join(Environment.NewLine, items)); 84 | if (message.Title != null) 85 | intent.PutExtra(Intent.ExtraSubject, message.Title); 86 | 87 | var chooserIntent = Intent.CreateChooser(intent, options?.ChooserTitle); 88 | chooserIntent.SetFlags(ActivityFlags.ClearTop); 89 | chooserIntent.SetFlags(ActivityFlags.NewTask); 90 | Application.Context.StartActivity(chooserIntent); 91 | 92 | return Task.FromResult(true); 93 | } 94 | catch (Exception ex) 95 | { 96 | Console.WriteLine("Unable to share: " + ex.Message); 97 | return Task.FromResult(false); 98 | } 99 | } 100 | 101 | /// 102 | /// Sets text of the clipboard 103 | /// 104 | /// Text to set 105 | /// Label to display (not required, Android only) 106 | /// True if the operation was successful, false otherwise 107 | public Task SetClipboardText(string text, string label = null) 108 | { 109 | try 110 | { 111 | var sdk = (int)Android.OS.Build.VERSION.SdkInt; 112 | if (sdk < (int)Android.OS.BuildVersionCodes.Honeycomb) 113 | { 114 | var clipboard = (Android.Text.ClipboardManager)Application.Context.GetSystemService(Context.ClipboardService); 115 | clipboard.Text = text; 116 | } 117 | else 118 | { 119 | var clipboard = (ClipboardManager)Application.Context.GetSystemService(Context.ClipboardService); 120 | clipboard.PrimaryClip = ClipData.NewPlainText(label ?? string.Empty, text); 121 | } 122 | 123 | return Task.FromResult(true); 124 | } 125 | catch (Exception ex) 126 | { 127 | Console.WriteLine("Unable to copy to clipboard: " + ex.Message); 128 | return Task.FromResult(false); 129 | } 130 | } 131 | 132 | /// 133 | /// Checks if the url can be opened 134 | /// 135 | /// Url to check 136 | /// True if it can 137 | public bool CanOpenUrl(string url) 138 | { 139 | try 140 | { 141 | var context = CrossCurrentActivity.Current.Activity ?? Application.Context; 142 | var intent = new Intent(Intent.ActionView); 143 | intent.SetData(Android.Net.Uri.Parse(url)); 144 | 145 | intent.SetFlags(ActivityFlags.ClearTop); 146 | intent.SetFlags(ActivityFlags.NewTask); 147 | return intent.ResolveActivity(context.PackageManager) != null; 148 | } 149 | catch (Exception ex) 150 | { 151 | return false; 152 | } 153 | } 154 | 155 | /// 156 | /// Gets if cliboard is supported 157 | /// 158 | public bool SupportsClipboard => true; 159 | } 160 | } -------------------------------------------------------------------------------- /Share/Share.Plugin.Android/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Share/Share.Plugin.Tizen/Share.Plugin.Tizen.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | tizen40 6 | false 7 | Plugin.Share 8 | Plugin.Share 9 | 10 | 11 | 12 | portable 13 | 14 | 15 | None 16 | 17 | 18 | 19 | 20 | 21 | Runtime 22 | 23 | 24 | 25 | 26 | 27 | CrossShare.cs 28 | 29 | 30 | 31 | 32 | {59b706e6-4b1d-415c-bdd0-da7aff4547c5} 33 | Share.Plugin.Abstractions 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /Share/Share.Plugin.Tizen/ShareImplementation.cs: -------------------------------------------------------------------------------- 1 | using Plugin.Share.Abstractions; 2 | using System; 3 | using System.Diagnostics; 4 | using System.Threading.Tasks; 5 | using Tizen.Applications; 6 | 7 | namespace Plugin.Share 8 | { 9 | /// 10 | /// Implementation for Share 11 | /// 12 | public class ShareImplementation : IShare 13 | { 14 | /// 15 | /// Open a browser to a specific url 16 | /// 17 | /// Url to open 18 | /// Platform specific options 19 | /// True if the operation was successful, false otherwise 20 | public Task OpenBrowser(string url, BrowserOptions options = null) 21 | { 22 | try 23 | { 24 | AppControl appControl = new AppControl(); 25 | appControl.Operation = AppControlOperations.View; 26 | appControl.Uri = url; 27 | AppControl.SendLaunchRequest(appControl); 28 | 29 | return Task.FromResult(true); 30 | } 31 | catch (Exception ex) 32 | { 33 | Debug.WriteLine("Unable to open browser: " + ex.Message); 34 | return Task.FromResult(false); 35 | } 36 | } 37 | 38 | /// 39 | /// Share a message with compatible services 40 | /// 41 | /// Message to share 42 | /// Platform specific options 43 | /// True if the operation was successful, false otherwise 44 | public Task Share(ShareMessage message, ShareOptions options = null) 45 | { 46 | if (message == null) 47 | throw new ArgumentNullException(nameof(message)); 48 | 49 | try 50 | { 51 | string sharedResourcePath = Application.Current.ApplicationInfo.SharedResourcePath.ToString(); 52 | AppControl appControl = new AppControl(); 53 | 54 | if (options != null) 55 | { 56 | switch(options.ExcludedAppControlTypes) 57 | { 58 | case ShareAppControlType.FileInEmail: 59 | appControl.Operation = AppControlOperations.Share; 60 | appControl.Uri = "mailto:"; 61 | if (message.Url == null) 62 | throw new ArgumentNullException(nameof(message.Url)); 63 | appControl.ExtraData.Add("http://tizen.org/appcontrol/data/path", sharedResourcePath + "/" + message.Url); 64 | break; 65 | case ShareAppControlType.FileInMessage: 66 | appControl.Operation = AppControlOperations.Share; 67 | appControl.Uri = "mmsto:"; 68 | if (message.Url == null) 69 | throw new ArgumentNullException(nameof(message.Url)); 70 | appControl.ExtraData.Add("http://tizen.org/appcontrol/data/path", sharedResourcePath + "/" + message.Url); 71 | break; 72 | case ShareAppControlType.TextInEmail: 73 | appControl.Operation = AppControlOperations.ShareText; 74 | appControl.Uri = "mailto:"; 75 | if (message.Text == null) 76 | throw new ArgumentNullException(nameof(message.Text)); 77 | appControl.ExtraData.Add("http://tizen.org/appcontrol/data/subject", message.Title); 78 | appControl.ExtraData.Add("http://tizen.org/appcontrol/data/text", message.Text); 79 | //appControl.ExtraData.Add("http://tizen.org/appcontrol/data/url", message.Url); 80 | break; 81 | case ShareAppControlType.TextInSMS: 82 | appControl.Operation = AppControlOperations.ShareText; 83 | appControl.Uri = "sms:"; 84 | if (message.Text == null) 85 | throw new ArgumentNullException(nameof(message.Text)); 86 | appControl.ExtraData.Add("http://tizen.org/appcontrol/data/subject", message.Title); 87 | appControl.ExtraData.Add("http://tizen.org/appcontrol/data/text", message.Text); 88 | //appControl.ExtraData.Add("http://tizen.org/appcontrol/data/url", message.Url); 89 | break; 90 | case ShareAppControlType.TextInMMS: 91 | appControl.Operation = AppControlOperations.ShareText; 92 | appControl.Uri = "mmsto:"; 93 | if (message.Text == null) 94 | throw new ArgumentNullException(nameof(message.Text)); 95 | appControl.ExtraData.Add("http://tizen.org/appcontrol/data/subject", message.Title); 96 | appControl.ExtraData.Add("http://tizen.org/appcontrol/data/text", message.Text); 97 | //appControl.ExtraData.Add("http://tizen.org/appcontrol/data/url", message.Url); 98 | break; 99 | case ShareAppControlType.Link: 100 | appControl.Operation = AppControlOperations.ShareText; 101 | if (message.Url == null) 102 | throw new ArgumentNullException(nameof(message.Url)); 103 | appControl.ExtraData.Add("http://tizen.org/appcontrol/data/subject", message.Title); 104 | appControl.ExtraData.Add("http://tizen.org/appcontrol/data/url", message.Text); 105 | appControl.ExtraData.Add("http://tizen.org/appcontrol/data/text", message.Url); 106 | break; 107 | default: 108 | appControl.Operation = AppControlOperations.ShareText; 109 | appControl.ExtraData.Add("http://tizen.org/appcontrol/data/subject", message.Title); 110 | appControl.ExtraData.Add("http://tizen.org/appcontrol/data/text", message.Text); 111 | appControl.ExtraData.Add("http://tizen.org/appcontrol/data/url", message.Url); 112 | break; 113 | } 114 | } 115 | else 116 | { 117 | appControl.Operation = AppControlOperations.ShareText; 118 | appControl.ExtraData.Add("http://tizen.org/appcontrol/data/subject", message.Title); 119 | appControl.ExtraData.Add("http://tizen.org/appcontrol/data/text", message.Text); 120 | appControl.ExtraData.Add("http://tizen.org/appcontrol/data/url", message.Url); 121 | } 122 | 123 | AppControl.SendLaunchRequest(appControl); 124 | 125 | return Task.FromResult(true); 126 | } 127 | catch (Exception ex) 128 | { 129 | Debug.WriteLine("Unable to share: " + ex.Message); 130 | return Task.FromResult(false); 131 | } 132 | } 133 | 134 | /// 135 | /// Sets text of the clipboard 136 | /// 137 | /// Text to set 138 | /// Label to display (not required, Android only) 139 | /// True if the operation was successful, false otherwise 140 | public Task SetClipboardText(string text, string label = null) 141 | { 142 | return Task.FromResult(false); 143 | } 144 | 145 | public bool CanOpenUrl(string url) => true; 146 | 147 | /// 148 | /// Gets if cliboard is supported 149 | /// 150 | public bool SupportsClipboard => false; 151 | } 152 | } 153 | -------------------------------------------------------------------------------- /Share/Share.Plugin.UWP/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("Plugin.Share")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("Plugin.Share")] 13 | [assembly: AssemblyCopyright("Copyright © 2015")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Version information for an assembly consists of the following four values: 18 | // 19 | // Major Version 20 | // Minor Version 21 | // Build Number 22 | // Revision 23 | // 24 | // You can specify all the values or you can default the Build and Revision Numbers 25 | // by using the '*' as shown below: 26 | // [assembly: AssemblyVersion("1.0.*")] 27 | [assembly: AssemblyVersion("3.0.1")] 28 | [assembly: AssemblyFileVersion("3.0.1")] 29 | [assembly: ComVisible(false)] -------------------------------------------------------------------------------- /Share/Share.Plugin.UWP/Properties/Plugin.Share.rd.xml: -------------------------------------------------------------------------------- 1 | 2 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /Share/Share.Plugin.UWP/Share.Plugin.UWP.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {D723D9F6-7DDC-4208-AD38-F67C58CC7574} 8 | Library 9 | Properties 10 | Plugin.Share 11 | Plugin.Share 12 | en-US 13 | UAP 14 | 10.0.10586.0 15 | 10.0.10240.0 16 | 14 17 | 512 18 | {A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 19 | 20 | 21 | AnyCPU 22 | true 23 | full 24 | false 25 | bin\Debug\ 26 | DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP 27 | prompt 28 | 4 29 | 30 | 31 | AnyCPU 32 | pdbonly 33 | true 34 | bin\Release\ 35 | TRACE;NETFX_CORE;WINDOWS_UWP 36 | prompt 37 | 4 38 | bin\Release\Plugin.Share.XML 39 | 40 | 41 | ARM 42 | true 43 | bin\ARM\Debug\ 44 | DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP 45 | ;2008 46 | full 47 | ARM 48 | false 49 | prompt 50 | 51 | 52 | ARM 53 | bin\ARM\Release\ 54 | TRACE;NETFX_CORE;WINDOWS_UWP 55 | true 56 | ;2008 57 | pdbonly 58 | ARM 59 | false 60 | prompt 61 | 62 | 63 | x64 64 | true 65 | bin\x64\Debug\ 66 | DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP 67 | ;2008 68 | full 69 | x64 70 | false 71 | prompt 72 | 73 | 74 | x64 75 | bin\x64\Release\ 76 | TRACE;NETFX_CORE;WINDOWS_UWP 77 | true 78 | ;2008 79 | pdbonly 80 | x64 81 | false 82 | prompt 83 | 84 | 85 | x86 86 | true 87 | bin\x86\Debug\ 88 | DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP 89 | ;2008 90 | full 91 | x86 92 | false 93 | prompt 94 | 95 | 96 | x86 97 | bin\Release\ 98 | TRACE;NETFX_CORE;WINDOWS_UWP 99 | true 100 | ;2008 101 | pdbonly 102 | AnyCPU 103 | false 104 | prompt 105 | bin\Release\Plugin.Share.XML 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | CrossShare.cs 114 | 115 | 116 | 117 | 118 | Always 119 | 120 | 121 | 122 | 123 | {59b706e6-4b1d-415c-bdd0-da7aff4547c5} 124 | Share.Plugin.Abstractions 125 | 126 | 127 | 128 | 14.0 129 | 130 | 131 | 138 | -------------------------------------------------------------------------------- /Share/Share.Plugin.UWP/ShareImplementation.cs: -------------------------------------------------------------------------------- 1 | using Plugin.Share.Abstractions; 2 | using System; 3 | using System.Diagnostics; 4 | using System.Threading.Tasks; 5 | using Windows.ApplicationModel.DataTransfer; 6 | using Windows.Foundation; 7 | 8 | namespace Plugin.Share 9 | { 10 | /// 11 | /// Implementation for Share 12 | /// 13 | public class ShareImplementation : IShare 14 | { 15 | 16 | /// 17 | /// Open a browser to a specific url 18 | /// 19 | /// Url to open 20 | /// Platform specific options 21 | /// True if the operation was successful, false otherwise 22 | public async Task OpenBrowser(string url, BrowserOptions options = null) 23 | { 24 | try 25 | { 26 | await Windows.System.Launcher.LaunchUriAsync(new Uri(url)); 27 | 28 | return true; 29 | } 30 | catch (Exception ex) 31 | { 32 | Debug.WriteLine("Unable to open browser: " + ex.Message); 33 | return false; 34 | } 35 | } 36 | 37 | string title, text, url; 38 | DataTransferManager dataTransferManager; 39 | 40 | 41 | /// 42 | /// Share a message with compatible services 43 | /// 44 | /// Message to share 45 | /// Platform specific options 46 | /// True if the operation was successful, false otherwise 47 | public Task Share(ShareMessage message, ShareOptions options = null) 48 | { 49 | if (message == null) 50 | throw new ArgumentNullException(nameof(message)); 51 | 52 | try 53 | { 54 | title = message.Title; 55 | text = message.Text; 56 | url = message.Url; 57 | if (dataTransferManager == null) 58 | { 59 | dataTransferManager = DataTransferManager.GetForCurrentView(); 60 | dataTransferManager.DataRequested += new TypedEventHandler(this.ShareTextHandler); 61 | } 62 | DataTransferManager.ShowShareUI(); 63 | 64 | return Task.FromResult(true); 65 | } 66 | catch (Exception ex) 67 | { 68 | Debug.WriteLine("Unable to share: " + ex.Message); 69 | return Task.FromResult(false); 70 | } 71 | } 72 | 73 | private void ShareTextHandler(DataTransferManager sender, DataRequestedEventArgs e) 74 | { 75 | try 76 | { 77 | DataRequest request = e.Request; 78 | 79 | // The Title is mandatory 80 | #if WINDOWS_UWP || WINDOWS_APP 81 | request.Data.Properties.Title = title ?? Windows.ApplicationModel.Package.Current.DisplayName; 82 | #else 83 | request.Data.Properties.Title = title ?? string.Empty; 84 | #endif 85 | 86 | if (text != null) 87 | request.Data.SetText(text); 88 | if (url != null) 89 | request.Data.SetWebLink(new Uri(url)); 90 | } 91 | catch (Exception ex) 92 | { 93 | Debug.WriteLine("Unable to share: " + ex.Message); 94 | } 95 | } 96 | 97 | /// 98 | /// Sets text of the clipboard 99 | /// 100 | /// Text to set 101 | /// Label to display (not required, Android only) 102 | /// True if the operation was successful, false otherwise 103 | public Task SetClipboardText(string text, string label = null) 104 | { 105 | #if WINDOWS_UWP || WINDOWS_APP 106 | try 107 | { 108 | var dataPackage = new DataPackage(); 109 | dataPackage.RequestedOperation = DataPackageOperation.Copy; 110 | dataPackage.SetText(text); 111 | 112 | Clipboard.SetContent(dataPackage); 113 | 114 | return Task.FromResult(true); 115 | } 116 | catch (Exception ex) 117 | { 118 | Debug.WriteLine("Unable to copy to clipboard: " + ex.Message); 119 | return Task.FromResult(false); 120 | } 121 | #else 122 | return Task.FromResult(false); 123 | #endif 124 | } 125 | 126 | 127 | /// 128 | /// Checks if the url can be opened 129 | /// 130 | /// Url to check 131 | /// True if it can 132 | public bool CanOpenUrl(string url) => true; 133 | 134 | /// 135 | /// Gets if cliboard is supported 136 | /// 137 | public bool SupportsClipboard 138 | { 139 | #if WINDOWS_UWP || WINDOWS_APP 140 | get { return true; } 141 | #else 142 | get { return false; } 143 | #endif 144 | } 145 | } 146 | } 147 | -------------------------------------------------------------------------------- /Share/Share.Plugin.UWP/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "Microsoft.NETCore.UniversalWindowsPlatform": "5.2.3" 4 | }, 5 | "frameworks": { 6 | "uap10.0": {} 7 | }, 8 | "runtimes": { 9 | "win10-arm": {}, 10 | "win10-arm-aot": {}, 11 | "win10-x86": {}, 12 | "win10-x86-aot": {}, 13 | "win10-x64": {}, 14 | "win10-x64-aot": {} 15 | } 16 | } -------------------------------------------------------------------------------- /Share/Share.Plugin.iOS/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("Plugin.Share")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("Plugin.Share")] 13 | [assembly: AssemblyCopyright("Copyright © 2014")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("38453772-383c-4ada-845b-100c5b84f50a")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("3.0.1")] 36 | [assembly: AssemblyFileVersion("3.0.1")] 37 | -------------------------------------------------------------------------------- /Share/Share.Plugin.iOS/Share.Plugin.iOS.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Debug 5 | AnyCPU 6 | {2882AEEB-D4CD-4EB9-8A6C-6653B33681F0} 7 | {FEACFBD2-3405-455C-9665-78FE426C6842};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 8 | Library 9 | Plugin.Share 10 | Resources 11 | Plugin.Share 12 | 13 | 14 | true 15 | full 16 | false 17 | bin\iPhone\Debug 18 | DEBUG 19 | prompt 20 | 4 21 | false 22 | true 23 | iPhone Developer 24 | 25 | 26 | none 27 | true 28 | bin\iPhone\Release 29 | prompt 30 | 4 31 | false 32 | iPhone Developer 33 | bin\iPhone\Release\Plugin.Share.xml 34 | 35 | 36 | 37 | CrossShare.cs 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | {59b706e6-4b1d-415c-bdd0-da7aff4547c5} 53 | Share.Plugin.Abstractions 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /Share/Share.Plugin.iOS/ShareActivityItemSource.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using Foundation; 5 | using UIKit; 6 | 7 | namespace Plugin.Share 8 | { 9 | class ShareActivityItemSource : UIActivityItemSource 10 | { 11 | private NSObject item; 12 | private string subject; 13 | 14 | public ShareActivityItemSource(NSObject item, string subject) 15 | { 16 | this.item = item; 17 | this.subject = subject; 18 | } 19 | 20 | public override NSObject GetItemForActivity(UIActivityViewController activityViewController, NSString activityType) 21 | { 22 | return item; 23 | } 24 | 25 | public override NSObject GetPlaceholderData(UIActivityViewController activityViewController) 26 | { 27 | return item; 28 | } 29 | 30 | public override string GetSubjectForActivity(UIActivityViewController activityViewController, NSString activityType) 31 | { 32 | return subject; 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /Share/Share.Plugin.iOS/ShareColorExtensions.cs: -------------------------------------------------------------------------------- 1 | using Plugin.Share.Abstractions; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Text; 5 | using UIKit; 6 | 7 | namespace Plugin.Share 8 | { 9 | /// 10 | /// Extension class used for color conversion 11 | /// 12 | static class ShareColorExtensions 13 | { 14 | /// 15 | /// Convert object to native color 16 | /// 17 | /// The color to convert 18 | /// The converted color 19 | public static UIColor ToUIColor(this ShareColor color) 20 | { 21 | if (color == null) 22 | throw new ArgumentNullException(nameof(color)); 23 | 24 | return new UIColor( 25 | color.R / 255f, 26 | color.G / 255f, 27 | color.B / 255f, 28 | color.A / 255f); 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /Share/Share.Plugin/CrossShare.cs: -------------------------------------------------------------------------------- 1 | using Plugin.Share.Abstractions; 2 | using System; 3 | 4 | namespace Plugin.Share 5 | { 6 | /// 7 | /// Cross platform Share implemenations 8 | /// 9 | public class CrossShare 10 | { 11 | static Lazy implementation = new Lazy(() => CreateShare(), System.Threading.LazyThreadSafetyMode.PublicationOnly); 12 | /// 13 | /// Gets if the plugin is supported on the current platform. 14 | /// 15 | public static bool IsSupported => implementation.Value == null ? false : true; 16 | 17 | /// 18 | /// Current plugin implementation to use 19 | /// 20 | public static IShare Current 21 | { 22 | get 23 | { 24 | var ret = implementation.Value; 25 | if (ret == null) 26 | { 27 | throw NotImplementedInReferenceAssembly(); 28 | } 29 | return ret; 30 | } 31 | } 32 | 33 | static IShare CreateShare() 34 | { 35 | #if NETSTANDARD1_0 36 | return null; 37 | #else 38 | return new ShareImplementation(); 39 | #endif 40 | } 41 | 42 | internal static Exception NotImplementedInReferenceAssembly() => 43 | new NotImplementedException("This functionality is not implemented in the portable version of this assembly. You should reference the NuGet package from your main application project in order to reference the platform-specific implementation."); 44 | 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /Share/Share.Plugin/Share.Plugin.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | netstandard1.0 5 | Plugin.Share 6 | Plugin.Share 7 | 1.0.0.0 8 | 1.0.0.0 9 | 1.0.0.0 10 | 11 | 12 | 13 | 14 | bin\Release\netstandard1.0\Plugin.Share.xml 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /ShareTest/ShareTest.Droid/Assets/AboutAssets.txt: -------------------------------------------------------------------------------- 1 | Any raw assets you want to be deployed with your application can be placed in 2 | this directory (and child directories) and given a Build Action of "AndroidAsset". 3 | 4 | These files will be deployed with you package and will be accessible using Android's 5 | AssetManager, like this: 6 | 7 | public class ReadAsset : Activity 8 | { 9 | protected override void OnCreate (Bundle bundle) 10 | { 11 | base.OnCreate (bundle); 12 | 13 | InputStream input = Assets.Open ("my_asset.txt"); 14 | } 15 | } 16 | 17 | Additionally, some Android functions will automatically load asset files: 18 | 19 | Typeface tf = Typeface.CreateFromAsset (Context.Assets, "fonts/samplefont.ttf"); 20 | -------------------------------------------------------------------------------- /ShareTest/ShareTest.Droid/MainActivity.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | using Android.App; 4 | using Android.Content.PM; 5 | using Android.Runtime; 6 | using Android.Views; 7 | using Android.Widget; 8 | using Android.OS; 9 | 10 | namespace ShareTest.Droid 11 | { 12 | [Activity(Label = "ShareTest", Icon = "@drawable/icon", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)] 13 | public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsApplicationActivity 14 | { 15 | protected override void OnCreate(Bundle bundle) 16 | { 17 | base.OnCreate(bundle); 18 | 19 | global::Xamarin.Forms.Forms.Init(this, bundle); 20 | LoadApplication(new App()); 21 | } 22 | } 23 | } 24 | 25 | -------------------------------------------------------------------------------- /ShareTest/ShareTest.Droid/MainApplication.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | using Android.App; 4 | using Android.OS; 5 | using Android.Runtime; 6 | using Plugin.CurrentActivity; 7 | 8 | namespace ShareTest.Droid 9 | { 10 | //You can specify additional application information in this attribute 11 | [Application] 12 | public class MainApplication : Application, Application.IActivityLifecycleCallbacks 13 | { 14 | public MainApplication(IntPtr handle, JniHandleOwnership transer) 15 | : base(handle, transer) 16 | { 17 | } 18 | 19 | public override void OnCreate() 20 | { 21 | base.OnCreate(); 22 | RegisterActivityLifecycleCallbacks(this); 23 | //A great place to initialize Xamarin.Insights and Dependency Services! 24 | } 25 | 26 | public override void OnTerminate() 27 | { 28 | base.OnTerminate(); 29 | UnregisterActivityLifecycleCallbacks(this); 30 | } 31 | 32 | public void OnActivityCreated(Activity activity, Bundle savedInstanceState) 33 | { 34 | CrossCurrentActivity.Current.Activity = activity; 35 | } 36 | 37 | public void OnActivityDestroyed(Activity activity) 38 | { 39 | } 40 | 41 | public void OnActivityPaused(Activity activity) 42 | { 43 | } 44 | 45 | public void OnActivityResumed(Activity activity) 46 | { 47 | CrossCurrentActivity.Current.Activity = activity; 48 | } 49 | 50 | public void OnActivitySaveInstanceState(Activity activity, Bundle outState) 51 | { 52 | } 53 | 54 | public void OnActivityStarted(Activity activity) 55 | { 56 | CrossCurrentActivity.Current.Activity = activity; 57 | } 58 | 59 | public void OnActivityStopped(Activity activity) 60 | { 61 | } 62 | } 63 | } -------------------------------------------------------------------------------- /ShareTest/ShareTest.Droid/Properties/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /ShareTest/ShareTest.Droid/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | using Android.App; 5 | 6 | // General Information about an assembly is controlled through the following 7 | // set of attributes. Change these attribute values to modify the information 8 | // associated with an assembly. 9 | [assembly: AssemblyTitle("ShareTest.Droid")] 10 | [assembly: AssemblyDescription("")] 11 | [assembly: AssemblyConfiguration("")] 12 | [assembly: AssemblyCompany("")] 13 | [assembly: AssemblyProduct("ShareTest.Droid")] 14 | [assembly: AssemblyCopyright("Copyright © 2014")] 15 | [assembly: AssemblyTrademark("")] 16 | [assembly: AssemblyCulture("")] 17 | [assembly: ComVisible(false)] 18 | 19 | // Version information for an assembly consists of the following four values: 20 | // 21 | // Major Version 22 | // Minor Version 23 | // Build Number 24 | // Revision 25 | // 26 | // You can specify all the values or you can default the Build and Revision Numbers 27 | // by using the '*' as shown below: 28 | // [assembly: AssemblyVersion("1.0.*")] 29 | [assembly: AssemblyVersion("3.0.1")] 30 | [assembly: AssemblyFileVersion("3.0.1")] 31 | 32 | // Add some common permissions, these can be removed if not needed 33 | [assembly: UsesPermission(Android.Manifest.Permission.Internet)] 34 | [assembly: UsesPermission(Android.Manifest.Permission.WriteExternalStorage)] 35 | -------------------------------------------------------------------------------- /ShareTest/ShareTest.Droid/Resources/AboutResources.txt: -------------------------------------------------------------------------------- 1 | Images, layout descriptions, binary blobs and string dictionaries can be included 2 | in your application as resource files. Various Android APIs are designed to 3 | operate on the resource IDs instead of dealing with images, strings or binary blobs 4 | directly. 5 | 6 | For example, a sample Android app that contains a user interface layout (main.xml), 7 | an internationalization string table (strings.xml) and some icons (drawable-XXX/icon.png) 8 | would keep its resources in the "Resources" directory of the application: 9 | 10 | Resources/ 11 | drawable-hdpi/ 12 | icon.png 13 | 14 | drawable-ldpi/ 15 | icon.png 16 | 17 | drawable-mdpi/ 18 | icon.png 19 | 20 | layout/ 21 | main.xml 22 | 23 | values/ 24 | strings.xml 25 | 26 | In order to get the build system to recognize Android resources, set the build action to 27 | "AndroidResource". The native Android APIs do not operate directly with filenames, but 28 | instead operate on resource IDs. When you compile an Android application that uses resources, 29 | the build system will package the resources for distribution and generate a class called 30 | "Resource" that contains the tokens for each one of the resources included. For example, 31 | for the above Resources layout, this is what the Resource class would expose: 32 | 33 | public class Resource { 34 | public class drawable { 35 | public const int icon = 0x123; 36 | } 37 | 38 | public class layout { 39 | public const int main = 0x456; 40 | } 41 | 42 | public class strings { 43 | public const int first_string = 0xabc; 44 | public const int second_string = 0xbcd; 45 | } 46 | } 47 | 48 | You would then use R.drawable.icon to reference the drawable/icon.png file, or Resource.layout.main 49 | to reference the layout/main.xml file, or Resource.strings.first_string to reference the first 50 | string in the dictionary file values/strings.xml. 51 | -------------------------------------------------------------------------------- /ShareTest/ShareTest.Droid/Resources/drawable-hdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jguertl/SharePlugin/4cffe8cc1ad0bcc1bd056761fbe17f01c48cb35b/ShareTest/ShareTest.Droid/Resources/drawable-hdpi/icon.png -------------------------------------------------------------------------------- /ShareTest/ShareTest.Droid/Resources/drawable-xhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jguertl/SharePlugin/4cffe8cc1ad0bcc1bd056761fbe17f01c48cb35b/ShareTest/ShareTest.Droid/Resources/drawable-xhdpi/icon.png -------------------------------------------------------------------------------- /ShareTest/ShareTest.Droid/Resources/drawable-xxhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jguertl/SharePlugin/4cffe8cc1ad0bcc1bd056761fbe17f01c48cb35b/ShareTest/ShareTest.Droid/Resources/drawable-xxhdpi/icon.png -------------------------------------------------------------------------------- /ShareTest/ShareTest.Droid/Resources/drawable/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jguertl/SharePlugin/4cffe8cc1ad0bcc1bd056761fbe17f01c48cb35b/ShareTest/ShareTest.Droid/Resources/drawable/icon.png -------------------------------------------------------------------------------- /ShareTest/ShareTest.Droid/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /ShareTest/ShareTest.Tizen/ShareTest.Tizen.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace ShareTest.Tizen 4 | { 5 | class Program : global::Xamarin.Forms.Platform.Tizen.FormsApplication 6 | { 7 | protected override void OnCreate() 8 | { 9 | base.OnCreate(); 10 | LoadApplication(new App()); 11 | } 12 | 13 | static void Main(string[] args) 14 | { 15 | var app = new Program(); 16 | global::Xamarin.Forms.Platform.Tizen.Forms.Init(app); 17 | app.Run(args); 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /ShareTest/ShareTest.Tizen/ShareTest.Tizen.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Exe 6 | tizen40 7 | 8 | 9 | 10 | portable 11 | 12 | 13 | None 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | Runtime 29 | 30 | 31 | 32 | 33 | 34 | 35 | ..\..\..\GeolocatorPlugin\src\Geolocator.Plugin.Tizen\bin\Debug\tizen40\Plugin.Geolocator.Abstractions.dll 36 | 37 | 38 | ..\..\Share\Share.Plugin.Tizen\bin\Debug\tizen40\Plugin.Share.dll 39 | 40 | 41 | ..\ShareTest\bin\Debug\ShareTest.dll 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /ShareTest/ShareTest.Tizen/shared/res/ShareTest.Tizen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jguertl/SharePlugin/4cffe8cc1ad0bcc1bd056761fbe17f01c48cb35b/ShareTest/ShareTest.Tizen/shared/res/ShareTest.Tizen.png -------------------------------------------------------------------------------- /ShareTest/ShareTest.Tizen/tizen-manifest.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ShareTest.Tizen.png 7 | 8 | 9 | 10 | http://tizen.org/privilege/appmanager.launch 11 | 12 | 13 | -------------------------------------------------------------------------------- /ShareTest/ShareTest.UWP/App.xaml: -------------------------------------------------------------------------------- 1 |  7 | 8 | 9 | -------------------------------------------------------------------------------- /ShareTest/ShareTest.UWP/App.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Runtime.InteropServices.WindowsRuntime; 6 | using Windows.ApplicationModel; 7 | using Windows.ApplicationModel.Activation; 8 | using Windows.Foundation; 9 | using Windows.Foundation.Collections; 10 | using Windows.UI.Xaml; 11 | using Windows.UI.Xaml.Controls; 12 | using Windows.UI.Xaml.Controls.Primitives; 13 | using Windows.UI.Xaml.Data; 14 | using Windows.UI.Xaml.Input; 15 | using Windows.UI.Xaml.Media; 16 | using Windows.UI.Xaml.Navigation; 17 | 18 | namespace ShareTest.UWP 19 | { 20 | /// 21 | /// Provides application-specific behavior to supplement the default Application class. 22 | /// 23 | sealed partial class App : Application 24 | { 25 | /// 26 | /// Initializes the singleton application object. This is the first line of authored code 27 | /// executed, and as such is the logical equivalent of main() or WinMain(). 28 | /// 29 | public App() 30 | { 31 | this.InitializeComponent(); 32 | this.Suspending += OnSuspending; 33 | } 34 | 35 | /// 36 | /// Invoked when the application is launched normally by the end user. Other entry points 37 | /// will be used such as when the application is launched to open a specific file. 38 | /// 39 | /// Details about the launch request and process. 40 | protected override void OnLaunched(LaunchActivatedEventArgs e) 41 | { 42 | #if DEBUG 43 | if (System.Diagnostics.Debugger.IsAttached) 44 | { 45 | this.DebugSettings.EnableFrameRateCounter = true; 46 | } 47 | #endif 48 | Frame rootFrame = Window.Current.Content as Frame; 49 | 50 | // Do not repeat app initialization when the Window already has content, 51 | // just ensure that the window is active 52 | if (rootFrame == null) 53 | { 54 | // Create a Frame to act as the navigation context and navigate to the first page 55 | rootFrame = new Frame(); 56 | 57 | rootFrame.NavigationFailed += OnNavigationFailed; 58 | Xamarin.Forms.Forms.Init(e); 59 | if (e.PreviousExecutionState == ApplicationExecutionState.Terminated) 60 | { 61 | //TODO: Load state from previously suspended application 62 | } 63 | 64 | // Place the frame in the current Window 65 | Window.Current.Content = rootFrame; 66 | } 67 | 68 | if (e.PrelaunchActivated == false) 69 | { 70 | if (rootFrame.Content == null) 71 | { 72 | // When the navigation stack isn't restored navigate to the first page, 73 | // configuring the new page by passing required information as a navigation 74 | // parameter 75 | rootFrame.Navigate(typeof(MainPage), e.Arguments); 76 | } 77 | // Ensure the current window is active 78 | Window.Current.Activate(); 79 | } 80 | } 81 | 82 | /// 83 | /// Invoked when Navigation to a certain page fails 84 | /// 85 | /// The Frame which failed navigation 86 | /// Details about the navigation failure 87 | void OnNavigationFailed(object sender, NavigationFailedEventArgs e) 88 | { 89 | throw new Exception("Failed to load Page " + e.SourcePageType.FullName); 90 | } 91 | 92 | /// 93 | /// Invoked when application execution is being suspended. Application state is saved 94 | /// without knowing whether the application will be terminated or resumed with the contents 95 | /// of memory still intact. 96 | /// 97 | /// The source of the suspend request. 98 | /// Details about the suspend request. 99 | private void OnSuspending(object sender, SuspendingEventArgs e) 100 | { 101 | var deferral = e.SuspendingOperation.GetDeferral(); 102 | //TODO: Save application state and stop any background activity 103 | deferral.Complete(); 104 | } 105 | } 106 | } 107 | -------------------------------------------------------------------------------- /ShareTest/ShareTest.UWP/Assets/LockScreenLogo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jguertl/SharePlugin/4cffe8cc1ad0bcc1bd056761fbe17f01c48cb35b/ShareTest/ShareTest.UWP/Assets/LockScreenLogo.scale-200.png -------------------------------------------------------------------------------- /ShareTest/ShareTest.UWP/Assets/SplashScreen.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jguertl/SharePlugin/4cffe8cc1ad0bcc1bd056761fbe17f01c48cb35b/ShareTest/ShareTest.UWP/Assets/SplashScreen.scale-200.png -------------------------------------------------------------------------------- /ShareTest/ShareTest.UWP/Assets/Square150x150Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jguertl/SharePlugin/4cffe8cc1ad0bcc1bd056761fbe17f01c48cb35b/ShareTest/ShareTest.UWP/Assets/Square150x150Logo.scale-200.png -------------------------------------------------------------------------------- /ShareTest/ShareTest.UWP/Assets/Square44x44Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jguertl/SharePlugin/4cffe8cc1ad0bcc1bd056761fbe17f01c48cb35b/ShareTest/ShareTest.UWP/Assets/Square44x44Logo.scale-200.png -------------------------------------------------------------------------------- /ShareTest/ShareTest.UWP/Assets/Square44x44Logo.targetsize-24_altform-unplated.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jguertl/SharePlugin/4cffe8cc1ad0bcc1bd056761fbe17f01c48cb35b/ShareTest/ShareTest.UWP/Assets/Square44x44Logo.targetsize-24_altform-unplated.png -------------------------------------------------------------------------------- /ShareTest/ShareTest.UWP/Assets/StoreLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jguertl/SharePlugin/4cffe8cc1ad0bcc1bd056761fbe17f01c48cb35b/ShareTest/ShareTest.UWP/Assets/StoreLogo.png -------------------------------------------------------------------------------- /ShareTest/ShareTest.UWP/Assets/Wide310x150Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jguertl/SharePlugin/4cffe8cc1ad0bcc1bd056761fbe17f01c48cb35b/ShareTest/ShareTest.UWP/Assets/Wide310x150Logo.scale-200.png -------------------------------------------------------------------------------- /ShareTest/ShareTest.UWP/MainPage.xaml: -------------------------------------------------------------------------------- 1 |  10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /ShareTest/ShareTest.UWP/MainPage.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Runtime.InteropServices.WindowsRuntime; 6 | using Windows.Foundation; 7 | using Windows.Foundation.Collections; 8 | using Windows.UI.Xaml; 9 | using Windows.UI.Xaml.Controls; 10 | using Windows.UI.Xaml.Controls.Primitives; 11 | using Windows.UI.Xaml.Data; 12 | using Windows.UI.Xaml.Input; 13 | using Windows.UI.Xaml.Media; 14 | using Windows.UI.Xaml.Navigation; 15 | using Xamarin.Forms.Platform.UWP; 16 | 17 | // The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=402352&clcid=0x409 18 | 19 | namespace ShareTest.UWP 20 | { 21 | /// 22 | /// An empty page that can be used on its own or navigated to within a Frame. 23 | /// 24 | public sealed partial class MainPage : WindowsPage 25 | { 26 | public MainPage() 27 | { 28 | this.InitializeComponent(); 29 | LoadApplication(new ShareTest.App()); 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /ShareTest/ShareTest.UWP/Package.appxmanifest: -------------------------------------------------------------------------------- 1 |  2 | 3 | 8 | 9 | 13 | 14 | 15 | 16 | 17 | ShareTest.UWP 18 | Dominik 19 | Assets\StoreLogo.png 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 34 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /ShareTest/ShareTest.UWP/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("ShareTest.UWP")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("ShareTest.UWP")] 13 | [assembly: AssemblyCopyright("Copyright © 2016")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Version information for an assembly consists of the following four values: 18 | // 19 | // Major Version 20 | // Minor Version 21 | // Build Number 22 | // Revision 23 | // 24 | // You can specify all the values or you can default the Build and Revision Numbers 25 | // by using the '*' as shown below: 26 | // [assembly: AssemblyVersion("1.0.*")] 27 | [assembly: AssemblyVersion("1.0.0.0")] 28 | [assembly: AssemblyFileVersion("1.0.0.0")] 29 | [assembly: ComVisible(false)] -------------------------------------------------------------------------------- /ShareTest/ShareTest.UWP/Properties/Default.rd.xml: -------------------------------------------------------------------------------- 1 | 17 | 18 | 19 | 20 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /ShareTest/ShareTest.UWP/ShareTest.UWP.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | x86 7 | {C8C4DA1C-9075-4A83-952F-6A8CC8AB9E58} 8 | AppContainerExe 9 | Properties 10 | ShareTest.UWP 11 | ShareTest.UWP 12 | en-US 13 | UAP 14 | 10.0.10586.0 15 | 10.0.10240.0 16 | 14 17 | 512 18 | {A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 19 | ShareTest.UWP_TemporaryKey.pfx 20 | 21 | 22 | true 23 | bin\x86\Debug\ 24 | DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP 25 | ;2008 26 | full 27 | x86 28 | false 29 | prompt 30 | true 31 | 32 | 33 | bin\x86\Release\ 34 | TRACE;NETFX_CORE;WINDOWS_UWP 35 | true 36 | ;2008 37 | pdbonly 38 | x86 39 | false 40 | prompt 41 | true 42 | true 43 | 44 | 45 | true 46 | bin\ARM\Debug\ 47 | DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP 48 | ;2008 49 | full 50 | ARM 51 | false 52 | prompt 53 | true 54 | 55 | 56 | bin\ARM\Release\ 57 | TRACE;NETFX_CORE;WINDOWS_UWP 58 | true 59 | ;2008 60 | pdbonly 61 | ARM 62 | false 63 | prompt 64 | true 65 | true 66 | 67 | 68 | true 69 | bin\x64\Debug\ 70 | DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP 71 | ;2008 72 | full 73 | x64 74 | false 75 | prompt 76 | true 77 | 78 | 79 | bin\x64\Release\ 80 | TRACE;NETFX_CORE;WINDOWS_UWP 81 | true 82 | ;2008 83 | pdbonly 84 | x64 85 | false 86 | prompt 87 | true 88 | true 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | App.xaml 97 | 98 | 99 | MainPage.xaml 100 | 101 | 102 | 103 | 104 | 105 | Designer 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | MSBuild:Compile 122 | Designer 123 | 124 | 125 | MSBuild:Compile 126 | Designer 127 | 128 | 129 | 130 | 131 | {1595236a-04fc-4d89-99c2-ceb1d7f0b87e} 132 | Share.Plugin.Abstractions 133 | 134 | 135 | {d723d9f6-7ddc-4208-ad38-f67c58cc7574} 136 | Share.Plugin.UWP 137 | 138 | 139 | {0f183fa6-5a54-4ce7-810a-801937115de3} 140 | ShareTest 141 | 142 | 143 | 144 | 14.0 145 | 146 | 147 | 154 | -------------------------------------------------------------------------------- /ShareTest/ShareTest.UWP/ShareTest.UWP.nuget.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | True 5 | NuGet 6 | C:\GitHub\SharePlugin\ShareTest\ShareTest.UWP\project.lock.json 7 | $(UserProfile)\.nuget\packages\ 8 | C:\Users\James Montemagno\.nuget\packages\;C:\Program Files (x86)\Microsoft SDKs\NuGetPackagesFallback\ 9 | ProjectJson 10 | 4.5.0 11 | 12 | 13 | $(MSBuildAllProjects);$(MSBuildThisFileFullPath) 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /ShareTest/ShareTest.UWP/ShareTest.UWP.nuget.targets: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | $(MSBuildAllProjects);$(MSBuildThisFileFullPath) 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ShareTest/ShareTest.UWP/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "Microsoft.NETCore.UniversalWindowsPlatform": "5.2.3", 4 | "Xamarin.Forms": "2.5.0.121934" 5 | }, 6 | "frameworks": { 7 | "uap10.0.10240": {} 8 | }, 9 | "runtimes": { 10 | "win10-arm": {}, 11 | "win10-arm-aot": {}, 12 | "win10-x86": {}, 13 | "win10-x86-aot": {}, 14 | "win10-x64": {}, 15 | "win10-x64-aot": {} 16 | } 17 | } -------------------------------------------------------------------------------- /ShareTest/ShareTest.iOS/AppDelegate.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | 5 | using Foundation; 6 | using UIKit; 7 | 8 | namespace ShareTest.iOS 9 | { 10 | // The UIApplicationDelegate for the application. This class is responsible for launching the 11 | // User Interface of the application, as well as listening (and optionally responding) to 12 | // application events from iOS. 13 | [Register("AppDelegate")] 14 | public partial class AppDelegate : global::Xamarin.Forms.Platform.iOS.FormsApplicationDelegate 15 | { 16 | // 17 | // This method is invoked when the application has loaded and is ready to run. In this 18 | // method you should instantiate the window, load the UI into it and then make the window 19 | // visible. 20 | // 21 | // You have 17 seconds to return from this method, or iOS will terminate your application. 22 | // 23 | public override bool FinishedLaunching(UIApplication app, NSDictionary options) 24 | { 25 | global::Xamarin.Forms.Forms.Init(); 26 | LoadApplication(new App()); 27 | 28 | return base.FinishedLaunching(app, options); 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /ShareTest/ShareTest.iOS/Entitlements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /ShareTest/ShareTest.iOS/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | UIDeviceFamily 6 | 7 | 1 8 | 2 9 | 10 | UISupportedInterfaceOrientations 11 | 12 | UIInterfaceOrientationPortrait 13 | UIInterfaceOrientationLandscapeLeft 14 | UIInterfaceOrientationLandscapeRight 15 | 16 | UISupportedInterfaceOrientations~ipad 17 | 18 | UIInterfaceOrientationPortrait 19 | UIInterfaceOrientationPortraitUpsideDown 20 | UIInterfaceOrientationLandscapeLeft 21 | UIInterfaceOrientationLandscapeRight 22 | 23 | MinimumOSVersion 24 | 6.0 25 | CFBundleDisplayName 26 | ShareTest 27 | CFBundleIdentifier 28 | com.plugin.ShareTest 29 | CFBundleVersion 30 | 1.0 31 | CFBundleIconFiles 32 | 33 | Icon-60@2x.png 34 | Icon-76.png 35 | Icon-76@2x.png 36 | Default.png 37 | Default@2x.png 38 | Default-568h@2x.png 39 | Default-Portrait.png 40 | Default-Portrait@2x.png 41 | Icon-Small-40.png 42 | Icon-Small-40@2x.png 43 | Icon-Small.png 44 | Icon-Small@2x.png 45 | 46 | UILaunchStoryboardName 47 | LaunchScreen 48 | CFBundleShortVersionString 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /ShareTest/ShareTest.iOS/Main.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | 5 | using Foundation; 6 | using UIKit; 7 | 8 | namespace ShareTest.iOS 9 | { 10 | public class Application 11 | { 12 | // This is the main entry point of the application. 13 | static void Main(string[] args) 14 | { 15 | // if you want to use a different Application Delegate class from "AppDelegate" 16 | // you can specify it here. 17 | UIApplication.Main(args, null, "AppDelegate"); 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /ShareTest/ShareTest.iOS/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("ShareTest.iOS")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("ShareTest.iOS")] 13 | [assembly: AssemblyCopyright("Copyright © 2014")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("72bdc44f-c588-44f3-b6df-9aace7daafdd")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("3.0.1")] 36 | [assembly: AssemblyFileVersion("3.0.1")] 37 | -------------------------------------------------------------------------------- /ShareTest/ShareTest.iOS/Resources/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jguertl/SharePlugin/4cffe8cc1ad0bcc1bd056761fbe17f01c48cb35b/ShareTest/ShareTest.iOS/Resources/Default-568h@2x.png -------------------------------------------------------------------------------- /ShareTest/ShareTest.iOS/Resources/Default-Portrait.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jguertl/SharePlugin/4cffe8cc1ad0bcc1bd056761fbe17f01c48cb35b/ShareTest/ShareTest.iOS/Resources/Default-Portrait.png -------------------------------------------------------------------------------- /ShareTest/ShareTest.iOS/Resources/Default-Portrait@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jguertl/SharePlugin/4cffe8cc1ad0bcc1bd056761fbe17f01c48cb35b/ShareTest/ShareTest.iOS/Resources/Default-Portrait@2x.png -------------------------------------------------------------------------------- /ShareTest/ShareTest.iOS/Resources/Default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jguertl/SharePlugin/4cffe8cc1ad0bcc1bd056761fbe17f01c48cb35b/ShareTest/ShareTest.iOS/Resources/Default.png -------------------------------------------------------------------------------- /ShareTest/ShareTest.iOS/Resources/Default@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jguertl/SharePlugin/4cffe8cc1ad0bcc1bd056761fbe17f01c48cb35b/ShareTest/ShareTest.iOS/Resources/Default@2x.png -------------------------------------------------------------------------------- /ShareTest/ShareTest.iOS/Resources/Icon-60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jguertl/SharePlugin/4cffe8cc1ad0bcc1bd056761fbe17f01c48cb35b/ShareTest/ShareTest.iOS/Resources/Icon-60@2x.png -------------------------------------------------------------------------------- /ShareTest/ShareTest.iOS/Resources/Icon-60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jguertl/SharePlugin/4cffe8cc1ad0bcc1bd056761fbe17f01c48cb35b/ShareTest/ShareTest.iOS/Resources/Icon-60@3x.png -------------------------------------------------------------------------------- /ShareTest/ShareTest.iOS/Resources/Icon-76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jguertl/SharePlugin/4cffe8cc1ad0bcc1bd056761fbe17f01c48cb35b/ShareTest/ShareTest.iOS/Resources/Icon-76.png -------------------------------------------------------------------------------- /ShareTest/ShareTest.iOS/Resources/Icon-76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jguertl/SharePlugin/4cffe8cc1ad0bcc1bd056761fbe17f01c48cb35b/ShareTest/ShareTest.iOS/Resources/Icon-76@2x.png -------------------------------------------------------------------------------- /ShareTest/ShareTest.iOS/Resources/Icon-Small-40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jguertl/SharePlugin/4cffe8cc1ad0bcc1bd056761fbe17f01c48cb35b/ShareTest/ShareTest.iOS/Resources/Icon-Small-40.png -------------------------------------------------------------------------------- /ShareTest/ShareTest.iOS/Resources/Icon-Small-40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jguertl/SharePlugin/4cffe8cc1ad0bcc1bd056761fbe17f01c48cb35b/ShareTest/ShareTest.iOS/Resources/Icon-Small-40@2x.png -------------------------------------------------------------------------------- /ShareTest/ShareTest.iOS/Resources/Icon-Small-40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jguertl/SharePlugin/4cffe8cc1ad0bcc1bd056761fbe17f01c48cb35b/ShareTest/ShareTest.iOS/Resources/Icon-Small-40@3x.png -------------------------------------------------------------------------------- /ShareTest/ShareTest.iOS/Resources/Icon-Small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jguertl/SharePlugin/4cffe8cc1ad0bcc1bd056761fbe17f01c48cb35b/ShareTest/ShareTest.iOS/Resources/Icon-Small.png -------------------------------------------------------------------------------- /ShareTest/ShareTest.iOS/Resources/Icon-Small@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jguertl/SharePlugin/4cffe8cc1ad0bcc1bd056761fbe17f01c48cb35b/ShareTest/ShareTest.iOS/Resources/Icon-Small@2x.png -------------------------------------------------------------------------------- /ShareTest/ShareTest.iOS/Resources/Icon-Small@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jguertl/SharePlugin/4cffe8cc1ad0bcc1bd056761fbe17f01c48cb35b/ShareTest/ShareTest.iOS/Resources/Icon-Small@3x.png -------------------------------------------------------------------------------- /ShareTest/ShareTest.iOS/Resources/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /ShareTest/ShareTest.iOS/iTunesArtwork: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jguertl/SharePlugin/4cffe8cc1ad0bcc1bd056761fbe17f01c48cb35b/ShareTest/ShareTest.iOS/iTunesArtwork -------------------------------------------------------------------------------- /ShareTest/ShareTest.iOS/iTunesArtwork@2x: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jguertl/SharePlugin/4cffe8cc1ad0bcc1bd056761fbe17f01c48cb35b/ShareTest/ShareTest.iOS/iTunesArtwork@2x -------------------------------------------------------------------------------- /ShareTest/ShareTest.iOS/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /ShareTest/ShareTest/App.cs: -------------------------------------------------------------------------------- 1 | using Plugin.Share; 2 | using Plugin.Share.Abstractions; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Linq; 6 | using System.Text; 7 | 8 | using Xamarin.Forms; 9 | 10 | namespace ShareTest 11 | { 12 | public class App : Application 13 | { 14 | public App() 15 | { 16 | var button = new Button 17 | { 18 | Text = "Share some text" 19 | }; 20 | 21 | var button1 = new Button 22 | { 23 | Text = "Share a link" 24 | }; 25 | 26 | var button2 = new Button 27 | { 28 | Text = "Open browser" 29 | }; 30 | 31 | var buttonShare = new Button 32 | { 33 | Text = "Share" 34 | }; 35 | 36 | var buttonNewPage = new Button 37 | { 38 | Text = "Modal Page" 39 | }; 40 | 41 | buttonNewPage.Clicked += async (sender, args) => 42 | { 43 | await Application.Current.MainPage.Navigation.PushModalAsync(new Page1()); 44 | }; 45 | 46 | var switchTitle = new Switch { IsToggled = true }; 47 | var switchText = new Switch { IsToggled = true }; 48 | var switchUrl = new Switch { IsToggled = true }; 49 | var switchChooserTitle = new Switch { IsToggled = true }; 50 | 51 | button.Clicked += (sender, args) => 52 | { 53 | CrossShare.Current.Share(new ShareMessage 54 | { 55 | Text = "Follow @JamesMontemagno on Twitter", 56 | Title = "Share" 57 | }, 58 | new ShareOptions 59 | { 60 | ChooserTitle = "Chooser Title", 61 | ExcludedUIActivityTypes = new [] { ShareUIActivityType.PostToFacebook }, 62 | PopoverAnchorRectangle = button.GetScreenRect() 63 | }); 64 | 65 | }; 66 | 67 | button1.Clicked += (sender, args) => 68 | { 69 | CrossShare.Current.Share(new Plugin.Share.Abstractions.ShareMessage 70 | { 71 | Text = "MotzCod.es", 72 | Title = "heckout my blog", 73 | Url = "http://motzcod.es" 74 | }); 75 | 76 | }; 77 | 78 | button2.Clicked += (sender, args) => 79 | { 80 | CrossShare.Current.OpenBrowser("http://motzcod.es", new BrowserOptions() { SafariBarTintColor = new ShareColor(200, 0, 0), SafariControlTintColor = new ShareColor(255, 255, 255), ChromeToolbarColor = new ShareColor(200, 0, 0) }); 81 | }; 82 | 83 | buttonShare.Clicked += (sender, args) => 84 | { 85 | var shareMessage = new ShareMessage(); 86 | var shareOptions = new ShareOptions(); 87 | 88 | if (switchTitle.IsToggled) 89 | shareMessage.Title = "MotzCod.es"; 90 | if (switchText.IsToggled) 91 | shareMessage.Text = "Checkout my blog"; 92 | if (switchUrl.IsToggled) 93 | shareMessage.Url = "http://motzcod.es"; 94 | 95 | if (switchChooserTitle.IsToggled) 96 | shareOptions.ChooserTitle = "Share this!"; 97 | 98 | CrossShare.Current.Share(shareMessage, shareOptions); 99 | }; 100 | 101 | // The root page of your application 102 | MainPage = new NavigationPage(new ContentPage 103 | { 104 | Content = new StackLayout 105 | { 106 | VerticalOptions = LayoutOptions.Center, 107 | Children = 108 | { 109 | new Label 110 | { 111 | XAlign = TextAlignment.Center, 112 | Text = "Welcome to Share Plugin Sample!" 113 | }, 114 | button, 115 | button1, 116 | button2, 117 | buttonNewPage, 118 | new Label 119 | { 120 | XAlign = TextAlignment.Center, 121 | Text = "New sharing options:" 122 | }, 123 | new StackLayout 124 | { 125 | Orientation = StackOrientation.Horizontal, 126 | Children = { switchTitle, new Label { Text = "Include title" } } 127 | }, 128 | new StackLayout 129 | { 130 | Orientation = StackOrientation.Horizontal, 131 | Children = { switchText, new Label { Text = "Include text" } } 132 | }, 133 | new StackLayout 134 | { 135 | Orientation = StackOrientation.Horizontal, 136 | Children = { switchUrl, new Label { Text = "Include url" } } 137 | }, 138 | new StackLayout 139 | { 140 | Orientation = StackOrientation.Horizontal, 141 | Children = { switchChooserTitle, new Label { Text = "Include chooser title (Android only)" } } 142 | }, 143 | buttonShare 144 | } 145 | } 146 | }); 147 | } 148 | 149 | protected override void OnStart() 150 | { 151 | // Handle when your app starts 152 | } 153 | 154 | protected override void OnSleep() 155 | { 156 | // Handle when your app sleeps 157 | } 158 | 159 | protected override void OnResume() 160 | { 161 | // Handle when your app resumes 162 | } 163 | } 164 | } 165 | -------------------------------------------------------------------------------- /ShareTest/ShareTest/GettingStarted.Xamarin: -------------------------------------------------------------------------------- 1 | 2 | GS\XF\CS\App\GettingStarted.html 3 | false 4 | -------------------------------------------------------------------------------- /ShareTest/ShareTest/Page1.xaml: -------------------------------------------------------------------------------- 1 |  2 | 5 | 6 | 7 |