You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by st...@apache.org on 2013/12/13 01:41:13 UTC

svn commit: r1550603 [2/2] - in /cordova/site: ./ bin/ public/ public/docs/en/3.2.0/ public/docs/en/edge/

Added: cordova/site/public/docs/en/edge/guide_platforms_amazonfireos_webview.md.html
URL: http://svn.apache.org/viewvc/cordova/site/public/docs/en/edge/guide_platforms_amazonfireos_webview.md.html?rev=1550603&view=auto
==============================================================================
--- cordova/site/public/docs/en/edge/guide_platforms_amazonfireos_webview.md.html (added)
+++ cordova/site/public/docs/en/edge/guide_platforms_amazonfireos_webview.md.html Fri Dec 13 00:41:13 2013
@@ -0,0 +1,254 @@
+<!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 lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no, width=device-width">
+<meta name="generator" content="joDoc">
+<title>Apache Cordova API Documentation</title>
+<link rel="stylesheet" type="text/css" href="index.css">
+<link rel="stylesheet" type="text/css" href="mobile.css" media="only screen and (max-device-width: 1024px)">
+<link rel="stylesheet" type="text/css" href="prettify/prettify.css">
+</head>
+<body>
+        <div id="header">
+            <h1><a href="index.html">Apache <strong>Cordova</strong> Documentation</a></h1>
+            <small>
+                <select><optgroup label="Chinese" value="zh">
+<option value="edge">edge</option>
+<option value="3.1.0">3.1.0</option>
+</optgroup>
+<optgroup label="English" value="en">
+<option selected value="edge">edge</option>
+<option value="3.3.0">3.3.0</option>
+<option value="3.2.0">3.2.0</option>
+<option value="3.1.0">3.1.0</option>
+<option value="3.0.0">3.0.0</option>
+<option value="2.9.0">2.9.0</option>
+<option value="2.8.0">2.8.0</option>
+<option value="2.7.0">2.7.0</option>
+<option value="2.6.0">2.6.0</option>
+<option value="2.5.0">2.5.0</option>
+<option value="2.4.0">2.4.0</option>
+<option value="2.3.0">2.3.0</option>
+<option value="2.2.0">2.2.0</option>
+<option value="2.1.0">2.1.0</option>
+<option value="2.0.0">2.0.0</option>
+<option value="1.9.0">1.9.0</option>
+<option value="1.8.1">1.8.1</option>
+<option value="1.8.0">1.8.0</option>
+<option value="1.7.0">1.7.0</option>
+<option value="1.6.1">1.6.1</option>
+<option value="1.6.0">1.6.0</option>
+<option value="1.5.0">1.5.0</option>
+</optgroup>
+<optgroup label="French" value="fr">
+<option value="edge">edge</option>
+<option value="3.1.0">3.1.0</option>
+</optgroup>
+<optgroup label="German" value="de">
+<option value="edge">edge</option>
+<option value="3.1.0">3.1.0</option>
+</optgroup>
+<optgroup label="Italian" value="it">
+<option value="edge">edge</option>
+<option value="3.1.0">3.1.0</option>
+</optgroup>
+<optgroup label="Japanese" value="ja">
+<option value="edge">edge</option>
+<option value="3.1.0">3.1.0</option>
+<option value="2.2.0">2.2.0</option>
+<option value="2.1.0">2.1.0</option>
+<option value="2.0.0">2.0.0</option>
+<option value="1.9.0">1.9.0</option>
+<option value="1.8.1">1.8.1</option>
+<option value="1.7.0">1.7.0</option>
+</optgroup>
+<optgroup label="Korean" value="ko">
+<option value="edge">edge</option>
+<option value="3.1.0">3.1.0</option>
+<option value="2.0.0">2.0.0</option>
+</optgroup>
+<optgroup label="Russian" value="ru">
+<option value="edge">edge</option>
+<option value="3.1.0">3.1.0</option>
+</optgroup>
+<optgroup label="Spanish" value="es">
+<option value="edge">edge</option>
+<option value="3.1.0">3.1.0</option>
+</optgroup></select></small>
+        </div>
+        <div id="subheader">
+            <h1>Amazon Fire OS WebViews</h1>
+            <small><select><option value="Amazon%2520Fire%2520OS%2520WebViews">Amazon Fire OS WebViews</option>
+<option value="Amazon%20Fire%20OS%20WebViews_prerequisites">      - Prerequisites</option>
+<option value="Amazon%20Fire%20OS%20WebViews_guide_to_using_cordovawebview_in_a_amazon_fire_os_project">      - Guide to using CordovaWebView in a Amazon Fire OS Project</option></select></small>
+        </div>
+
+        <div id="sidebar">
+            <div class="vertical_divider"></div>
+        <h1>Guides</h1>
+<ul>
+<li><a href="guide_overview_index.md.html#Overview">Overview</a></li>
+<li><a href="guide_support_index.md.html#Platform%20Support">Platform Support</a></li>
+<li><a href="guide_cli_index.md.html#The%20Command-Line%20Interface">The Command-Line Interface</a></li>
+<li><a href="guide_platforms_index.md.html#Platform%20Guides">Platform Guides</a></li>
+<li><a href="plugin_ref_plugman.md.html#Using%20Plugman%20to%20Manage%20Plugins">Using Plugman to Manage Plugins</a></li>
+<li><a href="config_ref_index.md.html#The%20config.xml%20File">The config.xml File</a></li>
+<li><a href="config_ref_images.md.html#Icons%20and%20Splash%20Screens">Icons and Splash Screens</a></li>
+<li><a href="guide_hybrid_webviews_index.md.html#Embedding%20WebViews">Embedding WebViews</a></li>
+<li><a href="guide_hybrid_plugins_index.md.html#Plugin%20Development%20Guide">Plugin Development Guide</a></li>
+<li><a href="guide_appdev_privacy_index.md.html#Privacy%20Guide">Privacy Guide</a></li>
+<li><a href="guide_appdev_whitelist_index.md.html#Whitelist%20Guide">Whitelist Guide</a></li>
+<li><a href="_index.html">Keyword Index</a></li>
+</ul>
+<h1>API Reference</h1>
+<ul>
+<li><a href="cordova_accelerometer_accelerometer.md.html#Accelerometer">Accelerometer</a></li>
+<li><a href="cordova_camera_camera.md.html#Camera">Camera</a></li>
+<li><a href="cordova_media_capture_capture.md.html#Capture">Capture</a></li>
+<li><a href="cordova_compass_compass.md.html#Compass">Compass</a></li>
+<li><a href="cordova_connection_connection.md.html#Connection">Connection</a></li>
+<li><a href="cordova_contacts_contacts.md.html#Contacts">Contacts</a></li>
+<li><a href="cordova_device_device.md.html#Device">Device</a></li>
+<li><a href="cordova_events_events.md.html#Events">Events</a></li>
+<li><a href="cordova_file_file.md.html#File">File</a></li>
+<li><a href="cordova_geolocation_geolocation.md.html#Geolocation">Geolocation</a></li>
+<li><a href="cordova_globalization_globalization.md.html#Globalization">Globalization</a></li>
+<li><a href="cordova_inappbrowser_inappbrowser.md.html#InAppBrowser">InAppBrowser</a></li>
+<li><a href="cordova_media_media.md.html#Media">Media</a></li>
+<li><a href="cordova_notification_notification.md.html#Notification">Notification</a></li>
+<li><a href="cordova_splashscreen_splashscreen.md.html#Splashscreen">Splashscreen</a></li>
+<li><a href="cordova_storage_storage.md.html#Storage">Storage</a></li>
+</ul>
+</div>
+
+        <div id="scrollable">
+            <div id="content">
+                <h1><a name="Amazon%20Fire%20OS%20WebViews">Amazon Fire OS WebViews</a></h1>
+
+<p>Beginning with 3.0.0, you can use Cordova as a component in Amazon Fire OS applications. Amazon Fire OS refers to this component as <code>CordovaWebView</code>. <code>CordovaWebView</code> extends Amazon WebView that is built on the open source Chromium Project. By leveraging this feature, your web apps can utilize the latest HTML5 web standards running in a modern web runtime engine.</p>
+
+<h2>
+<a name="Amazon%20Fire%20OS%20WebViews_prerequisites">Prerequisites</a>
+</h2>
+
+<ul>
+<li><p>Cordova 3.0.0 or greater</p></li>
+<li><p>Android SDK updated to the latest SDK</p></li>
+<li><p>Amazon WebView SDK</p></li>
+</ul>
+<h2>
+<a name="Amazon%20Fire%20OS%20WebViews_guide_to_using_cordovawebview_in_a_amazon_fire_os_project">Guide to using CordovaWebView in a Amazon Fire OS Project</a>
+</h2>
+
+<ol>
+<li><p>Download and expand the <a class="external" href="https://developer.amazon.com/sdk/fire/IntegratingAWV.html#installawv">Amazon WebView SDK</a> , then copy the awv_interface.jar into <code>/framework/libs</code> directory. Create a libs/ folder if it doesn't exist.</p></li>
+<li><p><code>cd</code> into <code>/framework</code> and run <code>ant jar</code> to build the cordova jar. It creates the .jar file formed as <code>cordova-x.x.x.jar</code> in the <code>/framework</code> directory.</p></li>
+<li>
+<p>Edit your application's <code>main.xml</code> file (under <code>/res/layout</code>) to look like the following, with the <code>layout_height</code>, <code>layout_width</code> and <code>id</code> modified to suit your application:</p>
+
+<pre class="prettyprint"><code>&lt;org.apache.cordova.CordovaWebView
+    android:id="@+id/tutorialView"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent" /&gt;
+</code></pre>
+</li>
+<li>
+<p>Modify your activity so that it implements the <code>CordovaInterface</code>.  You should implement the included methods.  You may wish to copy them from <code>/framework/src/org/apache/cordova/CordovaActivity.java</code>, or implement them on your own.  The code fragment below shows a basic application that uses the interface. Note how the referenced view id matches the <code>id</code> attribute specified in the XML fragment shown above:</p>
+
+<pre class="prettyprint"><code>public class CordovaViewTestActivity extends Activity implements CordovaInterface {
+    CordovaWebView cwv;
+    /* Called when the activity is first created. */
+    @Override
+    public void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.main);
+        cwv = (CordovaWebView) findViewById(R.id.tutorialView);
+        Config.init(this);
+        cwv.loadUrl(Config.getStartUrl());
+    }
+</code></pre>
+</li>
+</ol>
+<p>If you use the camera, you should also implement this:</p>
+
+<pre class="prettyprint"><code>    @Override
+    public void setActivityResultCallback(CordovaPlugin plugin) {
+        this.activityResultCallback = plugin;
+    }
+    /**
+     * Launch an activity for which you would like a result when it finished. When this activity exits,
+     * your onActivityResult() method is called.
+     *
+     * @param command           The command object
+     * @param intent            The intent to start
+     * @param requestCode       The request code that is passed to callback to identify the activity
+     */
+    public void startActivityForResult(CordovaPlugin command, Intent intent, int requestCode) {
+        this.activityResultCallback = command;
+        this.activityResultKeepRunning = this.keepRunning;
+
+        // If multitasking turned on, then disable it for activities that return results
+        if (command != null) {
+            this.keepRunning = false;
+        }
+
+        // Start activity
+        super.startActivityForResult(intent, requestCode);
+    }
+
+    @Override
+    /**
+     * Called when an activity you launched exits, giving you the requestCode you started it with,
+     * the resultCode it returned, and any additional data from it.
+     *
+     * @param requestCode       The request code originally supplied to startActivityForResult(),
+     *                          allowing you to identify who this result came from.
+     * @param resultCode        The integer result code returned by the child activity through its setResult().
+     * @param data              An Intent, which can return result data to the caller (various data can be attached to Intent "extras").
+     */
+    protected void onActivityResult(int requestCode, int resultCode, Intent intent) {
+        super.onActivityResult(requestCode, resultCode, intent);
+        CordovaPlugin callback = this.activityResultCallback;
+        if (callback != null) {
+            callback.onActivityResult(requestCode, resultCode, intent);
+        }
+    }
+</code></pre>
+
+<p>Finally, remember to add the thread pool, otherwise the plugins have no threads to run on:</p>
+
+<pre class="prettyprint"><code>    @Override
+    public ExecutorService getThreadPool() {
+        return threadPool;
+    }
+</code></pre>
+
+<ol>
+<li><p>Copy your application's HTML and JavaScript files to your Amazon Fire OS project's <code>/assets/www</code> directory.</p></li>
+<li><p>Copy <code>config.xml</code> from <code>/framework/res/xml</code> to your project's <code>/res/xml</code> directory.</p></li>
+</ol>
+</div>
+        </div>
+
+        <!-- Functionality and Syntax Highlighting -->
+        <script type="text/javascript" src="index.js"></script><script type="text/javascript" src="prettify/prettify.js"></script>
+</body>
+</html>

