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 Member
andiskater
Posts: 1
Registered: ‎06-06-2012
My Device: Bold 9900
My Carrier: Swisscom

Blackberry WebWorks: It is impossible to develop for this.

Hi!

 

I am mostly a web developer and have recently programmed a site finder app (gas stations) for andorid and iPhone using PhoneGap, jQuery, jQuery mobile and Google Maps.

Now my client also wanted a version for Blackberry. I should run on the Blackberry Bold 9900 (9930). I thought this would be possible, but reality proofed me wrong up to this point.

 

I am using a Mac and installed the SDK and Blackberry driver, so that I could test the app on the actual device. There is no emulator for Mac OS. I don't know where to begin, but getting the signing keys was already a quite annoying process and after I got everything working, I was very puzzled, that 111 parts of my app had to be signed online every time sending me 111 emails to my gmail account. luckly I could set up a rule to delte all that **bleep** before it reaches my inbox.

 

Now for the problemes developing an App: Here are so my nice and well-meant documentation documents and tutorials, but actually most of that stuff does not work correctly:

 

1. The remote Web Inspector: Even when you just use a "hello world" html or one of the webworks examples (weather) the inspector deas not work. You can connect to the url, but then the webinspector is empty – I found an entry about this problem in this forum, but no answer.

 

2. It's funny that even the 768MB RAM of the Bold 9900 are not enough to load the Google Maps API and display a map. It works in the Browser, but not in an Webworks app. You know that, and what is the solution? A blog article about lightweight maps (http://devblog.blackberry.com/2012/05/lightweight-maps-for-mobile-part-1/). Well-meant but mostly annoying as the google map works on iOS and Android.

 

3. I have specified in the config.xml that I can load assets from all domains (<access subdomains="true" uri="*"/>), but I can't load a script using the jQuery.getScript() method, or can I? It seemed to work, when I added another access tag and specified an external domain... but it didn't work with my local testing server (ip as well as .local domain). And now, for whatever reason, it doesn't work at all.

 

4. Debugging: Without the remote Web Inspector it is impossible to debug the app. I can't see, what goes wrong!

 

5. Ripple. Ripple is an absolute joke. Regardless it it is the stand alone version or the chrome extension. Who are you trying to fool? The Blackberry OS is using a different version of webkit and it is absurd to rely on testing in this environment. Google Maps works there – of courese, as well as loading external scripts with jQuery and many other things actual device won't do.

 

6. Testing on the device: Besides the email spamming it also takes forevet to compile and transfer the app... and then, one won't belive it, the Blackberry has to restart every time I want to test a new verison?!

 

7. Oh, there was one of the well-meant blog entries suggesting setting the content tag in the config.xml to a remote address – clever – but it does not work!

 

8. I remember that one time I was able to use the remote Web inspector and I even remember seeing google maps crash after viewing the map for half a second. Not much changed in my development environment, but but nothing works anymore...

 

9. I even tried everything on Windows and with the Blackberry Simulator – but even there nothing worked as expected. The simulator crashes a lot and the remote web inspector won't work either. 

 

