mirror of
https://github.com/apache/cordova-android.git
synced 2025-01-19 15:12:51 +08:00
Hacking on the File and Media APIs
This commit is contained in:
parent
9957dfca73
commit
4b3e3140f4
@ -94,6 +94,3 @@
|
||||
padding:1.2em 0;
|
||||
}
|
||||
|
||||
#viewport {
|
||||
display: none;
|
||||
}
|
||||
|
@ -8,6 +8,7 @@ import android.content.Context;
|
||||
import android.hardware.SensorListener;
|
||||
import android.webkit.WebView;
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public class AccelListener implements SensorListener{
|
||||
|
||||
WebView mAppView;
|
||||
|
@ -165,69 +165,6 @@ public class PhoneGap{
|
||||
|
||||
|
||||
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user