diff --git a/README.md b/README.md index 26eb1f6..bbb6ad5 100644 --- a/README.md +++ b/README.md @@ -98,7 +98,7 @@ To prevent the app from being paused while in background, the `backroundMode.ena - To activate the background mode the app needs to be in foreground. ```javascript -window.plugin.backgroundMode.enable(); +cordova.plugins.backgroundMode.enable(); ``` ### Pause the app while in background @@ -108,7 +108,7 @@ The background mode can be disabled through the `backgroundMode.disable` interfa - Once the background mode has been disabled, the app will be paused when in background. ```javascript -window.plugin.backgroundMode.disable(); +cordova.plugins.backgroundMode.disable(); ``` @@ -150,38 +150,6 @@ cordova.plugins.backgroundMode.configure({ ``` -### WP8 Optimization -By default the plugin will track for geo updates while the application is in background and foreground. To stop tracking in foreground, the `MainPage.xaml.cs` file needs the following 2 methods: - -```c# -// MainPage.xaml.cs - -namespace your.own.namespace -{ - public partial class MainPage : PhoneApplicationPage - { - /// - /// The page (the app) will enter the background and the background mode - /// needs to be activated. - /// - protected override void OnNavigatingFrom(System.Windows.Navigation.NavigatingCancelEventArgs e) - { - Cordova.Extension.Commands.BackgroundMode.Activate(); - } - - /// - /// The page (the app) will enter the foreground and the background mode - /// needs to be deactivated. - /// - protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e) - { - Cordova.Extension.Commands.BackgroundMode.Deactivate(); - } - } -} -``` - - ## Quirks ### iOS Crash