mirror of
https://github.com/apache/cordova-android.git
synced 2025-02-22 00:32:55 +08:00
Hacking on the File and Media APIs
This commit is contained in:
parent
8ee5d77edc
commit
ea87973bfb
@ -94,6 +94,3 @@
|
|||||||
padding:1.2em 0;
|
padding:1.2em 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#viewport {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
@ -8,6 +8,7 @@ import android.content.Context;
|
|||||||
import android.hardware.SensorListener;
|
import android.hardware.SensorListener;
|
||||||
import android.webkit.WebView;
|
import android.webkit.WebView;
|
||||||
|
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
public class AccelListener implements SensorListener{
|
public class AccelListener implements SensorListener{
|
||||||
|
|
||||||
WebView mAppView;
|
WebView mAppView;
|
||||||
|
@ -162,70 +162,7 @@ public class PhoneGap{
|
|||||||
http.get(url, file);
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user