Working with Files

Basic Tutorials concerning: GUI, Views, Activites, XML, Layouts, Intents, ...

Re: Working with Files

Postby simros » Mon Mar 21, 2011 10:56 am

Hi,
I followed your tutorial on how to write a file and it works on my emulator. But when i install my app on my device (Samsung Galaxy Tab), and run it i can't find my file! I really can't figure out what's wrong.
I added this line to my manifest:
Code: Select all
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>

It still doesn't work. I also added the MODE_WORLD_READABLE. still nothing.
Having my minSdkVersion at 2 solves the problem, and the files is at my internal storage. But i need my minSdkVersion to at least 4 to get application running in full screen! But then i can't see/find my file - If it gets created? My guess is that the file doesn't even get created. It's killing me, i really need to get this working! :)
Hopefully, someone can help me? :)
simros
Freshman
Freshman
 
Posts: 2
Joined: Thu Mar 17, 2011 8:40 pm

Top

Re: Working with Files

Postby piyushangre » Fri Aug 19, 2011 10:27 am

how to append xml file in android??
piyushangre
Freshman
Freshman
 
Posts: 3
Joined: Tue Jan 25, 2011 8:03 am

Re: Working with Files

Postby keetper » Mon Oct 31, 2011 8:50 am

piyushangre wrote:how to append xml file in android??

You can have one XML file that has the outer tags, with a DTD that defines
and entity that references a second file that contains a sequence of XML
forms, and a reference to that entity between the outer tags.
The need for two files is often reason enough to reject this approach. And,
of course, it requires that your XML parser properly handle this sort of
inclusion.
keetper
Freshman
Freshman
 
Posts: 3
Joined: Mon Oct 31, 2011 8:47 am

Re: Working with Files

Postby keetper » Fri Nov 04, 2011 8:16 am

piyushangre wrote:how to append xml file in android??

i did try the osw.write() but i don't know how cell phone spy software to get the results. I needed someone to show me how to write the results out to the file in android.
Last edited by keetper on Tue Feb 07, 2012 7:53 am, edited 1 time in total.
keetper
Freshman
Freshman
 
Posts: 3
Joined: Mon Oct 31, 2011 8:47 am

Re: Working with Files

Postby karthikk » Wed Nov 23, 2011 1:09 pm

Hi,
I have successfully saved a downloaded file in the /data/data/PACKAGE_NAME/files/ folder. I hardcoded the path. It works fine on emulator. But does it work on even the real device? And also, how do I read the file back? Its a video .mp4 file.
Kindly help me out!
karthikk
Freshman
Freshman
 
Posts: 5
Joined: Wed Nov 16, 2011 8:05 am

Re: Working with Files

Postby emgainho » Fri Mar 02, 2012 10:09 am

I also implemented that on my Samsung Galaxy Tab.

But when I used Files, I can not find /data/data/ folder.

Can you help me?
emgainho
Junior Developer
Junior Developer
 
Posts: 20
Joined: Thu Aug 19, 2010 1:45 pm

Top
Previous

Return to Novice Tutorials

Who is online

Users browsing this forum: MickeyMazariegos and 5 guests