community-cordova-plugin-social-sharing 6.1.0 → 6.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/FUNDING.yml +3 -0
- package/.travis.yml +4 -4
- package/LICENSE +18 -18
- package/README.md +582 -559
- package/package.json +48 -48
- package/plugin.xml +125 -119
- package/src/android/nl/xservices/plugins/FileProvider.java +3 -3
- package/src/android/nl/xservices/plugins/ShareChooserPendingIntent.java +16 -16
- package/src/android/nl/xservices/plugins/SocialSharing.java +809 -802
- package/src/android/res/xml/sharing_paths.xml +10 -10
- package/src/ios/NSString+SSURLEncoding.h +5 -5
- package/src/ios/NSString+SSURLEncoding.m +30 -30
- package/src/ios/SocialSharing.h +28 -28
- package/src/ios/SocialSharing.m +861 -861
- package/src/windows/SocialSharingProxy.js +176 -176
- package/src/wp8/Newtonsoft.Json.dll +0 -0
- package/src/wp8/SocialSharing.cs +103 -103
- package/types/index.d.ts +62 -62
- package/www/SocialSharing.js +157 -157
package/package.json
CHANGED
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "community-cordova-plugin-social-sharing",
|
|
3
|
-
"version": "6.
|
|
4
|
-
"description": "Share text, images (and other files), or a link via the native sharing widget of your device. Android is fully supported, as well as iOS 6 and up. WP8 has somewhat limited support.",
|
|
5
|
-
"cordova": {
|
|
6
|
-
"id": "community-cordova-plugin-social-sharing",
|
|
7
|
-
"platforms": [
|
|
8
|
-
"ios",
|
|
9
|
-
"android",
|
|
10
|
-
"wp8",
|
|
11
|
-
"windows",
|
|
12
|
-
"web"
|
|
13
|
-
]
|
|
14
|
-
},
|
|
15
|
-
"repository": "EYALIN/community-cordova-plugin-social-sharing/tree/master",
|
|
16
|
-
"homepage": "https://github.com/EYALIN/community-cordova-plugin-social-sharing/tree/master",
|
|
17
|
-
"funding": "https://github.com/sponsors/EYALIN",
|
|
18
|
-
"keywords": [
|
|
19
|
-
"Social",
|
|
20
|
-
"Share",
|
|
21
|
-
"Twitter",
|
|
22
|
-
"Facebook",
|
|
23
|
-
"Email",
|
|
24
|
-
"SMS",
|
|
25
|
-
"WhatsApp",
|
|
26
|
-
"Tumblr",
|
|
27
|
-
"Pocket",
|
|
28
|
-
"LinkedIn",
|
|
29
|
-
"cordova",
|
|
30
|
-
"WebShare",
|
|
31
|
-
"ecosystem:cordova",
|
|
32
|
-
"cordova-ios",
|
|
33
|
-
"cordova-android",
|
|
34
|
-
"cordova-windows"
|
|
35
|
-
],
|
|
36
|
-
"engines": [
|
|
37
|
-
{
|
|
38
|
-
"name": "cordova",
|
|
39
|
-
"version": ">=3.0.0"
|
|
40
|
-
}
|
|
41
|
-
],
|
|
42
|
-
"author": "Eyalin",
|
|
43
|
-
"license": "MIT",
|
|
44
|
-
"bugs": {
|
|
45
|
-
"url": "https://github.com/EddyVerbruggen/SocialSharing-PhoneGap-Plugin/issues"
|
|
46
|
-
},
|
|
47
|
-
"types": "./types/index.d.ts"
|
|
48
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "community-cordova-plugin-social-sharing",
|
|
3
|
+
"version": "6.2.0",
|
|
4
|
+
"description": "Share text, images (and other files), or a link via the native sharing widget of your device. Android is fully supported, as well as iOS 6 and up. WP8 has somewhat limited support.",
|
|
5
|
+
"cordova": {
|
|
6
|
+
"id": "community-cordova-plugin-social-sharing",
|
|
7
|
+
"platforms": [
|
|
8
|
+
"ios",
|
|
9
|
+
"android",
|
|
10
|
+
"wp8",
|
|
11
|
+
"windows",
|
|
12
|
+
"web"
|
|
13
|
+
]
|
|
14
|
+
},
|
|
15
|
+
"repository": "EYALIN/community-cordova-plugin-social-sharing/tree/master",
|
|
16
|
+
"homepage": "https://github.com/EYALIN/community-cordova-plugin-social-sharing/tree/master",
|
|
17
|
+
"funding": "https://github.com/sponsors/EYALIN",
|
|
18
|
+
"keywords": [
|
|
19
|
+
"Social",
|
|
20
|
+
"Share",
|
|
21
|
+
"Twitter",
|
|
22
|
+
"Facebook",
|
|
23
|
+
"Email",
|
|
24
|
+
"SMS",
|
|
25
|
+
"WhatsApp",
|
|
26
|
+
"Tumblr",
|
|
27
|
+
"Pocket",
|
|
28
|
+
"LinkedIn",
|
|
29
|
+
"cordova",
|
|
30
|
+
"WebShare",
|
|
31
|
+
"ecosystem:cordova",
|
|
32
|
+
"cordova-ios",
|
|
33
|
+
"cordova-android",
|
|
34
|
+
"cordova-windows"
|
|
35
|
+
],
|
|
36
|
+
"engines": [
|
|
37
|
+
{
|
|
38
|
+
"name": "cordova",
|
|
39
|
+
"version": ">=3.0.0"
|
|
40
|
+
}
|
|
41
|
+
],
|
|
42
|
+
"author": "Eyalin",
|
|
43
|
+
"license": "MIT",
|
|
44
|
+
"bugs": {
|
|
45
|
+
"url": "https://github.com/EddyVerbruggen/SocialSharing-PhoneGap-Plugin/issues"
|
|
46
|
+
},
|
|
47
|
+
"types": "./types/index.d.ts"
|
|
48
|
+
}
|
package/plugin.xml
CHANGED
|
@@ -1,119 +1,125 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
|
|
3
|
-
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
4
|
-
id="community-cordova-plugin-social-sharing"
|
|
5
|
-
version="6.
|
|
6
|
-
|
|
7
|
-
<name>SocialSharing</name>
|
|
8
|
-
|
|
9
|
-
<description>
|
|
10
|
-
Share text, images (and other files), or a link via the native sharing widget of your device.
|
|
11
|
-
Android is fully supported, as well as iOS 6 and up. WP8 has somewhat limited support.
|
|
12
|
-
</description>
|
|
13
|
-
|
|
14
|
-
<author>Eddy Verbruggen</author>
|
|
15
|
-
|
|
16
|
-
<license>MIT</license>
|
|
17
|
-
|
|
18
|
-
<keywords>Social, Share, Twitter, Facebook, Email, SMS, WhatsApp, Tumblr, Pocket, LinkedIn</keywords>
|
|
19
|
-
|
|
20
|
-
<repo>https://github.com/EYALIN/community-cordova-plugin-social-sharing.git</repo>
|
|
21
|
-
|
|
22
|
-
<issue>https://github.com/
|
|
23
|
-
|
|
24
|
-
<engines>
|
|
25
|
-
<engine name="cordova" version=">=3.0.0"/>
|
|
26
|
-
</engines>
|
|
27
|
-
|
|
28
|
-
<dependency id="es6-promise-plugin" version="^4.1.0" />
|
|
29
|
-
|
|
30
|
-
<js-module src="www/SocialSharing.js" name="SocialSharing">
|
|
31
|
-
<clobbers target="window.plugins.socialsharing" />
|
|
32
|
-
</js-module>
|
|
33
|
-
|
|
34
|
-
<!-- ios -->
|
|
35
|
-
<platform name="ios">
|
|
36
|
-
|
|
37
|
-
<config-file target="config.xml" parent="/*">
|
|
38
|
-
<feature name="SocialSharing">
|
|
39
|
-
<param name="ios-package" value="SocialSharing"/>
|
|
40
|
-
<param name="onload" value="true" />
|
|
41
|
-
</feature>
|
|
42
|
-
</config-file>
|
|
43
|
-
|
|
44
|
-
<preference name="PHOTO_LIBRARY_ADD_USAGE_DESCRIPTION" default="This app requires photo library access to function properly." />
|
|
45
|
-
<config-file target="*-Info.plist" parent="NSPhotoLibraryAddUsageDescription">
|
|
46
|
-
<string>$PHOTO_LIBRARY_ADD_USAGE_DESCRIPTION</string>
|
|
47
|
-
</config-file>
|
|
48
|
-
|
|
49
|
-
<preference name="PHOTO_LIBRARY_USAGE_DESCRIPTION" default="This app requires photo library access to function properly." />
|
|
50
|
-
<config-file target ="*-Info.plist" parent="NSPhotoLibraryUsageDescription">
|
|
51
|
-
<string>$PHOTO_LIBRARY_USAGE_DESCRIPTION</string>
|
|
52
|
-
</config-file>
|
|
53
|
-
|
|
54
|
-
<header-file src="src/ios/NSString+SSURLEncoding.h"/>
|
|
55
|
-
<source-file src="src/ios/NSString+SSURLEncoding.m"/>
|
|
56
|
-
<header-file src="src/ios/SocialSharing.h"/>
|
|
57
|
-
<source-file src="src/ios/SocialSharing.m"/>
|
|
58
|
-
|
|
59
|
-
<framework src="Social.framework" weak="true" />
|
|
60
|
-
<framework src="MessageUI.framework" weak="true" />
|
|
61
|
-
</platform>
|
|
62
|
-
|
|
63
|
-
<!-- android -->
|
|
64
|
-
<platform name="android">
|
|
65
|
-
|
|
66
|
-
<config-file target="res/xml/config.xml" parent="/*">
|
|
67
|
-
<feature name="SocialSharing">
|
|
68
|
-
<param name="android-package" value="nl.xservices.plugins.SocialSharing" />
|
|
69
|
-
</feature>
|
|
70
|
-
</config-file>
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
<config-file target="AndroidManifest.xml" parent="/*/application">
|
|
75
|
-
<receiver android:name="nl.xservices.plugins.ShareChooserPendingIntent" android:enabled="true" android:exported="true">
|
|
76
|
-
<intent-filter>
|
|
77
|
-
<action android:name="android.intent.action.SEND"/>
|
|
78
|
-
</intent-filter>
|
|
79
|
-
</receiver>
|
|
80
|
-
</config-file>
|
|
81
|
-
|
|
82
|
-
<config-file target="AndroidManifest.xml" parent="/*">
|
|
83
|
-
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
|
|
84
|
-
</config-file>
|
|
85
|
-
|
|
86
|
-
<config-file target="AndroidManifest.xml" parent="/manifest/application">
|
|
87
|
-
<provider android:authorities="${applicationId}.sharing.provider" android:exported="false" android:grantUriPermissions="true" android:name="nl.xservices.plugins.FileProvider">
|
|
88
|
-
<meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/sharing_paths" />
|
|
89
|
-
</provider>
|
|
90
|
-
</config-file>
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
<
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
<
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
|
|
3
|
+
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
4
|
+
id="community-cordova-plugin-social-sharing"
|
|
5
|
+
version="6.2.0">
|
|
6
|
+
|
|
7
|
+
<name>SocialSharing</name>
|
|
8
|
+
|
|
9
|
+
<description>
|
|
10
|
+
Share text, images (and other files), or a link via the native sharing widget of your device.
|
|
11
|
+
Android is fully supported, as well as iOS 6 and up. WP8 has somewhat limited support.
|
|
12
|
+
</description>
|
|
13
|
+
|
|
14
|
+
<author>Eddy Verbruggen</author>
|
|
15
|
+
|
|
16
|
+
<license>MIT</license>
|
|
17
|
+
|
|
18
|
+
<keywords>Social, Share, Twitter, Facebook, Email, SMS, WhatsApp, Tumblr, Pocket, LinkedIn</keywords>
|
|
19
|
+
|
|
20
|
+
<repo>https://github.com/EYALIN/community-cordova-plugin-social-sharing.git</repo>
|
|
21
|
+
|
|
22
|
+
<issue>https://github.com/EYALIN/community-cordova-plugin-social-sharing/issues</issue>
|
|
23
|
+
|
|
24
|
+
<engines>
|
|
25
|
+
<engine name="cordova" version=">=3.0.0"/>
|
|
26
|
+
</engines>
|
|
27
|
+
|
|
28
|
+
<dependency id="es6-promise-plugin" version="^4.1.0" />
|
|
29
|
+
|
|
30
|
+
<js-module src="www/SocialSharing.js" name="SocialSharing">
|
|
31
|
+
<clobbers target="window.plugins.socialsharing" />
|
|
32
|
+
</js-module>
|
|
33
|
+
|
|
34
|
+
<!-- ios -->
|
|
35
|
+
<platform name="ios">
|
|
36
|
+
|
|
37
|
+
<config-file target="config.xml" parent="/*">
|
|
38
|
+
<feature name="SocialSharing">
|
|
39
|
+
<param name="ios-package" value="SocialSharing"/>
|
|
40
|
+
<param name="onload" value="true" />
|
|
41
|
+
</feature>
|
|
42
|
+
</config-file>
|
|
43
|
+
|
|
44
|
+
<preference name="PHOTO_LIBRARY_ADD_USAGE_DESCRIPTION" default="This app requires photo library access to function properly." />
|
|
45
|
+
<config-file target="*-Info.plist" parent="NSPhotoLibraryAddUsageDescription">
|
|
46
|
+
<string>$PHOTO_LIBRARY_ADD_USAGE_DESCRIPTION</string>
|
|
47
|
+
</config-file>
|
|
48
|
+
|
|
49
|
+
<preference name="PHOTO_LIBRARY_USAGE_DESCRIPTION" default="This app requires photo library access to function properly." />
|
|
50
|
+
<config-file target ="*-Info.plist" parent="NSPhotoLibraryUsageDescription">
|
|
51
|
+
<string>$PHOTO_LIBRARY_USAGE_DESCRIPTION</string>
|
|
52
|
+
</config-file>
|
|
53
|
+
|
|
54
|
+
<header-file src="src/ios/NSString+SSURLEncoding.h"/>
|
|
55
|
+
<source-file src="src/ios/NSString+SSURLEncoding.m"/>
|
|
56
|
+
<header-file src="src/ios/SocialSharing.h"/>
|
|
57
|
+
<source-file src="src/ios/SocialSharing.m"/>
|
|
58
|
+
|
|
59
|
+
<framework src="Social.framework" weak="true" />
|
|
60
|
+
<framework src="MessageUI.framework" weak="true" />
|
|
61
|
+
</platform>
|
|
62
|
+
|
|
63
|
+
<!-- android -->
|
|
64
|
+
<platform name="android">
|
|
65
|
+
|
|
66
|
+
<config-file target="res/xml/config.xml" parent="/*">
|
|
67
|
+
<feature name="SocialSharing">
|
|
68
|
+
<param name="android-package" value="nl.xservices.plugins.SocialSharing" />
|
|
69
|
+
</feature>
|
|
70
|
+
</config-file>
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
<config-file target="AndroidManifest.xml" parent="/*/application">
|
|
75
|
+
<receiver android:name="nl.xservices.plugins.ShareChooserPendingIntent" android:enabled="true" android:exported="true">
|
|
76
|
+
<intent-filter>
|
|
77
|
+
<action android:name="android.intent.action.SEND"/>
|
|
78
|
+
</intent-filter>
|
|
79
|
+
</receiver>
|
|
80
|
+
</config-file>
|
|
81
|
+
|
|
82
|
+
<config-file target="AndroidManifest.xml" parent="/*">
|
|
83
|
+
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
|
|
84
|
+
</config-file>
|
|
85
|
+
|
|
86
|
+
<config-file target="AndroidManifest.xml" parent="/manifest/application">
|
|
87
|
+
<provider android:authorities="${applicationId}.sharing.provider" android:exported="false" android:grantUriPermissions="true" android:name="nl.xservices.plugins.FileProvider">
|
|
88
|
+
<meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/sharing_paths" />
|
|
89
|
+
</provider>
|
|
90
|
+
</config-file>
|
|
91
|
+
|
|
92
|
+
<config-file target="AndroidManifest.xml" parent="/*">
|
|
93
|
+
<queries>
|
|
94
|
+
<package android:name="com.whatsapp" />
|
|
95
|
+
</queries>
|
|
96
|
+
</config-file>
|
|
97
|
+
|
|
98
|
+
<source-file src="src/android/nl/xservices/plugins/SocialSharing.java" target-dir="src/nl/xservices/plugins"/>
|
|
99
|
+
<source-file src="src/android/nl/xservices/plugins/ShareChooserPendingIntent.java" target-dir="src/nl/xservices/plugins"/>
|
|
100
|
+
<source-file src="src/android/nl/xservices/plugins/FileProvider.java" target-dir="src/nl/xservices/plugins"/>
|
|
101
|
+
<source-file src="src/android/res/xml/sharing_paths.xml" target-dir="res/xml"/>
|
|
102
|
+
|
|
103
|
+
<framework src="androidx.legacy:legacy-support-v4:1.0.0" />
|
|
104
|
+
</platform>
|
|
105
|
+
|
|
106
|
+
<!-- wp8 -->
|
|
107
|
+
<platform name="wp8">
|
|
108
|
+
<config-file target="config.xml" parent="/*">
|
|
109
|
+
<feature name="SocialSharing">
|
|
110
|
+
<param name="wp-package" value="SocialSharing"/>
|
|
111
|
+
</feature>
|
|
112
|
+
</config-file>
|
|
113
|
+
|
|
114
|
+
<source-file src="src/wp8/SocialSharing.cs" />
|
|
115
|
+
<framework src="src/wp8/Newtonsoft.Json.dll" custom="true"/>
|
|
116
|
+
</platform>
|
|
117
|
+
|
|
118
|
+
<!-- windows -->
|
|
119
|
+
<platform name="windows">
|
|
120
|
+
<js-module src="src/windows/SocialSharingProxy.js" name="SocialSharingProxy">
|
|
121
|
+
<runs />
|
|
122
|
+
</js-module>
|
|
123
|
+
</platform>
|
|
124
|
+
|
|
125
|
+
</plugin>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
package nl.xservices.plugins;
|
|
2
|
-
|
|
3
|
-
public class FileProvider extends androidx.core.content.FileProvider {
|
|
1
|
+
package nl.xservices.plugins;
|
|
2
|
+
|
|
3
|
+
public class FileProvider extends androidx.core.content.FileProvider {
|
|
4
4
|
}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
package nl.xservices.plugins;
|
|
2
|
-
|
|
3
|
-
import android.content.BroadcastReceiver;
|
|
4
|
-
import android.content.Context;
|
|
5
|
-
import android.content.Intent;
|
|
6
|
-
import android.util.Log;
|
|
7
|
-
|
|
8
|
-
public class ShareChooserPendingIntent extends BroadcastReceiver {
|
|
9
|
-
public static String chosenComponent = null;
|
|
10
|
-
@Override
|
|
11
|
-
public void onReceive(Context context, Intent intent) {
|
|
12
|
-
if (intent.getExtras() != null) {
|
|
13
|
-
ShareChooserPendingIntent.chosenComponent = intent.getExtras().get(Intent.EXTRA_CHOSEN_COMPONENT).toString();
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
}
|
|
1
|
+
package nl.xservices.plugins;
|
|
2
|
+
|
|
3
|
+
import android.content.BroadcastReceiver;
|
|
4
|
+
import android.content.Context;
|
|
5
|
+
import android.content.Intent;
|
|
6
|
+
import android.util.Log;
|
|
7
|
+
|
|
8
|
+
public class ShareChooserPendingIntent extends BroadcastReceiver {
|
|
9
|
+
public static String chosenComponent = null;
|
|
10
|
+
@Override
|
|
11
|
+
public void onReceive(Context context, Intent intent) {
|
|
12
|
+
if (intent.getExtras() != null) {
|
|
13
|
+
ShareChooserPendingIntent.chosenComponent = intent.getExtras().get(Intent.EXTRA_CHOSEN_COMPONENT).toString();
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|