10. I really would like to ask some concrete questions and find solutions to make the app I want to develop work (I'm even ready to do a complete rewrite with another map component and without the somewhat bloated jQuery mobile), but right now this whole Blackberry development stuff makes me desperate and hopeless.

 

How is it possible that is easier to develop webapps for iOS and Android with PhoneGap, which is a third party library, than it is to develop for Blackberrys own web app framework? Why are there so many well-meant efforts to make the platform attractive for developers, when there seem to be some serious problems making anything of that work correctly?

 

If my client wasn't eager to have a blackberry version of the app I would not waste one more second on this platform. I' can't imagine one person using or developing for a Blackberry phone by choice.

 

Regards,

Andi

Please use plain text.
BlackBerry Development Advisor
oros
Posts: 1,523
Registered: ‎04-12-2010
My Device: BlackBerry Z10
My Carrier: Bell

Re: Blackberry WebWorks: It is impossible to develop for this.

Hello Andi,

 

I'll do my best to help address the issues below.

 

Web Inspector

  • Can you please confirm that your device is connected to a WiFi network? (Sometimes it helps to turn off the mobile network too.)
  • Are your PC and device both connected to the same SSID / WiFi access point? Or, is your PC connecting to the network through a wired connection?

Google Maps

  • WebWorks applications get only a specific slice of the overall memory, and each WebWorks application itself is restricted to a specific memory size.
  • Memory usage with Google Maps has been a common point of issue for developers, unfortunately there is not much you can do programmatically to ease this aside from exploring alternative API offerrings.

config.xml White Listing

  • Is the script you are loading at some external URL? It may be simplest to package the script within your application. This approach would also help ensure that any external changes would not affect functionality of your application down the line.
  • Perhaps there is some cross-domain restriction occurring?

Debugging

  • If you are able to test with our Ripple tool, that also has a built-in Web Inspector that you can access by right-clicking the background and clicking "Inspect Element". From there, you get access to the same inspector as you would in the browser.
  • Based on your previous post, it is safe to assume you are compiling in debug mode correct? And that WiFi is active on your device?
  • Do you see the same results for a debug application with Web Inspector that you see if you simply browse to your application through the native browser and enable Web Inspector there?

Ripple

  • Ripple is good for the majority of UI / layout and native functionality. The WebKit engine between devices and Ripple is also comparable, though newer versions of Ripple may have a newer engine. You are also subject to some cross-domain, browser-specific restrictions (in the plugin version.)
  • Generally I find Ripple good for 80-90% of my development, but it is no replacement for a real device, and some projects will certainly require more reliance on physical devices over Ripple.
  • It is still very much a work in progress, and we're aiming to make future versions as easy to use and reflective of the devices as possible.

Reboot on Load

  • Yes, this is very much an issue that adds to the development cycle. However, you can work around this by creating a WebWorks "Launcher" that accesses the URL of your hosted application. Basically, a config.xml file that points at your application. In that config.xml file, you would need to white-list specific WebWorks APIs for your external URL. You would also need to disable caching so that when you launch the app, it loads fresh content.
  • The benefit of doing this is that you can simply make changes in your hosted files, relaunch your "Launcher" app, and see the new content immediately without needing to reload the device.
  • There is a guide for this here: http://devblog.blackberry.com/2009/12/update-your-blackberry-widget-without-recompiling/
  • An example of the "Launcher" app / config.xml that I personally use is as follows:

<?xml version="1.0" encoding="UTF-8" ?> <widget xmlns="http://www.w3.org/ns/widgets" xmlns:rim="http://www.blackberry.com/ns/widgets" version="2.0" rim:header="RIM-Widget: rim/widget"> <name>WAMP</name> <author>Oros</author> <access uri="*" subdomains="true" /> <access uri="http://MYWAMP.SERVER.com" subdomains="true"> <feature id="blackberry.app" /> <feature id="blackberry.app.event" /> ... <feature id="blackberry.ui.dialog" /> <feature id="blackberry.utils" /> </access> <rim:cache disableAllCache="true" />
<content src="http://MYWAMP.SERVER.com" /> </widget>
  •  Basically, I am pointing this Launcher at my web server, so I can access my WebWorks applications. I white-list the features I want my server to be able to access (the whole list is much longer, and I disable caching.

I just read Point 7 after providing the above, can you elaborate a little as to what does not work? The above has proven quite useful in my development, but perhaps there is something else going on in your environment?

 

 

It seems to me that the Web Inspector issue may be the best starting point as, if we can resolve that, we can leverage it to investigate additional issues (like a remote URL not loading when specified in config.xml.)

 

Would you be able to share the full OS version of the device(s) you are testing on? This can be found under Options > Device > About Device Versions. Also, can you please confirm that you have attempted with:

  • Mobile network disabled, only WiFi enabled.
  • Your PC and Device both connected via WiFi to the same network.
  • Google Chrome as your PC browser when attempting to connect to Web Inspector.

These would be the best starting points that I can think of. Depending on the state of the above, this can guide additional investigation.


Erik Oros | @WaterlooErik | eoros@blackberry.com | Developer Issue Tracker

If a reply has answered your question, please click Accept as Solution to help other visitors in the future.
Please use plain text.
Trusted Contributor
usr501
Posts: 222
Registered: ‎03-03-2012
My Device: Ripple, LE Z10, Dev Alpha _C, Playbook, Bold 9900
My Carrier: rogers

Re: Blackberry WebWorks: It is impossible to develop for this.

[ Edited ]

Oros,

I have successfully built apps for Blackberry Playbook 2 and BB10 using  the Phonegap/Jquerymobile/Ant/Vmware Simulator WebWorks SDK 2.2.0.5 win7 environment

Moving to Web Works SDK 2.3.1.5 /HTML5/JqueryMobile/Ripple for platform OS 6.0,7.0,  seemed straight-forward enough and first build of the same app succeeded .However I cannot load ALX to device.I tried manually as well to install cod - no gold.I will try disconnecting both the device 9900 and the win7 desktop from the mobile network.I too was mail-bombed with several hundred web signer verifications :smileyvery-happy: In review - build succeeded but cannot load device?

finding my way around the website has been a bit of a challenge:smileyvery-happy:. will report back Monday with results of no mobile connection

Device manager 7 imports the alx to a pending state then when clicked there is no green status bar movement.The program refreshes and shows the app in the application loader in a uninstalled state. 9900 OS IS 7..2406 585 PLATFORM 5.0.0.734 

regards

Bob

Please use plain text.
BlackBerry Development Advisor
oros
Posts: 1,523
Registered: ‎04-12-2010
My Device: BlackBerry Z10
My Carrier: Bell

Re: Blackberry WebWorks: It is impossible to develop for this.

Hi there,

 

If you're connected via USB, I'd recommend giving Javaloader a shot. Example:

javaloader -u load MyApplication.cod

 

Note that JavaLoader.exe is located in the following folder:

...\BlackBerry WebWorks SDK 2.3.1.5\bin

 

The command above assumes you are executing it from the bin folder and that MyApplication.cod is also contained in the bin folder. Note that the COD  file name is just an example.

 

Unfortunately I can't speak for the Ant tools directly. Have you tried building with Ripple directly?


Erik Oros | @WaterlooErik | eoros@blackberry.com | Developer Issue Tracker

If a reply has answered your question, please click Accept as Solution to help other visitors in the future.
Please use plain text.
Trusted Contributor
usr501
Posts: 222
Registered: ‎03-03-2012
My Device: Ripple, LE Z10, Dev Alpha _C, Playbook, Bold 9900
My Carrier: rogers

Re: Blackberry WebWorks: It is impossible to develop for this.

just posted to community about bb10 webworks and ripple emulator throwing errors regarding password and a missing config.xml file

 

been using windows ripple 9.0.16 and it works fine 

Please use plain text.
Trusted Contributor
usr501
Posts: 222
Registered: ‎03-03-2012
My Device: Ripple, LE Z10, Dev Alpha _C, Playbook, Bold 9900
My Carrier: rogers

Re: loading ant/phonegap/jquerymobile on 9900

[ Edited ]

 thanks for your reply.

It must have had something to do with the size of the app which was 5mb for playbook.

I've since reduced to 4mb and loads using the 'ant blackberry load-device' command

 

and ant uses java loader:smileyvery-happy:

 

as for ripple its a great environment and I look forward to using it for 10 development  when the bugs are out.

I downloaded 9.6 emulator but ran into errors ranging from no config file to password errors. So its obviously different from playbook OS.

 

regards

 

Please use plain text.