Skip to content

Commit

Permalink
Merge pull request #72 from Vo2le/master
Browse files Browse the repository at this point in the history
Added Windows 10 Universal App Support
  • Loading branch information
dbaq committed Mar 15, 2016
2 parents 1c0c38e + fafd03f commit 2f6f78b
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 2 deletions.
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"platforms": [
"android",
"wp8",
"ios"
"ios",
"windows"
]
},
"repository": {
Expand All @@ -21,7 +22,8 @@
"ecosystem:cordova",
"cordova-android",
"cordova-wp8",
"cordova-ios"
"cordova-ios",
"cordova-windows"
],
"engines": [
{
Expand Down
8 changes: 8 additions & 0 deletions plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
<source-file src="src/android/Sms.java" target-dir="src/com/cordova/plugins/sms" />
</platform>

<!-- wp8 -->
<platform name="wp8">
<source-file src="src/wp8/Sms.cs" />

Expand All @@ -54,4 +55,11 @@
<source-file src="src/ios/Sms.m" />
<framework src="MessageUI.framework" weak="true" />
</platform>

<!-- windows -->
<platform name="windows">
<js-module src="src/windows/SmsProxy.js" name="SmsProxy">
<merges target="" />
</js-module>
</platform>
</plugin>
13 changes: 13 additions & 0 deletions src/windows/SmsProxy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
module.exports = {

send: function (win, fail, args) {

var chatMessage = new Windows.ApplicationModel.Chat.ChatMessage();
chatMessage.body = args[1];
chatMessage.recipients.push(args[0]);
Windows.ApplicationModel.Chat.ChatMessageManager.showComposeSmsMessageAsync(chatMessage);

}
};

require("cordova/exec/proxy").add("Sms", module.exports);

0 comments on commit 2f6f78b

Please sign in to comment.