RE: Have an error problem

Evening hope you can help me

I am trying to create an app that collects data from different buttons. The cycle starts with buttons numbered C1 to C10. These buttons have a timestamp added to them. Once you select one of the button example C3. It closes the screen and gives you a number of buttons marked animals, humans, and vehicles. You click on animals and then it closes the screen and takes you to the next screen where you select a cat. Once the cycle is completed it stores the data or button information in a note pad. In the note pad, you click add and the cycle is added to the list and this is an example of what the cycle should look like in the note pad.
C1 Time 01h41 cat
C3 Time 01h50 Buck

The error appears when I click add on the notepad once I completed the cycle.
The second problem is all the data does not go to the notepad and only the button cat appears in the notepad

Runtime Error

The operation add items to list cannot accept the arguments: , [java.util.GregorianCalendar[time=1616622307889,areFieldsSet=true,lenient=true,zone=org.apache.harmony.luni.internal.util.ZoneInfo["SAST",mRawOffset=7200000,mUseDst=false],firstDayOfWeek=1,minimalDaysInFirstWeek=4,ERA==1,YEAR==2021,MONTH==2,WEEK_OF_YEAR==12,WEEK_OF_MONTH==4,DAY_OF_MONTH==24,DAY_OF_YEAR==83,DAY_OF_WEEK==4,DAY_OF_WEEK_IN_MONTH==4,AM_PM==1,HOUR==11,HOUR_OF_DAY=23,MINUTE==45,SECOND==7,MILLISECOND==889,ZONE_OFFSET==7200000,DST_OFFSET==0]], ["Cat"]
Note: You will not see another error reported for 5 seconds.

I can't figure this out and I not sure which blocks or code to use to make my app work. I hope you can help me
VertualScreens.aia (205.8 KB)

somewhere in your blocks you are using an add items to list block together with an instant as list...
an instant can't be a list...
unfortunately your screenshot does not help very much...


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by icon24 Taifun.

This is wrong.

What test do you want to apply to global list?

  • is it empty?
  • Is it nonempty?
  • does it contain whatever you are thinking of but didn't bother to code yet?

And how would you expect it to hold anything different from what you initialize it to in this screen, if you are testing it in the Screen Initialize event before this screen has a chance to change its value?

By the way, don't open Screen1 from Screen2. It will eventually deplete your RAM.

You are basically coding a logger to TinyDB.

Here is a simple sample:

You can extend its entries with your button contents using a text JOIN block.

I forgot to mention this in my prior posts ...

You need to get clear on what you are using as TinyDB tags, and how the tags will support
data collection for whatever reports you plan on running.

I imagine you will be running this app over days, weeks, months.
Yet I don't see where you mention the date in your data items or in the tag(s) holding them.

Do you plan on summarizing the items by event type (human/animal) or by day/week/month?

What are your planned limits for data retention?

Thank you for your reply!
I am not sure what you mean when you say I need to get clear on what I am using as TinyDb tags, and how the tags will support data collection. If I understand this correctly with tags is that every button or item I want to use for data should then be identified. An example is that C 1 tag must be Identified as C 1 and Cat tag must be identified.
(I imagine you will be running this app over days, weeks, months.
Yet I don't see where you mention the date in your data items or in the tag(s) holding them)
The app will only run for a duration of a day or for a shift. At the end of the day, the data collected will be sent via a message and will then be cleared for the next day's shift.
The event type when clicking on that will give you a choice to select an event like animals, humans,s and so forth but only for a day.
My planned limit for data retention is a max of 100 entries. Wich is sometimes not even close to 50 enties VertualScreens.aia (205.8 KB)
I added my aia file
I hope you can help

It looks like you just overwrite your TinyDB tag.

so, it only store the last data.
In order to solve that, you need to add additional ID to add unique value to your TinyDB tag.
Something like this:

What kind of message?

  • SMS?
  • Email?
  • shared onlline database?

Hi it will be sent as a text

I must confess I have not used the SMS text component myself.
(I mostly use the emulator, and none of my Android devices passed carrier setup.)
But I have heard that the total length of a SMS text is limitted to only 160 characters.
Are you sure an entire day's log can fit into that?

I gave great thought to your question and found a tutorial that links WhatsApp in place of an SMS text message.
At this moment my greatest achievement would be to get the data string right and working.

So the next question is the Whatsapp API?

I am not sure the tutorial I followed used whatsapp but not sure if it was Whatsapp API... Sorry, can't really give you a straight answer to your question...