[android-developers] Re: Unable to write text file to sdcard on physical G1 device

2009-10-27 Thread androiduser mobile
We resolved the issue, my project is dependent on another project and after keeping the WRITE_EXTERNAL_STORAGE permission in both the projects manifest files solved the issue. Thank you all for helping. Android user. On Oct 15, 12:13 pm, androiduser mobile wrote: > Hi Mark, > > we did try these

[android-developers] Re: Unable to write text file to sdcard on physical G1 device

2009-10-15 Thread Greivin Lopez
I think you only need to add the permission as suggested by androiduser mobile to be able to write to the SD Card. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group

[android-developers] Re: Unable to write text file to sdcard on physical G1 device

2009-10-15 Thread androiduser mobile
Hi Mark, we did try these but no luck. We tried with same SD card what I am using. No formatting issue. Thanks, Android user On Oct 15, 10:49 am, Mark Murphy wrote: > androiduser mobile wrote: > >         File directory = new File > > (Environment.getExternalStorageDirectory().getPath()+"/down

[android-developers] Re: Unable to write text file to sdcard on physical G1 device

2009-10-15 Thread Mark Murphy
androiduser mobile wrote: > File directory = new File > (Environment.getExternalStorageDirectory().getPath()+"/downloads"); Creating paths via concatenation is bad form and prone to error (e.g., duplicate slashes). Use: new File(Environment.getExternalStorageDirectory(), "downloads"); >

[android-developers] Re: Unable to write text file to sdcard on physical G1 device

2009-10-15 Thread androiduser mobile
Hi Mark, Thanks for immediate reply. I checked these conditions, when we tried to push a file using adb is working fine, but only through the below code, we are seeing the exception: public void addFile(String filename) throws Exception{ InputStream is = this.getInstrumentation().getCo

[android-developers] Re: Unable to write text file to sdcard on physical G1 device

2009-10-15 Thread Mark Murphy
androiduser mobile wrote: > Hi all, > > I am facing a weird problem now, I have a piece of code which copies > the files from assets folder to sdcard/downloads and is working well > for me, but when other user is running this code in his system, he is > getting " Parent directory does not exist"

[android-developers] Re: Unable to write text file to sdcard on physical G1 device

2009-10-15 Thread androiduser mobile
Hi all, I am facing a weird problem now, I have a piece of code which copies the files from assets folder to sdcard/downloads and is working well for me, but when other user is running this code in his system, he is getting " Parent directory does not exist" exception with file.createNewFile(). W

[android-developers] Re: Unable to write text file to sdcard on physical G1 device

2009-09-17 Thread tauntz
Applications targeted for 1.0, 1.1 and 1.5 will be able to write to the external storage without any permissions. They will continue to work just like they have till today. http://developer.android.com/sdk/android-1.6.html#api-changes "WRITE_EXTERNAL_STORAGE: Allows an application to write to ext

[android-developers] Re: Unable to write text file to sdcard on physical G1 device

2009-09-17 Thread Shrenik Vikam
WRITE_EXTERNAL_STORAGE is there in 1.6 what abt 1.5 ??? On Sep 10, 12:30 am, androiduser mobile wrote: > I got it working with a permission change in the manifest file. I > added "WRITE_EXTERNAL_STORAGE" and it worked like a gem :)). > > On Sep 9, 12:13 pm, Chris Stratton wrote: > > > On Jul 17

[android-developers] Re: Unable to write text file to sdcard on physical G1 device

2009-09-09 Thread androiduser mobile
I got it working with a permission change in the manifest file. I added "WRITE_EXTERNAL_STORAGE" and it worked like a gem :)). On Sep 9, 12:13 pm, Chris Stratton wrote: > On Jul 17, 6:24 pm, doubleminus wrote: > > > Is it a permissions issue?  Trying to "touch" the sdcard via adb shell > > giv

[android-developers] Re: Unable to write text file to sdcard on physical G1 device

