cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agri...@apache.org
Subject docs commit: Update Android's getting started guide.
Date Mon, 22 Oct 2012 17:06:21 GMT
Updated Branches:
  refs/heads/master b55bcb886 -> 4ca64bf6d


Update Android's getting started guide.

Now uses bin/create script.
Fixes issue: https://issues.apache.org/jira/browse/CB-1692


Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-docs/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-docs/commit/4ca64bf6
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-docs/tree/4ca64bf6
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-docs/diff/4ca64bf6

Branch: refs/heads/master
Commit: 4ca64bf6d030729210b32515255c64c2fbe76eeb
Parents: b55bcb8
Author: Andrew Grieve <agrieve@chromium.org>
Authored: Mon Oct 22 13:05:44 2012 -0400
Committer: Andrew Grieve <agrieve@chromium.org>
Committed: Mon Oct 22 13:05:44 2012 -0400

----------------------------------------------------------------------
 .../en/edge/guide/getting-started/android/index.md |  104 +++------------
 .../guide/getting-started/android/AndroidFlow.png  |  Bin 198941 -> 0 bytes
 .../guide/getting-started/android/buildPath.jpg    |  Bin 80516 -> 0 bytes
 .../android/eclipse_new_project.png                |  Bin 0 -> 57193 bytes
 .../img/guide/getting-started/android/javaSrc.jpg  |  Bin 141340 -> 0 bytes
 .../img/guide/getting-started/android/manifest.jpg |  Bin 268212 -> 0 bytes
 .../img/guide/getting-started/android/manifest.png |  Bin 210586 -> 0 bytes
 .../android/new_android_project.jpeg               |  Bin 62485 -> 0 bytes
 .../img/guide/getting-started/android/step_1.png   |  Bin 59002 -> 0 bytes
 .../img/guide/getting-started/android/step_2.png   |  Bin 67435 -> 0 bytes
 .../img/guide/getting-started/android/step_3.png   |  Bin 71747 -> 0 bytes
 .../img/guide/getting-started/android/step_4.png   |  Bin 48027 -> 0 bytes
 .../img/guide/getting-started/android/step_5.png   |  Bin 52899 -> 0 bytes
 13 files changed, 18 insertions(+), 86 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-docs/blob/4ca64bf6/docs/en/edge/guide/getting-started/android/index.md
----------------------------------------------------------------------
diff --git a/docs/en/edge/guide/getting-started/android/index.md b/docs/en/edge/guide/getting-started/android/index.md
index 7fad9db..578e4f4 100644
--- a/docs/en/edge/guide/getting-started/android/index.md
+++ b/docs/en/edge/guide/getting-started/android/index.md
@@ -20,8 +20,7 @@ license: Licensed to the Apache Software Foundation (ASF) under one
 Getting Started with Android
 ============================
 
-This guide describes how to set up your development environment for Cordova and run a sample
application.  Note that Cordova used to be called PhoneGap, so some of the sites still use
the old PhoneGap name.
-
+This guide describes how to set up your development environment for Cordova and run a sample
application.
 
 1. Requirements
 ---------------
