display.capture not working on NOOK tablet

I have not been able to get the nook to create an image in the photos area using the display.capture(true) method call. Has anyone else had this problem? It does work on a kindle fire so I think I have the android permissions set up correctly. Is there some other setting that needs to be added specifically for the nook tablet? [import]uid: 103459 topic_id: 23950 reply_id: 323950[/import]

update: found this in the log from the nook…
03-27 19:02:10.633 W/System.err(18692): java.io.FileNotFoundException: /mnt/sdcard/Pictures/FeltBoard Picture 1.png (Permission denied)

so … looks like I am getting a permission denied error… I have added the following to the build.settings file … is there something else I should add??

androidPermissions =
{
“android.permission.WRITE_EXTERNAL_STORAGE”
},

thanks for any help… [import]uid: 103459 topic_id: 23950 reply_id: 96726[/import]

Anyone have any ideas? Any at all? [import]uid: 103459 topic_id: 23950 reply_id: 98019[/import]

Hi Dave,
I have got the exactly same issue on Nook Tablet. I had app to teach Chinese characters (named: Piece Up Chinese) which has no issue at iOS platform to capture screen, but when I build .apk for Noon (with debugkey, hope this is not the issue), I have no clue where(/whether) the screen shots is saved. Not is the gallery, not in any file folders…

I did include this setting already: “android.permission.WRITE_EXTERNAL_STORAGE”

By the way, how do you get the error log out of nook?

Thanks,

Pixio
[import]uid: 63983 topic_id: 23950 reply_id: 98363[/import]

Pixio,

You have to use adb to get the error log information. You should be familiar with adb because you probably used it to deploy the .apk file to the Nook. I think the command is adb bugreport. At least that is how I got the errors on a Mac platform. If you are using windows then I am not sure how you would get it.

Additionally, I submitted this problem as a bug to Ansca and they have confirmed it is a bug and will let me know when it is fixed in the daily builds. It is Case 13262, in case you were wondering.

Hope this helps,
David [import]uid: 103459 topic_id: 23950 reply_id: 98367[/import]

additional info can be found on adb on the android site here:

http://developer.android.com/guide/developing/tools/adb.html [import]uid: 103459 topic_id: 23950 reply_id: 98368[/import]

Yes, I got the same error.(BTW, I do use Corona on Mac).

Thanks for your reply.

04-03 20:58:24.107 W/System.err( 2427): java.io.FileNotFoundException: /mnt/sdcard/Pictures/Teddy Picture 1.png (Permission denied)
04-03 20:58:24.107 W/System.err( 2427): at org.apache.harmony.luni.platform.OSFileSystem.open(Native Method)
04-03 20:58:24.107 W/System.err( 2427): at dalvik.system.BlockGuard$WrappedFileSystem.open(BlockGuard.java:232)
04-03 20:58:24.107 W/System.err( 2427): at java.io.FileOutputStream.(FileOutputStream.java:94)
04-03 20:58:24.107 W/System.err( 2427): at java.io.FileOutputStream.(FileOutputStream.java:165)
04-03 20:58:24.107 W/System.err( 2427): at java.io.FileOutputStream.(FileOutputStream.java:144)
04-03 20:58:24.107 W/System.err( 2427): at com.ansca.corona.Controller.saveBitmap(Controller.java:527)
04-03 20:58:24.107 W/System.err( 2427): at com.ansca.corona.NativeToJavaBridge.callSaveBitmap(NativeToJavaBridge.java:1060)
04-03 20:58:24.107 W/System.err( 2427): at com.ansca.corona.JavaToNativeShim.nativeTouchEvent(Native Method)
04-03 20:58:24.107 W/System.err( 2427): at com.ansca.corona.JavaToNativeShim.touchEvent(JavaToNativeShim.java:157)
04-03 20:58:24.107 W/System.err( 2427): at com.ansca.corona.events.TouchEvent.Send(TouchEvent.java:17)
04-03 20:58:24.107 W/System.err( 2427): at com.ansca.corona.events.EventManager.sendEvents(EventManager.java:266)
04-03 20:58:24.107 W/System.err( 2427): at com.ansca.corona.Controller.onDrawFrame(Controller.java:236)
04-03 20:58:24.107 W/System.err( 2427): at com.ansca.corona.CoronaRenderer.onDrawFrame(CoronaRenderer.java:74)
04-03 20:58:24.107 W/System.err( 2427): at android.opengl.derived.SwapGLSurfaceView$GLThread.guardedRun(SwapGLSurfaceView.java:913)
04-03 20:58:24.107 W/System.err( 2427): at android.opengl.derived.SwapGLSurfaceView$GLThread.run(SwapGLSurfaceView.java:773) [import]uid: 63983 topic_id: 23950 reply_id: 98420[/import]

Any word from Ansca Support on this Nook screen.capture bug?

Posted on Tue, 2012-04-03 15:25
Pixio,

You have to use adb to get the error log information. You should be familiar with adb because you probably used it to deploy the .apk file to the Nook. I think the command is adb bugreport. At least that is how I got the errors on a Mac platform. If you are using windows then I am not sure how you would get it.

Additionally, I submitted this problem as a bug to Ansca and they have confirmed it is a bug and will let me know when it is fixed in the daily builds. It is Case 13262, in case you were wondering.

Hope this helps,
David
[import]uid: 40033 topic_id: 23950 reply_id: 115865[/import]

This bug has been resolved in the latest stable build.

Dave [import]uid: 103459 topic_id: 23950 reply_id: 115872[/import]

Hi and thanks for your reply but Ansca just sent me a reply saying that it’s still a bug and my app was just rejected bc it wasn’t working. Do you have code you can share that works? Thanks again. [import]uid: 40033 topic_id: 23950 reply_id: 115876[/import]

Does anyone know if this works for NOOK?
(Ansca sent me a response yesterday saying that the display.captureScreen(true) is still a bug)
local screenCap = display.captureScreen(true)
local baseDir = system.DocumentsDirectory
display.save( screenCap, “screenCapturePicture.jpg”, baseDir ) [import]uid: 40033 topic_id: 23950 reply_id: 115924[/import]

This is the code I am using:

local screenCapture = display.captureScreen( true );

I have tested this on my Nook and it works fine. I have submitted my app to B&N and I am currently waiting to see if it passes their review.

My build no is: 2012.828 (2012.12.8)

Thanks,
Dave [import]uid: 103459 topic_id: 23950 reply_id: 115931[/import]

Dave is correct. This used to be a bug, but it was fixed in the newest release version (build #840) which is available to trial users.

Also, make sure that you have the following permission set in your “build.settings” file or else your app won’t have permission to save the capture image to the photo library on “any” Android device.

[lua]settings =
{
androidPermissions =
{
“android.permission.WRITE_EXTERNAL_STORAGE”
}
}[/lua]
[import]uid: 32256 topic_id: 23950 reply_id: 115932[/import]

[SOLVED] Thanks to Joshua @Ansca for his quick help.

Hello,

This used to be a bug, but it was fixed in the newest stable release version, build #840.

Also, make sure that you have the following permission set in your “build.settings” file or else your app won’t have permission to save the capture image to the photo library on any Android device.

settings =
{
androidPermissions =
{
“android.permission.WRITE_EXTERNAL_STORAGE”
}
}
[import]uid: 40033 topic_id: 23950 reply_id: 115933[/import]