I found a new problem with Android - my dialog boxes don’t fire the function. Ex. My back button gives a dialog box with two options - Ok and Cancel. With Ok it should go back to the main screen but it does not seem to fire the ‘OnBackComplete’ function. Cancel is ok (it just dismisses the dialog box). Note this code works fine on iOS (app on App Store) just not on Android.
[code]
– Handler that gets notified when the alert closes
local function onBackComplete( event )
if “clicked” == event.action then
local i = event.index
if 1 == i then
disableGameView()
media.stopSound()
elseif 2 == i then
– do nothing
end
end
end
function backButton:tap( event )
media.playEventSound(“buttonclick.wav”)
local alert = native.showAlert( “Are you sure you want to leave the game?”, “”, { “OK”, “Cancel” }, onBackComplete )
end
backButton:addEventListener( “tap”, backButton)
[/code] [import]uid: 10652 topic_id: 6605 reply_id: 306605[/import]