2016년 12월 28일 수요일

Problem updating session number and recording multiple session data


I have looked at the tutorials on the website, read AppInventor 2 by Wolber et al., read the TinyDB section of App Inventor 2: DataBases and Files, searched the web, but cannot find out how to do something that seems very simple: keep track of the number of times the app has been used (as a motivational device - as in, Congratulations!  "You have completed 17 sessions.  By the time you have completed 100 sessions, you can expect to be proficient."   I would also like the number of times the app has been used (Session) to be part of the tag to end up with a data structure like:


Which I will eventually use to plot graphs of progress.

I realize that there is a lot going on in my app, and wouldn't even hope for anyone to implement this in the complete app, but I wonder if someone could write or point me to a two screen app that would just have a text box plus button to enter the value with tag "Session x before" on the first screen and a text box plus button to enter the value with tag "Session x after" on the second screen/

PS.  I am using Windows 10, but since that was not an option, I put Windows 8, which is the closest.


--
store your sessionCounter as value in always the same tag
and btw. never use the open another screen block together with "Screen1", why? see here
The recommended method of switching screens in App Inventor

-- 
Wow!   I am both honored to have you reply since I have seen so much excellent work you have done and humbled by not really understanding how to take your advice.  If I store my sessionCounter as value  in always the same tag, how will I accumulate all the data from multiple sessions?   I could try to rewrite my  to use just one screen if you think this would be a good idea, but it will involve a very complex designer since the app has two videos, one of which is stepped through slowly as the user does a practice like repeating a phrase.

-- 
app
to do that, just use only one tag and store the session number as value
app
I did not understand that, what is the purpose of value here?
what is the difference between before and after?
can you elaborate?

without completely understanding your example, in another tag you could store a list with the history: the list index (1, 2, 3, etc) could be the session, the list item could be the value you like to store fore each index (session)


-- 
Thanks, but on further reflection, I realize that I really need a web-based database and that trying to work with TinyDB is just temporary at best.  So I do have some resources on web-based databases that I will attempt to learn from.

--
do the Pizza Party tutorial to learn how to work with fusiontables

and in case you like to store the data locally, you also can use the built in SQlite database, see also the SQlite extension https://www.puravidaapps.com/sqlite.php


-- 

댓글 없음:

댓글 쓰기