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
enableDeepak
Posts: 7
Registered: ‎04-19-2010
My Device: 9700

How to deploy web app

Hi,

 

I have a small website application with few HTML pages, images and javascript made using BB plugin for Visual Studio. How can I deploy this buch of files as a widget to BB phone?

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

Re: How to deploy web app

Hi enableDeepak,

 

I wasn't entirely clear on your question. Have you already created the BlackBerry Widget and tested it in the simulator and are now looking to install it on a device?

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Please use plain text.
Developer
iamtony
Posts: 87
Registered: ‎02-26-2010
My Device: Bold 9000

Re: How to deploy web app

[ Edited ]

Hi,

 

If Tim was right, then you probably have your files all packed up into a zip archive and have ran it through the widget packager.

 

All you have to do now is sign the .cod file using your key and then either use OTA or Desktop Manager to put it on your actual device.

 

You can get more information about signing here:

http://na.blackberry.com/eng/developers/javaappdev/codekeys.jsp

-Tony

Please use plain text.
New Contributor
enableDeepak
Posts: 7
Registered: ‎04-19-2010
My Device: 9700

Re: How to deploy web app

Hi,

 

I wouldn't  call it a widget specifically. Let's say, I have a simple folder with 5 html files (login.htm being the startup page). Functionality of these 5 html file is tested in simulator.

 

Now, what I want to know to know is that how can I deploy these 5 html files to a device such that, it displays an application icon. When users open this, my startup page should open. When I click on any link on this startup page (linked to other 4 pagesm which also reside with startup page), it should navigate smoothly.

 

I am a beginner, hence requested to guide with a little basics. Thanks a lot.

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

Re: How to deploy web app

Are you wanting to have the 5 pages located on the device itself?  Or are you looking to launch an application that would view your 5 pages from a remote web server?

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Please use plain text.
Developer
iamtony
Posts: 87
Registered: ‎02-26-2010
My Device: Bold 9000

Re: How to deploy web app

Hi,

 

If you want to have application icons, I believe you would have to package up a widget with a config.xml file that has:

 

 

	<icon src="icon_off.png" />
	<icon src="icon_on.png" rim:hover="true" />

 

 

This will display the icon_off.png initially, and when you hover, the icon_on.png.

 

As for the pages, you will be able to navigate smoothly whether or not it is stored on the device or on a remote server.

 

For having it on the device, just package up all the files into the zip archive and run it through the BBWP.

 

For having it on a remote server, one solution is to package up an index file which redirects the user to this remote server location that stores the login.htm for example.

 

-tony

Please use plain text.
New Contributor
enableDeepak
Posts: 7
Registered: ‎04-19-2010
My Device: 9700

Re: How to deploy web app

I want to deply 5 web pages to device.

 

Let me make my question even more simple. :smileyhappy:

 

Functionality Required: Login screen

I have 2 html pages - Loginscreen.htm and WelcomScreen.htm (and say a logo image and a css file too) Now, I want to deploy these 4 things as a package to BB device.


Query1 : How user will open loginscreen.htm available on device?

I expect there should be an icon in a widgets list clicking on which browser will open navigated to locally available Loginscreen.htm. (May be there is some other option you may suggest)

 

When user clicks on "log me in" button on loginscreenhtm after entering username and password, my application would make a call to .net webservice to validate login through javascript. If response is good, welcome screen will get displayed with text "Welcome <username>".

 

Query2: Once user logs in, is there a mechanism to have sessions in blackberry like .net?else how would I display welcome <username> on second page or any other consecutive page?

 

Last Query3:Assuming that JAVA is out of scope and only .net technology is available, is there a better supported approach (may be winform etc) to implement basic functionality mentioned abvove?

I am new to blackberry hence not aware of available options and standard practices.

 

 

 

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

Re: How to deploy web app

 

If you do not want to write a Java application you can create a BlackBerry Widget.  It is entirely authored in HTML, CSS and JavaScript.  There is no way to run .NET code locally on a BlackBerry at all.

 

To package up your pages, you would place them into a BlackBerry Widget.  You can use the Visual Studio Plug-in to create a BlackBerry Widget.  This plug-in can be downloaded here:

http://na.blackberry.com/eng/developers/browserdev/devtoolsdownloads.jsp

 

You would then make an AJAX call to your web service to validate your login.  You can keep your session information in cookies so that it is maintained from page to page.

 

There are a bunch of Labs/Tutorials and Samples for Widgets that can be found here:

http://www.blackberry.com/developers/widget

 

You can also view an introductory video on how to build a widget in Visual Studio here:

http://www.blackberry.com/DevMediaLibrary/view.do?name=widgetBlackBerryplug-inMicrosoftvisualstudio

 

Other widget and web related videos can also be found here:

http://na.blackberry.com/eng/developers/resources/videolibrary.jsp#tab_tab_browser

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Please use plain text.