Help and advise asked for Mileage app by beginner (Android)

The reason I ended up here is that I used to send my rides to myself via whatsapp and then later processed them in excel.
I thought that should be easier and maybe it is possible to write an app for that myself.
What I am trying to accomplish is that I open an app, then see four text input fields, with current location, current mileage, destination and reason. And then a save button that writes the text in the fields to a cvs file or a local database which I can later export and import into the target Excel. That target excel has 5 columns: time of day, current location, current mileage, destination and reason.
Now I have been doing some work, but am now stumbling and wondering if I am on the right track. Ideally I would like to have the last 4 lines written away also in the screen.in some kind of log screen or something.

Is this doable with this platform and if so, what would be the right way in terms of writing away to a csv file, TinyDB or something else?

Any help is appreciated and kind regards,
Sjoerd

Welcome Sjoerd.

Yes.

Right way? There are several acceptable ways depending on where time of day, current location, current mileage, destination and reason come from. If they are all items the user inputs, it would be easy. I would use a List of Lists stored with a date Tag.

Here is some code you could adapt to your purposes perhaps Simple addresses on global tinydb - #4 by dora_paz

To store only on your phone, a TinyDB is a good choice. You can also store to an online database like a GoogleSheet, FirebaseDB, CloudDB etc at increasing coding complexity.

1 Like

Hi Steve,

Thank you for your reply!

It will be only user input and local file/db on my phone. My intention is to export it somehow and then import it into the right excel.

That you for your tip code, will look into it :)!

Kind regards,
Sjoerd

1 Like

Something similar to this incomplete app


is possible.

Good luck with your Project. If having issues, ask again. :wink: Someone will provide specific advice.

1 Like

Again thank you!
That looks exactly what i am looking for actually. Is this a project or can i read somewhere more on it?

Kind regards!
Sjoerd

This is were a am now:
image

Yes, an unfinished project without only some of the error control that should be there implemented.

your email address goes in the textbox that is greened out. Used to send an email to yourself with the CSV table.

You can adapt and build this to your needs.

1 Like

Hi Steve,

Wow! Look very promising, thank you very much! Looks its yours?
What is the unfinished part if i may ask?

Kind regards,
Sjoerd

  • ability to modify/edit existing items
  • ability to delete existing items
  • error control. There is some error control but it could use more If the user does unexpected things it may crash.
  • do something with 'older' entries
  • transfer csv to a GoogleSpreadsheet (Excel 'equivalent'
  • make it look pretty :wink:
  • make it do exactly what the user wants to do
  • etc.

Yes The code is an adaptation of Dora's nice TinyDB address app (link previously posted) Almost completely redone.

1 Like