2009-09-09 Thread Chris Stratton
On Jul 17, 6:24 pm, doubleminus wrote: > Is it a permissions issue?  Trying to "touch" the sdcard via adb shell > gives me a "permission denied" message... FYI there's no "touch" command in the shell or /system/bin and the shell apparently considers "permission denied" to be a good substitute fo

[android-developers] Re: Unable to write text file to sdcard on physical G1 device

2009-09-09 Thread androiduser mobile
Hi doubleminus, Did you resolve this issue? Can you please provide me the solution. I am stuck with this issue. Thanks, Android user On Aug 17, 7:15 am, Dany BREARD wrote: > Hi > > I have the same issue but I can't change my /sdcard permission. > > I have windows xp, I try to change /sdcard

[android-developers] Re: Unable to write text file to sdcard on physical G1 device

2009-08-17 Thread Dany BREARD
gt; > > file_name); > > > > > > On Jul 13, 3:02 pm, Streets Of Boston wrote: > > > > > > > Simple. :-) > > > > > > The error says that the file does not exist... that means you should > > > > > > create it. > > >

[android-developers] Re: Unable to write text file to sdcard on physical G1 device

2009-08-05 Thread Kaj Bjurman
ng file1 after that line. You are > > > > > > > using > > > > > > > file_name. > > > > > > > > On 14 Juli, 18:09, doubleminus wrote: > > > > > > > > > Isn't that what the first lines of code do? > >

[android-developers] Re: Unable to write text file to sdcard on physical G1 device

2009-08-04 Thread doubleminus
ectory(), > > > > > > > file_name); > > > > > > > > On Jul 13, 3:02 pm, Streets Of Boston > > > > > > > wrote: > > > > > > > > > Simple. :-) > > > > > > > > The er

[android-developers] Re: Unable to write text file to sdcard on physical G1 device

2009-07-29 Thread doubleminus
; On Jul 13, 3:02 pm, Streets Of Boston > > > > > > wrote: > > > > > > > > Simple. :-) > > > > > > > The error says that the file does not exist... that means you > > > > > > > should > > > > > >

[android-developers] Re: Unable to write text file to sdcard on physical G1 device

2009-07-26 Thread doubleminus
gt; file_name); > > > > > > On Jul 13, 3:02 pm, Streets Of Boston wrote: > > > > > > > Simple. :-) > > > > > > The error says that the file does not exist... that means you should > > > > > > create it. > > > > > &

[android-developers] Re: Unable to write text file to sdcard on physical G1 device

2009-07-17 Thread ekwang
2 pm, Streets Of Boston wrote: > > > > > > Simple. :-) > > > > > The error says that the file does not exist... that means you should > > > > > create it. > > > > > Use File#createNewFile(). > > > > > > On Jul 13, 5:53 pm, d

[android-developers] Re: Unable to write text file to sdcard on physical G1 device

2009-07-17 Thread Mark Murphy
doubleminus wrote: > Is it a permissions issue? Trying to "touch" the sdcard via adb shell > gives me a "permission denied" message... Is this the emulator, or a device? If it is the emulator, do you have an SD card image attached to the emulator? By default, the emulator has no SD card image.

[android-developers] Re: Unable to write text file to sdcard on physical G1 device

2009-07-17 Thread doubleminus
t; On Jul 13, 5:53 pm, doubleminus wrote: > > > > > > Romain is? I don't understand. Is there something I should be doing > > > > > to avoid filenotfound exception? > > > > > > On Jul 13, 12:40 am, 郑伟 wrote: > > > > > > > You are

[android-developers] Re: Unable to write text file to sdcard on physical G1 device

2009-07-16 Thread doubleminus
omain is? I don't understand. Is there something I should be doing > > > > to avoid filenotfound exception? > > > > > On Jul 13, 12:40 am, 郑伟 wrote: > > > > > > You are right... > > > > > > > Date: Sun, 12 Ju

[android-developers] Re: Unable to write text file to sdcard on physical G1 device

