<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>android/src/com/phonegap/demo/CompassListener.java</filename>
    </added>
    <added>
      <filename>android/src/com/phonegap/demo/FileUtils.java</filename>
    </added>
    <added>
      <filename>javascripts/android/file.js</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -3,16 +3,15 @@
       package=&quot;com.phonegap.demo&quot; android:versionName=&quot;1.0.1&quot; android:versionCode=&quot;2&quot;&gt;
     &lt;uses-permission android:name=&quot;android.permission.CAMERA&quot; /&gt;
     &lt;uses-permission android:name=&quot;android.permission.VIBRATE&quot; /&gt;
-    &lt;uses-permission android:name=&quot;android.permission.ACCESS_GPS&quot; /&gt;
-    &lt;uses-permission android:name=&quot;android.permission.ACCESS_ASSISTED_GPS&quot; /&gt;
-    &lt;uses-permission android:name=&quot;android.permission.ACCESS_LOCATION&quot; /&gt;
     &lt;uses-permission android:name=&quot;android.permission.ACCESS_COARSE_LOCATION&quot; /&gt;
     &lt;uses-permission android:name=&quot;android.permission.ACCESS_FINE_LOCATION&quot; /&gt;
+    &lt;uses-permission android:name=&quot;android.permission.ACCESS_LOCATION_EXTRA_COMMANDS&quot; /&gt;
     &lt;uses-permission android:name=&quot;android.permission.READ_PHONE_STATE&quot; /&gt;
     &lt;uses-permission android:name=&quot;android.permission.INTERNET&quot; /&gt;
     &lt;uses-permission android:name=&quot;android.permission.RECEIVE_SMS&quot; /&gt;
     &lt;uses-permission android:name=&quot;android.permission.RECORD_AUDIO&quot; /&gt;
     &lt;uses-permission android:name=&quot;android.permission.MODIFY_AUDIO_SETTINGS&quot; /&gt;
+    &lt;uses-permission android:name=&quot;android.permission.WRITE_EXTERNAL_STORAGE&quot; /&gt;   
     
     &lt;application android:icon=&quot;@drawable/icon&quot; android:label=&quot;@string/app_name&quot;
     	android:debuggable=&quot;true&quot;&gt;
@@ -29,6 +28,6 @@
         		&lt;action android:name=&quot;android.intent.action.PICK&quot; /&gt;        		
         &lt;/activity&gt;
     &lt;/application&gt;
-	&lt;uses-sdk android:minSdkVersion=&quot;3&quot; /&gt;
+	&lt;uses-sdk android:minSdkVersion=&quot;4&quot; /&gt;
 
-&lt;/manifest&gt; 
\ No newline at end of file
+&lt;/manifest&gt; </diff>
      <filename>android/AndroidManifest.xml</filename>
    </modified>
    <modified>
      <diff>@@ -87,6 +87,17 @@
       alert(fail);
     }
 
+  	// This is just to do this.
+  	function readFile()
+  	{  	
+   		navigator.file.read('/sdcard/phonegap.txt', fail , fail);
+  	}
+
+  	function writeFile()
+  	{
+  	  	navigator.file.write('foo.txt', &quot;This is a test of writing to a file&quot;, fail, fail);
+  	}
+
 	function init(){
 		document.addEventListener(&quot;touchmove&quot;, preventBehavior, false);
 		setTimeout(deviceInfo, 1);
@@ -112,7 +123,9 @@
 	&lt;a href=&quot;tel://411&quot; class=&quot;btn large&quot;&gt;Call 411&lt;/a&gt;
     &lt;a href=&quot;#&quot; class=&quot;btn&quot; onclick=&quot;beep();&quot;&gt;Beep&lt;/a&gt;
     &lt;a href=&quot;#&quot; class=&quot;btn&quot; onclick=&quot;vibrate();&quot;&gt;Vibrate&lt;/a&gt;
-    &lt;a href=&quot;#&quot; class=&quot;btn large&quot; onclick=&quot;show_pic();&quot;&gt;Get a Picture&lt;/a&gt;
+    &lt;a href=&quot;#&quot; class=&quot;btn&quot; onclick=&quot;show_pic();&quot;&gt;Get a Picture&lt;/a&gt;
+    &lt;a href=&quot;#&quot; class=&quot;btn&quot; onclick=&quot;readFile();&quot;&gt;Read from file&lt;/a&gt;
+    &lt;a href=&quot;#&quot; class=&quot;btn&quot; onclick=&quot;writeFile();&quot;&gt;Write to File&lt;/a&gt;
     &lt;div id=&quot;viewport&quot; class=&quot;viewport&quot;&gt;       
       &lt;img style=&quot;width:60px;height:60px&quot; id=&quot;test_img&quot; src=&quot;&quot; /&gt;
     &lt;/div&gt; </diff>
      <filename>android/assets/www/index.html</filename>
    </modified>
    <modified>
      <diff>@@ -94,6 +94,3 @@
   	padding:1.2em 0;
   }
 
