Commit 1989fd4f authored by Sebastián Katzer's avatar Sebastián Katzer
Browse files

Small WP8 changes

parent 29271edb
Loading
Loading
Loading
Loading
+18 −17
Changes for src/wp8/LocalNotification.cs: 18 added lines, 17 removed lines.
Original line number Diff line number Diff line
@@ -46,7 +46,7 @@ namespace Cordova.Extension.Commands
        /// <summary>
        /// Informs either the app is running in background or foreground
        /// </summary>
        private bool RunsInBackground = true;
        private bool RunsInBackground = false;

        /// <summary>
        /// Sets application live tile
@@ -140,22 +140,6 @@ namespace Cordova.Extension.Commands
            DeviceReady = true;
        }

        /// <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
        /// </summary>
@@ -215,5 +199,22 @@ namespace Cordova.Extension.Commands
        {
            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;
        }
    }
}
+1 −1
Changes for www/local-notification.js: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -214,7 +214,7 @@ channel.deviceready.subscribe( function () {

channel.onCordovaReady.subscribe( function () {
    channel.onCordovaInfoReady.subscribe( function () {
        if (device.platform != 'iOS') {
        if (device.platform == 'Android') {
            channel.onPause.subscribe( function () {
                cordova.exec(null, null, 'LocalNotification', 'pause', []);
            });