2009-07-16 Thread Kaj Bjurman
don't understand. Is there something I should be doing > > > to avoid filenotfound exception? > > > > On Jul 13, 12:40 am, 郑伟 wrote: > > > > > You are right... > > > > > > Date: Sun, 12 Jul 2009 21:29:28 -0700 > > > > > Subjec

[android-developers] Re: Unable to write text file to sdcard on physical G1 device

2009-07-16 Thread Kaj Bjurman
u are right... > > > > Date: Sun, 12 Jul 2009 21:29:28 -0700 > > > Subject: [android-developers] Re: Unable to write text file to sdcard on > > > physical G1 device > > > From: romain...@google.com > > > To: android-developers@googlegroups.com >

[android-developers] Re: Unable to write text file to sdcard on physical G1 device

2009-07-15 Thread Mark Murphy
doubleminus wrote: > Anyone?? > > On Jul 14, 9:09 am, doubleminus wrote: >> Isn't that what the first lines of code do? >> >> File file1 = new File(Environment.getExternalStorageDirectory(), >> file_name); No. That statement create a Java object, in memory, and does not affect the file system a

[android-developers] Re: Unable to write text file to sdcard on physical G1 device

2009-07-15 Thread doubleminus
oid filenotfound exception? > > > > On Jul 13, 12:40 am, 郑伟 wrote: > > > > > You are right... > > > > > > Date: Sun, 12 Jul 2009 21:29:28 -0700 > > > > > Subject: [android-developers] Re: Unable to write text file to sdcard > &g

[android-developers] Re: Unable to write text file to sdcard on physical G1 device

2009-07-14 Thread doubleminus
; > > > > Date: Sun, 12 Jul 2009 21:29:28 -0700 > > > > Subject: [android-developers] Re: Unable to write text file to sdcard > > > > on physical G1 device > > > > From: romain...@google.com > > > > To: android-developers@googlegroups.co

[android-developers] Re: Unable to write text file to sdcard on physical G1 device

2009-07-13 Thread Streets Of Boston
13, 12:40 am, 郑伟 wrote: > > > > > You are right... > > > > Date: Sun, 12 Jul 2009 21:29:28 -0700 > > > Subject: [android-developers] Re: Unable to write text file to sdcard on > > > physical G1 device > > > From: romain...@google.com >

[android-developers] Re: Unable to write text file to sdcard on physical G1 device

2009-07-13 Thread doubleminus
Romain is? I don't understand. Is there something I should be doing to avoid filenotfound exception? On Jul 13, 12:40 am, 郑伟 wrote: > You are right... > > > > > > > Date: Sun, 12 Jul 2009 21:29:28 -0700 > > Subject: [android-developers] Re: Unable to write te

[android-developers] Re: Unable to write text file to sdcard on physical G1 device

2009-07-13 Thread 郑伟
You are right... > Date: Sun, 12 Jul 2009 21:29:28 -0700 > Subject: [android-developers] Re: Unable to write text file to sdcard on > physical G1 device > From: romain...@google.com > To: android-developers@googlegroups.com > > > Hi, > > Instead of: &g

[android-developers] Re: Unable to write text file to sdcard on physical G1 device

2009-07-13 Thread doubleminus
Hmm, this change causes the code to throw an exception (filenotfound). Is there something else I should do/change in addition to this? On Jul 12, 9:29 pm, Romain Guy wrote: > Hi, > > Instead of: > > > FileOutputStream file_out = openFileOutput > > (file_name,MODE_WORLD_READABLE); > > Just use: >

[android-developers] Re: Unable to write text file to sdcard on physical G1 device

2009-07-12 Thread Romain Guy
Hi, Instead of: > FileOutputStream file_out = openFileOutput > (file_name,MODE_WORLD_READABLE); Just use: FileOutputStream file_out = new FileOutputStream(file_name); This should work. On Sun, Jul 12, 2009 at 8:10 PM, doubleminus wrote: > > I need to write a fairly simple .csv file to the de