cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bra...@apache.org
Subject [29/50] Add WP7 and WP8 platform files.
Date Thu, 23 May 2013 21:58:26 GMT
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/0fea2dd2/lib/cordova-wp7/templates/standalone/Plugins/MimeTypeMapper.cs
----------------------------------------------------------------------
diff --git a/lib/cordova-wp7/templates/standalone/Plugins/MimeTypeMapper.cs b/lib/cordova-wp7/templates/standalone/Plugins/MimeTypeMapper.cs
new file mode 100644
index 0000000..01ba4cb
--- /dev/null
+++ b/lib/cordova-wp7/templates/standalone/Plugins/MimeTypeMapper.cs
@@ -0,0 +1,99 @@
+/*  
+	Licensed under the Apache License, Version 2.0 (the "License");
+	you may not use this file except in compliance with the License.
+	You may obtain a copy of the License at
+	
+	http://www.apache.org/licenses/LICENSE-2.0
+	
+	Unless required by applicable law or agreed to in writing, software
+	distributed under the License is distributed on an "AS IS" BASIS,
+	WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+	See the License for the specific language governing permissions and
+	limitations under the License.
+*/
+
+using System.Collections.Generic;
+using System.IO;
+
+namespace WPCordovaClassLib.Cordova.Commands
+{
+    /// <summary>
+    /// Represents file extension to mime type mapper.
+    /// </summary>
+    public static class MimeTypeMapper
+    {
+        /// <summary>
+        /// For unknown type it is recommended to use 'application/octet-stream'
+        /// http://stackoverflow.com/questions/1176022/unknown-file-type-mime
+        /// </summary>
+        private static string DefaultMimeType = "application/octet-stream";
+
+        /// <summary>
+        /// Stores mime type for all necessary extension
+        /// </summary>
+        private static readonly Dictionary<string, string> MIMETypesDictionary = new Dictionary<string, string>
+                                                                             {                                                                                
+                                                                                 {"avi", "video/x-msvideo"},
+                                                                                 {"bmp", "image/bmp"},                                                                                                                                                                
+                                                                                 {"gif", "image/gif"},                                                                                                                                                               
+                                                                                 {"jpe", "image/jpeg"},
+                                                                                 {"jpeg", "image/jpeg"},
+                                                                                 {"jpg", "image/jpeg"},                                                                                                                                                             
+                                                                                 {"mov", "video/quicktime"},
+                                                                                 {"mp2", "audio/mpeg"},
+                                                                                 {"mp3", "audio/mpeg"},
+                                                                                 {"mp4", "video/mp4"},
+                                                                                 {"mpe", "video/mpeg"},
+                                                                                 {"mpeg", "video/mpeg"},
+                                                                                 {"mpg", "video/mpeg"},
+                                                                                 {"mpga", "audio/mpeg"},                                                                                
+                                                                                 {"pbm", "image/x-portable-bitmap"},
+                                                                                 {"pcm", "audio/x-pcm"},
+                                                                                 {"pct", "image/pict"},
+                                                                                 {"pgm", "image/x-portable-graymap"},
+                                                                                 {"pic", "image/pict"},
+                                                                                 {"pict", "image/pict"},
+                                                                                 {"png", "image/png"},
+                                                                                 {"pnm", "image/x-portable-anymap"},
+                                                                                 {"pnt", "image/x-macpaint"},
+                                                                                 {"pntg", "image/x-macpaint"},
+                                                                                 {"ppm", "image/x-portable-pixmap"},
+                                                                                 {"qt", "video/quicktime"},
+                                                                                 {"ra", "audio/x-pn-realaudio"},
+                                                                                 {"ram", "audio/x-pn-realaudio"},
+                                                                                 {"ras", "image/x-cmu-raster"},
+                                                                                 {"rgb", "image/x-rgb"},
+                                                                                 {"snd", "audio/basic"},
+                                                                                 {"txt", "text/plain"},
+                                                                                 {"tif", "image/tiff"},
+                                                                                 {"tiff", "image/tiff"},
+                                                                                 {"wav", "audio/x-wav"},
+                                                                                 {"wbmp", "image/vnd.wap.wbmp"},
+
+                                                                             };
+        /// <summary>
+        /// Gets mime type by file extension
+        /// </summary>
+        /// <param name="fileName">file name to extract extension</param>
+        /// <returns>mime type</returns>
+        public static string GetMimeType(string fileName)
+        {
+            string ext = Path.GetExtension(fileName);
+
+            // invalid extension
+            if (string.IsNullOrEmpty(ext) || !ext.StartsWith("."))
+            {
+                return DefaultMimeType;
+            }
+
+            ext = ext.Remove(0, 1);
+
+            if (MIMETypesDictionary.ContainsKey(ext))
+            {
+                return MIMETypesDictionary[ext];
+            }
+
+            return DefaultMimeType;
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/0fea2dd2/lib/cordova-wp7/templates/standalone/Plugins/NetworkStatus.cs
----------------------------------------------------------------------
diff --git a/lib/cordova-wp7/templates/standalone/Plugins/NetworkStatus.cs b/lib/cordova-wp7/templates/standalone/Plugins/NetworkStatus.cs
new file mode 100644
index 0000000..12eb061
--- /dev/null
+++ b/lib/cordova-wp7/templates/standalone/Plugins/NetworkStatus.cs
@@ -0,0 +1,129 @@
+/*  
+	Licensed under the Apache License, Version 2.0 (the "License");
+	you may not use this file except in compliance with the License.
+	You may obtain a copy of the License at
+	
+	http://www.apache.org/licenses/LICENSE-2.0
+	
+	Unless required by applicable law or agreed to in writing, software
+	distributed under the License is distributed on an "AS IS" BASIS,
+	WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+	See the License for the specific language governing permissions and
+	limitations under the License.
+*/
+
+using System;
+using System.Diagnostics;
+using System.Net;
+using System.Net.NetworkInformation;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Documents;
+using System.Windows.Ink;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+using System.Windows.Shapes;
+using Microsoft.Phone.Net.NetworkInformation;
+
+namespace WPCordovaClassLib.Cordova.Commands
+{
+
+    // http://msdn.microsoft.com/en-us/library/microsoft.phone.net.networkinformation(v=VS.92).aspx
+    // http://msdn.microsoft.com/en-us/library/microsoft.phone.net.networkinformation.devicenetworkinformation(v=VS.92).aspx
+
+    public class NetworkStatus : BaseCommand
+    {
+        const string UNKNOWN = "unknown";
+        const string ETHERNET = "ethernet";
+        const string WIFI = "wifi";
+        const string CELL_2G = "2g";
+        const string CELL_3G = "3g";
+        const string CELL_4G = "4g";
+        const string NONE = "none";
+        const string CELL = "cellular";
+
+        private bool HasCallback = false;
+
+        public NetworkStatus()
+        {
+            DeviceNetworkInformation.NetworkAvailabilityChanged += new EventHandler<NetworkNotificationEventArgs>(ChangeDetected);
+        }
+
+        public override void OnResume(object sender, Microsoft.Phone.Shell.ActivatedEventArgs e)
+        {
+            this.getConnectionInfo("");
+        }
+
+        public void getConnectionInfo(string empty)
+        {
+            HasCallback = true;
+            updateConnectionType(checkConnectionType());
+        }
+
+        private string checkConnectionType()
+        {
+            if (DeviceNetworkInformation.IsNetworkAvailable)
+            {
+                if (DeviceNetworkInformation.IsWiFiEnabled)
+                {
+                    return WIFI;
+                }
+                else
+                {
+                    return DeviceNetworkInformation.IsCellularDataEnabled ? CELL : UNKNOWN;
+                }
+            }
+            return NONE;
+        }
+
+        private string checkConnectionType(NetworkInterfaceSubType type)
+        {
+            switch (type)
+            {
+                case NetworkInterfaceSubType.Cellular_1XRTT: //cell
+                case NetworkInterfaceSubType.Cellular_GPRS: //cell
+                    return CELL;
+                case NetworkInterfaceSubType.Cellular_EDGE: //2
+                    return CELL_2G;
+                case NetworkInterfaceSubType.Cellular_3G:
+                case NetworkInterfaceSubType.Cellular_EVDO: //3
+                case NetworkInterfaceSubType.Cellular_EVDV: //3 
+                case NetworkInterfaceSubType.Cellular_HSPA: //3
+                    return CELL_3G;
+                case NetworkInterfaceSubType.WiFi:
+                    return WIFI;
+                case NetworkInterfaceSubType.Unknown:
+                case NetworkInterfaceSubType.Desktop_PassThru:
+                default:
+                    return UNKNOWN;
+            }
+        }
+
+        void ChangeDetected(object sender, NetworkNotificationEventArgs e)
+        {
+            switch (e.NotificationType)
+            {
+                case NetworkNotificationType.InterfaceConnected:
+                    updateConnectionType(checkConnectionType(e.NetworkInterface.InterfaceSubtype));
+                    break;
+                case NetworkNotificationType.InterfaceDisconnected:
+                    updateConnectionType(NONE);
+                    break;
+                default:
+                    break;
+            }
+        }
+
+        private void updateConnectionType(string type)
+        {
+            // This should also implicitly fire offline/online events as that is handled on the JS side
+            if (this.HasCallback)
+            {
+                PluginResult result = new PluginResult(PluginResult.Status.OK, type);
+                result.KeepCallback = true;
+                DispatchCommandResult(result);
+            }
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/0fea2dd2/lib/cordova-wp7/templates/standalone/Plugins/Notification.cs
----------------------------------------------------------------------
diff --git a/lib/cordova-wp7/templates/standalone/Plugins/Notification.cs b/lib/cordova-wp7/templates/standalone/Plugins/Notification.cs
new file mode 100644
index 0000000..11f14bd
--- /dev/null
+++ b/lib/cordova-wp7/templates/standalone/Plugins/Notification.cs
@@ -0,0 +1,367 @@
+/*  
+	Licensed under the Apache License, Version 2.0 (the "License");
+	you may not use this file except in compliance with the License.
+	You may obtain a copy of the License at
+	
+	http://www.apache.org/licenses/LICENSE-2.0
+	
+	Unless required by applicable law or agreed to in writing, software
+	distributed under the License is distributed on an "AS IS" BASIS,
+	WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+	See the License for the specific language governing permissions and
+	limitations under the License.
+*/
+
+using System;
+using System.Windows;
+using System.Windows.Controls;
+using Microsoft.Devices;
+using System.Runtime.Serialization;
+using System.Threading;
+using System.Windows.Resources;
+using Microsoft.Phone.Controls;
+using Microsoft.Xna.Framework.Audio;
+using WPCordovaClassLib.Cordova.UI;
+using System.Diagnostics;
+
+
+namespace WPCordovaClassLib.Cordova.Commands
+{
+    public class Notification : BaseCommand
+    {
+        static ProgressBar progressBar = null;
+        const int DEFAULT_DURATION = 5;
+
+        private NotificationBox notifyBox;
+
+        private class NotifBoxData
+        {
+            public NotificationBox previous;
+            public string callbackId;
+        }
+
+        private PhoneApplicationPage Page
+        {
+            get
+            {
+                PhoneApplicationPage page = null;
+                PhoneApplicationFrame frame = Application.Current.RootVisual as PhoneApplicationFrame;
+                if (frame != null)
+                {
+                    page = frame.Content as PhoneApplicationPage;
+                }
+                return page;
+            }
+        }
+
+        // blink api - doesn't look like there is an equivalent api we can use...
+
+        [DataContract]
+        public class AlertOptions
+        {
+            [OnDeserializing]
+            public void OnDeserializing(StreamingContext context)
+            {
+                // set defaults
+                this.message = "message";
+                this.title = "Alert";
+                this.buttonLabel = "ok";
+            }
+
+            /// <summary>
+            /// message to display in the alert box
+            /// </summary>
+            [DataMember]
+            public string message;
+
+            /// <summary>
+            /// title displayed on the alert window
+            /// </summary>
+            [DataMember]
+            public string title;
+
+            /// <summary>
+            /// text to display on the button
+            /// </summary>
+            [DataMember]
+            public string buttonLabel;
+        }
+
+        public void alert(string options)
+        {
+            string[] args = JSON.JsonHelper.Deserialize<string[]>(options);
+            AlertOptions alertOpts = new AlertOptions();
+            alertOpts.message = args[0];
+            alertOpts.title = args[1];
+            alertOpts.buttonLabel = args[2];
+            string aliasCurrentCommandCallbackId = args[3];
+
+            Deployment.Current.Dispatcher.BeginInvoke(() =>
+            {
+                PhoneApplicationPage page = Page;
+                if (page != null)
+                {
+                    Grid grid = page.FindName("LayoutRoot") as Grid;
+                    if (grid != null)
+                    {
+                        var previous = notifyBox;
+                        notifyBox = new NotificationBox();
+                        notifyBox.Tag = new NotifBoxData{ previous = previous, callbackId = aliasCurrentCommandCallbackId };
+                        notifyBox.PageTitle.Text = alertOpts.title;
+                        notifyBox.SubTitle.Text = alertOpts.message;
+                        Button btnOK = new Button();
+                        btnOK.Content = alertOpts.buttonLabel;
+                        btnOK.Click += new RoutedEventHandler(btnOK_Click);
+                        btnOK.Tag = 1;
+                        notifyBox.ButtonPanel.Children.Add(btnOK);
+                        grid.Children.Add(notifyBox);
+
+                        if (previous == null)
+                        {
+                            page.BackKeyPress += page_BackKeyPress;
+                        }
+                    }
+                }
+                else
+                {
+                    DispatchCommandResult(new PluginResult(PluginResult.Status.INSTANTIATION_EXCEPTION));
+                }
+            });
+        }
+
+        public void confirm(string options)
+        {
+            string[] args = JSON.JsonHelper.Deserialize<string[]>(options);
+            AlertOptions alertOpts = new AlertOptions();
+            alertOpts.message = args[0];
+            alertOpts.title = args[1];
+            alertOpts.buttonLabel = args[2];
+            string aliasCurrentCommandCallbackId = args[3];
+
+            Deployment.Current.Dispatcher.BeginInvoke(() =>
+            {
+                PhoneApplicationPage page = Page;
+                if (page != null)
+                {
+                    Grid grid = page.FindName("LayoutRoot") as Grid;
+                    if (grid != null)
+                    {
+                        var previous = notifyBox;
+                        notifyBox = new NotificationBox();
+                        notifyBox.Tag = new NotifBoxData{ previous = previous, callbackId = aliasCurrentCommandCallbackId };
+                        notifyBox.PageTitle.Text = alertOpts.title;
+                        notifyBox.SubTitle.Text = alertOpts.message;
+
+                        string[] labels = JSON.JsonHelper.Deserialize<string[]>(alertOpts.buttonLabel);
+
+                        if (labels == null)
+                        {
+                            labels = alertOpts.buttonLabel.Split(',');
+                        }
+
+                        for (int n = 0; n < labels.Length; n++)
+                        {
+                            Button btn = new Button();
+                            btn.Content = labels[n];
+                            btn.Tag = n;
+                            btn.Click += new RoutedEventHandler(btnOK_Click);
+                            notifyBox.ButtonPanel.Children.Add(btn);
+                        }
+
+                        grid.Children.Add(notifyBox);
+                        if (previous == null)
+                        {
+                            page.BackKeyPress += page_BackKeyPress;
+                        }
+                    }
+                }
+                else
+                {
+                    DispatchCommandResult(new PluginResult(PluginResult.Status.INSTANTIATION_EXCEPTION));
+                }
+            });
+        }
+
+        void page_BackKeyPress(object sender, System.ComponentModel.CancelEventArgs e)
+        {
+            PhoneApplicationPage page = sender as PhoneApplicationPage;
+            string callbackId = "";
+            if (page != null && notifyBox != null)
+            {
+                Grid grid = page.FindName("LayoutRoot") as Grid;
+                if (grid != null)
+                {
+                    grid.Children.Remove(notifyBox);
+                    NotifBoxData notifBoxData = notifyBox.Tag as NotifBoxData;
+                    notifyBox = notifBoxData.previous;
+                    callbackId = notifBoxData.callbackId;
+                }
+                if (notifyBox == null)
+                {
+                    page.BackKeyPress -= page_BackKeyPress;
+                }
+                e.Cancel = true;
+            }
+
+            DispatchCommandResult(new PluginResult(PluginResult.Status.OK, 0), callbackId);
+        }
+
+        void btnOK_Click(object sender, RoutedEventArgs e)
+        {
+            Button btn = sender as Button;
+            FrameworkElement notifBoxParent = null;
+            int retVal = 0;
+            string callbackId = "";
+            if (btn != null)
+            {
+                retVal = (int)btn.Tag + 1;
+
+                notifBoxParent = btn.Parent as FrameworkElement;
+                while ((notifBoxParent = notifBoxParent.Parent as FrameworkElement) != null &&
+                       !(notifBoxParent is NotificationBox)) ;
+            }
+            if (notifBoxParent != null)
+            {
+                PhoneApplicationPage page = Page;
+                if (page != null)
+                {
+                    Grid grid = page.FindName("LayoutRoot") as Grid;
+                    if (grid != null)
+                    {
+                        grid.Children.Remove(notifBoxParent);
+                    }
+
+                    NotifBoxData notifBoxData = notifBoxParent.Tag as NotifBoxData;
+                    notifyBox = notifBoxData.previous;
+                    callbackId = notifBoxData.callbackId;
+
+                    if (notifyBox == null)
+                    {
+                        page.BackKeyPress -= page_BackKeyPress;
+                    }
+                }
+
+            }
+            DispatchCommandResult(new PluginResult(PluginResult.Status.OK, retVal),callbackId);
+        }
+
+
+
+        public void beep(string options)
+        {
+            string[] args = JSON.JsonHelper.Deserialize<string[]>(options);
+            int times = int.Parse(args[0]);
+
+            string resourcePath = BaseCommand.GetBaseURL() + "resources/notification-beep.wav";
+
+            StreamResourceInfo sri = Application.GetResourceStream(new Uri(resourcePath, UriKind.Relative));
+
+            if (sri != null)
+            {
+                SoundEffect effect = SoundEffect.FromStream(sri.Stream);
+                SoundEffectInstance inst = effect.CreateInstance();
+                ThreadPool.QueueUserWorkItem((o) =>
+                {
+                    // cannot interact with UI !!
+                    do
+                    {
+                        inst.Play();
+                        Thread.Sleep(effect.Duration + TimeSpan.FromMilliseconds(100));
+                    }
+                    while (--times > 0);
+
+                });
+
+            }
+
+            // TODO: may need a listener to trigger DispatchCommandResult after the alarm has finished executing...
+            DispatchCommandResult();
+        }
+
+        // Display an indeterminate progress indicator
+        public void activityStart(string unused)
+        {
+
+            Deployment.Current.Dispatcher.BeginInvoke(() =>
+            {
+                PhoneApplicationFrame frame = Application.Current.RootVisual as PhoneApplicationFrame;
+
+                if (frame != null)
+                {
+                    PhoneApplicationPage page = frame.Content as PhoneApplicationPage;
+
+                    if (page != null)
+                    {
+                        var temp = page.FindName("LayoutRoot");
+                        Grid grid = temp as Grid;
+                        if (grid != null)
+                        {
+                            if (progressBar != null)
+                            {
+                                grid.Children.Remove(progressBar);
+                            }
+                            progressBar = new ProgressBar();
+                            progressBar.IsIndeterminate = true;
+                            progressBar.IsEnabled = true;
+
+                            grid.Children.Add(progressBar);
+                        }
+                    }
+                }
+            });
+        }
+
+
+        // Remove our indeterminate progress indicator
+        public void activityStop(string unused)
+        {
+            Deployment.Current.Dispatcher.BeginInvoke(() =>
+            {
+                if (progressBar != null)
+                {
+                    progressBar.IsEnabled = false;
+                    PhoneApplicationFrame frame = Application.Current.RootVisual as PhoneApplicationFrame;
+                    if (frame != null)
+                    {
+                        PhoneApplicationPage page = frame.Content as PhoneApplicationPage;
+                        if (page != null)
+                        {
+                            Grid grid = page.FindName("LayoutRoot") as Grid;
+                            if (grid != null)
+                            {
+                                grid.Children.Remove(progressBar);
+                            }
+                        }
+                    }
+                    progressBar = null;
+                }
+            });
+        }
+
+        public void vibrate(string vibrateDuration)
+        {
+
+            int msecs = 200; // set default
+
+            try
+            {
+                string[] args = JSON.JsonHelper.Deserialize<string[]>(vibrateDuration);
+
+                msecs = int.Parse(args[0]);
+                if (msecs < 1)
+                {
+                    msecs = 1;
+                }
+            }
+            catch (FormatException)
+            {
+
+            }
+
+            VibrateController.Default.Start(TimeSpan.FromMilliseconds(msecs));
+
+            // TODO: may need to add listener to trigger DispatchCommandResult when the vibration ends...
+            DispatchCommandResult();
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/0fea2dd2/lib/cordova-wp7/templates/standalone/Plugins/UI/AudioCaptureTask.cs
----------------------------------------------------------------------
diff --git a/lib/cordova-wp7/templates/standalone/Plugins/UI/AudioCaptureTask.cs b/lib/cordova-wp7/templates/standalone/Plugins/UI/AudioCaptureTask.cs
new file mode 100644
index 0000000..9f43d23
--- /dev/null
+++ b/lib/cordova-wp7/templates/standalone/Plugins/UI/AudioCaptureTask.cs
@@ -0,0 +1,107 @@
+/*  
+	Licensed under the Apache License, Version 2.0 (the "License");
+	you may not use this file except in compliance with the License.
+	You may obtain a copy of the License at
+	
+	http://www.apache.org/licenses/LICENSE-2.0
+	
+	Unless required by applicable law or agreed to in writing, software
+	distributed under the License is distributed on an "AS IS" BASIS,
+	WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+	See the License for the specific language governing permissions and
+	limitations under the License.
+*/
+
+using System;
+using System.IO;
+using System.Windows;
+using Microsoft.Phone.Controls;
+using Microsoft.Phone.Tasks;
+
+namespace WPCordovaClassLib.Cordova.UI
+{
+    /// <summary>
+    /// Allows an application to launch the Audio Recording application. 
+    /// Use this to allow users to record audio from your application.
+    /// </summary>
+    public class AudioCaptureTask
+    {
+        /// <summary>
+        /// Represents recorded audio returned from a call to the Show method of
+        /// a WPCordovaClassLib.Cordova.Controls.AudioCaptureTask object
+        /// </summary>
+        public class AudioResult : TaskEventArgs
+        {
+            /// <summary>
+            /// Initializes a new instance of the AudioResult class.
+            /// </summary>
+            public AudioResult()
+            { }
+
+            /// <summary>
+            /// Initializes a new instance of the AudioResult class
+            /// with the specified Microsoft.Phone.Tasks.TaskResult.
+            /// </summary>
+            /// <param name="taskResult">Associated Microsoft.Phone.Tasks.TaskResult</param>
+            public AudioResult(TaskResult taskResult)
+                : base(taskResult)
+            { }
+
+            /// <summary>
+            ///  Gets the file name of the recorded audio.
+            /// </summary>
+            public Stream AudioFile { get; internal set; }
+
+            /// <summary>
+            /// Gets the stream containing the data for the recorded audio.
+            /// </summary>
+            public string AudioFileName { get; internal set; }
+        }
+
+        /// <summary>
+        /// Occurs when a audio recording task is completed.
+        /// </summary>
+        public event EventHandler<AudioResult> Completed;
+
+        /// <summary>
+        /// Shows Audio Recording application
+        /// </summary>
+        public void Show()
+        {
+            Deployment.Current.Dispatcher.BeginInvoke(() =>
+            {
+                var root = Application.Current.RootVisual as PhoneApplicationFrame;
+
+                root.Navigated += new System.Windows.Navigation.NavigatedEventHandler(NavigationService_Navigated);
+
+                string baseUrl = WPCordovaClassLib.Cordova.Commands.BaseCommand.GetBaseURL();
+                // dummy parameter is used to always open a fresh version
+                root.Navigate(new System.Uri(baseUrl + "CordovaLib/UI/AudioRecorder.xaml?dummy=" + Guid.NewGuid().ToString(), UriKind.Relative));
+
+            });
+        }
+
+        /// <summary>
+        /// Performs additional configuration of the recording application.
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void NavigationService_Navigated(object sender, System.Windows.Navigation.NavigationEventArgs e)
+        {
+            if (!(e.Content is AudioRecorder)) return;
+
+            (Application.Current.RootVisual as PhoneApplicationFrame).Navigated -= NavigationService_Navigated;
+
+            AudioRecorder audioRecorder = (AudioRecorder)e.Content;
+
+            if (audioRecorder != null)
+            {
+                audioRecorder.Completed += this.Completed;
+            }
+            else if (this.Completed != null)
+            {
+                this.Completed(this, new AudioResult(TaskResult.Cancel));
+            }
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/0fea2dd2/lib/cordova-wp7/templates/standalone/Plugins/UI/AudioRecorder.xaml
----------------------------------------------------------------------
diff --git a/lib/cordova-wp7/templates/standalone/Plugins/UI/AudioRecorder.xaml b/lib/cordova-wp7/templates/standalone/Plugins/UI/AudioRecorder.xaml
new file mode 100644
index 0000000..0fd26ab
--- /dev/null
+++ b/lib/cordova-wp7/templates/standalone/Plugins/UI/AudioRecorder.xaml
@@ -0,0 +1,66 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License. 
+-->
+<phone:PhoneApplicationPage 
+    x:Class="WPCordovaClassLib.Cordova.UI.AudioRecorder"
+    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
+    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
+    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+    FontFamily="{StaticResource PhoneFontFamilyNormal}"
+    FontSize="{StaticResource PhoneFontSizeNormal}"
+    Foreground="{StaticResource PhoneForegroundBrush}"
+    SupportedOrientations="Portrait" Orientation="Portrait"
+    mc:Ignorable="d" d:DesignHeight="768" d:DesignWidth="480"
+    shell:SystemTray.IsVisible="True">
+
+    <!--LayoutRoot is the root grid where all page content is placed-->
+    <Grid x:Name="LayoutRoot" Background="Transparent">
+        <Grid.RowDefinitions>
+            <RowDefinition Height="Auto"/>
+            <RowDefinition Height="*"/>
+        </Grid.RowDefinitions>
+
+        <!--TitlePanel contains the name of the application and page title-->
+        <StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="0,17,0,28">
+            <TextBlock x:Name="PageTitle" Text="Audio recorder" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}"/>
+        </StackPanel>
+
+        <!--ContentPanel - place additional content here-->
+        <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
+            <Button Name="btnStartStop" Content="Start" Height="72" HorizontalAlignment="Left" Margin="156,96,0,0"  VerticalAlignment="Top" Width="160" Click="btnStartStop_Click" />
+            <Button Name="btnTake" Content="Take" IsEnabled="False" Height="72" HorizontalAlignment="Left" Margin="155,182,0,0" VerticalAlignment="Top" Width="160" Click="btnTake_Click" />
+            <TextBlock Height="30" HorizontalAlignment="Left" Margin="168,60,0,0" Name="txtDuration" Text="Duration: 00:00" VerticalAlignment="Top" />
+        </Grid>
+    </Grid>
+ 
+    <!--Sample code showing usage of ApplicationBar-->
+    <!--<phone:PhoneApplicationPage.ApplicationBar>
+        <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True">
+            <shell:ApplicationBarIconButton IconUri="/Images/appbar_button1.png" Text="Button 1"/>
+            <shell:ApplicationBarIconButton IconUri="/Images/appbar_button2.png" Text="Button 2"/>
+            <shell:ApplicationBar.MenuItems>
+                <shell:ApplicationBarMenuItem Text="MenuItem 1"/>
+                <shell:ApplicationBarMenuItem Text="MenuItem 2"/>
+            </shell:ApplicationBar.MenuItems>
+        </shell:ApplicationBar>
+    </phone:PhoneApplicationPage.ApplicationBar>-->
+
+</phone:PhoneApplicationPage>

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/0fea2dd2/lib/cordova-wp7/templates/standalone/Plugins/UI/AudioRecorder.xaml.cs
----------------------------------------------------------------------
diff --git a/lib/cordova-wp7/templates/standalone/Plugins/UI/AudioRecorder.xaml.cs b/lib/cordova-wp7/templates/standalone/Plugins/UI/AudioRecorder.xaml.cs
new file mode 100644
index 0000000..bc8ba6f
--- /dev/null
+++ b/lib/cordova-wp7/templates/standalone/Plugins/UI/AudioRecorder.xaml.cs
@@ -0,0 +1,306 @@
+/*  
+	Licensed under the Apache License, Version 2.0 (the "License");
+	you may not use this file except in compliance with the License.
+	You may obtain a copy of the License at
+	
+	http://www.apache.org/licenses/LICENSE-2.0
+	
+	Unless required by applicable law or agreed to in writing, software
+	distributed under the License is distributed on an "AS IS" BASIS,
+	WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+	See the License for the specific language governing permissions and
+	limitations under the License.
+*/
+
+using Microsoft.Phone.Controls;
+using Microsoft.Phone.Tasks;
+using Microsoft.Xna.Framework;
+using Microsoft.Xna.Framework.Audio;
+using System;
+using System.IO;
+using System.IO.IsolatedStorage;
+using System.Windows;
+using System.Windows.Threading;
+using WPCordovaClassLib.Cordova.Commands;
+using AudioResult = WPCordovaClassLib.Cordova.UI.AudioCaptureTask.AudioResult;
+
+namespace WPCordovaClassLib.Cordova.UI
+{
+    /// <summary>
+    /// Implements Audio Recording application
+    /// </summary>
+    public partial class AudioRecorder : PhoneApplicationPage
+    {
+
+        #region Constants
+
+        private const string RecordingStartCaption = "Start";
+        private const string RecordingStopCaption = "Stop";
+
+        private const string LocalFolderName = "AudioCache";
+        private const string FileNameFormat = "Audio-{0}.wav";
+
+        #endregion
+
+        #region Callbacks
+
+        /// <summary>
+        /// Occurs when a audio recording task is completed.
+        /// </summary>
+        public event EventHandler<AudioResult> Completed;
+
+        #endregion
+
+        #region Fields
+
+        /// <summary>
+        /// Audio source
+        /// </summary>
+        private Microphone microphone;
+
+        /// <summary>
+        /// Temporary buffer to store audio chunk
+        /// </summary>
+        private byte[] buffer;
+
+        /// <summary>
+        /// Recording duration
+        /// </summary>
+        private TimeSpan duration;
+
+        /// <summary>
+        /// Output buffer
+        /// </summary>
+        private MemoryStream memoryStream;
+
+        /// <summary>
+        /// Xna game loop dispatcher
+        /// </summary>
+        DispatcherTimer dtXna;
+
+        /// <summary>
+        /// Recording result, dispatched back when recording page is closed
+        /// </summary>
+        private AudioResult result = new AudioResult(TaskResult.Cancel);
+
+        /// <summary>
+        /// Whether we are recording audio now
+        /// </summary>
+        private bool IsRecording
+        {
+            get
+            {
+                return (this.microphone != null && this.microphone.State == MicrophoneState.Started);
+            }
+        }
+
+        #endregion
+
+        /// <summary>
+        /// Creates new instance of the AudioRecorder class.
+        /// </summary>
+        public AudioRecorder()
+        {
+
+            this.InitializeXnaGameLoop();
+
+            // microphone requires special XNA initialization to work
+            InitializeComponent();
+        }
+
+        /// <summary>
+        /// Starts recording, data is stored in memory
+        /// </summary>
+        private void StartRecording()
+        {
+            this.microphone = Microphone.Default;
+            this.microphone.BufferDuration = TimeSpan.FromMilliseconds(500);
+
+            this.btnTake.IsEnabled = false;
+            this.btnStartStop.Content = RecordingStopCaption;
+
+            this.buffer = new byte[microphone.GetSampleSizeInBytes(this.microphone.BufferDuration)];
+            this.microphone.BufferReady += new EventHandler<EventArgs>(MicrophoneBufferReady);
+
+            this.memoryStream = new MemoryStream();
+            this.memoryStream.InitializeWavStream(this.microphone.SampleRate);
+
+            this.duration = new TimeSpan(0);
+
+            this.microphone.Start();
+        }
+
+        /// <summary>
+        /// Stops recording
+        /// </summary>
+        private void StopRecording()
+        {
+            this.microphone.Stop();
+
+            this.microphone.BufferReady -= MicrophoneBufferReady;
+
+            this.microphone = null;
+
+            btnStartStop.Content = RecordingStartCaption;
+
+            // check there is some data
+            this.btnTake.IsEnabled = true;
+        }
+
+        /// <summary>
+        /// Handles Start/Stop events
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void btnStartStop_Click(object sender, RoutedEventArgs e)
+        {
+
+            if (this.IsRecording)
+            {
+                this.StopRecording();
+            }
+            else
+            {
+                this.StartRecording();
+            }
+        }
+
+        /// <summary>
+        /// Handles Take button click
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void btnTake_Click(object sender, RoutedEventArgs e)
+        {
+            this.result = this.SaveAudioClipToLocalStorage();
+
+            if (Completed != null)
+            {
+                Completed(this, result);
+            }
+
+            if (this.NavigationService.CanGoBack)
+            {
+                this.NavigationService.GoBack();
+            }
+        }
+
+        /// <summary>
+        /// Handles page closing event, stops recording if needed and dispatches results.
+        /// </summary>
+        /// <param name="e"></param>
+        protected override void OnNavigatedFrom(System.Windows.Navigation.NavigationEventArgs e)
+        {
+            if (IsRecording)
+            {
+                StopRecording();
+            }
+
+            this.FinalizeXnaGameLoop();
+
+            base.OnNavigatedFrom(e);
+        }
+
+        /// <summary>
+        /// Copies data from microphone to memory storages and updates recording state
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void MicrophoneBufferReady(object sender, EventArgs e)
+        {
+            this.microphone.GetData(this.buffer);
+            this.memoryStream.Write(this.buffer, 0, this.buffer.Length);
+            TimeSpan bufferDuration = this.microphone.BufferDuration;
+
+            this.Dispatcher.BeginInvoke(() =>
+            {
+                this.duration += bufferDuration;
+
+                this.txtDuration.Text = "Duration: " +
+                    this.duration.Minutes.ToString().PadLeft(2, '0') + ":" +
+                    this.duration.Seconds.ToString().PadLeft(2, '0');
+            });
+
+        }
+
+        /// <summary>
+        /// Writes audio data from memory to isolated storage
+        /// </summary>
+        /// <returns></returns>
+        private AudioResult SaveAudioClipToLocalStorage()
+        {
+            if (this.memoryStream == null || this.memoryStream.Length <= 0)
+            {
+                return new AudioResult(TaskResult.Cancel);
+            }
+
+            this.memoryStream.UpdateWavStream();
+
+            // save audio data to local isolated storage
+
+            string filename = String.Format(FileNameFormat, Guid.NewGuid().ToString());
+
+            try
+            {
+                using (IsolatedStorageFile isoFile = IsolatedStorageFile.GetUserStoreForApplication())
+                {
+
+                    if (!isoFile.DirectoryExists(LocalFolderName))
+                    {
+                        isoFile.CreateDirectory(LocalFolderName);
+                    }
+
+                    string filePath = System.IO.Path.Combine("/" + LocalFolderName + "/", filename);
+
+                    this.memoryStream.Seek(0, SeekOrigin.Begin);
+
+                    using (IsolatedStorageFileStream fileStream = isoFile.CreateFile(filePath))
+                    {
+
+                        this.memoryStream.CopyTo(fileStream);
+                    }
+
+                    AudioResult result = new AudioResult(TaskResult.OK);
+                    result.AudioFileName = filePath;
+
+                    result.AudioFile = this.memoryStream;
+                    result.AudioFile.Seek(0, SeekOrigin.Begin);
+
+                    return result;
+                }
+
+
+
+            }
+            catch (Exception)
+            {
+                //TODO: log or do something else
+                throw;
+            }
+        }
+
+        /// <summary>
+        /// Special initialization required for the microphone: XNA game loop
+        /// </summary>
+        private void InitializeXnaGameLoop()
+        {
+            // Timer to simulate the XNA game loop (Microphone is from XNA)
+            this.dtXna = new DispatcherTimer();
+            this.dtXna.Interval = TimeSpan.FromMilliseconds(33);
+            this.dtXna.Tick += delegate { try { FrameworkDispatcher.Update(); } catch { } };
+            this.dtXna.Start();
+        }
+        /// <summary>
+        /// Finalizes XNA game loop for microphone
+        /// </summary>
+        private void FinalizeXnaGameLoop()
+        {
+            // Timer to simulate the XNA game loop (Microphone is from XNA)
+            if (dtXna != null)
+            {
+                dtXna.Stop();
+                dtXna = null;
+            }
+        }
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/0fea2dd2/lib/cordova-wp7/templates/standalone/Plugins/UI/ImageCapture.xaml
----------------------------------------------------------------------
diff --git a/lib/cordova-wp7/templates/standalone/Plugins/UI/ImageCapture.xaml b/lib/cordova-wp7/templates/standalone/Plugins/UI/ImageCapture.xaml
new file mode 100644
index 0000000..a7eee21
--- /dev/null
+++ b/lib/cordova-wp7/templates/standalone/Plugins/UI/ImageCapture.xaml
@@ -0,0 +1,26 @@
+<phone:PhoneApplicationPage 
+    x:Class="WPCordovaClassLib.Cordova.UI.ImageCapture"
+    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
+    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
+    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+    FontFamily="{StaticResource PhoneFontFamilyNormal}"
+    FontSize="{StaticResource PhoneFontSizeNormal}"
+    Foreground="{StaticResource PhoneForegroundBrush}"
+    SupportedOrientations="PortraitOrLandscape" Orientation="Portrait"
+    mc:Ignorable="d" d:DesignHeight="768" d:DesignWidth="480"
+    shell:SystemTray.IsVisible="True">
+
+    <!--LayoutRoot is the root grid where all page content is placed-->
+    <Grid x:Name="LayoutRoot" Background="Yellow">
+        <Grid.RowDefinitions>
+            <RowDefinition Height="Auto"/>
+            <RowDefinition Height="*"/>
+        </Grid.RowDefinitions>
+
+    </Grid>
+ 
+
+</phone:PhoneApplicationPage>

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/0fea2dd2/lib/cordova-wp7/templates/standalone/Plugins/UI/ImageCapture.xaml.cs
----------------------------------------------------------------------
diff --git a/lib/cordova-wp7/templates/standalone/Plugins/UI/ImageCapture.xaml.cs b/lib/cordova-wp7/templates/standalone/Plugins/UI/ImageCapture.xaml.cs
new file mode 100644
index 0000000..234b444
--- /dev/null
+++ b/lib/cordova-wp7/templates/standalone/Plugins/UI/ImageCapture.xaml.cs
@@ -0,0 +1,109 @@
+/*  
+	Licensed under the Apache License, Version 2.0 (the "License");
+	you may not use this file except in compliance with the License.
+	You may obtain a copy of the License at
+	
+	http://www.apache.org/licenses/LICENSE-2.0
+	
+	Unless required by applicable law or agreed to in writing, software
+	distributed under the License is distributed on an "AS IS" BASIS,
+	WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+	See the License for the specific language governing permissions and
+	limitations under the License.
+*/
+
+
+using System;
+using System.IO;
+using System.Windows;
+using Microsoft.Phone.Controls;
+using Microsoft.Phone.Tasks;
+
+namespace WPCordovaClassLib.Cordova.UI
+{
+    public partial class ImageCapture : PhoneApplicationPage
+    {
+        public ImageCapture()
+        {
+            InitializeComponent();
+        }
+    }
+
+    public class ImageCaptureTask
+    {
+        /// <summary>
+        /// Represents an image returned from a call to the Show method of
+        /// a WPCordovaClassLib.Cordova.Controls.ImageCaptureTask object
+        /// </summary>
+        //public class AudioResult : TaskEventArgs
+        //{
+        //    /// <summary>
+        //    /// Initializes a new instance of the AudioResult class.
+        //    /// </summary>
+        //    public AudioResult()
+        //    { }
+
+        //    /// <summary>
+        //    /// Initializes a new instance of the AudioResult class
+        //    /// with the specified Microsoft.Phone.Tasks.TaskResult.
+        //    /// </summary>
+        //    /// <param name="taskResult">Associated Microsoft.Phone.Tasks.TaskResult</param>
+        //    public AudioResult(TaskResult taskResult)
+        //        : base(taskResult)
+        //    { }
+
+        //    /// <summary>
+        //    ///  Gets the file name of the recorded audio.
+        //    /// </summary>
+        //    public Stream AudioFile { get; internal set; }
+
+        //    /// <summary>
+        //    /// Gets the stream containing the data for the recorded audio.
+        //    /// </summary>
+        //    public string AudioFileName { get; internal set; }
+        //}
+
+        ///// <summary>
+        ///// Occurs when a audio recording task is completed.
+        ///// </summary>
+        //public event EventHandler<AudioResult> Completed;
+
+        /// <summary>
+        /// Shows Audio Recording application
+        /// </summary>
+        public void Show()
+        {
+            Deployment.Current.Dispatcher.BeginInvoke(() =>
+            {
+                var root = Application.Current.RootVisual as PhoneApplicationFrame;
+
+                root.Navigated += new System.Windows.Navigation.NavigatedEventHandler(NavigationService_Navigated);
+
+                string baseUrl = WPCordovaClassLib.Cordova.Commands.BaseCommand.GetBaseURL();
+
+                // dummy parameter is used to always open a fresh version
+                root.Navigate(new System.Uri(baseUrl + "Cordova/UI/ImageCapture.xaml?dummy=" + Guid.NewGuid().ToString(), UriKind.Relative));
+            });
+        }
+
+        /// <summary>
+        /// Performs additional configuration of the recording application.
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void NavigationService_Navigated(object sender, System.Windows.Navigation.NavigationEventArgs e)
+        {
+            ImageCapture imageCapture = e.Content as ImageCapture;
+            if (imageCapture != null)
+            {
+                (Application.Current.RootVisual as PhoneApplicationFrame).Navigated -= NavigationService_Navigated;
+
+                //imageCapture.Completed += this.Completed;
+                //else if (this.Completed != null)
+                //{
+                //    this.Completed(this, new AudioResult(TaskResult.Cancel));
+                //}
+            }
+        }
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/0fea2dd2/lib/cordova-wp7/templates/standalone/Plugins/UI/NotificationBox.xaml
----------------------------------------------------------------------
diff --git a/lib/cordova-wp7/templates/standalone/Plugins/UI/NotificationBox.xaml b/lib/cordova-wp7/templates/standalone/Plugins/UI/NotificationBox.xaml
new file mode 100644
index 0000000..1ca5d5f
--- /dev/null
+++ b/lib/cordova-wp7/templates/standalone/Plugins/UI/NotificationBox.xaml
@@ -0,0 +1,62 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License. 
+-->
+<UserControl x:Class="WPCordovaClassLib.Cordova.UI.NotificationBox"
+    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+    mc:Ignorable="d"
+    FontFamily="{StaticResource PhoneFontFamilyNormal}"
+    FontSize="{StaticResource PhoneFontSizeNormal}"
+    Foreground="{StaticResource PhoneForegroundBrush}"
+    d:DesignHeight="800" d:DesignWidth="480" VerticalAlignment="Stretch">
+
+    <Grid x:Name="LayoutRoot" 
+          Background="{StaticResource PhoneSemitransparentBrush}" VerticalAlignment="Stretch">
+        
+        <Grid.RowDefinitions>
+            <RowDefinition Height="Auto"/>
+            <RowDefinition Height="*"/>
+        </Grid.RowDefinitions>
+        
+
+        <!--TitlePanel contains the name of the application and page title-->
+        <StackPanel x:Name="TitlePanel" 
+                    Grid.Row="0" 
+                    Background="{StaticResource PhoneSemitransparentBrush}">
+            <TextBlock x:Name="PageTitle" 
+                       Text="Title" 
+                       Margin="10,10" 
+                       Style="{StaticResource PhoneTextTitle2Style}"/>
+            
+            <TextBlock x:Name="SubTitle" 
+                       Text="Subtitle" 
+                       TextWrapping="Wrap"
+                       Margin="10,10"
+                       Style="{StaticResource PhoneTextTitle3Style}"/>
+            
+            <ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Disabled">       
+            <StackPanel x:Name="ButtonPanel"
+                        Margin="10,10"
+                        Orientation="Horizontal"/>
+            </ScrollViewer>
+
+        </StackPanel>
+    </Grid>
+</UserControl>

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/0fea2dd2/lib/cordova-wp7/templates/standalone/Plugins/UI/NotificationBox.xaml.cs
----------------------------------------------------------------------
diff --git a/lib/cordova-wp7/templates/standalone/Plugins/UI/NotificationBox.xaml.cs b/lib/cordova-wp7/templates/standalone/Plugins/UI/NotificationBox.xaml.cs
new file mode 100644
index 0000000..50b2f2a
--- /dev/null
+++ b/lib/cordova-wp7/templates/standalone/Plugins/UI/NotificationBox.xaml.cs
@@ -0,0 +1,41 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License. 
+*/
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Net;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+using System.Windows.Shapes;
+
+namespace WPCordovaClassLib.Cordova.UI
+{
+    public partial class NotificationBox : UserControl
+    {
+        public NotificationBox()
+        {
+            InitializeComponent();
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/0fea2dd2/lib/cordova-wp7/templates/standalone/Plugins/UI/VideoCaptureTask.cs
----------------------------------------------------------------------
diff --git a/lib/cordova-wp7/templates/standalone/Plugins/UI/VideoCaptureTask.cs b/lib/cordova-wp7/templates/standalone/Plugins/UI/VideoCaptureTask.cs
new file mode 100644
index 0000000..def2a88
--- /dev/null
+++ b/lib/cordova-wp7/templates/standalone/Plugins/UI/VideoCaptureTask.cs
@@ -0,0 +1,105 @@
+/*  
+	Licensed under the Apache License, Version 2.0 (the "License");
+	you may not use this file except in compliance with the License.
+	You may obtain a copy of the License at
+	
+	http://www.apache.org/licenses/LICENSE-2.0
+	
+	Unless required by applicable law or agreed to in writing, software
+	distributed under the License is distributed on an "AS IS" BASIS,
+	WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+	See the License for the specific language governing permissions and
+	limitations under the License.
+*/
+
+using System;
+using System.IO;
+using System.Windows;
+using Microsoft.Phone.Controls;
+using Microsoft.Phone.Tasks;
+
+namespace WPCordovaClassLib.Cordova.UI
+{
+    /// <summary>
+    /// Allows an application to launch the Video Recording application. 
+    /// Use this to allow users to record video from your application.
+    /// </summary>
+    public class VideoCaptureTask
+    {
+        /// <summary>
+        /// Represents recorded video returned from a call to the Show method of
+        /// a WPCordovaClassLib.Cordova.Controls.VideoCaptureTask object
+        /// </summary>
+        public class VideoResult : TaskEventArgs
+        {
+            /// <summary>
+            /// Initializes a new instance of the VideoResult class.
+            /// </summary>
+            public VideoResult()
+            { }
+
+            /// <summary>
+            /// Initializes a new instance of the VideoResult class
+            /// with the specified Microsoft.Phone.Tasks.TaskResult.
+            /// </summary>
+            /// <param name="taskResult">Associated Microsoft.Phone.Tasks.TaskResult</param>
+            public VideoResult(TaskResult taskResult)
+                : base(taskResult)
+            { }
+
+            /// <summary>
+            ///  Gets the file name of the recorded Video.
+            /// </summary>
+            public Stream VideoFile { get; internal set; }
+
+            /// <summary>
+            /// Gets the stream containing the data for the recorded Video.
+            /// </summary>
+            public string VideoFileName { get; internal set; }
+        }
+
+        /// <summary>
+        /// Occurs when a Video recording task is completed.
+        /// </summary>
+        public event EventHandler<VideoResult> Completed;
+
+        /// <summary>
+        /// Shows Video Recording application
+        /// </summary>
+        public void Show()
+        {
+            Deployment.Current.Dispatcher.BeginInvoke(() =>
+            {
+                var root = Application.Current.RootVisual as PhoneApplicationFrame;
+
+                root.Navigated += new System.Windows.Navigation.NavigatedEventHandler(NavigationService_Navigated);
+
+                string baseUrl = WPCordovaClassLib.Cordova.Commands.BaseCommand.GetBaseURL();
+                // dummy parameter is used to always open a fresh version
+                root.Navigate(new System.Uri(baseUrl + "CordovaLib/UI/VideoRecorder.xaml?dummy=" + Guid.NewGuid().ToString(), UriKind.Relative));
+            });
+        }
+
+        /// <summary>
+        /// Performs additional configuration of the recording application.
+        /// </summary>
+        private void NavigationService_Navigated(object sender, System.Windows.Navigation.NavigationEventArgs e)
+        {
+            if (!(e.Content is VideoRecorder)) return;
+
+            (Application.Current.RootVisual as PhoneApplicationFrame).Navigated -= NavigationService_Navigated;
+
+            VideoRecorder VideoRecorder = (VideoRecorder)e.Content;
+
+            if (VideoRecorder != null)
+            {
+                VideoRecorder.Completed += this.Completed;
+            }
+            else if (this.Completed != null)
+            {
+                this.Completed(this, new VideoResult(TaskResult.Cancel));
+            }
+        }
+
+    }
+}

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/0fea2dd2/lib/cordova-wp7/templates/standalone/Plugins/UI/VideoRecorder.xaml
----------------------------------------------------------------------
diff --git a/lib/cordova-wp7/templates/standalone/Plugins/UI/VideoRecorder.xaml b/lib/cordova-wp7/templates/standalone/Plugins/UI/VideoRecorder.xaml
new file mode 100644
index 0000000..c78fdb0
--- /dev/null
+++ b/lib/cordova-wp7/templates/standalone/Plugins/UI/VideoRecorder.xaml
@@ -0,0 +1,52 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License. 
+-->
+<phone:PhoneApplicationPage 
+    x:Class="WPCordovaClassLib.Cordova.UI.VideoRecorder"
+    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
+    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
+    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+    mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="480"
+    FontFamily="{StaticResource PhoneFontFamilyNormal}"
+    FontSize="{StaticResource PhoneFontSizeNormal}"
+    Foreground="{StaticResource PhoneForegroundBrush}"
+    SupportedOrientations="Landscape" Orientation="LandscapeLeft"
+    shell:SystemTray.IsVisible="False">
+   
+    <Canvas x:Name="LayoutRoot" Background="Transparent" Grid.ColumnSpan="1" Grid.Column="0">
+
+        <Rectangle 
+            x:Name="viewfinderRectangle"
+            Width="640" 
+            Height="480" 
+            HorizontalAlignment="Left" 
+            Canvas.Left="80"/>
+        
+    </Canvas>
+
+    <phone:PhoneApplicationPage.ApplicationBar>
+        <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True" x:Name="PhoneAppBar" Opacity="0.0">
+            <shell:ApplicationBarIconButton IconUri="/Images/appbar.feature.video.rest.png" Text="Record"  x:Name="btnStartRecording" Click="StartRecording_Click" />
+            <shell:ApplicationBarIconButton IconUri="/Images/appbar.save.rest.png" Text="Take" x:Name="btnTakeVideo" Click="TakeVideo_Click"/>            
+        </shell:ApplicationBar>
+    </phone:PhoneApplicationPage.ApplicationBar>
+
+</phone:PhoneApplicationPage>

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/0fea2dd2/lib/cordova-wp7/templates/standalone/Plugins/UI/VideoRecorder.xaml.cs
----------------------------------------------------------------------
diff --git a/lib/cordova-wp7/templates/standalone/Plugins/UI/VideoRecorder.xaml.cs b/lib/cordova-wp7/templates/standalone/Plugins/UI/VideoRecorder.xaml.cs
new file mode 100644
index 0000000..6ab1cc3
--- /dev/null
+++ b/lib/cordova-wp7/templates/standalone/Plugins/UI/VideoRecorder.xaml.cs
@@ -0,0 +1,405 @@
+/*  
+	Licensed under the Apache License, Version 2.0 (the "License");
+	you may not use this file except in compliance with the License.
+	You may obtain a copy of the License at
+	
+	http://www.apache.org/licenses/LICENSE-2.0
+	
+	Unless required by applicable law or agreed to in writing, software
+	distributed under the License is distributed on an "AS IS" BASIS,
+	WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+	See the License for the specific language governing permissions and
+	limitations under the License.
+*/
+
+using System;
+using System.IO;
+using System.IO.IsolatedStorage;
+using System.Windows.Media;
+using System.Windows.Navigation;
+using Microsoft.Phone.Controls;
+using Microsoft.Phone.Shell;
+using Microsoft.Phone.Tasks;
+using VideoResult = WPCordovaClassLib.Cordova.UI.VideoCaptureTask.VideoResult;
+
+namespace WPCordovaClassLib.Cordova.UI
+{
+    public partial class VideoRecorder : PhoneApplicationPage
+    {
+
+        #region Constants
+
+        /// <summary>
+        /// Caption for record button in ready state
+        /// </summary>
+        private const string RecordingStartCaption = "Record";
+
+        /// <summary>
+        /// Caption for record button in recording state
+        /// </summary>
+        private const string RecordingStopCaption = "Stop";
+
+        /// <summary>
+        /// Start record icon URI
+        /// </summary>
+        private const string StartIconUri = "/Images/appbar.feature.video.rest.png";
+
+        /// <summary>
+        /// Stop record icon URI
+        /// </summary>
+        private const string StopIconUri = "/Images/appbar.stop.rest.png";
+
+        /// <summary>
+        /// Folder to save video clips
+        /// </summary>
+        private const string LocalFolderName = "VideoCache";
+
+        /// <summary>
+        /// File name format
+        /// </summary>
+        private const string FileNameFormat = "Video-{0}.mp4";
+
+        /// <summary>
+        /// Temporary file name
+        /// </summary>
+        private const string defaultFileName = "NewVideoFile.mp4";
+
+        #endregion
+
+        #region Callbacks
+        /// <summary>
+        /// Occurs when a video recording task is completed.
+        /// </summary>
+        public event EventHandler<VideoResult> Completed;
+
+        #endregion
+
+        #region Fields
+
+        /// <summary>
+        /// Viewfinder for capturing video
+        /// </summary>
+        private VideoBrush videoRecorderBrush;
+
+        /// <summary>
+        /// Path to save video clip
+        /// </summary>
+        private string filePath;
+
+        /// <summary>
+        /// Source for capturing video. 
+        /// </summary>
+        private CaptureSource captureSource;
+
+        /// <summary>
+        /// Video device
+        /// </summary>
+        private VideoCaptureDevice videoCaptureDevice;
+
+        /// <summary>
+        /// File sink so save recording video in Isolated Storage
+        /// </summary>
+        private FileSink fileSink;
+
+        /// <summary>
+        /// For managing button and application state 
+        /// </summary>
+        private enum VideoState { Initialized, Ready, Recording, CameraNotSupported };
+
+        /// <summary>
+        /// Current video state
+        /// </summary>
+        private VideoState currentVideoState;
+
+        /// <summary>
+        /// Stream to return result
+        /// </summary>
+        private MemoryStream memoryStream;
+
+        /// <summary>
+        /// Recording result, dispatched back when recording page is closed
+        /// </summary>
+        private VideoResult result = new VideoResult(TaskResult.Cancel);
+
+        #endregion
+
+        /// <summary>
+        /// Initializes components
+        /// </summary>
+        public VideoRecorder()
+        {
+            InitializeComponent();
+
+            PhoneAppBar = (ApplicationBar)ApplicationBar;
+            PhoneAppBar.IsVisible = true;
+            btnStartRecording = ((ApplicationBarIconButton)ApplicationBar.Buttons[0]);
+            btnTakeVideo = ((ApplicationBarIconButton)ApplicationBar.Buttons[1]);
+        }
+
+        /// <summary>
+        /// Initializes the video recorder then page is loading
+        /// </summary>
+        protected override void OnNavigatedTo(NavigationEventArgs e)
+        {
+            base.OnNavigatedTo(e);
+            this.InitializeVideoRecorder();
+        }
+
+        /// <summary>
+        /// Disposes camera and media objects then leave the page
+        /// </summary>
+        protected override void OnNavigatedFrom(NavigationEventArgs e)
+        {
+            this.DisposeVideoRecorder();
+
+            if (this.Completed != null)
+            {
+                this.Completed(this, result);
+            }
+            base.OnNavigatedFrom(e);
+        }
+
+        /// <summary>
+        /// Handles TakeVideo button click
+        /// </summary>
+        private void TakeVideo_Click(object sender, EventArgs e)
+        {
+            this.result = this.SaveVideoClip();
+            this.NavigateBack();
+        }
+
+        private void NavigateBack()
+        {
+            if (this.NavigationService.CanGoBack)
+            {
+                this.NavigationService.GoBack();
+            }
+        }
+
+        /// <summary>
+        /// Resaves video clip from temporary directory to persistent 
+        /// </summary>
+        private VideoResult SaveVideoClip()
+        {
+            try
+            {
+                using (IsolatedStorageFile isoFile = IsolatedStorageFile.GetUserStoreForApplication())
+                {
+                    if (string.IsNullOrEmpty(filePath) || (!isoFile.FileExists(filePath)))
+                    {
+                        return new VideoResult(TaskResult.Cancel);
+                    }
+
+                    string fileName = String.Format(FileNameFormat, Guid.NewGuid().ToString());
+                    string newPath = Path.Combine("/" + LocalFolderName + "/", fileName);
+                    isoFile.CopyFile(filePath, newPath);
+                    isoFile.DeleteFile(filePath);
+
+                    memoryStream = new MemoryStream();
+                    using (IsolatedStorageFileStream fileStream = new IsolatedStorageFileStream(newPath, FileMode.Open, isoFile))
+                    {
+                        fileStream.CopyTo(memoryStream);
+                    }
+
+                    VideoResult result = new VideoResult(TaskResult.OK);
+                    result.VideoFileName = newPath;
+                    result.VideoFile = this.memoryStream;
+                    result.VideoFile.Seek(0, SeekOrigin.Begin);
+                    return result;
+                }
+
+            }
+            catch (Exception)
+            {
+                return new VideoResult(TaskResult.None);
+            }
+        }
+
+        /// <summary>
+        /// Updates the buttons on the UI thread based on current state. 
+        /// </summary>
+        /// <param name="currentState">current UI state</param>
+        private void UpdateUI(VideoState currentState)
+        {
+            Dispatcher.BeginInvoke(delegate
+            {
+                switch (currentState)
+                {
+                    case VideoState.CameraNotSupported:
+                        btnStartRecording.IsEnabled = false;
+                        btnTakeVideo.IsEnabled = false;
+                        break;
+
+                    case VideoState.Initialized:
+                        btnStartRecording.Text = RecordingStartCaption;
+                        btnStartRecording.IconUri = new Uri(StartIconUri, UriKind.Relative);
+                        btnTakeVideo.IsEnabled = false;
+                        break;
+
+                    case VideoState.Ready:
+                        btnStartRecording.Text = RecordingStartCaption;
+                        btnStartRecording.IconUri = new Uri(StartIconUri, UriKind.Relative);
+                        btnTakeVideo.IsEnabled = true;
+                        break;
+
+                    case VideoState.Recording:
+                        btnStartRecording.Text = RecordingStopCaption;
+                        btnStartRecording.IconUri = new Uri(StopIconUri, UriKind.Relative);
+                        btnTakeVideo.IsEnabled = false;
+                        break;
+
+                    default:
+                        break;
+                }
+                currentVideoState = currentState;
+            });
+        }
+
+        /// <summary>
+        /// Initializes VideoRecorder
+        /// </summary>
+        public void InitializeVideoRecorder()
+        {
+            if (captureSource == null)
+            {
+                captureSource = new CaptureSource();
+                fileSink = new FileSink();
+                videoCaptureDevice = CaptureDeviceConfiguration.GetDefaultVideoCaptureDevice();
+
+                if (videoCaptureDevice != null)
+                {
+                    videoRecorderBrush = new VideoBrush();
+                    videoRecorderBrush.SetSource(captureSource);
+                    viewfinderRectangle.Fill = videoRecorderBrush;
+                    captureSource.Start();
+                    this.UpdateUI(VideoState.Initialized);
+                }
+                else
+                {
+                    this.UpdateUI(VideoState.CameraNotSupported);
+                }
+            }
+        }
+
+        /// <summary>
+        /// Sets recording state: start recording 
+        /// </summary>
+        private void StartVideoRecording()
+        {
+            try
+            {
+                if ((captureSource.VideoCaptureDevice != null) && (captureSource.State == CaptureState.Started))
+                {
+                    captureSource.Stop();
+                    fileSink.CaptureSource = captureSource;
+                    filePath = System.IO.Path.Combine("/" + LocalFolderName + "/", defaultFileName);
+
+                    using (IsolatedStorageFile isoFile = IsolatedStorageFile.GetUserStoreForApplication())
+                    {
+                        if (!isoFile.DirectoryExists(LocalFolderName))
+                        {
+                            isoFile.CreateDirectory(LocalFolderName);
+                        }
+
+                        if (isoFile.FileExists(filePath))
+                        {
+                            isoFile.DeleteFile(filePath);
+                        }
+                    }
+
+                    fileSink.IsolatedStorageFileName = filePath;
+                }
+
+                if (captureSource.VideoCaptureDevice != null
+                    && captureSource.State == CaptureState.Stopped)
+                {
+                    captureSource.Start();
+                }
+                this.UpdateUI(VideoState.Recording);
+            }
+            catch (Exception)
+            {
+                this.result = new VideoResult(TaskResult.None);
+                this.NavigateBack();
+            }
+        }
+
+        /// <summary>
+        /// Sets the recording state: stop recording
+        /// </summary>
+        private void StopVideoRecording()
+        {
+            try
+            {
+                if ((captureSource.VideoCaptureDevice != null) && (captureSource.State == CaptureState.Started))
+                {
+                    captureSource.Stop();
+                    fileSink.CaptureSource = null;
+                    fileSink.IsolatedStorageFileName = null;
+                    this.StartVideoPreview();
+                }
+            }
+            catch (Exception)
+            {
+                this.result = new VideoResult(TaskResult.None);
+                this.NavigateBack();
+            }
+        }
+
+        /// <summary>
+        /// Sets the recording state: display the video on the viewfinder. 
+        /// </summary>
+        private void StartVideoPreview()
+        {
+            try
+            {
+                if ((captureSource.VideoCaptureDevice != null) && (captureSource.State == CaptureState.Stopped))
+                {
+                    videoRecorderBrush.SetSource(captureSource);
+                    viewfinderRectangle.Fill = videoRecorderBrush;
+                    captureSource.Start();
+                    this.UpdateUI(VideoState.Ready);
+                }
+            }
+            catch (Exception)
+            {
+                this.result = new VideoResult(TaskResult.None);
+                this.NavigateBack();
+            }
+        }
+
+        /// <summary>
+        /// Starts video recording 
+        /// </summary>
+        private void StartRecording_Click(object sender, EventArgs e)
+        {
+            if (currentVideoState == VideoState.Recording)
+            {
+                this.StopVideoRecording();
+            }
+            else
+            {
+                this.StartVideoRecording();
+            }
+        }
+
+        /// <summary>
+        /// Releases resources
+        /// </summary>
+        private void DisposeVideoRecorder()
+        {
+            if (captureSource != null)
+            {
+                if ((captureSource.VideoCaptureDevice != null) && (captureSource.State == CaptureState.Started))
+                {
+                    captureSource.Stop();
+                }
+                captureSource = null;
+                videoCaptureDevice = null;
+                fileSink = null;
+                videoRecorderBrush = null;
+            }
+        }
+
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/0fea2dd2/lib/cordova-wp7/templates/standalone/Properties/AppManifest.xml
----------------------------------------------------------------------
diff --git a/lib/cordova-wp7/templates/standalone/Properties/AppManifest.xml b/lib/cordova-wp7/templates/standalone/Properties/AppManifest.xml
new file mode 100644
index 0000000..877ea4b
--- /dev/null
+++ b/lib/cordova-wp7/templates/standalone/Properties/AppManifest.xml
@@ -0,0 +1,6 @@
+<Deployment xmlns="http://schemas.microsoft.com/client/2007/deployment"
+        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+>
+  <Deployment.Parts>
+  </Deployment.Parts>
+</Deployment>

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/0fea2dd2/lib/cordova-wp7/templates/standalone/Properties/AssemblyInfo.cs
----------------------------------------------------------------------
diff --git a/lib/cordova-wp7/templates/standalone/Properties/AssemblyInfo.cs b/lib/cordova-wp7/templates/standalone/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..3f5dc5a
--- /dev/null
+++ b/lib/cordova-wp7/templates/standalone/Properties/AssemblyInfo.cs
@@ -0,0 +1,38 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using System.Resources;
+
+// General Information about an assembly is controlled through the following 
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("CordovaAppProj")]
+[assembly: AssemblyDescription("2.0.0.0")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("Apache Cordova")]
+[assembly: AssemblyProduct("CordovaAppProj")]
+[assembly: AssemblyCopyright("Copyright © Apache Cordova 2013")]
+[assembly: AssemblyTrademark("Apache Cordova")]
+[assembly: AssemblyCulture("")]
+
+[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
+
+// Setting ComVisible to false makes the types in this assembly not visible 
+// to COM components.  If you need to access a type in this assembly from 
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("9e27b972-0825-4386-ba17-63c695262c3d")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+// You can specify all the values or you can default the Revision and Build Numbers 
+// by using the '*' as shown below:
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/0fea2dd2/lib/cordova-wp7/templates/standalone/Properties/WMAppManifest.xml
----------------------------------------------------------------------
diff --git a/lib/cordova-wp7/templates/standalone/Properties/WMAppManifest.xml b/lib/cordova-wp7/templates/standalone/Properties/WMAppManifest.xml
new file mode 100644
index 0000000..96332e1
--- /dev/null
+++ b/lib/cordova-wp7/templates/standalone/Properties/WMAppManifest.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Deployment xmlns="http://schemas.microsoft.com/windowsphone/2009/deployment" AppPlatformVersion="7.1">
+  <App xmlns="" ProductID="{$guid1$}" Title="$safeprojectname$" 
+       RuntimeType="Silverlight" Version="1.0.0.0" Genre="apps.normal"  
+       Author="$safeprojectname$ author" 
+       BitsPerPixel="32" 
+       Description="Apache Cordova for Windows Phone 7"
+       Publisher="$safeprojectname$">
+    
+    <IconPath IsRelative="true" IsResource="false">ApplicationIcon.png</IconPath>
+    <Capabilities>
+      <Capability Name="ID_CAP_IDENTITY_DEVICE" />
+      <Capability Name="ID_CAP_IDENTITY_USER" />
+      <Capability Name="ID_CAP_LOCATION" />
+      <Capability Name="ID_CAP_NETWORKING" />
+      <Capability Name="ID_CAP_WEBBROWSERCOMPONENT" />
+      <Capability Name="ID_CAP_APPOINTMENTS"/>
+      <Capability Name="ID_CAP_CONTACTS"/>
+      <Capability Name="ID_CAP_ISV_CAMERA"/>
+      <Capability Name="ID_CAP_MEDIALIB"/>
+      <Capability Name="ID_CAP_MICROPHONE"/>
+      <Capability Name="ID_CAP_PHONEDIALER"/>
+      <Capability Name="ID_CAP_PUSH_NOTIFICATION"/>
+      <Capability Name="ID_CAP_SENSORS"/>
+      <Capability Name="ID_HW_FRONTCAMERA"/>      
+    </Capabilities>
+    
+    <Tasks>
+      <DefaultTask Name="_default" NavigationPage="MainPage.xaml" />
+    </Tasks>
+    <Tokens>
+      <PrimaryToken TokenID="$safeprojectname$Token" TaskName="_default">
+        <TemplateType5>
+          <BackgroundImageURI IsRelative="true" IsResource="false">Background.png</BackgroundImageURI>
+          <Count>0</Count>
+          <Title>$safeprojectname$</Title>
+        </TemplateType5>
+      </PrimaryToken>
+    </Tokens>
+  </App>
+</Deployment>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/0fea2dd2/lib/cordova-wp7/templates/standalone/README.md
----------------------------------------------------------------------
diff --git a/lib/cordova-wp7/templates/standalone/README.md b/lib/cordova-wp7/templates/standalone/README.md
new file mode 100644
index 0000000..6374253
--- /dev/null
+++ b/lib/cordova-wp7/templates/standalone/README.md
@@ -0,0 +1,13 @@
+Project Template
+===
+
+This project template needs to be built to be installed.
+
+
+This template includes the full source code for Windows Phone 7
+
+
+In order to build this template in Visual Studio Express for Windows Phone 7 :
+
+1. Open the solution file in Visual Studio
+2. Choose File->Export Template and follow the directions.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/0fea2dd2/lib/cordova-wp7/templates/standalone/SplashScreenImage.jpg
----------------------------------------------------------------------
diff --git a/lib/cordova-wp7/templates/standalone/SplashScreenImage.jpg b/lib/cordova-wp7/templates/standalone/SplashScreenImage.jpg
new file mode 100644
index 0000000..d35501d
Binary files /dev/null and b/lib/cordova-wp7/templates/standalone/SplashScreenImage.jpg differ

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/0fea2dd2/lib/cordova-wp7/templates/standalone/VERSION
----------------------------------------------------------------------
diff --git a/lib/cordova-wp7/templates/standalone/VERSION b/lib/cordova-wp7/templates/standalone/VERSION
new file mode 100644
index 0000000..9aa3464
--- /dev/null
+++ b/lib/cordova-wp7/templates/standalone/VERSION
@@ -0,0 +1 @@
+2.7.0
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/0fea2dd2/lib/cordova-wp7/templates/standalone/config.xml
----------------------------------------------------------------------
diff --git a/lib/cordova-wp7/templates/standalone/config.xml b/lib/cordova-wp7/templates/standalone/config.xml
new file mode 100644
index 0000000..170f9fe
--- /dev/null
+++ b/lib/cordova-wp7/templates/standalone/config.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+# http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+#  KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+-->
+<widget>
+
+  <plugins>
+    <plugin name="Device"/>
+    <plugin name="Logger"/>
+    <plugin name="Compass"/>
+    <plugin name="Accelerometer"/>
+    <plugin name="Camera"/>
+    <plugin name="NetworkStatus"/>
+    <plugin name="Contacts"/>
+    <plugin name="DebugConsole" />
+    <plugin name="Echo"/>
+    <plugin name="File"/>
+    <plugin name="FileTransfer"/>
+    <plugin name="Geolocation"/>
+    <plugin name="Notification"/>
+    <plugin name="Media"/>
+    <plugin name="Capture"/>
+    <plugin name="SplashScreen"/>
+    <plugin name="Battery"/>
+    <plugin name="Globalization"/>
+    <plugin name="InAppBrowser"/>
+  </plugins>
+
+
+  <access origin="*"/>
+
+</widget>

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/0fea2dd2/lib/cordova-wp7/templates/standalone/cordova/build.bat
----------------------------------------------------------------------
diff --git a/lib/cordova-wp7/templates/standalone/cordova/build.bat b/lib/cordova-wp7/templates/standalone/cordova/build.bat
new file mode 100644
index 0000000..b48598a
--- /dev/null
+++ b/lib/cordova-wp7/templates/standalone/cordova/build.bat
@@ -0,0 +1,9 @@
+@ECHO OFF
+SET full_path=%~dp0
+IF EXIST %full_path%lib\build.js (
+    cscript "%full_path%lib\build.js" %* //nologo
+) ELSE (
+    ECHO.
+    ECHO ERROR: Could not find 'build.js' in cordova/lib, aborting...>&2
+    EXIT /B 1
+)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/0fea2dd2/lib/cordova-wp7/templates/standalone/cordova/clean.bat
----------------------------------------------------------------------
diff --git a/lib/cordova-wp7/templates/standalone/cordova/clean.bat b/lib/cordova-wp7/templates/standalone/cordova/clean.bat
new file mode 100644
index 0000000..1bafe1b
--- /dev/null
+++ b/lib/cordova-wp7/templates/standalone/cordova/clean.bat
@@ -0,0 +1,9 @@
+@ECHO OFF
+SET full_path=%~dp0
+IF EXIST %full_path%lib\clean.js (
+    cscript "%full_path%lib\clean.js" %* //nologo
+) ELSE (
+    ECHO.
+    ECHO ERROR: Could not find 'clean.js' in cordova/lib, aborting...>&2
+    EXIT /B 1
+)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/0fea2dd2/lib/cordova-wp7/templates/standalone/cordova/lib/CordovaDeploy/CordovaDeploy.sln
----------------------------------------------------------------------
diff --git a/lib/cordova-wp7/templates/standalone/cordova/lib/CordovaDeploy/CordovaDeploy.sln b/lib/cordova-wp7/templates/standalone/cordova/lib/CordovaDeploy/CordovaDeploy.sln
new file mode 100644
index 0000000..3305276
--- /dev/null
+++ b/lib/cordova-wp7/templates/standalone/cordova/lib/CordovaDeploy/CordovaDeploy.sln
@@ -0,0 +1,20 @@
+
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CordovaDeploy", "CordovaDeploy\CordovaDeploy.csproj", "{E752165B-AF59-4FF0-8601-A2A69FE09E0E}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|x86 = Debug|x86
+		Release|x86 = Release|x86
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{E752165B-AF59-4FF0-8601-A2A69FE09E0E}.Debug|x86.ActiveCfg = Debug|x86
+		{E752165B-AF59-4FF0-8601-A2A69FE09E0E}.Debug|x86.Build.0 = Debug|x86
+		{E752165B-AF59-4FF0-8601-A2A69FE09E0E}.Release|x86.ActiveCfg = Release|x86
+		{E752165B-AF59-4FF0-8601-A2A69FE09E0E}.Release|x86.Build.0 = Release|x86
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+EndGlobal


Mime
View raw message