Page 2 of 2

one time login in a application in appery.

Posted: Tue Nov 04, 2014 7:30 am
by Evgene Karachevtsev

Hello!

You can access the service response in the handler of event success, for example. The variable data will contain the service response.
Image


one time login in a application in appery.

Posted: Tue Nov 04, 2014 11:40 am
by www.iconnectiva.com

Hi Evgene,
I have another problem regarding the previous issue when i install the .apk file in mobile.After first time login into the application When I resume/restart the from menu application behavior is very abnormal.According to the logic the landing page appears.Its ok but after that the login page appears(supposed not to be) and again fromlogin page the landing page appears.

But there is no page navigation from landing page to login page or any javascript that will navigate the page.


one time login in a application in appery.

Posted: Tue Nov 04, 2014 12:06 pm
by www.iconnectiva.com

Is there anything regarding application resume event.


one time login in a application in appery.

Posted: Wed Nov 05, 2014 1:20 am
by Yurii Orishchuk

Hello,

Please see phonegap events "pause" and "resume".

http://docs.phonegap.com/en/3.0.0/cor...

Regards.

Here is code examples to handle these events:

pre

var onPause = function(){
//Here is a code when app goes pause. Do what you need here.
};
jQuery(document).on("pause", onPause);

/pre

Also in below here is a code to attach event handler to "resume" event handler.

pre

var onResume = function(){
//Here is a code when app wakes up. Do what you need here.
};
jQuery(document).on("resume", onResume);

/pre

Regards.


one time login in a application in appery.

Posted: Wed Nov 05, 2014 5:46 am
by www.iconnectiva.com

Hi Yurii,
Thanks for your support.I have applied the above events in the page load event.But my problem is still there.I am describing you the complete scenario-

i)I have a login page and after successful login the application goes to landing page.
ii)After successful login I have set a flag.
iii)Next time when the application resumed/restarted the flag has been checked and if the flag is true the application will navigate to landing page other wise it will be in the login page.

By the above logic we have achieve the scenario that the user will login only once in the application after installing the .apk file.

Now suppose when I am using the application,minimize it(but the application is in background)and use some other application and then again resume the application from background it is working fine.

But if I minimize the application and remove from background and again restart it from mobile menu,the application is behaving unexpectedly.

First the landing page appears(its expected),but certainly after that the login page appears(not expected) and after that again the landing page appears.These all events occurs within a few seconds.

Please help.


one time login in a application in appery.

Posted: Wed Nov 05, 2014 11:28 am
by Evgene Karachevtsev

Hello!

Events pause and resume you can use directly in the UI builder http://devcenter.appery.io/documentat...
Just select the desired event from the list and write code to handle it.


one time login in a application in appery.

Posted: Wed Nov 05, 2014 1:01 pm
by www.iconnectiva.com

Hi Evegene,

Thanks.But my problem is some thing else.I have describe above.Could you please help me on his?


one time login in a application in appery.

Posted: Wed Nov 05, 2014 2:18 pm
by Evgene Karachevtsev

Please take a look, maybe you have event handlers that are responsible for this behavior?


one time login in a application in appery.

Posted: Fri Nov 07, 2014 6:34 am
by www.iconnectiva.com

Hi Evegene,
I have checked it properly.No event handler is there for doing such activity.


one time login in a application in appery.

Posted: Fri Nov 07, 2014 9:55 am
by Evgene Karachevtsev

Hello!

Please provide us with a public link to your project, steps to reproduce the issue and credentials if they are needed.