I’m trying to make a screenshot button so people can post their scores on the internet. When I press the button it captures and make a copy to Corona Simulator folder. When I put it in my phone it seems like it’s not saving it to my phone. Every time I try to edit my build.settings file my game get turn vertical. Please look at my build.settings to make sure its correct.
This is my build.settings:
[lua]
– Supported values for orientation:
– portrait, portraitUpsideDown, landscapeLeft, landscapeRight
settings = {
orientation = {
default = “landscapeRight”,
supported = { “landscapeLeft”, “landscapeRight” },
},
iphone = {
plist = {
UIStatusBarHidden = false,
UIPrerenderedIcon = true, – set to false for “shine” overlay
--UIApplicationExitsOnSuspend = true, – uncomment to quit app on suspend
--[[
– iOS app URL schemes:
CFBundleURLTypes =
{
{
CFBundleURLSchemes =
{
“fbXXXXXXXXXXXXXX”, – example scheme for facebook
“coronasdkapp”, – example second scheme
}
}
}
--]]
}
},
[[
Android permissions
androidPermissions = {
“android.permission.INTERNET”,
“android.permission.WRITE_EXTERNAL_STORAGE”,
settings
{
android =
{
versionCode = “11”,
usesPermissions =
{
“android.permission.INTERNET”,
“android.permission.WRITE_EXTERNAL_STORAGE”,
},
]]
}
[/lua]
This is what I use to capture:
[lua]
local function captureOnEvent()
local screenBounds =
{
xMin = 145,
xMax = 335,
yMin = 65,
yMax = 250,
}
local myCaptureImage = display.captureBounds( screenBounds, true )
myCaptureImage:removeSelf()
myCaptureImage = nil
local alert = native.showAlert( “Success”, “Screen Capture Saved to Library”, { “OK” } )
end
[/lua]