@@ -35,98 +34,31 @@ This guide describes how to set up your development environment for Cordova
and
 - Download and install [Eclipse Classic](http://www.eclipse.org/downloads/)
 - Download and install [Android SDK](http://developer.android.com/sdk/index.html)
 - Download and install [ADT Plugin](http://developer.android.com/sdk/eclipse-adt.html#installing)
-- Download the latest copy of [Cordova](http://phonegap.com/download) and extract its contents.
We will be working with the Android directory.
+- Download the latest copy of [Cordova](http://incubator.apache.org/cordova/#download) and
extract its contents. We will be working with the Android directory.
+
+3. Setup New Project
+--------------------
 
- 3. Setup New Project
----------------------
+- In a terminal window, navigate to the `bin` directory within the `android` subfolder of
the Cordova distribution.
+- Type in `./create <project_folder_path> <package_name> <project_name>`
then press **"Enter"**
+
+        <project_folder_path> is the path to your new Cordova Android project
+        <package_name> is the package name, e.g. com.YourCompany.YourAppName
+        <project_name> is the project name, e.g. YourApp (Must not contain spaces)
 
 - Launch Eclipse, and select menu item **New Project**
-    ![](img/guide/getting-started/android/step_1.png)
-- Then specify new application project
-    ![](img/guide/getting-started/android/step_2.png)
-- Then speciy an Application Name, a Project Name and Package Name with Namespace
-    ![](img/guide/getting-started/android/step_3.png)
-- Then select a graphic
-    ![](img/guide/getting-started/android/step_4.png)
-- Then Create a Blank Activity
-    ![](img/guide/getting-started/android/step_5.png)
-- Make sure the activity doesn't inherit from anything.  You most likely won't have PhoneGap
on your Eclipse Workspace.  Once this is done, click finish
-    
-- In the root directory of your project, create two new directories:
- 	- **/libs**
- 	- **assets/www**
-- Copy **cordova-2.0.0.js** from your Cordova download earlier to **assets/www**
-- Copy **cordova-2.0.0.jar** from your Cordova download earlier to **/libs**
-- Copy **xml** folder from your Cordova download earlier to **/res**
-
-- Verify that **cordova-2.0.0.jar** is listed in the Build Path for your project. Right click
on the /libs folder and go to **Build Paths/ &gt; Configure Build Path...**. Then, in
the Libraries tab, add **cordova-2.0.0.jar** to the project. If Eclipse is being temperamental,
you might need to refresh (F5) the project once again.
-
-    ![](img/guide/getting-started/android/buildPath.jpg)
-
-- Edit your project's main Java file found in the **src** folder in Eclipse:
-	- Add **import org.apache.cordova.*;**
-	- Change the class's extend from **Activity** to **DroidGap**
-	- Replace the **setContentView()** line with **super.loadUrl("file:///android_asset/www/index.html");**

-
-	![](img/guide/getting-started/android/javaSrc.jpg)
-	
-- Right click on AndroidManifest.xml and select **Open With &gt; Text Editor**
-- Paste the following permissions between the **&lt;uses-sdk.../&gt;** and **&lt;application.../&gt;**
tags.
-
-        <supports-screens 
-            android:largeScreens="true" 
-            android:normalScreens="true" 
-            android:smallScreens="true" 
-            android:resizeable="true" 
-            android:anyDensity="true" />
-        <uses-permission android:name="android.permission.VIBRATE" />
-        <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
-        <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
-        <uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS"
/>
-        <uses-permission android:name="android.permission.READ_PHONE_STATE" />
-        <uses-permission android:name="android.permission.INTERNET" />
-        <uses-permission android:name="android.permission.RECEIVE_SMS" />
-        <uses-permission android:name="android.permission.RECORD_AUDIO" />
-        <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
-        <uses-permission android:name="android.permission.READ_CONTACTS" />
-        <uses-permission android:name="android.permission.WRITE_CONTACTS" />
-        <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
-        <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

-        <uses-permission android:name="android.permission.GET_ACCOUNTS" />
-        <uses-permission android:name="android.permission.BROADCAST_STICKY" />
-*Note You are adding a blanket list of permissions to your application. You should remove
permissions you aren't using before submitting your application to Google Play.
-- Support orientation changes by pasting the following inside the **&lt;activity&gt;**
tag.
-
-        android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale"
-
-- Your AndroidManifest.xml file should look like
-
-    ![](img/guide/getting-started/android/manifest.png)
-
-4. Hello World
---------------    
-
-- Create and open a new file named **index.html** in the **assets/www** directory. Paste
the following code:
-
-        <!DOCTYPE HTML>
-        <html>
-        <head>
-        <title>Cordova</title>
-        <script type="text/javascript" charset="utf-8" src="cordova-1.9.0.js"></script>
-        </head>
-        <body>
-        <h1>Hello World</h1>
-        </body>
-        </html>
-
-5A. Deploy to Simulator
------------------------
+    ![](img/guide/getting-started/android/eclipse_new_project.png)
+- Select the directory you used for `<project_folder_path>`
+- Click Finish.
+
+4A. Deploy to Emulator
+----------------------
 
 - Right click the project and go to **Run As &gt; Android Application**
 - Eclipse will ask you to select an appropriate AVD. If there isn't one, then you'll need
to create it.
 
 
-5B. Deploy to Device
+4B. Deploy to Device
 --------------------
 
 - Make sure USB debugging is enabled on your device and plug it into your system. (**Settings
&gt; Applications &gt; Development**)

http://git-wip-us.apache.org/repos/asf/incubator-cordova-docs/blob/4ca64bf6/template/docs/default/img/guide/getting-started/android/AndroidFlow.png
----------------------------------------------------------------------
diff --git a/template/docs/default/img/guide/getting-started/android/AndroidFlow.png b/template/docs/default/img/guide/getting-started/android/AndroidFlow.png
deleted file mode 100644
index 7d019b6..0000000
Binary files a/template/docs/default/img/guide/getting-started/android/AndroidFlow.png and
/dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-cordova-docs/blob/4ca64bf6/template/docs/default/img/guide/getting-started/android/buildPath.jpg
----------------------------------------------------------------------
diff --git a/template/docs/default/img/guide/getting-started/android/buildPath.jpg b/template/docs/default/img/guide/getting-started/android/buildPath.jpg
deleted file mode 100755
index ae3f7ee..0000000
Binary files a/template/docs/default/img/guide/getting-started/android/buildPath.jpg and /dev/null
differ

http://git-wip-us.apache.org/repos/asf/incubator-cordova-docs/blob/4ca64bf6/template/docs/default/img/guide/getting-started/android/eclipse_new_project.png
----------------------------------------------------------------------
diff --git a/template/docs/default/img/guide/getting-started/android/eclipse_new_project.png
b/template/docs/default/img/guide/getting-started/android/eclipse_new_project.png
new file mode 100644
index 0000000..9d9106e
Binary files /dev/null and b/template/docs/default/img/guide/getting-started/android/eclipse_new_project.png
differ

http://git-wip-us.apache.org/repos/asf/incubator-cordova-docs/blob/4ca64bf6/template/docs/default/img/guide/getting-started/android/javaSrc.jpg
----------------------------------------------------------------------
diff --git a/template/docs/default/img/guide/getting-started/android/javaSrc.jpg b/template/docs/default/img/guide/getting-started/android/javaSrc.jpg
deleted file mode 100644
index ab93051..0000000
Binary files a/template/docs/default/img/guide/getting-started/android/javaSrc.jpg and /dev/null
differ

http://git-wip-us.apache.org/repos/asf/incubator-cordova-docs/blob/4ca64bf6/template/docs/default/img/guide/getting-started/android/manifest.jpg
----------------------------------------------------------------------
diff --git a/template/docs/default/img/guide/getting-started/android/manifest.jpg b/template/docs/default/img/guide/getting-started/android/manifest.jpg
deleted file mode 100644
index 6039194..0000000
Binary files a/template/docs/default/img/guide/getting-started/android/manifest.jpg and /dev/null
differ

http://git-wip-us.apache.org/repos/asf/incubator-cordova-docs/blob/4ca64bf6/template/docs/default/img/guide/getting-started/android/manifest.png
----------------------------------------------------------------------
diff --git a/template/docs/default/img/guide/getting-started/android/manifest.png b/template/docs/default/img/guide/getting-started/android/manifest.png
deleted file mode 100644
index 88163b1..0000000
Binary files a/template/docs/default/img/guide/getting-started/android/manifest.png and /dev/null
differ

http://git-wip-us.apache.org/repos/asf/incubator-cordova-docs/blob/4ca64bf6/template/docs/default/img/guide/getting-started/android/new_android_project.jpeg
----------------------------------------------------------------------
diff --git a/template/docs/default/img/guide/getting-started/android/new_android_project.jpeg
b/template/docs/default/img/guide/getting-started/android/new_android_project.jpeg
deleted file mode 100644
index 20bc29d..0000000
Binary files a/template/docs/default/img/guide/getting-started/android/new_android_project.jpeg
and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-cordova-docs/blob/4ca64bf6/template/docs/default/img/guide/getting-started/android/step_1.png
----------------------------------------------------------------------
diff --git a/template/docs/default/img/guide/getting-started/android/step_1.png b/template/docs/default/img/guide/getting-started/android/step_1.png
deleted file mode 100644
index bb3202a..0000000
Binary files a/template/docs/default/img/guide/getting-started/android/step_1.png and /dev/null
differ

http://git-wip-us.apache.org/repos/asf/incubator-cordova-docs/blob/4ca64bf6/template/docs/default/img/guide/getting-started/android/step_2.png
----------------------------------------------------------------------
diff --git a/template/docs/default/img/guide/getting-started/android/step_2.png b/template/docs/default/img/guide/getting-started/android/step_2.png
deleted file mode 100644
index 20929e6..0000000
Binary files a/template/docs/default/img/guide/getting-started/android/step_2.png and /dev/null
differ

http://git-wip-us.apache.org/repos/asf/incubator-cordova-docs/blob/4ca64bf6/template/docs/default/img/guide/getting-started/android/step_3.png
----------------------------------------------------------------------
diff --git a/template/docs/default/img/guide/getting-started/android/step_3.png b/template/docs/default/img/guide/getting-started/android/step_3.png
deleted file mode 100644
index cf3f87d..0000000
Binary files a/template/docs/default/img/guide/getting-started/android/step_3.png and /dev/null
differ

http://git-wip-us.apache.org/repos/asf/incubator-cordova-docs/blob/4ca64bf6/template/docs/default/img/guide/getting-started/android/step_4.png
----------------------------------------------------------------------
diff --git a/template/docs/default/img/guide/getting-started/android/step_4.png b/template/docs/default/img/guide/getting-started/android/step_4.png
deleted file mode 100644
index d8033d8..0000000
Binary files a/template/docs/default/img/guide/getting-started/android/step_4.png and /dev/null
differ

http://git-wip-us.apache.org/repos/asf/incubator-cordova-docs/blob/4ca64bf6/template/docs/default/img/guide/getting-started/android/step_5.png
----------------------------------------------------------------------
diff --git a/template/docs/default/img/guide/getting-started/android/step_5.png b/template/docs/default/img/guide/getting-started/android/step_5.png
deleted file mode 100644
index 9b64bfa..0000000
Binary files a/template/docs/default/img/guide/getting-started/android/step_5.png and /dev/null
differ


Mime
View raw message