Hey there. Tariq here, I have a question.
TL;DR version is I want a way to force an app to “resume” after being suspended. (The only things I saw that might be close to doing this is loading a saved state, from the searching I’ve been doing.)
The reasoning why I would want this is because I’m using media.newVideo() to play a video, and it works on my Mac in the simulator, but when testing on my kindle, on completion of the video, the app goes to the scene I specified, but then the screen glitches and shows only the background I have set instead of the rest of the scene.
I’m assuming this is because the app is being “suspended.”
Here’s the code if you’re curious, but its basically standard storyboard layout and copy and pasta example of media.newVideo from the documentation.
(I have another scene that goes to this scene if you click on some text.)
ocal storyboard = require "classes.storyboard" local scene = storyboard.newScene() display.setStatusBar(display.HiddenStatusBar) function scene: createScene(event) local screenGroup = self.view local background = display.newImageRect("ExtraPics/Background.png", 900, 1425) background.anchorX = 0.5 background.anchorY = 0.5 background.x = display.contentCenterX background.y = display.contentCenterY screenGroup:insert(background) local onComplete = function(event) storyboard.gotoScene("scenes.profilesponsor") --Runtime:removeEventListener( "system", onSystemEvent ) end -- Play the video. local video = media.playVideo("ExtraPics/Starbucks.mp4", true, onComplete ) end function scene: enterScene(event) storyboard.purgeScene("scenes.profilesponsor") end function scene: exitScene(event) end function scene: destroyScene(event) end scene:addEventListener("createScene", scene) scene:addEventListener("enterScene", scene) scene:addEventListener("exitScene", scene) scene:addEventListener("destroyScene", scene) return scene