Hi all,
I'm having a problem with the Mobile app I'm developing. To reproduce, login into the mobile app, press the back button of your phone (or go back in browser, when using mobile preview), and log back in. Now the following 'error' appears:
HTTP Status 200: Failed to log in. Attempted to call login() on a Session object that is already logged in. status (from jqXHT) :200 statusText (from jqXHT) :OK responseText (from jqXHT) :{"status_code":"200", "status_txt":"Successfully Logged in ." }
It seems that the authentication process was succesful, but somehow throws an error because I'm already logged in. I tried adding an eventhandler to the Backbutton event, which calls the LogoutService, but this didn't work out. When clicking the Logout button (instead of pressing the phone's backbutton), everything works fine.
Does someone have an idea how to solve this?
Hi Anil,
Thanks for your answer.
Adding the MyLogoutButton doesn't solve my problem. The logout button shown in the app already works well, but I'm facing the issue when I use the physical back button of Android. Since the back button is a common feature in Android, a lot of Android users will use it and therefore run into this error. The error is reproducible in the emulator by pressing backspace in DetailPage.
Like I said in my first post, I tried the following:
imagizer.imageshack.us/.../CLR0x8.png
But it didn't work out.
Flag this post as spam/abuse.
Hi all,
I'm having a problem with the Mobile app I'm developing. To reproduce, login into the mobile app, press the back button of your phone (or go back in browser, when using mobile preview), and log back in. Now the following 'error' appears:
HTTP Status 200: Failed to log in. Attempted to call login() on a Session object that is already logged in. status (from jqXHT) :200 statusText (from jqXHT) :OK responseText (from jqXHT) :{"status_code":"200", "status_txt":"Successfully Logged in ." }
It seems that the authentication process was succesful, but somehow throws an error because I'm already logged in. I tried adding an event to the Backbutton event, which calls the LogoutService, but this didn't work out. When clicking the Logout button, everything works fine.
Does someone have an idea how to solve this?
Flag this post as spam/abuse.
Hi Anil,
Thanks for your answer.
Adding the MyLogoutButton doesn't solve my problem. The logout button shown in the app already works well, but I'm facing the issue when I use the physical back button of Android. Since the back button is a common feature in Android, a lot of Android users will use it and therefore run into this error. The error is reproducible in the emulator by pressing backspace in DetailPage.
Like I said in my first post, I tried the following:
imagizer.imageshack.us/.../CLR0x8.png
But it didn't work out.
Hi Harrie,
I can't give you a specific suggestion, but I guess there are 2 possibilities here. One is the idea that you and Anil have already discussed of logging out when the user presses the back button. However, I could not get that to work either -- when I tried your approach (in my own project) of invoking logout on the firing of the Backbutton event, the Backbutton event did not fire when I used backspace or the browser back arrow in the emulator. If you can't get logout to be invoked when the user uses the back button, can you change the Welcome Page so that pressing the login button does not really invoke Login if there was already a successful login, and simply transitions to the Detail Page? You could set a local variable as a flag to indicate successful login -- of course, you would need to be sure to clear that flag whenever there is a logout. You would need to change your Login Button Click event so instead of doing an "Invoke service", the action is "Run JavaScript", and then invoke the login service (or not) using JavaScript in the handler. I have not tried this yet, right now it is just an idea.
--Wayne
Hi whenshaw,
As a workaround, I was thinking in the same direction. I will try that suggestion, and keep you posted! I think I file a ticket at Progress for the "backbutton event"-issue.
Thank you.
Hi Anil,
Thanks for your answer.
Adding the MyLogoutButton doesn't solve my problem. The logout button shown in the app already works well, but I'm facing the issue when I use the physical back button of Android. Since the back button is a common feature in Android, a lot of Android users will use it and therefore run into this error. The error is reproducible in the emulator by pressing backspace in DetailPage.
Like I said in my first post, I tried the following:
imagizer.imageshack.us/.../CLR0x8.png
But it didn't work out.
Flag this post as spam/abuse.