I'm working on a hobby project, but I've recently thought about another side project designed to solve an actual problem I encounter at work:

I have to record numerous variables (of different types) in a particular order every day, then review these variables as I enter them into a computer system. These variables are taken outside in sometimes-extreme conditions. I'd like to record them on my phone with an interface that's simple and easy to use even when your fingers are cold and not very precise. As these variables can change from job to job, I'd also like to be able to modify the description and type of the variables via manipulation of a simple data file.

Almost all the variables are numerical; a few are floats, a few are booleans. None of them are strings. What I'm trying to build, then, is a program that takes a simple data file and uses it to build a simple interface that presents a description of a value and accepts either a numerical or boolean input (based on the value type), and also allows you to skip backward or forward across the values. Finally, it needs to let you review your values in a clean, readable way before clearing them out.

I know Python. I'd like to program this for Android. How challenging does this sound? How much time would you expect to spend on it? It's for private use, not public use, so it doesn't need to be sleek or professional, just functional. I have no experience with kivy, but I'm thinking of going with it because it claims to solve a lot of the gui stuff for me. If someone has a better solution, though, I'd appreciate it!

I don't know Kivy, so if you decide to try it, I'd like to hear what you think.

Another possible, though not necessarily better, solution that allows you to at least partly work with Python, is to create a web application. You do the server part in Python and the client part in HTML (probably with some JavaScript). In the latter, you benefit from the fact that HTML and JavaScript are basically made for GUIs, and there also exist many convenience tools. You might get some additional benefit from this option by being able to send the data to the server and getting them into the target system from there (copy-paste?). Of course, this hinges on your phone as well as the target computer system being able to connect to the internet at some point.

Another possibility is to just create the GUI you want in HTML+JavaScript, without creating a server backend. You need an internet connection to load the page on your phone, but after that it is functionally equivalent to a GUI app.

Another possibility is to actually create a native app. That means learning Java, but I think you will manage that.

I have QPython3 on an(other) Android tablet. Underused, in my case, but if that's something that you could try (checks your Python and Android boxes, obviously) then...

You might be able to use actual HTML for your text-data-file of "what and what type fields/inputs" to present, per your instantaneous requirements, but if it can get boiled down sufficiently to a far simpler pseudo-markup of your devising (and the Python/whatever script to upconvert this markup into a GUI interface also being at least partially of your devising) then you might have a handy little interface on your hands.

I've done similar in Perl, with config-file lines such as "Numeric Value: %VALUE:INTEGER:Number1:MIN=-50:MAX=+100:DEFAULT=25% %NEWLINE% Yes? %TICKBOX:BOOLEAN:Check1:DEFAULTTICKED%" dictating a label and input pairing on each of two lines, in a long-winded but very versatile way, that would ultimately allow the input into (and thence saving off into a logging file, as per further %TAGGING%) variables "Number1" and "Check1".

But that was a rather unwieldy method, driven by both complex requirements at the time and imaginative extrapolations of what later extensibility might be required. It could possibly just as easily boil down to something (X)(HT)MLish and forgo the personal imagination dimension whilst taking advantage of common pre-written library functions.

Sorry, got a bit technical. But food for thought, if you understood me?

Jplus wrote:Another possible, though not necessarily better, solution that allows you to at least partly work with Python, is to create a web application. You do the server part in Python and the client part in HTML (probably with some JavaScript). In the latter, you benefit from the fact that HTML and JavaScript are basically made for GUIs, and there also exist many convenience tools. You might get some additional benefit from this option by being able to send the data to the server and getting them into the target system from there (copy-paste?). Of course, this hinges on your phone as well as the target computer system being able to connect to the internet at some point.

Years ago, I used the Google App Engine for a similar kind of miniature project. This might be a good fit for Hippo, though you might know better alternatives.

It was free for small use, you don't have to know much about setting up a server, you can use python for it. It has authentication (which I presume would work good with an android phone account, though I never tried). It sends and receives emails though gmail, which might be the easiest way to get data out. There's a "guestbook" tutorial that somewhat resembles Hippo's case.

Jplus wrote:Another possibility is to just create the GUI you want in HTML+JavaScript, without creating a server backend. You need an internet connection to load the page on your phone, but after that it is functionally equivalent to a GUI app.

You can simply save the files to your phone and open them there. (It would still allow for a "send to server" button, which is especially easy with the use of a <form> and <input> tags. But automating the "enter them into a computer system" step is a second-order problem.)I think localStorage works fine for pages with file:// URIs too, so you can save* the data in there to make sure you don't lose it at a page reload.

And of course with *ahum* jQuery there are tons of plugins to have a big virtual keypad, previous and next buttons, checking the values you input and whatnot.*I mean add a jQuery plugin that automatically scans all input fields and saves them to localStorage at every change (and loads it at every page load, including a sanity check that the form hasn't changed). I'm confident someone has made that into a jQuery plugin already.

The Great Hippo wrote:I'd like to record them on my phone with an interface that's simple and easy to use even when your fingers are cold and not very precise.

How do you feel about voice control? With a clearly defined input vocabulary (10 digits, dot, true, false, ...) it should be easy to train for maximum precision. Unless the "extreme conditions" include loud noises?

For a simple GUI, going pure html, or python, or native java is merely a matter of familiarity and portability. For voice recognition, you need something native to include voice recognition software.

I think localStorage works fine for pages with file:// URIs too

IIRC localstorage for file:// is not standardized and the implementation differs between browsers and even between browser versions. It's difficult to find a sensible definition of the same-origin-policy for file://.

IIRC localstorage for file:// is not standardized and the implementation differs between browsers and even between browser versions. It's difficult to find a sensible definition of the same-origin-policy for file://.

As long as it's one page (inlining the javascript code that handles the localstorage, just to be sure) and the file isn't renamed or relocated, all browsers should agree it's the same local storage no matter how often you reopen the page.

Your mistake is to assume that all programmers make decisions you would consider sensible.

I've seen browsers who refuse localStorage on file urls. I've seen browsers who offer localStorage, but don't persist the data for file urls. I've seen browsers who do as you suggest. I'm sure there is a browser somewhere that does something completely different.

What I'm saying is: before you rely on it in a project, test the browser(s) you're going to support.

Zamfir wrote:Years ago, I used the Google App Engine for a similar kind of miniature project. This might be a good fit for Hippo, though you might know better alternatives.

It was free for small use, you don't have to know much about setting up a server, you can use python for it. It has authentication (which I presume would work good with an android phone account, though I never tried). It sends and receives emails though gmail, which might be the easiest way to get data out. There's a "guestbook" tutorial that somewhat resembles Hippo's case.

I agree with this suggestion. I do know an alternative, but it's a bit different and it isn't necessarily better: PythonAnywhere.

I'm sorry for not replying to this thread for a bit; unexpected events at work have led to back-to-back twelve hour shifts for the near foreseeable future. I've been wrangling a lot of responsibilities and mostly just working, eating, bathing, and sleeping.

(Nothing terrible, mind you -- just a tremendous amount of work to do!)

Zamfir wrote:

Spoiler:

I made a sketchy but working version, client-side javascript only. Do you want it, or do you want to puzzle it out as project?

Thank you! I'd love to have it; at the very least, I can get a glimpse of what you did and try to replicate it (and at the most, I have an immediate working solution!).

(Also thank you to everyone else who replied; I will read this thread over again when I have time!)

Hmm, it really depends on your motivation and how much work you put in. If you're commited, you can learn in a few weeks how to code an app like the one you described. Take a look at this guide for which coding langauge you should consider learning. At the end of the day, the most important element is your attitude to be honest.