Skip to first unread message

VasilisMp

unread,
Apr 25, 2019, 5:17:47 AM4/25/19
to MIT App Inventor Forum
My previous question got answered https://groups.google.com/forum/#!category-topic/mitappinventortest/specific-programming-issue/windows-8/chrome/phonetablet-with-the-wifi/home-network/mit-appinventor-2/iOIM-eR5gGo, but another one arose. The login system works, i mean that all the values are succesfully stored on the lists but if i have 2 usernames on the list and 2 passwords i can login with any combination of these which i do not want. How could i solve it? 
(if you want more screenshots of the app tell me)
screen_continue.png
screen.png

TimAI2

unread,
Apr 25, 2019, 6:11:43 AM4/25/19
to MIT App Inventor Forum
Test for the value of name and password from the same index
Might be better to store names and passwords in one list (list of lists / table) so they are in alignment

VasilisMp

unread,
Apr 25, 2019, 9:28:38 AM4/25/19
to mitappinv...@googlegroups.com
Can you be more specific about the first? Could you, please, post a screenshot of the code? Because mine, if i do it right, does not work. It also causes an error.
issue.png
error.png

TimAI2

unread,
Apr 25, 2019, 9:47:28 AM4/25/19
to MIT App Inventor Forum
Can you please share your aia project file

VasilisMp

unread,
Apr 25, 2019, 11:44:30 AM4/25/19
to MIT App Inventor Forum
Here it is my friend.
PhoneCaller.aia

TimAI2

unread,
Apr 25, 2019, 12:51:48 PM4/25/19
to MIT App Inventor Forum
I will need to do a fair amount of reworking, you have multiple screen issues and also multiple "login process" issues
Hopefully I will have time this evening (UK time)

VasilisMp

unread,
Apr 25, 2019, 1:08:12 PM4/25/19
to MIT App Inventor Forum
Thanks you so much!

TimAI2

unread,
Apr 25, 2019, 5:45:09 PM4/25/19
to MIT App Inventor Forum
Hmmm, well it works, 292 blocks just to login. It is a bit long winded due to time constraints, debugging and trying to stick to your original design.
With a bit of extra work, this can be streamlined somewhat.

All done on a single screen, using 4 vertical arrangements

For development/debugging:
I added a back to Start routine when on the "App" page to start again
and a clear tinydb button

aia attached (recommended to start here, but see blocks below)

BLOCKS

blocksLoginMultiUserSingleScreen.png




LoginMultipleUsersSingleScreenv1.aia

VasilisMp

unread,
Apr 26, 2019, 3:03:12 AM4/26/19
to MIT App Inventor Forum
Thanks you, but for a reason google does not let me to download the .aia because it is dangerous. However, you can post the project on the app inventor gallery and then send me a link from there.

TimAI2

unread,
Apr 26, 2019, 4:39:36 AM4/26/19
to MIT App Inventor Forum
You should be able to override the dangerous part but here is gallery link

VasilisMp

unread,
Apr 26, 2019, 5:10:49 AM4/26/19
to MIT App Inventor Forum
Thanks a lot!

TimAI2

unread,
Apr 26, 2019, 6:10:05 AM4/26/19
to MIT App Inventor Forum
The only thing I didn't do is set a variable for "who is actually logged in"

Going forward you can share the tinydb data with the cloud, maintain it from there and re-up it to the app if you wish
Reply all
Reply to author
Forward
0 new messages