new to android and need help (writing data to file, timer)

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

new to android and need help (writing data to file, timer)

Postby Nara » Fri Feb 25, 2011 9:39 pm

Hello :)

I am an absolute beginner with android, just got my smart smartphone two weeks ago and have never dealt with android before. I have been playing around a little with Eclipse (+ that android plugin) for a couple of days, read and watched some tutorials. I also have some fair experience with flash actionscript and I am a quick learner, so I probably just need a little push in the right direction from you experts. :D

I will try to explain what I want to do:

I want to use my application for scientific observations. The app will have three activities, the initial activity has two buttons linking to the other two activities. The linking works well so far...
On the first activity I want the user to fill in various text data (name, location, starting time etc.). I have an EditText field for each data. Before the second activity is launched by a button, I would like to save all the input EditText data to a file on the phone/SD-card (preferrable as *.txt). I don't know how! I have been looking for tutorials and hints around the web - to no success... Any ideas?

On the second activity I also need help, even more than on the first one. Here I'll have 10 buttons, each button stands for a different observed behavior. The user simply clicks the observed behavior. The observation interval is one minute, that means after one minute I want to save all the observations that were observed in the past 60 seconds and add those information to the file on the phone/SD-card. In minute 2 I then want to start all over with this and I want to continue for 30 minutes.
So what I need here are 10 buttons with a unique ID and a 60-seconds timer that loops for 29 times. Before each loop the timer then writes to a file which button has been clicked in the past 60 seconds. Any ideas?

The txt-file that remains from all this should contain the data from the first activity (name, location, starting time etc.) and the observed behaviors for each of the 30 minutes.

I hope someone can help me please ... just the names of methods or procedures that may help me and are worth researching could be very useful already.

Thanks a lot in advance :)
Nara
Freshman
Freshman
 
Posts: 2
Joined: Fri Feb 25, 2011 9:28 pm

Top

Re: new to android and need help (writing data to file, time

Postby lockon_stratos » Wed Mar 16, 2011 5:52 am

Hi,

I think this article will help you http://developer.android.com/guide/topi ... orage.html.
Lets go to snipe!
User avatar
lockon_stratos
Freshman
Freshman
 
Posts: 7
Joined: Wed Mar 16, 2011 5:00 am

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: Google Feedfetcher, MSNbot Media and 28 guests