Skip to content
This repository has been archived by the owner on Sep 4, 2019. It is now read-only.

Add support for BlackBerry 10 to ExternalScreen plugin #336

Open
timwindsor opened this issue Oct 29, 2014 · 2 comments
Open

Add support for BlackBerry 10 to ExternalScreen plugin #336

timwindsor opened this issue Oct 29, 2014 · 2 comments

Comments

@timwindsor
Copy link
Collaborator

Plugin is forked here: https://github.com/blackberry/ExternalScreen

I'd like to investigate adding support for BlackBerry 10 devices to this plugin

@timwindsor
Copy link
Collaborator Author

Resources pulled together by @homynyk :

Here’s a video about using an External Screen with BlackBerry 10:
https://www.youtube.com/watch?v=3xz6YAeKSK0

And the source code:
https://github.com/blackberry/Presentations/tree/master/2013-BlackBerryJam-Europe/JAM321/cascades/src/hdmi

They discuss HDMI 10:05 – 20:30
• There are some bugs in the code so we should be aware of this. I’m not sure it will
be problematic since I believe the bugs are when there are multiple external screens.
• Don't have programmatic control of screen resolutions.

The plugin will require the following functions, (these are just from the client file for the
iOS plugin):
There isn’t much of a description of these functions (nothing in the readme), so I added
what I could find about them.

checkExternalScreenAvailable
//used to determine if an external screen is available
I think the following function can be used for this:
void ScreenFunctions::onTimeout() on line 145 here:
https://github.com/blackberry/Presentations/blob/master/2013-BlackBerryJam-Europe/JAM321/cascades/src/hdmi/ScreenFunctions.cpp
*This is discussed in the video linked to above

loadHTMLResource
// used to load an HTML file in external screen web view. The HTML file can be a local
HTML resource or remote HTML resource but this requires the URL to be white-listed in
PhoneGap.
From what I gathered from the video we will need to render images to the external
screen. I think we can use OpenGL for this:
https://developer.blackberry.com/native/documentation/core/setting_up_basic_opengles_app.html

setupScreenConnectionNotificationHandlers
//used to initialize monitoring of external screen
There will probably be some useful functions for accomplishing this in the link under
checkExternalScreenAvailable.

loadHTML
//used to load a HTML string in external screen web view
This will probably be similar to loadHTMLResource. See above.

invokeJavaScript
//used to invoke javascript, passed as a string, in external screen web view
Some more helpful resources:
The DisplayInfo API will probably be necessary. The documentation can be found here:
https://developer.blackberry.com/native/reference/cascades/bb__device__displayinfo.html#function-attachedchanged-attached

Someone else had a similar idea a while ago. Maybe they can be contacted to see if any
work was done on this.
https://blackberry.icanmakeitbetter.com/nextgen/ideas/externaldisplay?order=vote_count&page=9

@timwindsor
Copy link
Collaborator Author

This plugin does not appear to be posted to cordova.plugins.io or NPM, and on Phonegap-Build it is only used in ~200 apps. It's not likely to be used that much.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants