[android-beginners] Re: I/O

2010-07-14 Thread kypriakos
I noticed that using the standard Java to create the new file stalls: File UIDfile = new File(/data/local/tmp/myUID.txt); UIDfile.createNewFile(); Is this something that should not be used in Android? Anyone else faced this issue before? Should I convert these to: FileOutputStream fos =

Re: [android-beginners] Re: I/O

2010-07-14 Thread Mark Murphy
On Wed, Jul 14, 2010 at 2:59 PM, kypriakos demet...@ece.neu.edu wrote: I noticed that using the standard Java to create the new file stalls: File UIDfile = new File(/data/local/tmp/myUID.txt); UIDfile.createNewFile(); Is this something that should not be used in Android? You cannot write to

[android-beginners] Re: I/O

2010-07-14 Thread kypriakos
That's what I figured - thanks Mark. I think it makes more sense now. Regarding the emulator's storage, if I wanted to manually add a file let's say into the sdcard dir, is this possible (in other words is this a real file system dir or a simulated entity?). Thanks again On Jul 14, 3:03 pm,

[android-beginners] Re: I/O

2010-07-14 Thread kypriakos
The Environment.getExternalFilesDir() does return /sdcard and although empty it still stalls on writing the file out. What package carries the getFilesDir()? On Jul 14, 3:09 pm, kypriakos demet...@ece.neu.edu wrote: That's what I figured - thanks Mark. I think it makes more sense now.

Re: [android-beginners] Re: I/O

2010-07-14 Thread Mark Murphy
On Wed, Jul 14, 2010 at 3:20 PM, kypriakos demet...@ece.neu.edu wrote: The Environment.getExternalFilesDir() does return /sdcard and although empty it still stalls on writing the file out. I have no idea what stalls means in this context. You need an SD card (or SD card image for the emulator),

[android-beginners] Re: I/O

2010-07-14 Thread kypriakos
Sorry for not being clear from the start Mark - my bad. When the app reaches the createNewFile() method it quits (I thought it was stalling on that method but I was wrong). I think that method is the problem in my case. I did use adb push to copy files to the emulator's filesystem so that

Re: [android-beginners] Re: I/O

2010-07-14 Thread Mark Murphy
On Wed, Jul 14, 2010 at 3:42 PM, kypriakos demet...@ece.neu.edu wrote: When the app reaches the createNewFile() method it quits OK, then I have no idea what quits means in this context. I am going to guess you mean it had an unhandled exception. If so, use adb logcat, DDMS, or the DDMS

[android-beginners] Re: I/O

2010-07-14 Thread kypriakos
Normally I don't get into this back and forth QA loop as I know very well how busy most people are and what the real purpose of the mailing lists are, so I apologize for letting it get out of hand. You are right, most likely I should be able to find a lot of these fundamental concepts either on

[android-beginners] Re: I/O

2010-07-14 Thread kypriakos
One last thing - extending my question from the previous email - may be this is what I should have asked to begin with and left it at that: Since I can compile my complete imported app as an Android project it makes sense that the classes and methods I used in the past (even the System.out that

Re: [android-beginners] Re: I/O

2010-07-14 Thread Kostya Vasilyev
If you are catching IOException, a NullPointerException will slip right through. Happens sometimes (i.e. file open returns null, and subsequent code tries to write to it). Have you checked the logcat to see what goes on? Also note, if a crash happens while debugging, you have to hit Resume

[android-beginners] Re: I/O

2010-07-14 Thread kypriakos
I know I know - I rudely jumped into asking questions and that is a no no - you want people to help you make your context clear first and the rest will follow (to a certain reasonable extend of course ;) ) ... That's...very strange. Yes it is - but hey, I am sure what I learn from getting to