Let me further clarify, for Samsung I was able to get away with this code:
[lua]if samsungapp == true then
function onKeyEvent( event )
local phase = event.phase
local keyName = event.keyName
if( (keyName == “back”) and (phase == “down”) ) then
local function onComplete( event )
if “clicked” == event.action then
local i = event.index
if 1 == i then
native.cancelAlert( alert )
elseif 2 == i then
native.requestExit()
end
end
end
local alert = native.showAlert( “EXIT APP”, “ARE YOU SURE?”, { “NO”, “YES” }, onComplete )
return true
end
– for default behavior, return false.
return false
end
Runtime:addEventListener( “key”, onKeyEvent );
end [/lua]
Just wondering if I can do the same for Windows or if I need to make it work how they want.
I have submitted 2 apps now and 1 got rejected due to the back button issue (I had no back button code implemented on either).
Scott