I just tested the resize event with suspend/resume and immersiveSticky on an Android 5.0 device. It’s definitely working for me. The correct screen dimensions are getting reported during the resize event. Below is the code I used to test this. You may want to give this a try as well.
[config.lua]
application = { content = { width = 320, height = 480, scale = "letterbox", }, }
[main.lua]
-- Hide the status bar. display.setStatusBar(display.HiddenStatusBar) -- Display a black bacground rectangle in Corona's content region and red in the letterbox region. local backgroundRectangle = display.newRect(0, 0, 0, 0) backgroundRectangle:setFillColor(0, 0, 0) display.setDefault("background", 1, 0, 0) -- Define the rest of our variables. local textObject = nil local textGuideLineTop = nil local textGuideLineBottom = nil local textGuideLineLeft = nil local textGuideLineRight = nil -- Creates a red horizontal line at the given position within the content region. -- It will not draw the line in the letterbox region. local function createHorizontalGuidingLineAt(positionY) local line = display.newLine(0, positionY, display.contentWidth, positionY) line:setStrokeColor(1, 0, 0) line.strokeWidth = 3 \* display.contentScaleY -- Set line width to 3 pixels. return line end -- Creates a red vertical line at the given position within the content region. -- It will not draw the line in the letterbox region. local function createVerticalGuidingLineAt(positionX) local line = display.newLine(positionX, 0, positionX, display.contentHeight) line:setStrokeColor(1, 0, 0) line.strokeWidth = 3 \* display.contentScaleX -- Set line width to 3 pixels. return line end -- Creates and/or updates all display objects to fit the window. local function updatePositions() -- Update the text object. local x = display.contentCenterX local y = display.contentHeight local pixelWidth = display.pixelWidth local pixelHeight = display.pixelHeight if ((system.orientation == "landscapeRight") or (system.orientation == "landscapeLeft")) then local length = pixelWidth pixelWidth = pixelHeight pixelHeight = length end local message = "Window Size: " .. tostring(pixelWidth) .. "x" .. tostring(pixelHeight) .. " pixels" print(message .. ", Orientation: " .. tostring(system.orientation) .. ", Content Scale: " .. tostring(display.contentScaleX)) if textObject then textObject:removeSelf() end local textSettings = { x = display.contentCenterX, y = display.contentCenterY, text = message, align = "center", } textObject = display.newText(textSettings) -- Update the black background rectangle to fit the content region. backgroundRectangle.x = display.contentCenterX backgroundRectangle.y = display.contentCenterY backgroundRectangle.width = display.contentWidth backgroundRectangle.height = display.contentHeight -- Re-position the text object's guiding lines. local bounds = textObject.contentBounds if (textGuideLineTop) then textGuideLineTop:removeSelf() end if (textGuideLineBottom) then textGuideLineBottom:removeSelf() end if (textGuideLineLeft) then textGuideLineLeft:removeSelf() end if (textGuideLineRight) then textGuideLineRight:removeSelf() end textGuideLineTop = createHorizontalGuidingLineAt(bounds.yMin) textGuideLineBottom = createHorizontalGuidingLineAt(bounds.yMax) textGuideLineLeft = createVerticalGuidingLineAt(bounds.xMin) textGuideLineRight = createVerticalGuidingLineAt(bounds.xMax) end updatePositions() -- Called when the window has been resized. Re-layouts the app display objects to fit. local function onResized(event) updatePositions() end Runtime:addEventListener("resize", onResized) -- Called when the screen is tapped on. Enables Android's immersive mode. local function onTap(event) native.setProperty("androidSystemUiVisibility", "immersiveSticky") end Runtime:addEventListener("tap", onTap)
The above app will display the window’s pixel width and height onscreen and update it when a resize event occurs. The letterbox areas will be highlighted in red and a red guidelines will be displayed around the text object. The project supports landscape and portrait, so, feel free to enable both and rotate. I definitely did. For example, I enabled immersive mode, tapped the application list, rotated, and then tapped to get back in the app. The resize event was definitely dispatched and re-layed out itself as expected. Note that this project will also print() the current pixel size of the window when the resize event occurs, proving that the resize event is definitely getting dispatched upon resume.