File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Android and the fly likes android not running on my phone, but on my emulator does Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Mobile » Android
Reply Bookmark "android not running on my phone, but on my emulator does" Watch "android not running on my phone, but on my emulator does" New topic
Author

android not running on my phone, but on my emulator does

David Lakatos
Greenhorn

Joined: Aug 28, 2012
Posts: 8
FTPClient client = new FTPClient();
FileInputStream fis = null;

try {
client.connect("ftp.atw.hu");
client.login("festivale", "festivale12");
Log.d("TravellerLog :: ", "Csatlakozva: ftp.atw.hu");

//
// Create an InputStream of the file to be uploaded
//
client.setFileType(FTP.BINARY_FILE_TYPE);
client.enterLocalPassiveMode();
String substr = globalconstant.path.substring(4, globalconstant.path.length());
String filename = substr + "/Festivale.db";
Log.e("TravellerLog :: ", substr + "/Festivale.db");
fis = new FileInputStream(filename);

//
// Store file to server
//
client.storeFile("Festivale.db", fis);
Log.d("TravellerLog :: ", "Feltöltve");
client.logout();
} catch (IOException e) {
e.printStackTrace();
} finally {
try {
if (fis != null) {
fis.close();
}
client.disconnect();
} catch (IOException e) {
e.printStackTrace();
}
}
Hi I wrote this method which works great on emulator but on my sgs2 android 4.0.3 freezer the phone.
please help i'm trying to do this ftp almost 3hours ago :S
I can't get a log file from the phone, but can someone rry it? Thanks
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: android not running on my phone, but on my emulator does
 
Similar Threads
553 Can't open that file: No such file or directory
FTP Dowload JPG & XML files only... USing com.oroinc.net.ftp.* from FTP server
Directory / File not found
How do I read and write a binary file?
Open a file for view