How to create new files in assets folder

Put your problem here if it does not fit any of the other categories.

How to create new files in assets folder

Postby aglesteban » Sun Dec 14, 2008 2:03 pm

Hi. I would like to know if it's possible to create a file in the assets folder.
I have a program that needs to create files, and I don't know where can I save those files, I was thinking in the assets folder.

Thank you for your help.
aglesteban
Experienced Developer
Experienced Developer
 
Posts: 51
Joined: Fri Nov 21, 2008 5:11 pm

Top

Postby MrSnowflake » Sun Dec 14, 2008 3:09 pm

You can just create files locally to your app.
User avatar
MrSnowflake
Moderator
Moderator
 
Posts: 1439
Joined: Sat Feb 16, 2008 3:11 pm
Location: Flanders, Belgium

Postby aglesteban » Sun Dec 14, 2008 3:38 pm

In the program I have. I need to create some txt files for logs, so, you mean I can not do that, right?
damn it!,
But thank you for your help.
aglesteban
Experienced Developer
Experienced Developer
 
Posts: 51
Joined: Fri Nov 21, 2008 5:11 pm

Postby MrSnowflake » Sun Dec 14, 2008 4:06 pm

Maybe you should reread what I said: You CAN create files locally to your application, you shouldn't create them in the assets folder, as that is reserved (somewhat) for the assets in the apk.
User avatar
MrSnowflake
Moderator
Moderator
 
Posts: 1439
Joined: Sat Feb 16, 2008 3:11 pm
Location: Flanders, Belgium

Postby aglesteban » Sun Dec 14, 2008 4:22 pm

I see. Maybe I misunderstood.
Do you know where can I find some good information about creating files locally to my application?
I have no idea how to work with them. I was looking for some way to just send the path to those files and work with them, but I read something about putting them in the assets folder, and also about using res folder and raw folder.

Thank you for your time.
aglesteban
Experienced Developer
Experienced Developer
 
Posts: 51
Joined: Fri Nov 21, 2008 5:11 pm

Postby MrSnowflake » Sun Dec 14, 2008 4:36 pm

Learn how to do files in Java. Also, there's a tutorial on files here on the forum somewhere.
User avatar
MrSnowflake
Moderator
Moderator
 
Posts: 1439
Joined: Sat Feb 16, 2008 3:11 pm
Location: Flanders, Belgium

Top

Postby aglesteban » Sun Dec 14, 2008 5:06 pm

Yeap, I know how to create files in java, I just don't understand how to create files with android, I mean, i don't know where can I create them, how can I use them and the path for finding them.
I already have done the program I wanna integrate in android, and it works fine, but now I wanna use it in android, so the path I have to give it with the files I have, it's not working.

thanks a lot for replying to me so soon MrSnowflake.
aglesteban
Experienced Developer
Experienced Developer
 
Posts: 51
Joined: Fri Nov 21, 2008 5:11 pm

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: No registered users and 13 guests