Juan Pedro Casillas Chavez
Posts: 0
Joined: Fri May 23, 2014 7:19 pm

Android back button an popup problem

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.

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

Android back button an popup problem

Hello Juan,

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

codeclosePopup(); /code

Juan Pedro Casillas Chavez
Posts: 0
Joined: Fri May 23, 2014 7:19 pm

Android back button an popup problem

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

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

Android back button an popup problem

Juan,

Could you please clarify, do you need any help?

Juan Pedro Casillas Chavez
Posts: 0
Joined: Fri May 23, 2014 7:19 pm

Android back button an popup problem

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

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Android back button an popup problem

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

Juan Pedro Casillas Chavez
Posts: 0
Joined: Fri May 23, 2014 7:19 pm

Android back button an popup problem

I put the code that you gave me and nothing change

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Android back button an popup problem

Hi Juan,

What is your Android version?

Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

Android back button an popup problem

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.

Return to “Issues”