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
kalan
Posts: 23
Registered: ‎12-27-2010
My Device: 8900, 9630

Is blobToString working in playbook?

I tried the following code using both "base64" and "utf-8" encoding with phone simulator and playbook simulator.

 

 

var strBlob = blackberry.utils.blobToString(blob, "utf-8");

 

 

Its working perfectly with phone simulator. But not working with playbook simulator.

 

Thanks.

Please use plain text.
BlackBerry Development Advisor
tneil
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: Is blobToString working in playbook?

Hi kalan,

 

Currently blobToString() is not supported on PlayBook in the WebWorks Beta.  The list of currently supported Beta APIs are here: 

 

http://www.blackberry.com/developers/docs/webworks/api/playbook/

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Please use plain text.
Contributor
kalan
Posts: 23
Registered: ‎12-27-2010
My Device: 8900, 9630

Re: Is blobToString working in playbook?

Can you suggest me a method to convert a string to "base64" encoded string.

 

 

var blob = blackberry.utils.stringToBlob(authToken, "utf-8");
var strBlob = blackberry.utils.blobToString(blob,"base64");

 

 

I use this code with the phone app. Can you suggest me if there any alternative method available which can be used with playbook?

 

Thanks.

Please use plain text.
Contributor
kalan
Posts: 23
Registered: ‎12-27-2010
My Device: 8900, 9630

Re: Is blobToString working in playbook?

http://code.google.com/p/stringencoders/source/browse/trunk/javascript/base64.js?r=230

 

This code of converting binary data to base64 and vise versa works perfectly with phone API. But not works in playbook.

I can't understand why is that? Can someone explain me?

 

Thanks.

Please use plain text.