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
1989fd4f
Commit
1989fd4f
authored
Mar 22, 2014
by
Sebastián Katzer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Small WP8 changes
parent
29271edb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
18 deletions
+19
-18
LocalNotification.cs
src/wp8/LocalNotification.cs
+18
-17
local-notification.js
www/local-notification.js
+1
-1
No files found.
src/wp8/LocalNotification.cs
View file @
1989fd4f
...
@@ -46,7 +46,7 @@ namespace Cordova.Extension.Commands
...
@@ -46,7 +46,7 @@ namespace Cordova.Extension.Commands
/// <summary>
/// <summary>
/// Informs either the app is running in background or foreground
/// Informs either the app is running in background or foreground
/// </summary>
/// </summary>
private
bool
RunsInBackground
=
tru
e
;
private
bool
RunsInBackground
=
fals
e
;
/// <summary>
/// <summary>
/// Sets application live tile
/// Sets application live tile
...
@@ -141,22 +141,6 @@ namespace Cordova.Extension.Commands
...
@@ -141,22 +141,6 @@ namespace Cordova.Extension.Commands
}
}
/// <summary>
/// <summary>
/// Called when the application has been switched to background
/// </summary>
public
void
pause
(
string
jsonArgs
)
{
RunsInBackground
=
true
;
}
/// <summary>
/// Called when the application has been switched to foreground
/// </summary>
public
void
resume
(
string
jsonArgs
)
{
RunsInBackground
=
false
;
}
/// <summary>
/// Creates tile data
/// Creates tile data
/// </summary>
/// </summary>
private
FlipTileData
CreateTileData
(
Options
options
)
private
FlipTileData
CreateTileData
(
Options
options
)
...
@@ -215,5 +199,22 @@ namespace Cordova.Extension.Commands
...
@@ -215,5 +199,22 @@ namespace Cordova.Extension.Commands
{
{
return
RunsInBackground
?
"background"
:
"foreground"
;
return
RunsInBackground
?
"background"
:
"foreground"
;
}
}
/// <summary>
/// Occurs when the application is being deactivated.
/// </summary>
public
override
void
OnPause
(
object
sender
,
DeactivatedEventArgs
e
)
{
RunsInBackground
=
true
;
}
/// <summary>
/// Occurs when the application is being made active after previously being put
/// into a dormant state or tombstoned.
/// </summary>
public
override
void
OnResume
(
object
sender
,
Microsoft
.
Phone
.
Shell
.
ActivatedEventArgs
e
)
{
RunsInBackground
=
false
;
}
}
}
}
}
www/local-notification.js
View file @
1989fd4f
...
@@ -214,7 +214,7 @@ channel.deviceready.subscribe( function () {
...
@@ -214,7 +214,7 @@ channel.deviceready.subscribe( function () {
channel
.
onCordovaReady
.
subscribe
(
function
()
{
channel
.
onCordovaReady
.
subscribe
(
function
()
{
channel
.
onCordovaInfoReady
.
subscribe
(
function
()
{
channel
.
onCordovaInfoReady
.
subscribe
(
function
()
{
if
(
device
.
platform
!=
'iOS
'
)
{
if
(
device
.
platform
==
'Android
'
)
{
channel
.
onPause
.
subscribe
(
function
()
{
channel
.
onPause
.
subscribe
(
function
()
{
cordova
.
exec
(
null
,
null
,
'LocalNotification'
,
'pause'
,
[]);
cordova
.
exec
(
null
,
null
,
'LocalNotification'
,
'pause'
,
[]);
});
});
...
...
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