Page 1 of 1

Redirect to appery before the correct page

Posted: Wed Jan 08, 2014 11:37 am
by dionisis pot

I created a mobile application that the user goes from one page to another page through login via facebook account. The problem is that the first time that you install the application in the mobile then when you complete successful the login thru fb then ask login to appery in order to redirect to the correct page from application.
Can you please help me?


Redirect to appery before the correct page

Posted: Wed Jan 08, 2014 1:15 pm
by Kateryna Grynko

Hi,

Not sure I understand. Do you need to show one page on the first time and another after a user logged in, right?


Redirect to appery before the correct page

Posted: Wed Jan 08, 2014 1:17 pm
by dionisis pot

Yes. But when you forst install the apk in your mobile phone then after the login in fb, instead of the application page shows the appery login page


Redirect to appery before the correct page

Posted: Wed Jan 08, 2014 2:35 pm
by dionisis pot

Is that something that I must change in the application settings?


Redirect to appery before the correct page

Posted: Wed Jan 08, 2014 5:39 pm
by dionisis pot

Do you have any idea about the solution of this problem?


Redirect to appery before the correct page

Posted: Thu Jan 09, 2014 11:13 am
by Kateryna Grynko

Hi,

You can create a splash screen. On its load event run JavaScript code that checks a flag variable (if a user is logged in) and display a page depending on a result.

For example, there is a variable named "entered" in localStorage:prevar pageName = (localStorage.getItem("entered") === "true") ? "main" : "login";

Appery.navigateTo(pageName);/preIf entered=true, we open a page 'main', else 'login'.