Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

one time login in a application in appery.

Hello!

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

www.iconnectiva.com
Posts: 0
Joined: Wed Jul 23, 2014 11:08 am

one time login in a application in appery.

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.

www.iconnectiva.com
Posts: 0
Joined: Wed Jul 23, 2014 11:08 am

one time login in a application in appery.

Is there anything regarding application resume event.

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

one time login in a application in appery.

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.

www.iconnectiva.com
Posts: 0
Joined: Wed Jul 23, 2014 11:08 am

one time login in a application in appery.

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.

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

one time login in a application in appery.

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.

www.iconnectiva.com
Posts: 0
Joined: Wed Jul 23, 2014 11:08 am

one time login in a application in appery.

Hi Evegene,

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

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

one time login in a application in appery.

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

www.iconnectiva.com
Posts: 0
Joined: Wed Jul 23, 2014 11:08 am

one time login in a application in appery.

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

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

one time login in a application in appery.

Hello!

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

Return to “Issues”