Fusiontables doesn't like incorrect time

172 views
Skip to first unread message

Mr Didu

unread,
Aug 11, 2016, 3:05:25 PM8/11/16
to MIT App Inventor Forum
Hi,

I am working on a restaurant order app. Of course it is very much time dependent. For example customer should not be able to order in the system after 7pm. The issue is, when somebody has deliberately or by ignorance doesn't have their phone time set correctly and the time is set in the past the Fusiontables throws a 2601 error after query. 

Is there any way to get the real time and warn the user about the incorrect time setting?

Thanks!

Taifun

unread,
Aug 11, 2016, 4:26:48 PM8/11/16
to MIT App Inventor Forum
well, for the fusiontable actually it doesn't matter, which time will be supplied, you also could send an order in the middle of the night... the fusiontable works 24 hours a day...;-)
so the question is, why do you get that error?

It would really help if you provided a screenshot of your relevant blocks, so we can see what you are trying to do, and where the problem may be.

Taifun

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



Mr Didu

unread,
Aug 12, 2016, 2:47:14 AM8/12/16
to MIT App Inventor Forum
Hi,

Here are the blocks from my "feature testing" app:

I use the Service account method, the p12 is defined in the designer window. Of course table url, id and account email are filled and i repeat, i only get this message when i deliberately set the time into the past on my phone. Here is the error message in that case:


Thanks!


Taifun

unread,
Aug 12, 2016, 9:37:45 AM8/12/16
to MIT App Inventor Forum
just catch that error message and display a nice message instead like "please correct your date/time settings"

Mr Didu

unread,
Aug 12, 2016, 11:23:09 AM8/12/16
to MIT App Inventor Forum
Hi,

That begs the question, how do i "catch that error message". :)

Thanks!

Taifun

unread,
Aug 12, 2016, 11:41:31 AM8/12/16
to MIT App Inventor Forum
see also the Pizza Party tutorial how to do error handling...

in the FusiontablesControls.GotResult event
if contains get result 
                "Invalid JWT"     
then display your nice error message
else do your processing

Taifun

Mr Didu

unread,
Aug 12, 2016, 11:48:21 AM8/12/16
to MIT App Inventor Forum
Hi,

Thanks!

Mr Didu

unread,
Aug 12, 2016, 2:20:35 PM8/12/16
to MIT App Inventor Forum
Hi,

Back again.. I got the FusiontablesControls.GotResult event handled so that i can display a message in case of this error.
BUT it seems the built in error message still shows (see above screenshot), overlaying my "nice message". I can of course dismiss it, but it is not very user friendly.. Any thoughts?

Thanks!

Taifun

unread,
Aug 12, 2016, 2:39:19 PM8/12/16
to MIT App Inventor Forum
It would really help if you provided a screenshot of your relevant blocks, so we can see what you are trying to do, and where the problem may be.

Mr Didu

unread,
Aug 12, 2016, 2:57:30 PM8/12/16
to MIT App Inventor Forum
Here are the relevant blocks from my test app:


Taifun

unread,
Aug 12, 2016, 3:19:54 PM8/12/16
to MIT App Inventor Forum
it seems to be, the fusiontable control component now also uses additionally the Screen.ErrorOccured event to display the error message...
to ignore that message, just drag an empty Screen.ErrorOccured event into the working space
Taifun

Mr Didu

unread,
Aug 12, 2016, 3:37:18 PM8/12/16
to MIT App Inventor Forum
Indeed! This is a solution :)

Massive thanks. Now onto that stubborn image size issue...
Reply all
Reply to author
Forward
0 new messages