Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
Contributor
elmar28
Posts: 16
Registered: ‎01-27-2013
My Device: blackberry9360

I can not save the image using the canvas toDataURL from a smartphone for blackberry webwork.

I'm debugging using the 9360 and 9900, can not be stored exceeds the 480px × 320px, I will be error.
I tried to make a plugin in java of webworks, I do not go well.
Is there a way to do something other than to save the data to decode BASE64?

BlackBerry Development Advisor
chadtatro
Posts: 620
Registered: ‎10-01-2009
My Device: Z10

Re: I can not save the image using the canvas toDataURL from a smartphone for blackberry webwork.

Hello,

 

We have a sample on github that shows how to save your canvas, as an image.  Check it out here - https://github.com/blackberry/BB10-WebWorks-Samples/tree/master/canvasToFilesystem

Chad Tetreault | App Development Consultant | BlackBerry Developer Relations | developer.blackberry.com | @chadtatro
Contributor
elmar28
Posts: 16
Registered: ‎01-27-2013
My Device: blackberry9360

Re: I can not save the image using the canvas toDataURL from a smartphone for blackberry webwork.

Thank you for your reply Mr. chadtatro. Although we received and OS10 in URL, app that I have created is, OS6 OS7. What there is no way that can be supported by this.

BlackBerry Development Advisor
chadtatro
Posts: 620
Registered: ‎10-01-2009
My Device: Z10

Re: I can not save the image using the canvas toDataURL from a smartphone for blackberry webwork.

While that sample is for BB10, the scripts which save the canvas will work on any webkit browser.  OS6/7 I believe would be fine although I haven't tested it.  OS5 likely not.

Chad Tetreault | App Development Consultant | BlackBerry Developer Relations | developer.blackberry.com | @chadtatro
Contributor
elmar28
Posts: 16
Registered: ‎01-27-2013
My Device: blackberry9360

Re: I can not save the image using the canvas toDataURL from a smartphone for blackberry webwork.

Thank you. Try it.
Developer
The_Anomaly
Posts: 322
Registered: ‎08-06-2012
My Device: Dev Alpha / Playbook / Curve 9300

Re: I can not save the image using the canvas toDataURL from a smartphone for blackberry webwork.

I had a problem with this on Playbook which is similar to BB10.  Solution was this:

 

http://supportforums.blackberry.com/t5/Web-and-WebWorks-Development/stringToblog-save-image-problem/...

 

Read carefully the instructions require patching your webworks sdk.

If it helped you, click like. :smileyhappy:
Contributor
elmar28
Posts: 16
Registered: ‎01-27-2013
My Device: blackberry9360

Re: I can not save the image using the canvas toDataURL from a smartphone for blackberry webwork.

Although I think playbook is implemented in actionscript, OS7 is not a problem because it uses the same java, Is there any answer to this in the URL?
are not correctly decode exceeds the capacity that has BASE64outputstream of java. Therefore, it has become an error is saved by StringTOBlob as its value is returned in the sky, it does not work.

Contributor
elmar28
Posts: 16
Registered: ‎01-27-2013
My Device: blackberry9360

Re: I can not save the image using the canvas toDataURL from a smartphone for blackberry webwork.

I found the problem.
However, I can not come up with a workaround.
There seems to be a limit that can be passed as an argument in invoke.
Does anyone would not be able to avoid this idea.

By the way, file API and Unit8Array by javascript is a non-
I can not use these methods.