Write data in raw folder's file. Programatically

Problems with WiFi, SQLite ,Bluetooth, WiMax, Proxies, etc...

Write data in raw folder's file. Programatically

Postby kartik_saltriver » Mon Apr 13, 2009 5:31 am

Hello,

My application has requirements to write and edit the data in the file which is in raw folder of application. Is it possible
?
kartik_saltriver
Freshman
Freshman
 
Posts: 7
Joined: Wed Apr 01, 2009 5:50 am

Top

Postby stifry » Mon Apr 13, 2009 4:44 pm

Yes, you can do this:

Code: Select all
File xlsxFile = new File(Environment.getExternalStorageDirectory(),"session.xlsx");
            xlsxFile.createNewFile();  //writes to the top level of the SD card
.
.
//do some writing to the file


To access the file again, you can use:
Code: Select all
Uri.parse("file://"+Environment.getExternalStorageDirectory()+"/session.xlsx")
Visit Trackaroo.com!
Trackmaster - Motorsports Lap Timer
Dynomaster - Performance Dyno
Image Image
User avatar
stifry
Developer
Developer
 
Posts: 46
Joined: Tue Feb 17, 2009 7:50 pm

Top

Return to Networking & Database Problems

Who is online

Users browsing this forum: No registered users and 5 guests