Page 1 of 2

Android back button an popup problem

Posted: Fri Jun 06, 2014 3:38 pm
by Juan Pedro Casillas Chavez

I have a Popup that is shown when the startscreen load the when i go to a different screen and go back to the startscreen the Popup loads instead of the screen and it doesn't close even if i click the close button.

My problem only happen in android devices, in the web preview everything works OK

Please help.


Android back button an popup problem

Posted: Fri Jun 06, 2014 3:59 pm
by Evgene Karachevtsev

Hello Juan,

Please try next workaround: add next code on event page show from startscreen

codeclosePopup(); /code


Android back button an popup problem

Posted: Fri Jun 06, 2014 4:13 pm
by Juan Pedro Casillas Chavez

I think the problem is that the application .apk is not updated, because in previous versions of the app i make the Popup auto close and is still happening in the android app even when i already remove that piece of code


Android back button an popup problem

Posted: Fri Jun 06, 2014 4:18 pm
by Evgene Karachevtsev

Juan,

Could you please clarify, do you need any help?


Android back button an popup problem

Posted: Fri Jun 06, 2014 4:32 pm
by Juan Pedro Casillas Chavez

Sorry for my bad english

yes i need help

This is the situation

1- I put a Popup to show when the startScreen loads

2- The i have a list on the start screen and when i click on a list element the app go to a second page called "Viewer"

3- On the page "Viewer" I add the event to navigate to startScreen in the back button
3 Then in the page "Viewer" i hit the back button and instead of navigate to the startScreen it take me to the Popup and i can't close this Popup

this problem only happen in the android version of the app


Android back button an popup problem

Posted: Fri Jun 06, 2014 7:32 pm
by Kateryna Grynko

Dear Juan,

Add this code to startScreen: prelocalStorage.setItem("openDialog", "true");/pre
On dialog Page Show event run:preif(localStorage.getItem("openDialog") != "true")){
closePopup();
}/pre
On Viewer page Page show event run:prelocalStorage.removeItem("openDialog");/pre


Android back button an popup problem

Posted: Fri Jun 06, 2014 8:15 pm
by Juan Pedro Casillas Chavez

I put the code that you gave me and nothing change


Android back button an popup problem

Posted: Fri Jun 06, 2014 9:05 pm
by Kateryna Grynko

Hi Juan,

What is your Android version?


Android back button an popup problem

Posted: Fri Jun 06, 2014 9:06 pm
by Juan Pedro Casillas Chavez

Is 4.4.2


Android back button an popup problem

Posted: Sat Jun 07, 2014 7:06 am
by Alena Prykhodko

Hello Juan,

Please try to replace
[quote:]
On dialog Page Show event run:
pre
if(localStorage.getItem("openDialog") != "true")){
closePopup();
}
/pre[/quote]

with
On dialog Page Show event run:
pre
if(localStorage.getItem("openDialog") != "true"){
closePopup();
}/pre

Works for me, there was a typo.