Hi All,
I am new to Corona and I am trying to build simple apps but unfortunately
don’t get the same result in the real
android Galaxy S2 as I see in the simulator. The code works fine in the simulator but when I
build it for android as .apk and install it in my Galaxy S2 I got the picture,
text but not the physics component.
Here is one example, I am trying to simulate one of physics
demo lab in the SDK.
[lua]
local physics = require “physics”
physics.start()
local bkg =display.newImage(“bkg_clouds.png”)
local grass=display.newImage(“ground.png”)
local intro =display.newText("This is a test app only ",50 ,200,“Halvetica”,22)
intro:setTextColor(50)
local intro =display.newText(" Author:Abdulaziz Al Zaabi ",50 ,250,“Halvetica”,18)
intro:setTextColor(20)
grass.y= 500
physics.addBody( grass, “static”, { friction=0.5, bounce=0.3 } )
local logo=display.newImage(“crate.png”)
logo.x,logo.y=200, 50
logo.rotation = 50
local OnTouch = function (event)
if event.phase == “began” then
physics.addBody(logo, { density=3.0, friction=0.5, bounce=1 } )
return true
end
end
Runtime:addEventListener (“touch”, OnTouch)
[/lua]
Also I have attached the picture from the simulator and
picture from Galaxy s2. I don’t know what is wrong here. I trying few other
demos and I got the same problem. Please help !!