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 Developer
savire
Posts: 4
Registered: ‎01-30-2010
My Device: Bold 9500
Accepted Solution

Download to Local, Event Intercept

Greeting,

 

Dev Platform:

OS: Windows Vista Enterprise 32 bit

 

I have installed the Widget plugin for Visual Studio 2008 and started to build a widget application. Have tried all features roaming around inside this forum so far. That's why i wonder if these features below exists too :

 

1. I know the widget SDK support saving and loading Local File with Blob/Binary mode. The problem is what if i want to get a remote file and save it locally. For example i want to fetch a list of images from my remote server and cached them locally so that it will saved the bandwidth later when the user view them again.

 

But the rule is i can't shipped them with the widget since the images will be constantly changes from time to time. That's why i need them to be fetched from the server regularly by the widget.

 

2. I know that the Java development have support on listening and intercept an Event such as On Call Receives, etc. The question is the widget support this feature too ? Is there any example which can be tested out?

 

I would love to see SMS/Email incoming-outgoing and Phone call incoming-outgoing event handler sample if they supported.

 

Thanks,

Please use plain text.
Retired
tneil
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: Download to Local, Event Intercept

For your first question... you can use the Gears HttpRequest object where you can request your images and grab their contents using the "responseBlob" property.  You can then save this Blob down to the file system locally.

 

For events on incoming call and new email messages... they are coming as quickly as we can create them.  However, there will also be a lab released early next week that will step you through how to wrap any of the existing Java APIs so that they can be used in your Widget.

 

That may be a topic of interest for you as well :smileyhappy: 

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Please use plain text.
New Developer
savire
Posts: 4
Registered: ‎01-30-2010
My Device: Bold 9500

Re: Download to Local, Event Intercept

Cool, thanks tneil that really solved my problem :smileyhappy: As for the listeners i will be glad waiting for the lab results next week. Oh yeah it would be really great if we can extends the Java wrapper classes using the Javascript prototyping abilities such as mentioned here : http://javascript.crockford.com/inheritance.html I have one more question though. I have checked the .cod file resulted from the build process. When i open them inside a text editor i could see the resources code such as html, javascript and css codes left un-encoded nor encrypted. Well it could be fine for a free apps. But if i build a commercial apps or enterprise apps it would be really not nice at all. Is there any way to use encryptor or obfuscator so that the resulting code a little bit harder to be reversed engineered ?
Please use plain text.
New Developer
savire
Posts: 4
Registered: ‎01-30-2010
My Device: Bold 9500

Re: Download to Local, Event Intercept

[ Edited ]
-- double post --
Please use plain text.
Retired
tneil
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: Download to Local, Event Intercept

Hi savire,

 

We are looking at the possibility of the Widget Packager in the future to obfuscate the HTML and JavaScript.  But we haven't quite gotten there.

 

There are a bunch of JavaScript and CSS obfuscators out on the market.  Some free and some you purchase.  This is a common way of protecting web resources for web sites today.

 

We are considering building this functionality into the product, but I couldn't tell you if or when it may be available.

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Please use plain text.
New Developer
savire
Posts: 4
Registered: ‎01-30-2010
My Device: Bold 9500

Re: Download to Local, Event Intercept

Hi there,

 

I was hoping it's build in by default :smileyhappy: since I thought that the purchased key will enabled this option as an added value.

 

However it's really a great environment which enable web based apps developer move their apps into mobile based version. Looking forward for new development options :smileyhappy:.

 

Thank you verymuch for the response tneil.

Please use plain text.