Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
cordova-plugin-local-notifications
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Nabil Sadki
cordova-plugin-local-notifications
Commits
906f256f
Commit
906f256f
authored
Jan 22, 2014
by
Sebastián Katzer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
WP8 support for the new callback interface as good as possible
parent
e72f497d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
7 deletions
+23
-7
LocalNotification.cs
src/wp8/LocalNotification.cs
+23
-7
No files found.
src/wp8/LocalNotification.cs
View file @
906f256f
...
...
@@ -54,15 +54,10 @@ namespace Cordova.Extension.Commands
// Empty strings for the text values and URIs will result in the property being cleared.
FlipTileData
TileData
=
CreateTileData
(
options
);
// Update the Application Tile
AppTile
.
Update
(
TileData
);
if
(!
string
.
IsNullOrEmpty
(
options
.
Foreground
))
{
string
arguments
=
String
.
Format
(
"{0}({1})"
,
options
.
Foreground
,
options
.
ID
);
DispatchCommandResult
(
new
PluginResult
(
PluginResult
.
Status
.
OK
,
arguments
));
}
FireEvent
(
"trigger"
,
options
.
ID
,
options
.
JSON
);
FireEvent
(
"add"
,
options
.
ID
,
options
.
JSON
);
}
DispatchCommandResult
();
...
...
@@ -73,7 +68,12 @@ namespace Cordova.Extension.Commands
/// </summary>
public
void
cancel
(
string
jsonArgs
)
{
string
[]
args
=
JsonHelper
.
Deserialize
<
string
[
]>
(
jsonArgs
);
string
notificationID
=
args
[
0
];
cancelAll
(
jsonArgs
);
FireEvent
(
"cancel"
,
notificationID
,
""
);
}
/// <summary>
...
...
@@ -139,5 +139,21 @@ namespace Cordova.Extension.Commands
return
tile
;
}
/// <summary>
/// Fires the given event.
/// </summary>
private
void
FireEvent
(
string
Event
,
string
Id
,
string
JSON
=
""
)
{
string
state
=
"foreground"
;
string
args
=
String
.
Format
(
"\'{0}\',\'{1}\',\'{2}\'"
,
Id
,
state
,
JSON
);
string
js
=
String
.
Format
(
"window.plugin.notification.local.on{0}({1})"
,
Event
,
args
);
PluginResult
pluginResult
=
new
PluginResult
(
PluginResult
.
Status
.
OK
,
js
);
pluginResult
.
KeepCallback
=
true
;
DispatchCommandResult
(
pluginResult
);
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment