cordova-plugin-x-socialsharing
Advanced tools
Comparing version 5.0.6 to 5.0.7-a
{ | ||
"name": "cordova-plugin-x-socialsharing", | ||
"version": "5.0.6", | ||
"version": "5.0.7a", | ||
"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,0 +5,0 @@ "cordova": { |
@@ -229,2 +229,12 @@ # PhoneGap Social Sharing plugin for Android, iOS and Windows Phone | ||
##### Experimental feature: sharing directly to someone | ||
```html | ||
<button onclick="window.plugins.socialsharing.shareViaWhatsAppToReceiver(receiver, 'Message via WhatsApp', null /* img */, null /* url */, function() {console.log('share ok')})">msg via WhatsApp for Addressbook ID 101</button> | ||
``` | ||
For `receiver` on iOS pass in the Addressbook ID (or 'abid'). You can find those abid's by using the [Cordova Contacts Plugin](https://github.com/apache/cordova-plugin-contacts). | ||
The result in the success callback of the `find` function is a JSON array of contact objects, use the 'id' you find in those objects. | ||
Don't pass in an image on iOS because that can't be sent to someone directly unfortunately. Message and URL are fine though. | ||
On Android pass in the phone number of the person you want to send a message to (untested at the moment). | ||
####SMS | ||
@@ -385,3 +395,3 @@ Note that on Android, SMS via Hangouts may not behave correctly | ||
## 4b. Usage on Windows Phone | ||
The available methods on WP8 are: `available`, `canShareViaEmail`, `share` and `shareViaEmail`. | ||
The available methods on WP8 are: `available`, `canShareViaEmail`, `share`, `shareViaEmail` and `shareViaSMS`. | ||
Currently the first two always return true, but this may change in the future in case I can find a way to truly detect the availability. | ||
@@ -388,0 +398,0 @@ |
@@ -1,2 +0,2 @@ | ||
var cordova = require('cordova'); | ||
var cordova = require('cordova'); | ||
@@ -52,5 +52,9 @@ function SocialSharing() { | ||
SocialSharing.prototype.shareViaWhatsApp = function (message, fileOrFileArray, url, successCallback, errorCallback) { | ||
cordova.exec(successCallback, this._getErrorCallback(errorCallback, "shareViaWhatsApp"), "SocialSharing", "shareViaWhatsApp", [message, null, this._asArray(fileOrFileArray), url]); | ||
cordova.exec(successCallback, this._getErrorCallback(errorCallback, "shareViaWhatsApp"), "SocialSharing", "shareViaWhatsApp", [message, null, this._asArray(fileOrFileArray), url, null]); | ||
}; | ||
SocialSharing.prototype.shareViaWhatsAppToReceiver = function (receiver, message, fileOrFileArray, url, successCallback, errorCallback) { | ||
cordova.exec(successCallback, this._getErrorCallback(errorCallback, "shareViaWhatsAppToReceiver"), "SocialSharing", "shareViaWhatsApp", [message, null, this._asArray(fileOrFileArray), url, receiver]); | ||
}; | ||
SocialSharing.prototype.shareViaSMS = function (options, phonenumbers, successCallback, errorCallback) { | ||
@@ -57,0 +61,0 @@ var opts = options; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1293873
19
485
482
1
3