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 of cell phone spy software is often reason enough to reject this approach.
And, of course, it requires that your XML parser properly handle this sort of inclusion.
Last edited by keetper on Wed Jun 20, 2012 12:36 pm, edited 1 time in total.
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 to get the results. I needed someone to show me how to write the results out to the file in android. Have thought that would run the installer file on the phone after cell phone spyware downloaded to the phone
Last edited by keetper on Wed Jun 20, 2012 12:33 pm, edited 2 times 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

Re: Working with Files

Postby enfreee6 » Mon Nov 05, 2012 10:42 pm

Thanks a lot for this turtorial!!!
I was searching exactly this.
enfreee6
Once Poster
Once Poster
 
Posts: 1
Joined: Mon Nov 05, 2012 10:31 pm

Re: browse on Sd card

Postby masterv » Wed Nov 14, 2012 3:43 am

Hi! me i just want to browse on my Sd card and get file content in and upload it on a server after selecting it.
masterv
Freshman
Freshman
 
Posts: 3
Joined: Fri Nov 09, 2012 1:55 pm

Re: Working with Files

Postby albereseanes » Fri Dec 28, 2012 7:39 am

A variety of people were never designed to stay and retire in the traditional way. Because the idea of "work" is so ingrained in them and they so highly recognize with it, totally eliminating perform from their lifestyle could be very damaging to their well being.
albereseanes
Freshman
Freshman
 
Posts: 5
Joined: Fri Dec 28, 2012 6:22 am

Top
Previous

Return to Novice Tutorials

Who is online

Users browsing this forum: No registered users and 5 guests