Modified: cordova/site/public/index.html
URL: http://svn.apache.org/viewvc/cordova/site/public/index.html?rev=1550603&r1=1550602&r2=1550603&view=diff
==============================================================================
--- cordova/site/public/index.html (original)
+++ cordova/site/public/index.html Fri Dec 13 00:41:13 2013
@@ -73,7 +73,7 @@
         </ul>
         <div class="button-container">
 
-            <a class="button" href="#download">DOWNLOAD<label>Cordova version 3.2.0</label></a>
+            <a class="button" href="#download">DOWNLOAD<label>Cordova version 3.3.0</label></a>
 
         </div>
     </div>
@@ -364,7 +364,7 @@ cordova platform update android</code></
 <div class="wrap download-pane">
     <h2 class="icon icon-download">Download &amp; Archives</h2>
     <p>By downloading, you agree to the <a href="#">terms of service</a>.</p>
-    <p>In addition to the <a onclick="_gaq.push(['_trackEvent', 'Download', '3.2.0'])" href="https://www.apache.org/dist/cordova/cordova-3.2.0-src.zip">source zip</a>, the
+    <p>In addition to the <a onclick="_gaq.push(['_trackEvent', 'Download', '3.3.0'])" href="https://www.apache.org/dist/cordova/cordova-3.2.0-src.zip">source zip</a>, the
         <a href="https://www.apache.org/dist/cordova/cordova-3.2.0-src.zip.asc">OpenPGP keys</a>,
         <a href="https://www.apache.org/dist/cordova/cordova-3.2.0-src.zip.md5">MD5</a>,
         <a href="https://www.apache.org/dist/cordova/cordova-3.2.0-src.zip.sha">SHA</a>, and

Modified: cordova/site/public/rss.xml
URL: http://svn.apache.org/viewvc/cordova/site/public/rss.xml?rev=1550603&r1=1550602&r2=1550603&view=diff
==============================================================================
--- cordova/site/public/rss.xml (original)
+++ cordova/site/public/rss.xml Fri Dec 13 00:41:13 2013
@@ -5,8 +5,8 @@
         <description>Apache Cordova - Apache Cordova is a set of device APIs that allow a web mobile app developer to access native device function from JavaScript.</description>
         <atom:link href="http://cordova.apache.org/rss.xml" rel="self" type="application/rss+xml" />
         <link>http://cordova.apache.org/rss.xml</link>
-        <lastBuildDate>Fri, 06 Dec 2013 17:11:16 -0800</lastBuildDate>
-        <pubDate>Fri, 06 Dec 2013 17:11:16 -0800</pubDate>
+        <lastBuildDate>Thu, 12 Dec 2013 16:39:35 -0800</lastBuildDate>
+        <pubDate>Thu, 12 Dec 2013 16:39:35 -0800</pubDate>
         <ttl>1800</ttl>
         <image>
             <url>http://cordova.apache.org</url>