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
Visitor
Posts: 1
Registered: ‎10-20-2011
My Device: 9800
My Carrier: vodafone

Sencha touch+webworks 2.2+phonegap invoke browser not work

Hi All, 

 

I'm developing a webworks application with phonegap and sencha touch, and I must invoke the phone browser programmatically; using the webworks api, I've created a function that accomplish the purpose:

 

try{

if (typeof window.blackberry !== 'undefined') {  

 var args = new  blackberry.invoke.BrowserArguments('myurl');    window.blackberry.invoke.invoke(blackberry.invoke.APP_BROWSER, args);

}

}

catch(ex){

alert(ex);

}

 

of course, I added to config.xml the features for blackberry.invoke, blackberry.invoke.BrowserArguments, blackberry.identity.

It works outside Sencha Touch, but whe I call it from a sencha panel, (a button, for example) it throws the following exception:

 

TypeError: Result of expression 'window.blackberry.invoke.BrowserArguments' [undefined] is not a constructor

 

seems that sencha destroys the object blackberry.invoke... Anybody knows a solution or a workaround? 

Also, I noticed that with an earlier version of webworks framework (2.0) that won't happen (but I can't downgrade, cause of memory leaks...)

 

Thanks in advance...

Matteo 

Retired
Posts: 34
Registered: ‎10-24-2011
My Device: Curve
My Carrier: Telus

Re: Sencha touch+webworks 2.2+phonegap invoke browser not work

I tried and had no problem to invoke the browser.  The library I used is sencha-touch-1.1.0 and device is 9810.

See some of the code used:

 

<head>

...................

<script src="libs/sencha-touch-1.1.0/sencha-touch.js"></script>

...................

<body>

...................

Ext.setup({onReady : function() {

.......

listeners : {

.............

var args = new blackberry.invoke.BrowserArguments('http://www.blackberry.com');

blackberry.invoke.invoke(blackberry.invoke.APP_BROWSER, args);

.......



1.Please resolve your thread by clicking the "Accept as Solution" button below the post which solved your problem!
2. If any post helps you please click the button below the post(s)