-  #viewport {
-    display: none;
-  }</diff>
      <filename>android/assets/www/master.css</filename>
    </modified>
    <modified>
      <diff>@@ -7,16 +7,8 @@
 # &quot;build.properties&quot;, and override values to adapt the script to your
 # project structure.
 
-# Project target.
-target=Google Inc.:Google APIs:3
-# apk configurations. This property allows creation of APK files with limited
-# resources. For example, if your application contains many locales and
-# you wish to release multiple smaller apks instead of a large one, you can
-# define configuration to create apks with limited language sets.
-# Format is a comma separated list of configuration names. For each
-# configuration, a property will declare the resource configurations to
-# include. Example:
-#     apk-configurations=european,northamerica
-#     apk-config-european=en,fr,it,de,es
-#     apk-config-northamerica=en,es
 apk-configurations=
+# Project target.
+target=android-4
+# Indicates whether an apk should be generated for each density.
+split.density=false</diff>
      <filename>android/default.properties</filename>
    </modified>
    <modified>
      <diff>@@ -8,6 +8,7 @@ import android.content.Context;
 import android.hardware.SensorListener;
 import android.webkit.WebView;
 
+@SuppressWarnings(&quot;deprecation&quot;)
 public class AccelListener implements SensorListener{
 
 	WebView mAppView;</diff>
      <filename>android/src/com/phonegap/demo/AccelListener.java</filename>
    </modified>
    <modified>
      <diff>@@ -46,6 +46,7 @@ public class DroidGap extends Activity {
 	private GeoBroker geo;
 	private AccelListener accel;
 	private CameraLauncher launcher;
+	private FileUtils fs;
 	
     /** Called when the activity is first created. */
 	@Override
@@ -93,16 +94,18 @@ public class DroidGap extends Activity {
     
     private void bindBrowser(WebView appView)
     {
-
     	gap = new PhoneGap(this, appView);
     	geo = new GeoBroker(appView, this);
     	accel = new AccelListener(this, appView);
     	launcher = new CameraLauncher(appView, this);
+    	fs = new FileUtils(appView);
+    	
     	// This creates the new javascript interfaces for PhoneGap
     	appView.addJavascriptInterface(gap, &quot;DroidGap&quot;);
     	appView.addJavascriptInterface(geo, &quot;Geo&quot;);
     	appView.addJavascriptInterface(accel, &quot;Accel&quot;);
     	appView.addJavascriptInterface(launcher, &quot;GapCam&quot;);
+    	appView.addJavascriptInterface(fs, &quot;FileUtil&quot;);
     }
         
     /**</diff>
      <filename>android/src/com/phonegap/demo/DroidGap.java</filename>
    </modified>
    <modified>
      <diff>@@ -21,13 +21,12 @@ package com.phonegap.demo;
  * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
  * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  */
-import java.io.IOException;
+
 import java.util.TimeZone;
 
 import android.content.Context;
 import android.content.IntentFilter;
 import android.net.Uri;
-import android.os.Handler;
 import android.os.Vibrator;
 import android.telephony.TelephonyManager;
 import android.webkit.WebView;
@@ -41,7 +40,7 @@ public class PhoneGap{
 	 * UUID, version and availability	
 	 */
 	public boolean droid = true;
-	public static String version = &quot;0.2&quot;;
+	public static String version = &quot;0.8.0&quot;;
 	public static String platform = &quot;Android&quot;;
 	public static String uuid;
 	private Context mCtx;
@@ -62,9 +61,8 @@ public class PhoneGap{
 	
 	public void beep(long pattern)
 	{
-		RingtoneManager beeper = new RingtoneManager(mCtx);
-		Uri ringtone = beeper.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);
-		Ringtone notification = beeper.getRingtone(mCtx, ringtone);
+		Uri ringtone = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);
+		Ringtone notification = RingtoneManager.getRingtone(mCtx, ringtone);
 		for (long i = 0; i &lt; pattern; ++i)
 		{
 			notification.play();
@@ -162,72 +160,6 @@ public class PhoneGap{
     	http.get(url, file);
     }
     
-    
-
-    	
-    public int testSaveLocationExists(){
-        if (fileManager.testSaveLocationExists())
-            return 0;
-        else
-            return 1;
-    }
-    
-    public long getFreeDiskSpace(){
-        long freeDiskSpace=fileManager.getFreeDiskSpace();
-        return freeDiskSpace;
-    }
-
-    public int testFileExists(String file){
-        if (fileManager.testFileExists(file))
-            return 0;
-        else
-            return 1;
-    }
-    
-    public int testDirectoryExists(String file){
-        if (fileManager.testFileExists(file))
-            return 0;
-        else
-            return 1;
-    } 
-
-    /**
-	 * Delete a specific directory. 
-	 * Everyting in side the directory would be gone.
-	 * TODO: JavaScript Call backs for success and error handling 
-	 */
-    public int deleteDirectory (String dir){
-        if (fileManager.deleteDirectory(dir))
-            return 0;
-        else
-            return 1;
-    }
-    
-
-    /**
-	 * Delete a specific file. 
-	 * TODO: JavaScript Call backs for success and error handling 
-	 */
-    public int deleteFile (String file){
-        if (fileManager.deleteFile(file))
-            return 0;
-        else
-            return 1;
-    }
-    
-
-    /**
-	 * Create a new directory. 
-	 * TODO: JavaScript Call backs for success and error handling 
-	 */
-    public int createDirectory(String dir){
-    	if (fileManager.createDirectory(dir))
-            return 0;
-        else
-            return 1;
-    } 
-    
-    
     /**
      * AUDIO
      * TODO: Basic functions done but needs more work on error handling and call backs, remove record hack</diff>
      <filename>android/src/com/phonegap/demo/PhoneGap.java</filename>
    </modified>
    <modified>
      <diff>@@ -3,62 +3,11 @@
  * This class provides access to the device media, interfaces to both sound and video
  * @constructor
  */
-var MEDIA_AUDIO = &quot;mp3&quot;;
 
-function Media(src) {
-	this.src = src;
+Media.prototype.playAudio = function(filename) {
+  PhoneGap.startPlayingiAudio(filename);  
 }
 
-Media.prototype.record = function() {
-	var fileparse = this.src.split('.');
-	var filetype = fileparse[fileparse.length - 1];
-	if ( filetype == MEDIA_AUDIO )
-	{
-		// Queue up Audio API		
-	}
-	else
-	{
-		// Start Camera Preview for Video Recording
-	}
+Media.prototype.stopAudio = function() {
+  PhoneGap.stopPlayingAudio();
 }
-
-Media.prototype.play = function() {
-	var fileparse = this.src.split('.');
-	var filetype = fileparse[fileparse.length - 1];
-	if ( filetype = MEDIA_AUDIO)
-	{
-		// Play Audio
-	}
-	else
-	{
-		// Bring up Video Overlay
-		// (Note: On HTML 5 Browsers (iPhone), this should
-		// create a DIV with a VIDEO tag in it)
-	}
-}
-
-Media.prototype.pause = function() {
-	// Do some pausing
-}
-
-Media.prototype.stop = function() {
-	// Stop playback
-}
-
-
-/**
- * This class contains information about any Media errors.
- * @constructor
- */
-function MediaError() {
-	this.code = null,
-	this.message = &quot;&quot;;
-}
-
-MediaError.MEDIA_ERR_ABORTED 		= 1;
-MediaError.MEDIA_ERR_NETWORK 		= 2;
-MediaError.MEDIA_ERR_DECODE 		= 3;
-MediaError.MEDIA_ERR_NONE_SUPPORTED = 4;
-
-
-//if (typeof navigator.audio == &quot;undefined&quot;) navigator.audio = new Media(src);</diff>
      <filename>javascripts/android/media.js</filename>
    </modified>
  </modified>
  <removed type="array">
    <removed>
      <filename>android/assets/www/phonegap.js</filename>
    </removed>
  </removed>
  <parents type="array">
    <parent>
      <id>fafe5434da903780fe1f17c280b8a0a165779008</id>
    </parent>
    <parent>
      <id>fea61e1ed0990f3cda617bc22ccae3c68d380458</id>
    </parent>
  </parents>
  <author>
    <name>Fil Maj</name>
    <email>filip.maj@nitobi.com</email>
  </author>
  <url>http://github.com/sintaxi/phonegap/commit/e7765530ec377b37121dab6489cc9a8a4fbd662c</url>
  <id>e7765530ec377b37121dab6489cc9a8a4fbd662c</id>
  <committed-date>2009-10-29T14:14:56-07:00</committed-date>
  <authored-date>2009-10-29T14:14:56-07:00</authored-date>
  <message>Merge branch 'master' of git://github.com/bowserj/phonegap</message>
  <tree>edc326fa560c54360543600cad73046eb707da99</tree>
  <committer>
    <name>Fil Maj</name>
    <email>filip.maj@nitobi.com</email>
  </committer>
</commit>
