You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by be...@apache.org on 2013/05/25 02:15:42 UTC
[20/21] wp7 commit: Removed example project (needs to be re-done for
3.0.0)
Removed example project (needs to be re-done for 3.0.0)
Project: http://git-wip-us.apache.org/repos/asf/cordova-wp7/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-wp7/commit/48360316
Tree: http://git-wip-us.apache.org/repos/asf/cordova-wp7/tree/48360316
Diff: http://git-wip-us.apache.org/repos/asf/cordova-wp7/diff/48360316
Branch: refs/heads/3.0.0
Commit: 483603160bf38a932bea4e9d9003113f24a17fc1
Parents: b4bacc0
Author: Benn Mapes <be...@gmail.com>
Authored: Tue May 21 17:24:28 2013 -0700
Committer: Benn Mapes <be...@gmail.com>
Committed: Fri May 24 16:55:34 2013 -0700
----------------------------------------------------------------------
example/App.xaml | 37 -
example/App.xaml.cs | 154 -
example/ApplicationIcon.png | Bin 4951 -> 0 bytes
example/Background.png | Bin 10259 -> 0 bytes
example/BuildManifestProcessor.js | 81 -
example/CordovaExample.csproj | 196 -
example/CordovaExample.sln | 28 -
example/CordovaSourceDictionary.xml | 21 -
example/MainPage.xaml | 52 -
example/MainPage.xaml.cs | 70 -
example/Plugins/Calculator.cs | 46 -
example/Properties/AppManifest.xml | 24 -
example/Properties/AssemblyInfo.cs | 38 -
example/Properties/WMAppManifest.xml | 58 -
example/SplashScreenImage.jpg | Bin 22066 -> 0 bytes
example/config.xml | 49 -
example/www/accelerometer.html | 164 -
example/www/accelerometer2.html | 175 -
example/www/audio.html | 267 --
example/www/calculator.html | 84 -
example/www/camera.html | 115 -
example/www/capture.html | 207 -
example/www/compass.html | 150 -
example/www/contacts.html | 169 -
example/www/cordova.js | 6723 -----------------------------
example/www/events.html | 146 -
example/www/file.html | 284 --
example/www/index.html | 108 -
example/www/location.html | 165 -
example/www/master.css | 175 -
example/www/network.html | 96 -
example/www/notification.html | 112 -
example/www/storage.html | 78 -
33 files changed, 0 insertions(+), 10072 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-wp7/blob/48360316/example/App.xaml
----------------------------------------------------------------------
diff --git a/example/App.xaml b/example/App.xaml
deleted file mode 100644
index 65ba89a..0000000
--- a/example/App.xaml
+++ /dev/null
@@ -1,37 +0,0 @@
-<!--
- 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.
--->
-<Application
- x:Class="CordovaExample.App"
- 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">
-
- <!--Application Resources-->
- <Application.Resources>
- </Application.Resources>
-
- <Application.ApplicationLifetimeObjects>
- <!--Required object that handles lifetime events for the application-->
- <shell:PhoneApplicationService
- Launching="Application_Launching" Closing="Application_Closing"
- Activated="Application_Activated" Deactivated="Application_Deactivated"/>
- </Application.ApplicationLifetimeObjects>
-
-</Application>
http://git-wip-us.apache.org/repos/asf/cordova-wp7/blob/48360316/example/App.xaml.cs
----------------------------------------------------------------------
diff --git a/example/App.xaml.cs b/example/App.xaml.cs
deleted file mode 100644
index 6ae05e6..0000000
--- a/example/App.xaml.cs
+++ /dev/null
@@ -1,154 +0,0 @@
-/*
- 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.Navigation;
-using System.Windows.Shapes;
-using Microsoft.Phone.Controls;
-using Microsoft.Phone.Shell;
-
-namespace CordovaExample
-{
- public partial class App : Application
- {
- /// <summary>
- /// Provides easy access to the root frame of the Phone Application.
- /// </summary>
- /// <returns>The root frame of the Phone Application.</returns>
- public PhoneApplicationFrame RootFrame { get; private set; }
-
- /// <summary>
- /// Constructor for the Application object.
- /// </summary>
- public App()
- {
- // Global handler for uncaught exceptions.
- UnhandledException += Application_UnhandledException;
-
- // Show graphics profiling information while debugging.
- if (System.Diagnostics.Debugger.IsAttached)
- {
- // Display the current frame rate counters.
- //Application.Current.Host.Settings.EnableFrameRateCounter = true;
-
- // Show the areas of the app that are being redrawn in each frame.
- //Application.Current.Host.Settings.EnableRedrawRegions = true;
-
- // Enable non-production analysis visualization mode,
- // which shows areas of a page that are being GPU accelerated with a colored overlay.
- //Application.Current.Host.Settings.EnableCacheVisualization = true;
- }
-
- // Standard Silverlight initialization
- InitializeComponent();
-
- // Phone-specific initialization
- InitializePhoneApplication();
- }
-
- // Code to execute when the application is launching (eg, from Start)
- // This code will not execute when the application is reactivated
- private void Application_Launching(object sender, LaunchingEventArgs e)
- {
- }
-
- // Code to execute when the application is activated (brought to foreground)
- // This code will not execute when the application is first launched
- private void Application_Activated(object sender, ActivatedEventArgs e)
- {
- }
-
- // Code to execute when the application is deactivated (sent to background)
- // This code will not execute when the application is closing
- private void Application_Deactivated(object sender, DeactivatedEventArgs e)
- {
- }
-
- // Code to execute when the application is closing (eg, user hit Back)
- // This code will not execute when the application is deactivated
- private void Application_Closing(object sender, ClosingEventArgs e)
- {
- }
-
- // Code to execute if a navigation fails
- private void RootFrame_NavigationFailed(object sender, NavigationFailedEventArgs e)
- {
- if (System.Diagnostics.Debugger.IsAttached)
- {
- // A navigation has failed; break into the debugger
- System.Diagnostics.Debugger.Break();
- }
- }
-
- // Code to execute on Unhandled Exceptions
- private void Application_UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e)
- {
- if (System.Diagnostics.Debugger.IsAttached)
- {
- // An unhandled exception has occurred; break into the debugger
- System.Diagnostics.Debugger.Break();
- }
- }
-
- #region Phone application initialization
-
- // Avoid double-initialization
- private bool phoneApplicationInitialized = false;
-
- // Do not add any additional code to this method
- private void InitializePhoneApplication()
- {
- if (phoneApplicationInitialized)
- return;
-
- // Create the frame but don't set it as RootVisual yet; this allows the splash
- // screen to remain active until the application is ready to render.
- RootFrame = new PhoneApplicationFrame();
- RootFrame.Navigated += CompleteInitializePhoneApplication;
-
- // Handle navigation failures
- RootFrame.NavigationFailed += RootFrame_NavigationFailed;
-
- // Ensure we don't initialize again
- phoneApplicationInitialized = true;
- }
-
- // Do not add any additional code to this method
- private void CompleteInitializePhoneApplication(object sender, NavigationEventArgs e)
- {
- // Set the root visual to allow the application to render
- if (RootVisual != RootFrame)
- RootVisual = RootFrame;
-
- // Remove this handler since it is no longer needed
- RootFrame.Navigated -= CompleteInitializePhoneApplication;
- }
-
- #endregion
- }
-}
http://git-wip-us.apache.org/repos/asf/cordova-wp7/blob/48360316/example/ApplicationIcon.png
----------------------------------------------------------------------
diff --git a/example/ApplicationIcon.png b/example/ApplicationIcon.png
deleted file mode 100644
index 6b69046..0000000
Binary files a/example/ApplicationIcon.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/cordova-wp7/blob/48360316/example/Background.png
----------------------------------------------------------------------
diff --git a/example/Background.png b/example/Background.png
deleted file mode 100644
index 2667df4..0000000
Binary files a/example/Background.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/cordova-wp7/blob/48360316/example/BuildManifestProcessor.js
----------------------------------------------------------------------
diff --git a/example/BuildManifestProcessor.js b/example/BuildManifestProcessor.js
deleted file mode 100644
index 8b533c6..0000000
--- a/example/BuildManifestProcessor.js
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- 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.
-*/
-
-var objArgs = WScript.Arguments;
-for (i = 0; i < objArgs.length; i++) {
- WScript.Echo("Arg :: " + objArgs(i));
-}
-
-var projectFilePath = null;
-if (objArgs && objArgs.length > 0) {
- projectFilePath = objArgs(0);
-}
-
-
-var fso = WScript.CreateObject("Scripting.FileSystemObject");
-var outFile = fso.CreateTextFile("..\\..\\CordovaSourceDictionary.xml", true);
-
-outFile.WriteLine('<?xml version="1.0" encoding="utf-8"?>');
-outFile.WriteLine('<!-- This file is auto-generated, do not edit! -jm -->');
-outFile.WriteLine('<CordovaSourceDictionary>');
-
-// We need to get any Linked files from the project
-
-WScript.Echo("Adding Source Files ...");
-if (projectFilePath != null) {
- var projXml = WScript.CreateObject("Microsoft.XMLDOM");
-
- projXml.async = false;
- if (projXml.load(projectFilePath)) {
-
- // add linked content ( windows shortcuts )
- var nodes = projXml.selectNodes("/Project/ItemGroup/Content/Link");
- WScript.Echo("/Project/ItemGroup/Content/Link nodes.length" + nodes.length);
- for (var n = 0; n < nodes.length; n++) {
- outFile.WriteLine(' <FilePath Value="' + nodes[n].text + '"/>');
- }
-
- // add files of type Resource
- nodes = projXml.selectNodes("/Project/ItemGroup/Resource/Link");
- WScript.Echo("/Project/ItemGroup/Resource/Link nodes.length" + nodes.length);
- for (n = 0; n < nodes.length; n++) {
- outFile.WriteLine(' <FilePath Value="' + nodes[n].text + '"/>');
- }
-
- // add Content files from www folder
- nodes = projXml.selectNodes("/Project/ItemGroup/Content[@Include]");
- WScript.Echo("/Project/ItemGroup/Content nodes.length" + nodes.length);
- for (n = 0; n < nodes.length; n++) {
- for (var i = 0; i < nodes[n].attributes.length; i++) {
-
- if (nodes[n].attributes[i].name == "Include") {
- var val = nodes[n].attributes[i].value;
- if (val.indexOf("www") == 0) {
- WScript.Echo("adding value :: " + val);
- outFile.WriteLine(' <FilePath Value="' + val + '"/>');
- }
- }
- }
-
- }
- }
-}
-
-outFile.WriteLine('</CordovaSourceDictionary>');
-
http://git-wip-us.apache.org/repos/asf/cordova-wp7/blob/48360316/example/CordovaExample.csproj
----------------------------------------------------------------------
diff --git a/example/CordovaExample.csproj b/example/CordovaExample.csproj
deleted file mode 100644
index 783cec4..0000000
--- a/example/CordovaExample.csproj
+++ /dev/null
@@ -1,196 +0,0 @@
-<?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.
- -->
-<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>10.0.20506</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{0C6DFC84-A3BE-4581-BAAD-85B8CCC17FF8}</ProjectGuid>
- <ProjectTypeGuids>{C089C8C0-30E0-4E22-80C0-CE093F111A43};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>CordovaExample</RootNamespace>
- <AssemblyName>CordovaExample</AssemblyName>
- <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
- <SilverlightVersion>$(TargetFrameworkVersion)</SilverlightVersion>
- <TargetFrameworkProfile>WindowsPhone71</TargetFrameworkProfile>
- <TargetFrameworkIdentifier>Silverlight</TargetFrameworkIdentifier>
- <SilverlightApplication>true</SilverlightApplication>
- <SupportedCultures>
- </SupportedCultures>
- <XapOutputs>true</XapOutputs>
- <GenerateSilverlightManifest>true</GenerateSilverlightManifest>
- <XapFilename>CordovaExample.xap</XapFilename>
- <SilverlightManifestTemplate>Properties\AppManifest.xml</SilverlightManifestTemplate>
- <SilverlightAppEntry>CordovaExample.App</SilverlightAppEntry>
- <ValidateXaml>true</ValidateXaml>
- <ThrowErrorsInValidation>true</ThrowErrorsInValidation>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>Bin\Debug</OutputPath>
- <DefineConstants>DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
- <NoStdLib>true</NoStdLib>
- <NoConfig>true</NoConfig>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>Bin\Release</OutputPath>
- <DefineConstants>TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
- <NoStdLib>true</NoStdLib>
- <NoConfig>true</NoConfig>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="Microsoft.Phone" />
- <Reference Include="Microsoft.Phone.Interop" />
- <Reference Include="System.Runtime.Serialization" />
- <Reference Include="System.Windows" />
- <Reference Include="system" />
- <Reference Include="System.Core" />
- <Reference Include="System.Net" />
- <Reference Include="System.Xml" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="App.xaml.cs">
- <DependentUpon>App.xaml</DependentUpon>
- </Compile>
- <Compile Include="MainPage.xaml.cs">
- <DependentUpon>MainPage.xaml</DependentUpon>
- </Compile>
- <Compile Include="Plugins\Calculator.cs" />
- <Compile Include="Properties\AssemblyInfo.cs" />
- </ItemGroup>
- <ItemGroup>
- <ApplicationDefinition Include="App.xaml">
- <SubType>Designer</SubType>
- <Generator>MSBuild:Compile</Generator>
- </ApplicationDefinition>
- <Page Include="MainPage.xaml">
- <SubType>Designer</SubType>
- <Generator>MSBuild:Compile</Generator>
- </Page>
- </ItemGroup>
- <ItemGroup>
- <Content Include="config.xml" />
- <Content Include="CordovaSourceDictionary.xml">
- <SubType>Designer</SubType>
- </Content>
- <Content Include="www\cordova.js" />
- <Content Include="www\network.html">
- <SubType>Designer</SubType>
- </Content>
- <Content Include="www\notification.html">
- <SubType>Designer</SubType>
- </Content>
- <Content Include="www\storage.html">
- <SubType>Designer</SubType>
- </Content>
- <None Include="BuildManifestProcessor.js" />
- <Content Include="www\accelerometer.html">
- <SubType>Designer</SubType>
- </Content>
- <Content Include="www\accelerometer2.html">
- <SubType>Designer</SubType>
- </Content>
- <Content Include="www\audio.html">
- <SubType>Designer</SubType>
- </Content>
- <Content Include="www\calculator.html">
- <SubType>Designer</SubType>
- </Content>
- <Content Include="www\camera.html">
- <SubType>Designer</SubType>
- </Content>
- <Content Include="www\capture.html">
- <SubType>Designer</SubType>
- </Content>
- <Content Include="www\compass.html">
- <SubType>Designer</SubType>
- </Content>
- <Content Include="www\contacts.html">
- <SubType>Designer</SubType>
- </Content>
- <Content Include="www\events.html">
- <SubType>Designer</SubType>
- </Content>
- <Content Include="www\file.html">
- <SubType>Designer</SubType>
- </Content>
- <Content Include="www\index.html">
- <SubType>Designer</SubType>
- </Content>
- <Content Include="www\location.html">
- <SubType>Designer</SubType>
- </Content>
- <Content Include="www\master.css" />
- <None Include="Properties\AppManifest.xml">
- <SubType>Designer</SubType>
- </None>
- <None Include="Properties\WMAppManifest.xml">
- <SubType>Designer</SubType>
- </None>
- </ItemGroup>
- <ItemGroup>
- <Content Include="ApplicationIcon.png">
- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
- </Content>
- <Content Include="Background.png">
- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
- </Content>
- <Content Include="SplashScreenImage.jpg" />
- </ItemGroup>
- <ItemGroup>
- <WCFMetadata Include="Service References\" />
- </ItemGroup>
- <ItemGroup>
- <Service Include="{508349B6-6B84-4DF5-91F0-309BEEBAD82D}" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\framework\WPCordovaClassLib.csproj">
- <Project>{FC6A1A70-892D-46AD-9E4A-9793F72AF780}</Project>
- <Name>WPCordovaClassLib</Name>
- </ProjectReference>
- </ItemGroup>
- <Import Project="$(MSBuildExtensionsPath)\Microsoft\Silverlight for Phone\$(TargetFrameworkVersion)\Microsoft.Silverlight.$(TargetFrameworkProfile).Overrides.targets" />
- <Import Project="$(MSBuildExtensionsPath)\Microsoft\Silverlight for Phone\$(TargetFrameworkVersion)\Microsoft.Silverlight.CSharp.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
- <ProjectExtensions />
- <PropertyGroup>
- <PreBuildEvent>CScript "$(ProjectDir)/BuildManifestProcessor.js" "$(ProjectPath)"</PreBuildEvent>
- </PropertyGroup>
- <PropertyGroup>
- <PostBuildEvent>
- </PostBuildEvent>
- </PropertyGroup>
-</Project>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-wp7/blob/48360316/example/CordovaExample.sln
----------------------------------------------------------------------
diff --git a/example/CordovaExample.sln b/example/CordovaExample.sln
deleted file mode 100644
index 55a06f4..0000000
--- a/example/CordovaExample.sln
+++ /dev/null
@@ -1,28 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 2012
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CordovaExample", "CordovaExample.csproj", "{0C6DFC84-A3BE-4581-BAAD-85B8CCC17FF8}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WPCordovaClassLib", "..\framework\WPCordovaClassLib.csproj", "{FC6A1A70-892D-46AD-9E4A-9793F72AF780}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Release|Any CPU = Release|Any CPU
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {0C6DFC84-A3BE-4581-BAAD-85B8CCC17FF8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {0C6DFC84-A3BE-4581-BAAD-85B8CCC17FF8}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {0C6DFC84-A3BE-4581-BAAD-85B8CCC17FF8}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
- {0C6DFC84-A3BE-4581-BAAD-85B8CCC17FF8}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {0C6DFC84-A3BE-4581-BAAD-85B8CCC17FF8}.Release|Any CPU.Build.0 = Release|Any CPU
- {0C6DFC84-A3BE-4581-BAAD-85B8CCC17FF8}.Release|Any CPU.Deploy.0 = Release|Any CPU
- {FC6A1A70-892D-46AD-9E4A-9793F72AF780}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {FC6A1A70-892D-46AD-9E4A-9793F72AF780}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {FC6A1A70-892D-46AD-9E4A-9793F72AF780}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {FC6A1A70-892D-46AD-9E4A-9793F72AF780}.Release|Any CPU.Build.0 = Release|Any CPU
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
http://git-wip-us.apache.org/repos/asf/cordova-wp7/blob/48360316/example/CordovaSourceDictionary.xml
----------------------------------------------------------------------
diff --git a/example/CordovaSourceDictionary.xml b/example/CordovaSourceDictionary.xml
deleted file mode 100644
index 3082d16..0000000
--- a/example/CordovaSourceDictionary.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- This file is auto-generated, do not edit! -jm -->
-<CordovaSourceDictionary>
- <FilePath Value="www\cordova.js"/>
- <FilePath Value="www\network.html"/>
- <FilePath Value="www\notification.html"/>
- <FilePath Value="www\storage.html"/>
- <FilePath Value="www\accelerometer.html"/>
- <FilePath Value="www\accelerometer2.html"/>
- <FilePath Value="www\audio.html"/>
- <FilePath Value="www\calculator.html"/>
- <FilePath Value="www\camera.html"/>
- <FilePath Value="www\capture.html"/>
- <FilePath Value="www\compass.html"/>
- <FilePath Value="www\contacts.html"/>
- <FilePath Value="www\events.html"/>
- <FilePath Value="www\file.html"/>
- <FilePath Value="www\index.html"/>
- <FilePath Value="www\location.html"/>
- <FilePath Value="www\master.css"/>
-</CordovaSourceDictionary>
http://git-wip-us.apache.org/repos/asf/cordova-wp7/blob/48360316/example/MainPage.xaml
----------------------------------------------------------------------
diff --git a/example/MainPage.xaml b/example/MainPage.xaml
deleted file mode 100644
index b595818..0000000
--- a/example/MainPage.xaml
+++ /dev/null
@@ -1,52 +0,0 @@
-<!--
- 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="CordovaExample.MainPage"
- 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" FontFamily="{StaticResource PhoneFontFamilyNormal}"
- FontSize="{StaticResource PhoneFontSizeNormal}"
- Foreground="{StaticResource PhoneForegroundBrush}"
- Background="Black"
- SupportedOrientations="PortraitOrLandscape" Orientation="Portrait"
- shell:SystemTray.IsVisible="True" d:DesignHeight="768" d:DesignWidth="480"
- xmlns:my="clr-namespace:WPCordovaClassLib;assembly=WPCordovaClassLib">
- <Grid x:Name="LayoutRoot" Background="Transparent" HorizontalAlignment="Stretch">
- <Grid.RowDefinitions>
- <RowDefinition Height="*"/>
- </Grid.RowDefinitions>
- <my:CordovaView HorizontalAlignment="Stretch"
- Margin="0,0,0,0"
- Name="PGView"
- VerticalAlignment="Stretch" />
- <Image Source="SplashScreenImage.jpg"
- x:Name="SplashImage"
- VerticalAlignment="Center"
- HorizontalAlignment="Stretch">
- <Image.Projection>
- <PlaneProjection x:Name="SplashProjector" CenterOfRotationX="0"/>
- </Image.Projection>
- </Image>
- </Grid>
-
-</phone:PhoneApplicationPage>
http://git-wip-us.apache.org/repos/asf/cordova-wp7/blob/48360316/example/MainPage.xaml.cs
----------------------------------------------------------------------
diff --git a/example/MainPage.xaml.cs b/example/MainPage.xaml.cs
deleted file mode 100644
index 2c2ed5f..0000000
--- a/example/MainPage.xaml.cs
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- 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;
-using Microsoft.Phone.Controls;
-using System.IO;
-using System.Windows.Media.Imaging;
-using System.Windows.Resources;
-
-
-namespace CordovaExample
-{
- public partial class MainPage : PhoneApplicationPage
- {
- // Constructor
- public MainPage()
- {
- InitializeComponent();
- this.PGView.Loaded += GapBrowser_Loaded;
- }
-
- private void GapBrowser_Loaded(object sender, RoutedEventArgs e)
- {
- this.PGView.Loaded -= GapBrowser_Loaded;
- Storyboard _storyBoard = new Storyboard();
- DoubleAnimation animation = new DoubleAnimation()
- {
- From = 0,
- Duration = TimeSpan.FromSeconds(0.6),
- To = 90
- };
- Storyboard.SetTarget(animation, SplashProjector);
- Storyboard.SetTargetProperty(animation, new PropertyPath("RotationY"));
- _storyBoard.Children.Add(animation);
- _storyBoard.Begin();
- _storyBoard.Completed += Splash_Completed;
- }
-
- void Splash_Completed(object sender, EventArgs e)
- {
- (sender as Storyboard).Completed -= Splash_Completed;
- LayoutRoot.Children.Remove(SplashImage);
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/cordova-wp7/blob/48360316/example/Plugins/Calculator.cs
----------------------------------------------------------------------
diff --git a/example/Plugins/Calculator.cs b/example/Plugins/Calculator.cs
deleted file mode 100644
index 2e74dd3..0000000
--- a/example/Plugins/Calculator.cs
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- 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.Runtime.Serialization;
-using WPCordovaClassLib.Cordova;
-using WPCordovaClassLib.Cordova.Commands;
-using WPCordovaClassLib.Cordova.JSON;
-
-namespace Cordova.Extension.Commands
-{
- public class Calculator : BaseCommand
- {
-
- [DataContract]
- public class CalculateParameters
- {
- [DataMember]
- public double x { get; set; }
- [DataMember]
- public double y { get; set; }
- }
-
- public void sum(string args)
- {
- CalculateParameters calcParam = JsonHelper.Deserialize<CalculateParameters> (args);
-
- this.DispatchCommandResult(new PluginResult(PluginResult.Status.OK, calcParam.x + calcParam.y));
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/cordova-wp7/blob/48360316/example/Properties/AppManifest.xml
----------------------------------------------------------------------
diff --git a/example/Properties/AppManifest.xml b/example/Properties/AppManifest.xml
deleted file mode 100644
index d80a20d..0000000
--- a/example/Properties/AppManifest.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<!--
- 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.
- -->
-<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-wp7/blob/48360316/example/Properties/AssemblyInfo.cs
----------------------------------------------------------------------
diff --git a/example/Properties/AssemblyInfo.cs b/example/Properties/AssemblyInfo.cs
deleted file mode 100644
index 9b6cbd9..0000000
--- a/example/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,38 +0,0 @@
-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("CordovaExample")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Microsoft")]
-[assembly: AssemblyProduct("CordovaExample")]
-[assembly: AssemblyCopyright("Copyright © Microsoft 2011")]
-[assembly: AssemblyTrademark("")]
-[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-wp7/blob/48360316/example/Properties/WMAppManifest.xml
----------------------------------------------------------------------
diff --git a/example/Properties/WMAppManifest.xml b/example/Properties/WMAppManifest.xml
deleted file mode 100644
index 02f95cb..0000000
--- a/example/Properties/WMAppManifest.xml
+++ /dev/null
@@ -1,58 +0,0 @@
-<?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.
- -->
-<Deployment xmlns="http://schemas.microsoft.com/windowsphone/2009/deployment" AppPlatformVersion="7.1">
- <App xmlns="" ProductID="{252f4997-3d6c-4d7a-9d5b-59818888a810}" Title="CordovaExample"
- RuntimeType="Silverlight" Version="1.0.0.0" Genre="apps.normal"
- Author="CordovaExample author"
- Description="Apache Cordova for Windows Phone 7"
- Publisher="CordovaExample">
-
- <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="CordovaExampleToken" TaskName="_default">
- <TemplateType5>
- <BackgroundImageURI IsRelative="true" IsResource="false">Background.png</BackgroundImageURI>
- <Count>0</Count>
- <Title>CordovaExample</Title>
- </TemplateType5>
- </PrimaryToken>
- </Tokens>
- </App>
-</Deployment>
http://git-wip-us.apache.org/repos/asf/cordova-wp7/blob/48360316/example/SplashScreenImage.jpg
----------------------------------------------------------------------
diff --git a/example/SplashScreenImage.jpg b/example/SplashScreenImage.jpg
deleted file mode 100644
index 479d3e4..0000000
Binary files a/example/SplashScreenImage.jpg and /dev/null differ
http://git-wip-us.apache.org/repos/asf/cordova-wp7/blob/48360316/example/config.xml
----------------------------------------------------------------------
diff --git a/example/config.xml b/example/config.xml
deleted file mode 100644
index cac0c09..0000000
--- a/example/config.xml
+++ /dev/null
@@ -1,49 +0,0 @@
-<?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.
-#
--->
-<cordova>
-
- <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="*"/>
-
-</cordova>
http://git-wip-us.apache.org/repos/asf/cordova-wp7/blob/48360316/example/www/accelerometer.html
----------------------------------------------------------------------
diff --git a/example/www/accelerometer.html b/example/www/accelerometer.html
deleted file mode 100644
index fcb5917..0000000
--- a/example/www/accelerometer.html
+++ /dev/null
@@ -1,164 +0,0 @@
-<!DOCTYPE html>
-<!--
- 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.
--->
-<html>
- <head>
-
- <meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0, maximum-scale=1.0, user-scalable=no;" />
- <meta http-equiv="Content-type" content="text/html; charset=utf-8"/>
- <title>Cordova</title>
- <link rel="stylesheet" href="master.css" type="text/css" media="screen"/>
-
-
- <script type="text/javascript" charset="utf-8" src="cordova.js"></script>
-
-
-<script type="text/javascript" charset="utf-8">
-
- var deviceReady = false;
-
- function roundNumber(num) {
- var dec = 3;
- var result = Math.round(num*Math.pow(10,dec))/Math.pow(10,dec);
- return result;
- }
-
- //-------------------------------------------------------------------------
- // Acceleration
- //-------------------------------------------------------------------------
- var watchAccelId = null;
-
- /**
- * Start watching acceleration
- */
- var watchAccel = function() {
- console.log("watchAccel()");
-
- // Success callback
- var success = function (a) {
- document.getElementById('x').innerHTML = roundNumber(a.x);
- document.getElementById('y').innerHTML = roundNumber(a.y);
- document.getElementById('z').innerHTML = roundNumber(a.z);
- console.log("watchAccel success callback");
- };
-
- // Fail callback
- var fail = function(e){
- console.log("watchAccel fail callback with error code "+e);
- stopAccel();
- setAccelStatus(Accelerometer.ERROR_MSG[e]);
- };
-
- // Update acceleration every 1 sec
- var opt = {};
- opt.frequency = 50;
- watchAccelId = navigator.accelerometer.watchAcceleration(success, fail, opt);
-
- setAccelStatus("Running");
- };
-
- /**
- * Stop watching the acceleration
- */
- var stopAccel = function() {
- console.log("stopAccel()");
- setAccelStatus("Stopped");
- if (watchAccelId) {
- navigator.accelerometer.clearWatch(watchAccelId);
- watchAccelId = null;
- }
- };
-
- /**
- * Get current acceleration
- */
- var getAccel = function() {
- console.log("getAccel()");
-
- // Stop accel if running
- //stopAccel();
-
- // Success callback
- var success = function (a) {
- document.getElementById('x').innerHTML = roundNumber(a.x);
- document.getElementById('y').innerHTML = roundNumber(a.y);
- document.getElementById('z').innerHTML = roundNumber(a.z);
- };
-
- // Fail callback
- var fail = function(e){
- console.log("getAccel fail callback with error code "+e);
- setAccelStatus(Accelerometer.ERROR_MSG[e]);
- };
-
- // Make call
- var opt = {};
- navigator.accelerometer.getCurrentAcceleration(success, fail, opt);
- };
-
- /**
- * Set accelerometer status
- */
- var setAccelStatus = function (status) {
-
- document.getElementById('accel_status').innerHTML = status;
- };
-
- /**
- * Function called when page has finished loading.
- */
- function init() {
-
- document.addEventListener("deviceready", function() {
- deviceReady = true;
- console.log("Device="+device.platform+" "+device.version);
- }, false);
- window.setTimeout(function() {
- if (!deviceReady) {
- alert("Error: Cordova did not initialize. Demo will not run correctly.");
- }
- },1000);
- }
-
-</script>
-
-
-
- </head>
- <body onLoad="init();" id="stage" class="theme">
-
- <h1>Acceleration</h1>
- <div id="info">
- <div id="accel_status">Stopped</div>
- <div><table width="100%">
- <tr><td width="20%">X:</td><td id="x"> </td></tr>
- <tr><td width="20%">Y:</td><td id="y"> </td></tr>
- <tr><td width="20%">Z:</td><td id="z"> </td></tr>
- </table></div>
- </div>
-
-
-
- <h2>Action</h2>
- <a href="#" class="btn large" onclick="getAccel();">Get Acceleration</a>
- <a href="#" class="btn large" onclick="watchAccel();">Start Watch</a>
- <a href="#" class="btn large" onclick="stopAccel();">Clear Watch</a>
- <h2> </h2><a href="index.html" class="backBtn">Back</a>
- </body>
-</html>
http://git-wip-us.apache.org/repos/asf/cordova-wp7/blob/48360316/example/www/accelerometer2.html
----------------------------------------------------------------------
diff --git a/example/www/accelerometer2.html b/example/www/accelerometer2.html
deleted file mode 100644
index ade6d84..0000000
--- a/example/www/accelerometer2.html
+++ /dev/null
@@ -1,175 +0,0 @@
-<!DOCTYPE html>
-<!--
- 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.
--->
-<html>
- <head>
- <!-- meta name="viewport" content="width=device-width, height=device-height, user-scalable=yes, initial-scale=2.0, maximum-scale=4.0, minimum-scale=1.0" / -->
- <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no;" />
- <meta http-equiv="Content-type" content="text/html; charset=utf-8"/>
- <title>Cordova</title>
- <link rel="stylesheet" href="master.css" type="text/css" media="screen"/>
-
-
-
- <script type="text/javascript" charset="utf-8" src="cordova.js"></script>
-
-
-<script type="text/javascript" charset="utf-8">
-
-
- //-------------------------------------------------------------------------
- // Acceleration
- //-------------------------------------------------------------------------
- var watchAccelId = null;
-
- /**
- * Start watching acceleration
- */
- var watchAccel = function() {
- console.log("watchAccel()");
-
- if(watchAccelId)
- {
- return;
- }
-
- // Success callback
- var success = function (a) {
- document.getElementById("ball").style.left = parseInt(a.x * 100 + 100) + "px" ;
- document.getElementById("ball").style.top = parseInt(a.z * 100 + 100) + "px" ;
-
- };
-
- // Fail callback
- var fail = function(e){
- console.log("watchAccel fail callback with error code "+e);
- stopAccel();
- };
-
- // Update acceleration every 1 sec
- var opt = {};
- opt.frequency = 50;
- watchAccelId = navigator.accelerometer.watchAcceleration(onAccelData, fail, opt);
-
- setAccelStatus("Running");
- };
-
-
- var ballX = 0;
- var ballY = 0;
- var ballPixelsPerUpdate = 10;
-
- function onAccelData(a)
- {
- ballX += a.x * ballPixelsPerUpdate;
- ballY += a.z * ballPixelsPerUpdate;
-
- ballX = Math.max(ballX,0);
- ballX = Math.min(ballX,200);
-
- ballY = Math.max(ballY,0);
- ballY = Math.min(ballY,200);
-
-
- document.getElementById("ball").style.left = ballX + "px" ;
- document.getElementById("ball").style.top = ballY + "px" ;
- }
-
- /**
- * Stop watching the acceleration
- */
- var stopAccel = function() {
- console.log("stopAccel()");
- if (watchAccelId) {
- navigator.accelerometer.clearWatch(watchAccelId);
- watchAccelId = null;
- }
- };
-
-
- /**
- * Function called when page has finished loading.
- */
- function init() {
-
- document.addEventListener("deviceready", function() {
- console.log("Device="+device.platform+" "+device.version);
- }, false);
- }
-
-</script>
-
-<style>
- #ball
- {
- position:relative;
- width:20px;
- height:20px;
- border-radius:10px;
- background-color:#FFF;
- }
-
- #playfield
- {
- position:absolute;
- left:50px;
- top:220px;
- width:220px;
- height:220px;
- background-color:#ff8800;
- }
-
- .dButton
- {
- width:80px;
- height:40px;
- display:inline;
- float:left;
- clear:none;
- border-style:solid;
- border-width:1px;
- border-radius:2px;
- line-height:40px;
- }
-
- .backBtnz
- {
- position:absolute;
- bottom:-20px;
- }
-</style>
-
- </head>
- <body onLoad="init();" id="stage" class="theme">
-
- <div id="playfield">
- <div id="ball">
-
- </div>
- </div>
-
- <h2>Actions</h2>
-
- <div class="dButton" onclick="watchAccel();">Start</div>
- <div class="dButton" onclick="stopAccel();">Stop</div>
-
- <div/>
- <a href="index.html" class="backBtn backBtnz">Back</a>
- </body>
-</html>
http://git-wip-us.apache.org/repos/asf/cordova-wp7/blob/48360316/example/www/audio.html
----------------------------------------------------------------------
diff --git a/example/www/audio.html b/example/www/audio.html
deleted file mode 100644
index b1ec423..0000000
--- a/example/www/audio.html
+++ /dev/null
@@ -1,267 +0,0 @@
-<!DOCTYPE html>
-<!--
- 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.
--->
-<html>
- <head>
- <!-- meta name="viewport" content="width=device-width, height=device-height, user-scalable=yes, initial-scale=2.0, maximum-scale=4.0, minimum-scale=1.0" / -->
- <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no;" />
- <meta http-equiv="Content-type" content="text/html; charset=utf-8"/> <!-- ISO-8859-1 -->
- <title>Cordova</title>
- <link rel="stylesheet" href="master.css" type="text/css" media="screen"/>
-
- <script type="text/javascript" charset="utf-8" src="cordova.js"></script>
-
-
-<script type="text/javascript" charset="utf-8">
-
-
- //-------------------------------------------------------------------------
- // Audio player
- //-------------------------------------------------------------------------
- var media1 = null;
- var media1Timer = null;
- var audioSrc = null;
- var recordSrc = "/folder/1.wav";
-
- /**
- * Play audio
- */
- function playAudio(path) {
- console.log("playAudio()");
- console.log(" -- media="+media1);
- var src = path;
-
- // Stop playing if src is different from currently playing source
- if (src != audioSrc) {
- if (media1 != null) {
- stopAudio();
- media1 = null;
- }
- }
-
- if (media1 == null) {
- console.log("Start creating media...");
- media1 = new Media(src,
- function() {
- console.log("playAudio():Audio Success");
- },
- function(err) {
- console.log("playAudio():Audio Error: "+err);
- setAudioStatus("Error: " + err);
- },
- function(status) {
- console.log("playAudio():Audio Status: "+status);
- setAudioStatus(Media.MEDIA_MSG[status]);
-
- // If stopped, then stop getting current position
- if (Media.MEDIA_STOPPED == status) {
- clearInterval(media1Timer);
- media1Timer = null;
- }
- });
- }
- console.log("Start play audio...");
- audioSrc = src;
- document.getElementById('audio_duration').innerHTML = "";
- // Play audio
- media1.play();
-
- document.getElementById('play_caption').innerHTML = "Now playing: ";
- document.getElementById('file_name').innerHTML = path;
-
- if (media1Timer == null && media1.getCurrentPosition) {
- media1Timer = setInterval(
- function() {
- media1.getCurrentPosition(
- function(position) {
- console.log("Pos="+position);
- if (position > -1) {
- setAudioPosition(position+" sec");
- }
- },
- function(e) {
- console.log("Error getting pos="+e);
- setAudioPosition("Error: "+e);
- }
- );
- },
- 1000
- );
- }
-
- // Get duration
- var counter = 0;
- var timerDur = setInterval(
- function() {
- counter = counter + 100;
- if (counter > 2000) {
- clearInterval(timerDur);
- }
- var dur = media1.getDuration();
- if (dur > 0) {
- clearInterval(timerDur);
- document.getElementById('audio_duration').innerHTML = dur + " sec";
- }
- }, 100);
-
- }
-
- /**
- * Pause audio playback
- */
- function pauseAudio() {
- console.log("pauseAudio()");
- if (media1) {
- media1.pause();
- }
- }
-
- /**
- * Stop audio
- */
- function stopAudio() {
- console.log("stopAudio()");
- if (media1) {
- media1.stop();
- }
- clearInterval(media1Timer);
- media1Timer = null;
- }
-
- /**
- * Set audio status
- */
- var setAudioStatus = function(status) {
- document.getElementById('audio_status').innerHTML = status;
- };
-
- /**
- * Set audio position
- */
- var setAudioPosition = function(position) {
- document.getElementById('audio_position').innerHTML = position;
- };
-
- //-------------------------------------------------------------------------
- // Audio recorder
- //-------------------------------------------------------------------------
- var mediaRec = null;
- var recTime = 0;
-
- /**
- * Record audio
- */
- function recordAudio() {
- console.log("recordAudio()");
- console.log(" -- media="+mediaRec);
- if (mediaRec == null) {
-
- var src = recordSrc;
- mediaRec = new Media(src,
- function() {
- console.log("recordAudio():Audio Success");
- },
- function(err) {
- console.log("recordAudio():Audio Error: "+err);
- setAudioStatus("Error: " + err);
- },
- function(status) {
- console.log("recordAudio():Audio Status: "+status);
- setAudioStatus(Media.MEDIA_MSG[status]);
- }
- );
- }
-
- navigator.notification.beep(1);
-
- console.log("Start recording...");
- mediaRec.startRecord();
-
- document.getElementById('play_caption').innerHTML = "Recording in:";
- document.getElementById('file_name').innerHTML = recordSrc;
-
- // Stop recording after 10 sec
- recTime = 0;
- var recInterval = setInterval(function() {
- recTime = recTime + 1;
- setAudioPosition(recTime+" sec");
- if (recTime >= 10) {
- clearInterval(recInterval);
- if (mediaRec.stopAudioRecord){
- console.log("stopAudioRecord");
- mediaRec.stopAudioRecord();
- } else {
- console.log("stopRecord");
- mediaRec.stopRecord();
- }
- console.log("recordAudio(): stop");
- navigator.notification.beep(1);
- }
- }, 1000);
- }
-
- /**
- * Play back recorded audio
- */
- function playRecording() {
- playAudio(recordSrc);
- }
-
- function seekTo() {
- console.log("seekTo()");
- if (media1) {
- media1.seekTo(15000);
- }
- }
-
- /**
- * Function called when page has finished loading.
- */
- function init() {
- document.addEventListener("deviceready", function() {
- deviceReady = true;
- console.log("Device="+device.platform+" "+device.version);
- }, false);
- }
-
-</script>
-
- </head>
- <body onLoad="init();" id="stage" class="theme">
-
- <h1>Audio</h1>
- <div id="info">
- <table width="100%">
- <tr><td id="play_caption">Now playing:</td><td id="file_name"> </td></tr>
- <tr><td>Status:</td><td id="audio_status"> </td></tr>
- <tr><td>Duration:</td><td id="audio_duration"></td></tr>
- <tr><td>Position:</td><td id="audio_position"></td></tr>
- </table>
- </div>
- <h2>Action</h2>
- <a href="#" class="btn large" onClick="playAudio('http://audio.ibeat.org/content/p1rj1s/p1rj1s_-_rockGuitar.mp3');">Play/Unpause Audio</a>
- <a href="#" class="btn large" onClick="pauseAudio();">Pause Playing Audio</a>
- <a href="#" class="btn large" onClick="stopAudio();">Stop Playing Audio</a>
- <a href="#" class="btn large" onClick="recordAudio();">Record Audio for 10 sec</a>
- <a href="#" class="btn large" onClick="playRecording();">Play/Unpause Recording</a>
- <a href="#" class="btn large" onClick="seekTo();">Seek To 15 sec</a>
- <h2> </h2><a href="index.html" class="backBtn">Back</a>
-
- </body>
-</html>
http://git-wip-us.apache.org/repos/asf/cordova-wp7/blob/48360316/example/www/calculator.html
----------------------------------------------------------------------
diff --git a/example/www/calculator.html b/example/www/calculator.html
deleted file mode 100644
index fd03f62..0000000
--- a/example/www/calculator.html
+++ /dev/null
@@ -1,84 +0,0 @@
-<!DOCTYPE html>
-<!--
- 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.
--->
-<html>
- <head>
- <!-- meta name="viewport" content="width=device-width, height=device-height, user-scalable=yes, initial-scale=2.0, maximum-scale=4.0, minimum-scale=1.0" / -->
- <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no;" />
- <meta http-equiv="Content-type" content="text/html; charset=utf-8"/> <!-- ISO-8859-1 -->
- <title>Cordova</title>
- <link rel="stylesheet" href="master.css" type="text/css" media="screen"/>
-
-
- <script type="text/javascript" charset="utf-8" src="cordova.js"></script>
-
-
-<script type="text/javascript" charset="utf-8">
-
- var deviceReady = false;
-
- /**
- * Function called when page has finished loading.
- */
- function init() {
- document.addEventListener("deviceready", function () {
- deviceReady = true;
- console.log("Device=" + device.platform + " " + device.version);
- }, false);
- window.setTimeout(function () {
- if (!deviceReady) {
- alert("Error: Cordova did not initialize. Demo will not run correctly.");
- }
- }, 1000);
- }
-
- function calculateSum() {
-
- cordova.exec(
- function (res) {
- document.getElementById('res').innerHTML = res;
- },
- function (e) {
- console.log("Error occurred: " + e);
- document.getElementById('res').innerHTML = "Error occurred: " + e;
- },
- "Calculator", "sum",
- { x: document.getElementById('x').value, y: document.getElementById('y').value });
- };
-
-</script>
-
- </head>
- <body onLoad="init();" id="stage" class="theme">
-
- <h1>Calculator</h1>
- <div id="info">
- <span class='tb-label'>X</span> <span id="Span1"></span>
- <input type="text" id="x" value="1" style="width:250px;height:20px;"/>
- <br/>
- <span class='tb-label'>Y</span> <span id="Span2"></span>
- <input type="text" id="y" value="2" style="width:250px;height:20px;"/>
- <br/>
- Sum: <span id="res"></span>
- </div>
- <h2>Action</h2>
- <a href="#" class="btn large" onclick="calculateSum();">Calculate</a>
- <h2> </h2><a href="index.html" class="backBtn">Back</a>
- </body>
-</html>
http://git-wip-us.apache.org/repos/asf/cordova-wp7/blob/48360316/example/www/camera.html
----------------------------------------------------------------------
diff --git a/example/www/camera.html b/example/www/camera.html
deleted file mode 100644
index c43ca4c..0000000
--- a/example/www/camera.html
+++ /dev/null
@@ -1,115 +0,0 @@
-<!DOCTYPE html>
-<!--
- 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.
--->
-<html>
- <head>
- <!-- meta name="viewport" content="width=device-width, height=device-height, user-scalable=yes, initial-scale=2.0, maximum-scale=4.0, minimum-scale=1.0" / -->
- <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no;" />
- <meta http-equiv="Content-type" content="text/html; charset=utf-8"/> <!-- ISO-8859-1 -->
- <title>Cordova</title>
- <link rel="stylesheet" href="master.css" type="text/css" media="screen"/>
-
-
- <script type="text/javascript" charset="utf-8" src="cordova.js"></script>
-
-
-<script type="text/javascript" charset="utf-8">
-
- var deviceReady = false;
-
- //-------------------------------------------------------------------------
- // Camera
- //-------------------------------------------------------------------------
-
- /**
- * Capture picture
- */
- function getPicture() {
-
- //navigator.camera.getPicture(onPhotoDataSuccess, onFail, { quality: 50,
- // destinationType: Camera.DestinationType.FILE_URI, sourceType : Camera.PictureSourceType.CAMERA });
-
- navigator.camera.getPicture(
- function(data) {
- var img = document.getElementById('camera_image');
- img.style.visibility = "visible";
- img.style.display = "block";
- img.src = "data:image/jpeg;base64," + data;
- //img.src = data;
- document.getElementById('camera_status').innerHTML = "Success";
- },
- function(e) {
- console.log("Error getting picture: " + e);
- document.getElementById('camera_status').innerHTML = "Error getting picture.";
- },
- { quality: 50, destinationType: navigator.camera.DestinationType.DATA_URL, sourceType : navigator.camera.PictureSourceType.CAMERA});
- };
-
- /**
- * Select image from library
- */
- function getImage() {
- navigator.camera.getPicture(
- function(data) {
- var img = document.getElementById('camera_image');
- img.style.visibility = "visible";
- img.style.display = "block";
- //img.src = "data:image/jpeg;base64," + data;
- img.src = data;
- document.getElementById('camera_status').innerHTML = "Success";
- },
- function(e) {
- console.log("Error getting picture: " + e);
- document.getElementById('camera_status').innerHTML = "Error getting picture.";
- },
- { quality: 50, destinationType: navigator.camera.DestinationType.FILE_URI, sourceType: navigator.camera.PictureSourceType.PHOTOLIBRARY });
- };
-
-
- /**
- * Function called when page has finished loading.
- */
- function init() {
- document.addEventListener("deviceready", function() {
- deviceReady = true;
- console.log("Device="+device.platform+" "+device.version);
- }, false);
- window.setTimeout(function() {
- if (!deviceReady) {
- alert("Error: Cordova did not initialize. Demo will not run correctly.");
- }
- },1000);
- }
-
-</script>
-
- </head>
- <body onLoad="init();" id="stage" class="theme">
-
- <h1>Camera</h1>
- <div id="info">
- Status: <span id="camera_status"></span><br/>
- <img style="width:120px;height:120px;visibility:hidden;display:none;" id="camera_image" src="" />
- </div>
- <h2>Action</h2>
- <a href="#" class="btn large" onclick="getPicture();">Take Picture</a>
- <a href="#" class="btn large" onclick="getImage();">Select Image from Library</a>
- <h2> </h2><a href="index.html" class="backBtn">Back</a>
- </body>
-</html>
http://git-wip-us.apache.org/repos/asf/cordova-wp7/blob/48360316/example/www/capture.html
----------------------------------------------------------------------
diff --git a/example/www/capture.html b/example/www/capture.html
deleted file mode 100644
index 265f931..0000000
--- a/example/www/capture.html
+++ /dev/null
@@ -1,207 +0,0 @@
-<!DOCTYPE html>
-<!--
- 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.
--->
-<html>
- <head>
- <!-- meta name="viewport" content="width=device-width, height=device-height, user-scalable=yes, initial-scale=2.0, maximum-scale=4.0, minimum-scale=1.0" / -->
- <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no;" />
- <meta http-equiv="Content-type" content="text/html; charset=utf-8"/> <!-- ISO-8859-1 -->
- <title>Cordova</title>
- <link rel="stylesheet" href="master.css" type="text/css" media="screen"/>
-
-
- <script type="text/javascript" charset="utf-8" src="cordova.js"></script>
-
-
-<script type="text/javascript" charset="utf-8">
-
-
- // last captured media file
- var mediaFile = null;
-
- function clearMediaPlaceholder() {
- document.getElementById('audio_player').setAttribute('style', 'visibility:hidden;display:none;');
-
- var img = document.getElementById('camera_image');
- img.style.visibility = "hidden";
- img.style.display = "none";
- img.src = "";
- }
-
- //-------------------------------------------------------------------------
- // Capture
- //-------------------------------------------------------------------------
-
- /**
- * Capture image
- */
- function captureImage() {
-
- navigator.device.capture.captureImage(
- function (mediaFiles) {
-
- document.getElementById('capture_status').innerHTML = "Success. Captured " + mediaFiles.length + " media file(s).";
-
- if (mediaFiles.length <= 0) return;
-
- mediaFile = mediaFiles[0];
-
- document.getElementById('name').innerHTML = mediaFile.name;
- document.getElementById('fullPath').innerHTML = mediaFile.fullPath;
- document.getElementById('size').innerHTML = mediaFile.size;
- document.getElementById('lastModifiedDate').innerHTML = mediaFile.lastModifiedDate;
- document.getElementById('type').innerHTML = mediaFile.type;
-
- clearMediaPlaceholder();
-
- var img = document.getElementById('camera_image');
- img.style.visibility = "visible";
- img.style.display = "block";
- img.src = mediaFile.fullPath;
- },
- function (e) {
- console.log("Error getting picture: " + e);
- document.getElementById('capture_status').innerHTML = "Error getting picture.";
- },
- { limit: 1 });
- };
-
- /**
- * Capture Audio
- */
- function captureAudio() {
-
- navigator.device.capture.captureAudio(
- function (mediaFiles) {
-
- document.getElementById('capture_status').innerHTML = "Success. Captured " + mediaFiles.length + " media file(s).";
-
- if (mediaFiles.length <= 0) return;
-
- mediaFile = mediaFiles[0];
-
- document.getElementById('name').innerHTML = mediaFile.name;
- document.getElementById('fullPath').innerHTML = mediaFile.fullPath;
- document.getElementById('size').innerHTML = mediaFile.size;
- document.getElementById('lastModifiedDate').innerHTML = mediaFile.lastModifiedDate;
- document.getElementById('type').innerHTML = mediaFile.type;
-
- clearMediaPlaceholder();
-
- var player = document.getElementById('audio_player');
- player.setAttribute('style', 'visibility:visible;');
- player.src = mediaFile.fullPath;
- //player.play();
- },
- function (e) {
- console.log("Error getting audio: " + e);
- document.getElementById('capture_status').innerHTML = "Error getting audio.";
- },
- { limit: 1 });
- };
-
- /**
- * Capture Video
- */
- function captureVideo() {
-
- navigator.device.capture.captureVideo(
- function (mediaFiles) {
-
- document.getElementById('capture_status').innerHTML = "Success. Captured " + mediaFiles.length + " media file(s).";
-
- if (mediaFiles.length <= 0) return;
-
- mediaFile = mediaFiles[0];
-
- document.getElementById('name').innerHTML = mediaFile.name;
- document.getElementById('fullPath').innerHTML = mediaFile.fullPath;
- document.getElementById('size').innerHTML = mediaFile.size;
- document.getElementById('lastModifiedDate').innerHTML = mediaFile.lastModifiedDate;
- document.getElementById('type').innerHTML = mediaFile.type;
-
- clearMediaPlaceholder();
-
- var player = document.getElementById('video_player');
- player.setAttribute('style', 'visibility:visible;');
- player.src = mediaFile.fullPath;
- console.log("src: " + mediaFile.fullPath);
- },
- function (e) {
- console.log("Error getting video: " + e);
- document.getElementById('capture_status').innerHTML = "Error getting video.";
- },
- { limit: 1 });
- };
-
- /**
- * Function called when page has finished loading.
- */
- function init() {
- document.addEventListener("deviceready", function () {
- console.log("Device=" + device.platform + " " + device.version);
- }, false);
- }
-
- /**
- * Function to play last captured media.
- */
- function playMedia() {
- if (typeof mediaFile !== 'undefined') {
- mediaFile.play(
- null,
- function (e) {
- console.log("Error playing media: " + e);
- document.getElementById('capture_status').innerHTML = "Error playing media.";
- });
- }
- }
-
-</script>
-
- </head>
- <body onLoad="init();" id="stage" class="theme">
-
- <h1>Capture</h1>
- <div id="info">
- Status: <span id="capture_status"></span><br/>
- <img style="width:120px;height:120px;visibility:hidden;display:none;" id="camera_image" src="" />
- <audio style="visibility:hidden;display:none;" id="audio_player" src="" controls />
- <video style="visibility:hidden;display:none;" width="150" height="150" id="video_player" src=""
- onclick="playMedia();" >
- Browser does not support the video tag.
- </video>
-
-
- <div><table width="100%">
- <tr><td width="20%">Name:</td><td id="name"> </td></tr>
- <tr><td width="20%">FullPath:</td><td id="fullPath"> </td></tr>
- <tr><td width="20%">Type:</td><td id="type"> </td></tr>
- <tr><td width="20%">Size:</td><td id="size"> </td></tr>
- <tr><td width="20%">Modified:</td><td id="lastModifiedDate"> </td></tr>
- </table></div>
-
- </div>
- <h2>Actions</h2>
- <a href="#" class="btn large" onclick="captureImage();">Capture Image</a>
- <a href="#" class="btn large" onclick="captureAudio();">Capture Audio</a>
- <a href="#" class="btn large" onclick="captureVideo();">Capture Video</a>
- <h2> </h2><a href="index.html" class="backBtn">Back</a>
- </body>
-</html>
http://git-wip-us.apache.org/repos/asf/cordova-wp7/blob/48360316/example/www/compass.html
----------------------------------------------------------------------
diff --git a/example/www/compass.html b/example/www/compass.html
deleted file mode 100644
index d993535..0000000
--- a/example/www/compass.html
+++ /dev/null
@@ -1,150 +0,0 @@
-<!DOCTYPE html>
-<!--
- 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.
--->
-<html>
- <head>
- <!-- meta name="viewport" content="width=device-width, height=device-height, user-scalable=yes, initial-scale=2.0, maximum-scale=4.0, minimum-scale=1.0" / -->
- <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no;" />
- <meta http-equiv="Content-type" content="text/html; charset=utf-8"/>
- <title>Cordova</title>
- <link rel="stylesheet" href="master.css" type="text/css" media="screen"/>
-
-
-
- <script type="text/javascript" charset="utf-8" src="cordova.js"></script>
-
-
-<script type="text/javascript" charset="utf-8">
-
- var deviceReady = false;
-
- function roundNumber(num) {
- var dec = 3;
- var result = Math.round(num*Math.pow(10,dec))/Math.pow(10,dec);
- return result;
- }
-
- //-------------------------------------------------------------------------
- // Compass
- //-------------------------------------------------------------------------
- var watchCompassId = null;
-
- /**
- * Start watching compass
- */
- var watchCompass = function() {
- console.log("watchCompass()");
-
- // Success callback
- var success = function(a){
- document.getElementById('compassHeading').innerHTML = roundNumber(a);
- };
-
- // Fail callback
- var fail = function(e){
- console.log("watchCompass fail callback with error code "+e);
- stopCompass();
- setCompassStatus(Compass.ERROR_MSG[e]);
- };
-
- // Update heading every 1 sec
- var opt = {};
- opt.frequency = 1000;
- watchCompassId = navigator.compass.watchHeading(success, fail, opt);
-
- setCompassStatus("Running");
- };
-
- /**
- * Stop watching the acceleration
- */
- var stopCompass = function() {
- setCompassStatus("Stopped");
- if (watchCompassId) {
- navigator.compass.clearWatch(watchCompassId);
- watchCompassId = null;
- }
- };
-
- /**
- * Get current compass
- */
- var getCompass = function() {
- console.log("getCompass()");
-
- // Stop compass if running
- stopCompass();
-
- // Success callback
- var success = function(a){
- document.getElementById('compassHeading').innerHTML = roundNumber(a);
- };
-
- // Fail callback
- var fail = function(e){
- console.log("getCompass fail callback with error code "+e);
- setCompassStatus(Compass.ERROR_MSG[e]);
- };
-
- // Make call
- var opt = {};
- navigator.compass.getCurrentHeading(success, fail, opt);
- };
-
- /**
- * Set compass status
- */
- var setCompassStatus = function(status) {
- document.getElementById('compass_status').innerHTML = status;
- };
-
- /**
- * Function called when page has finished loading.
- */
- function init() {
- document.addEventListener("deviceready", function() {
- deviceReady = true;
- console.log("Device="+device.platform+" "+device.version);
- }, false);
- window.setTimeout(function() {
- if (!deviceReady) {
- alert("Error: Cordova did not initialize. Demo will not run correctly.");
- }
- },1000);
- }
-
-</script>
-
- </head>
- <body onLoad="init();" id="stage" class="theme">
-
- <h1>Compass</h1>
- <div id="info">
- Status: <span id="compass_status">Stopped</span>
- <table width="100%"><tr>
- <td width="33%">Heading: <span id="compassHeading"/> </td>
- </tr></table>
- </div>
- <h2>Action</h2>
- <a href="#" class="btn large" onClick="getCompass();">Get Compass</a>
- <a href="#" class="btn large" onClick="watchCompass();">Start Watching Compass</a>
- <a href="#" class="btn large" onClick="stopCompass();">Stop Watching Compass</a>
- <h2> </h2><a href="index.html" class="backBtn">Back</a>
- </body>
-</html>
http://git-wip-us.apache.org/repos/asf/cordova-wp7/blob/48360316/example/www/contacts.html
----------------------------------------------------------------------
diff --git a/example/www/contacts.html b/example/www/contacts.html
deleted file mode 100644
index e47092f..0000000
--- a/example/www/contacts.html
+++ /dev/null
@@ -1,169 +0,0 @@
-<!DOCTYPE html>
-<!--
- 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.
--->
-<html>
- <head>
- <!-- meta name="viewport" content="width=device-width, height=device-height, user-scalable=yes, initial-scale=2.0, maximum-scale=4.0, minimum-scale=1.0" / -->
- <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no;" />
- <meta http-equiv="Content-type" content="text/html; charset=utf-8"/>
- <title>Cordova</title>
- <link rel="stylesheet" href="master.css" type="text/css" media="screen"/>
-
-
-
- <script type="text/javascript" charset="utf-8" src="cordova.js"></script>
-
-
-<script type="text/javascript" charset="utf-8">
-
-
- var deviceReady = false;
-
- //-------------------------------------------------------------------------
- // Contacts
- //-------------------------------------------------------------------------
- function getContacts() {
- obj = new ContactFindOptions();
- obj.filter = ""; //Brooks";
- obj.multiple = true;
- navigator.contacts.find(["displayName", "name", "phoneNumbers", "emails", "urls", "note"],
- function(contacts)
- {
- console.log("received contacts :: " + contacts.length);
- console.log("contacts[0] = " + contacts[0]);
-
- var s = "";
- if (contacts.length == 0)
- {
- s = "No contacts found";
- }
- else
- {
- s = "Number of contacts: "+contacts.length+"<br/><table width='100%'><tr><th>Name</th><td>Phone</td><td>Email</td></tr>";
-
- for (var i=0; i < contacts.length; i++)
- {
- try
- {
- var contact = JSON.parse(contacts[i]);
- }
- catch(e)
- {
- console.log(e.message + " " + contacts[i]);
- continue;
- }
- s = s + "<tr><td>" + contact.displayName + "</td><td>";
-
- if (contact.phoneNumbers && contact.phoneNumbers.length > 0)
- {
- s = s + contact.phoneNumbers[0];
- }
- s = s + "</td><td>"
-
- if (contact.emails && contact.emails.length > 0)
- {
- s = s + contact.emails[0];
- }
- s = s + "</td></tr>";
- }
- s = s + "</table>";
- }
-
- document.getElementById('contacts_results').innerHTML = s;
- },
- function(e)
- {
- document.getElementById('contacts_results').innerHTML = "Error: "+e.code;
- },
- obj);
- };
-
- function addContact(){
- console.log("addContact()");
- try{
-
- console.log("before create");
-
- // create seems to be failing...
- var contact = navigator.contacts.create({"displayName": "Dooney Evans"});
-
- console.log("contact created");
-
- var contactName = {
- formatted: "Dooney Evans",
- familyName: "Evans",
- givenName: "Dooney",
- middleName: ""
- };
-
- console.log("create contactName");
-
- contact.name = contactName;
-
- contact.phoneNumbers = [new ContactField('work', '512-555-1234', true)];
-
- console.log("create contact phone number");
-
- contact.save(
- function(id) { console.log("Contact saved." + id);},
- function(e) { console.log("Contact save failed: " + e.code); }
- );
-
- console.log("saving the contact");
- }
- catch (e)
- {
- //alert(e);
- console.log("failed to save contact");
- }
-
- };
-
- /**
- * Function called when page has finished loading.
- */
- function init() {
- document.addEventListener("deviceready", function() {
- deviceReady = true;
- console.log("Device="+device.platform+" "+device.version);
- }, false);
- window.setTimeout(function() {
- if (!deviceReady) {
- alert("Error: Cordova did not initialize. Demo will not run correctly.");
- }
- },1000);
- }
-
- </script>
-
-
- </head>
- <body onLoad="init();" id="stage" class="theme">
-
- <h1>Contacts</h1>
- <div id="info">
- Results:<br/>
- <span id="contacts_results"> </span>
- </div>
- <h2>Action</h2>
- <a href="#" class="btn large" onClick="getContacts();">Get phone's contacts</a>
- <a href="#" class="btn large" onClick="addContact();">Add a new contact 'Dooney Evans'</a>
- <h2> </h2><a href="index.html" class="backBtn">Back</a>
- </body>
-</html>