native.showAlert listener issue

Hi,

I have a problem with my native.showAlert listener on device.

I have a first alert whose listener works perfectly well.

Then, from this first, I call another alert but the listener of this last alert is never called.

This only happens on device… It works perfectly fine on computer.

Here is my code:

 myData.showConditions = "true" onComplete3 = function(event) if event.action == "clicked" then print("ok") if i == 1 then myData.showConditions = "false" else end end end onComplete2 = function(event) print("ok") if event.action == "clicked" then local i = event.index if i == 1 then myData.showConditions = "false" else end end end conditionsFunction = function() if myData.work.languageForImages == "" then local alert1 = native.showAlert ("Terms of use", "...", {"Yes", "No" }, onComplete3) else local alert2 = native.showAlert ("Conditions d'utilisation", "...", {"Oui", "Non"}, onComplete2) end end local onComplete1 = function(event) if event.action == "clicked" then local i = event.index if i == 1 then myData.selectedLanguage = "English" myData.languageForImages = "" conditionsFunction() elseif i == 2 then myData.selectedLanguage = "French" myData.languageForImages = " french" print("ok1") conditionsFunction() end end end local alert1 = native.showAlert ("Welcome! Bienvenue!", "Please select a language. Choisissez une langue.", {"English", "Français"}, onComplete1)

Thanks in advance for your replies

In my case, solved by calling the 2nd alert a little late.

like this

=> timer.performWithDelay (100, call_2nd_alert )

Thank you very much, it works great!

Thanks in advance for your replies

In my case, solved by calling the 2nd alert a little late.

like this

=> timer.performWithDelay (100, call_2nd_alert )

Thank you very much, it works great!