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
Developer
Innovatology
Posts: 1,280
Registered: ‎03-03-2011
My Device: Playbook, Z10, Q10, Z30 with Files & Folders and Orbit of course
My Carrier: Vodafone
Accepted Solution

WebWorks BB10 screenshot extension

I have published my screenshot extension for BB10 WebWorks on Github.

 

https://github.com/jonwebb/webworks-bb10-screenshot

 

It allows you to get a bitmap of your WebWorks app and save it to disk or memory.

 

Features:

 

  • save to file, or return a data-URL
  • control rectangle to capture
  • control JPEG compression quality
  • capture as JPEG, PNG
  • set file permissions

Enjoy!

Files & Folders, the unified file & cloud manager for PlayBook and BB10 with SkyDrive, SugarSync, Box, Dropbox, Google Drive, Google Docs. Free 3-day trial! - Jon Webb - Innovatology - Utrecht, Netherlands
Please use plain text.
BlackBerry Development Advisor
twindsor
Posts: 822
Registered: ‎07-15-2008
My Device: Z10
My Carrier: Bell

Re: WebWorks BB10 screenshot extension

This looks good Jon. Are you open to us bringing it into the Community Repo?

Tim Windsor
Application Development Advisor II
Please use plain text.
Developer
Innovatology
Posts: 1,280
Registered: ‎03-03-2011
My Device: Playbook, Z10, Q10, Z30 with Files & Folders and Orbit of course
My Carrier: Vodafone

Re: WebWorks BB10 screenshot extension

Of course!

Files & Folders, the unified file & cloud manager for PlayBook and BB10 with SkyDrive, SugarSync, Box, Dropbox, Google Drive, Google Docs. Free 3-day trial! - Jon Webb - Innovatology - Utrecht, Netherlands
Please use plain text.
BlackBerry Development Advisor
twindsor
Posts: 822
Registered: ‎07-15-2008
My Device: Z10
My Carrier: Bell

Re: WebWorks BB10 screenshot extension

Cool, I'll follow up on the GitHub thread.

Tim Windsor
Application Development Advisor II
Please use plain text.
BlackBerry Development Advisor (Retired)
astanley
Posts: 1,382
Registered: ‎07-02-2009
My Device: BlackBerry Bold 9900
My Carrier: Bell

Re: WebWorks BB10 screenshot extension

Excellent work Jon!

Follow me on Twitter: @n_adam_stanley
-------------------------------------------------------------------------------------------------------------------------
Your app doesn't work? Use BlackBerry remote web inspector to find out why.
Please use plain text.
Visitor
MisterBearBear
Posts: 1
Registered: ‎10-30-2013
My Device: BlackBerry Z30
My Carrier: Hong Kong

Re: WebWorks BB10 screenshot extension

[ Edited ]

Great stuff. Thanks for the great work.

 

I have started integrating it into my app. I tried to capture screenshot and share it using card but failed. I used the following:

 

var options = {dest:'data:', mime:'image/png'};
var screenshot = net.jonwebb.screenshot.execute(options);

var request = {
	action : 'bb.action.SHARE',
	mime : 'image/png',
	data : screenshot,
	target_type: ["VIEWER", "CARD"]
};
blackberry.invoke.card.invokeTargetPicker(request, "Share", onInvokeSuccess, onInvokeError);

 

Should I need to use file path instead of data URL?

Please use plain text.
Developer
Innovatology
Posts: 1,280
Registered: ‎03-03-2011
My Device: Playbook, Z10, Q10, Z30 with Files & Folders and Orbit of course
My Carrier: Vodafone

Re: WebWorks BB10 screenshot extension

I don't think the invoke framework supports data-URL's.

Files & Folders, the unified file & cloud manager for PlayBook and BB10 with SkyDrive, SugarSync, Box, Dropbox, Google Drive, Google Docs. Free 3-day trial! - Jon Webb - Innovatology - Utrecht, Netherlands
Please use plain text.
BlackBerry Development Advisor
twindsor
Posts: 822
Registered: ‎07-15-2008
My Device: Z10
My Carrier: Bell

Re: WebWorks BB10 screenshot extension

Theoretically I think this could work, but it depends on their being a target that can work with it. In all the examples I've seen, the viewer and picture apps use file URLs.

Tim Windsor
Application Development Advisor II
Please use plain text.
New Contributor
LandS
Posts: 7
Registered: ‎01-17-2012
My Device: BlackBerry Z30
My Carrier: Telus

Re: WebWorks BB10 screenshot extension

Any possibility of modifying this to also allow capturing of the entire device screen? It would be hugely helpful for support apps to remotely share a screen.

 

Love it so far - thanks!

 

John

 

Please use plain text.
Developer
peardox
Posts: 1,229
Registered: ‎03-20-2011
My Device: Playbook, Z10 LE, Dev Alpha B, 2x Dev Alpha C
My Carrier: 3, Orange, Vodafone

Re: WebWorks BB10 screenshot extension

Jon - any idea what the max capture rate is?

 

Something I see being really useful is being able to do 15FPS to assemble a movie what can be used for in-app help




Click the like button if you find my posts useful!
Please use plain text.