10-20-2011 06:04 AM
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
}
}
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
10-26-2011 04:08 PM
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"></sc
...................
<body>
...................
Ext.setup({onReady : function() {
.......
listeners : {
.............
var args = new blackberry.invoke.BrowserArguments('http://www.blackberry.com');
blackberry.invoke.invoke(blackberry.invoke.APP_BRO
.......
button below the post(s)