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
New Contributor
Posts: 4
Registered: ‎12-06-2010
My Device: Not Specified

Using the Invoke APIs on the PlayBook WebWorks API

[ Edited ]

I'm trying to use the Invoke APIs with the WebWorks SDK on the PlayBook. Here's my code (for getting a camera and a browser). Neither one works. I thought the camera was supported in the 0.9.4 simulator, but maybe not. The browser doesn't work either though.

 

Can anyone tell me what I'm doing wrong?

 

 

<script type="text/javascript">
function getCamera()
{
var args = new blackberry.invoke.CameraArguments();
args.view = blackberry.invoke.CameraArguments.VIEW_RECORDER;
  
  
blackberry.invoke.invoke(blackberry.invoke.APP_CAMERA, args);
}
function getLink()
{
var args = new blackberry.invoke.BrowserArguments('http://blog.digitalbackcountry.com');
blackberry.invoke.invoke(blackberry.invoke.APP_BROWSER,args);
}
</script>
</head>
<body>
<input type="button" value="Start Camera" onclick="getCamera()" />
    <input type="button" value="Go to Link" onclick="getLink()" />
</body>
<script type="text/javascript">	
function getCamera()	
{	 
var args = new blackberry.invoke.CameraArguments();	 
args.view = blackberry.invoke.CameraArguments.VIEW_RECORDER;     
blackberry.invoke.invoke(blackberry.invoke.APP_CAMERA, args);	
}	 

function getLink()	
{	 var args = new blackberry.invoke.BrowserArguments('http://blog.digitalbackcountry.com'); 
blackberry.invoke.invoke(blackberry.invoke.APP_BROWSER,args);	
}

</script>
</head>
<body>	
<input type="button" value="Start Camera" onclick="getCamera()" />    <input type="button" value="Go to Link" onclick="getLink()" />
</body>

 

=Ryan

ryan@adobe.com

 

Developer
Posts: 31
Registered: ‎03-06-2011
My Device: Not Specified

Re: Using the Invoke APIs on the PlayBook WebWorks API

I know the browser invoke doesn't work in the latest simulator. It did to an extent in the previous one, and

according to this page, it works on the actual device:

http://docs.blackberry.com/en/developers/deliverables/24007/BB_WebWorks_SDK_Tablet_Known_Issues_Beta...


Here is a topic I made earlier about issues with invoke browser:
http://supportforums.blackberry.com/t5/Web-Development/Invoke-browser-Issues-Playbook/m-p/933785#M10...

 

I'm not sure if they were fixed in the latest SDK, since I can't test it.



I'm not really sure about the invoke camera API.