Skip to first unread message

abhishek prasadshaw

unread,
Sep 14, 2015, 5:58:13 AM9/14/15
to MIT App Inventor Forum
recently i have develop an app using app inventor for my company which allows to log in and then perform some action.but user name and password saving is not enabled.it means everytime when i open the app i have enter my log in details again. So can anyone suggest me what blocks i have to add more so that it will save my login details.please help me out.

Italo

unread,
Sep 14, 2015, 8:59:15 AM9/14/15
to MIT App Inventor Forum
How do you do the login process? Is it just inside the app or you use an external service?

abhishek prasadshaw

unread,
Sep 14, 2015, 11:26:41 AM9/14/15
to MIT App Inventor Forum
on clicking the app it will display the home page. From there log in option..

Italo

unread,
Sep 14, 2015, 11:33:46 AM9/14/15
to MIT App Inventor Forum
So I assume that you are not using a a web service to log in. It's just a login screen in your app.
Then accept the password, validate it and in a TinyDB save the username and a tag named "status" with "logged in" value.
The next time the app is opened, check the TinyDB first. If the tag "status" says "logged in", don't make the user login.
If the user log out, then delete the user tag and set the tag "status" to "logged out".

Is that what you need?

abhishek prasadshaw

unread,
Sep 14, 2015, 1:30:04 PM9/14/15
to MIT App Inventor Forum
no friend...ok let me be more specific. If am using facebook app it will redirect me to login page where i will enter my log in details, then it ask for saving username and password. Like that i want.

Italo

unread,
Sep 14, 2015, 1:53:03 PM9/14/15
to mitappinv...@googlegroups.com
Well, using what I explained before, just add a checkbox to save the info typed in the login screen. If the checkbox is checked, save the login info (username and password entered) in a TinyDB.
Next time, when the app starts, check if there's any user info saved in the TinyDB. If there is, populate the username textbox and the password textbox with what you have saved.
Then let the user press the login button or change the login info at will.

But I'm still not sure if I understand your question.
Reply all
Reply to author
Forward
0 new messages