Issue saving screenshot to device.

I am trying to save a screenshot to a android device. I have this working in the Corona simulator, I press a button and the screenshot is taken and save to my hard drive but it wont do it on a device.

Here is my build.lua setting, Im not sure if its correct. I thought all I had to do was add “android.permissions.WRITE_EXTERNAL_STORAGE” as a permission but not luck yet. 

-- Supported values for orientation: -- portrait, portraitUpsideDown, landscapeLeft, landscapeRight settings = { orientation = { default = "portrait", supported = { "portrait"} }, 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.permissions.WRITE\_EXTERNAL\_STORAGE" }, }

Hi Sebastian,

I noticed you added an “s” to the term for the external storage: “permissions” instead of “permission”. Can you change that and see if it works?

Thanks,

Brent

That was it, I needed to remove the “s” from permission. I did get unexpected results though, I thought this was supposed to take a screen shot and capture everything on the screen but when it takes the screen shot the text fields do not get captured nor does the text in the text fields. 

Hi Sebastian,

Since native text fields/boxes aren’t part of the OpenGL display canvas, they won’t be captured by the existing capture/save functions… these specifically target that aspect of the display.

Best regards,

Brent Sorrentino

That makes sense. Looks like I might be able to just take a screen capture of just a display group or object by using display.save() or display.capture()… That might be the way to go to just capture the section I need without having the empty spots where the text fields would be like I get with capturing the entire screen. 

Hi Sebastian,

I noticed you added an “s” to the term for the external storage: “permissions” instead of “permission”. Can you change that and see if it works?

Thanks,

Brent

That was it, I needed to remove the “s” from permission. I did get unexpected results though, I thought this was supposed to take a screen shot and capture everything on the screen but when it takes the screen shot the text fields do not get captured nor does the text in the text fields. 

Hi Sebastian,

Since native text fields/boxes aren’t part of the OpenGL display canvas, they won’t be captured by the existing capture/save functions… these specifically target that aspect of the display.

Best regards,

Brent Sorrentino

That makes sense. Looks like I might be able to just take a screen capture of just a display group or object by using display.save() or display.capture()… That might be the way to go to just capture the section I need without having the empty spots where the text fields would be like I get with capturing the entire screen.