Skip to content
Aasim's Web Corner
Aasim's Web Corner

Ink is better than the best memory.

  • Odysseys & Artistry
    • Saunterer Soul
    • My Poetry
    • My Sketch Work
  • Project Management
    • Agile & Frameworks
    • PMP Certification
  • Digital Diary
    • History
    • Islam
    • Life Around Us
    • My Bookshelf
  • My Tutorials
    • Amazon Kindle
    • Android
    • Aspect Oriented Programming
    • BlackBerry
    • Code Repositories
    • iOS
    • Java
    • JavaScript
    • Linux
    • Random Tips
Connect with me
Aasim's Web Corner

Ink is better than the best memory.

Blackberry-AppDevelopment-Tutorial-Part01-AasimNaseem.com

BlackBerry Application Development Tutorial (Part-4)

Aasim Naseem, February 23, 2011 | Read Count: 14,451May 16, 2025
Category: My Tutorials > BlackBerry

Hello All,
Hope you’re enjoying the world around you.

Surprised?? I know; after a long time, I am here writing a tutorial on BlackBerry application development. It is a requested tutorial, asked for by some developers a few days back. So here it is:

Note: This tutorial is a part of a series of my tutorials on BlackBerry application development; so far we have discussed the following.

  • Introduction :: BlackBerry Application Development
  • Setting Up Your System :: BlackBerry Application Development Tutorial (Part-2)
  • Your First Application :: BlackBerry Application Development Tutorial (Part-3)
  • Creating A WebIcon :: BlackBerry Application Development Tutorial (Part-4)

Introduction:
My friend has a problem: He visits a site many times a day. Every time he has to open browser, type the site name or chose from favorites to see it. He asked, what if there is an icon on my home screen that directly open a browser and navigate to that particular site?” By doing this, i need just one tap, just one.

The solution is Web Icon. How?  I’m telling you next. First bring a cup of coffee or tea, whatever you like; I brought a cup of Qehwa (a local drink for winters) with two chocolates. Bryan adams is playing in background. Sit relax.

Here we go. A web icon is an application that launches a BlackBerry smartphone browser to a predefined web address. Web icons displayed in the list of BlackBerry smartphone applications and they can be used as shortcuts to a BlackBerry smartphone user’s favorite websites.

Lets start. The first thing is to create a new class that extends from WebIcon. Here I’m dividing talk in two parts; Frist for the devices earlier to 4.0 and second, the part is for 4.1 and later.

1. BlackBerry Device Software earlier than 4.0

When using BlackBerry Device Software versions earlier than 4.0, the default browser is the only one that can be invoked;

As an example, a new class called BlackBerryWebIcon is created below that extends WebIcon and points to my blog, AasimNaseem.com; only three lines of code need to be added to the main method of this new class.

2. BlackBerry Device Software 4.0 and later

The previous sample can also be used for BlackBerry Device Software up to and including 4.2.1, although the following code samples offer a simpler methodology for allowing the web icon to invoke the default browser or invoke specific browsers on the BlackBerry smartphone.

A web icon may invoke either the default browser on the BlackBerry smartphone or the Internet Browser, the Wireless Application Protocol (WAP) Browser, the BlackBerry® Browser, the Wi-Fi® Browser, or the BlackBerry® Unite!™ Browser.

The following code creates a web icon that launches a browser to a specific web address for the given browser type;  If the given browser type is not available, the web icon launches the default browser.

Note: The previous code sample makes static calls to a factory class called BrowserSessionFactory to create these different  BrowserSessions; One thing more ist that BlackBerry Device Software 4.2 may prevent the previous code sample from opening the default browser. As a workaround, add the following code after the call to the displayPage method: This issue was resolved in BlackBerry Device Software 4.2.1;

As an example, a new class called BlackBerryWebIcon is created in the following sample that extendsWebIcon and points to my blog, AasimNaseem.com;. Again, only three lines of code need to be added to this new class.

At this point we are get done with code; Thumbs up; Plus its time to change Bryan Adams. Let try some slow number of Richard Marx.

Alright, next is to set the title of your application, as this title will be appears on the Home screen of the smartphone  user scrolls over the icon; To to this, right-click the project, select Properties and then select the General tab. In this area, you can type the application title, vendor name and application description.

Done; ?? great; Now next is to add an application icon. This is the icon that displays on the Home screen of the BlackBerry smartphone. Do the following steps:

  • Create an image approximately 32 x 32 pixels in size.
  • Right-click the project, select Add File to Project, and then navigate to the custom icon.
  • Once the file is added, right-click the file, and then select Properties.
  • Select the check box for Use as Application Icon.

Congratulations. You have done it; isn’t that simple?? Indeed it is; Make victory sign; Compile and deploy on your phone;

Feel free to throw queries incase you found a problem.
Have a nice time.

Happy Development;

source: http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800332/800440/How_To_-_Create_a_web_icon.html?nodeid=1487655&vernum=0

free counters

Author Profile

Aasim Naseem
Hey, Thanks for your interest. I’m a PMP, AWS Solutions Architect, and Scrum Master certified professional with 17+ years of hands-on experience leading projects, building teams, and helping organizations deliver software solutions better, faster, and smarter.

Outside of work, I’ve got a deep curiosity for history — especially ancient civilizations like Egypt. I also enjoy reflecting on the everyday moments that shape how we live and work. This blog is my space to share insights, lessons, and thoughts from both my professional journey and personal interests.

Thanks for reading — and I hope you will find something here that matches your interest.
Latest entries
  • Economic impact of Eid ul Adha - AasimNaseem.comIslamJune 6, 2025 | Read Count: 283Economic impact of Eid-ul-Adha
  • Best PMP Exam Study Resources - AasimNaseem.comPMP CertificationMay 23, 2025 | Read Count: 493Best PMP Study Resources for 2025 (Books, Courses, Tools & More)
  • agile vs scrum - AasimNaseem.comAgile & FrameworksMay 7, 2025 | Read Count: 463Agile vs Scrum: Finally Understanding the Difference
  • When Agile shouldn’t Use - AasimNaseem.comAgile & FrameworksApril 25, 2025 | Read Count: 493When Not To Use Agile: 5 Signs You Need a Different Approach
BlackBerry BlackBerry Application DevelopmentBlackBerry Application Development TutorialBlackBerry JDE plug-in for eclipseBlackBerry Tutorialblackberry with eclipseconfiguring eclipse with BlackBerryCreating A WebIconJavaweb icon tutorial in blackberry

Post navigation

Previous post
Next post

Related Posts

BlackBerry Blackberry-AppDevelopment-Tutorial-Part01-AasimNaseem.com

BlackBerry Application Development Tutorial (Part-1)

September 22, 2009 | Read Count: 16,497May 16, 2025

Category: My Tutorials > BlackBerryHello, all. I hope everything is going well. This is the 2nd day of Eid, and I’m building my system after switching back to Windows XP from Windows Vista Home Premium. Thanks to Allah, my notebook is now running smoothly. Right now I’m running FF with…

Read More
BlackBerry BlackBerry-AppWorld-AasimNaseem.com

Widget SDK Released for BlackBerry

August 8, 2009 | Read Count: 16,437April 29, 2025

Category: My Tutorials > BlackBerryResearch In Motion (RIM) has announced the BlackBerry Widget SDK to enable third-party application developers to build rich, integrated applications for BlackBerry smartphones using common web technologies. With the BlackBerry Widget SDK, developers can build web-based applications for BlackBerry smartphones with advanced features and functionality, a…

Read More
BlackBerry RIM Launches BlackBerry Desktop Manager for Mac Users-AasimNaseem.com

RIM Launches BlackBerry Desktop Manager for Mac Users

August 9, 2009 | Read Count: 16,421April 29, 2025

Category: My Tutorials > BlackBerryFinally, RIM launches BlackBerry Desktop Manager for Mac users. This new software makes it easy to sync data between Mac applications and BlackBerry smartphones. Waterloo, ON – Research In Motion (RIM) (NASDAQ: RIMM, TSX: RIM) has exciting news for Mac® users that want an easy and…

Read More

Comments (20)

  1. Pingback: BlackBerry Application Development Tutorial (Part-3) « Aasim's Web Corner;
  2. Pingback: BlackBerry Application Development Tutorial (Part-2) « Aasim's Web Corner;
  3. ahmad Saleem says:
    February 23, 2011 at 2:45 am

    blackberry??? again?? you told you were in iPhone.

    Reply
    1. y. Akbar says:
      February 23, 2011 at 2:51 am

      ye Mr Ans hain ye kch b ker sakty hain kisi b time. Aj ye iPhone my hy kal ye android my ho ga person kisi or chez my. He will get mad one day. itni c jaan hy is ki.

      Reply
  4. Pingback: BlackBerry Application Development :: Introduction « Aasim's Web Corner;
  5. Maqbool says:
    February 23, 2011 at 8:15 am

    kindle, android, iphone, blackberry. what next. i think windows 7 phone. 🙂 🙂
    thumbs up for you dude.

    Reply
  6. Amna Zaree says:
    February 23, 2011 at 10:43 am

    Ans bahi you great. Everytime you bring a detail words about something interesting. good work. im working in C# now a days. need little help.
    well you are guro no doubt. dnt know how you move take different things parallel.

    Reply
  7. Khalid Abbasi says:
    February 23, 2011 at 11:13 am

    Well done Ans. very descriptive way to telling whole story. Your style of explaining things is impressive.

    Reply
  8. Aqueel Ahmad Mirza says:
    February 23, 2011 at 2:27 pm

    Yar kafi tareef ho gae hai teri. Itni bohat hai :-p
    well done buddy. Keep it up bro 🙂

    Reply
  9. fusion says:
    February 25, 2011 at 5:31 pm

    very nice information you are sharing i really like that keep it up thanks.

    Reply
  10. bobby says:
    May 2, 2011 at 2:29 pm

    Really guys, Nice Article and its very important for me because I am a new in Mobile Application Development and your others blog Posts really help me, Pls share another article on a new Tech of Blackberry Playbook Development. Thanks a lot…

    Reply
  11. Sara says:
    July 3, 2011 at 1:50 pm

    Do you have url for book or tutorial for full blackberry development?

    Reply
  12. waisome says:
    July 13, 2011 at 9:27 pm

    i would like to create server vs client application with the basic start to access to a file or folder on a set location and then byextentions a form of remote desktop application concepts can u advise were to get started

    Reply
  13. sri says:
    August 30, 2011 at 7:38 pm

    I Dint Understand this program….part3 was so simple and part4 was v difficult…many builtin functions which require a prior knowledge am i ri8?

    Reply
  14. Scott says:
    September 12, 2011 at 10:58 pm

    Does anyone know a way we could do this but instead of opening up a web URL have the icon open up a static HTML file that is packaged with the application? WOuld love to do this for an emergency contact list I have created. As the list changes I could just re-push the app a couple times per year.

    Reply
  15. Mark C says:
    November 15, 2011 at 6:59 am

    i am experiencing “BrowserSessionFactory cannot be resolved” . Do you have the code for this class as it pertains to this tutorial?
    Thank you,
    M

    Reply
  16. agus @ ROR Developer says:
    December 22, 2011 at 12:33 pm

    I have a few good app ideas but don’t have the necessary skills to make it happen. Is there any advice that you could give me on how to get my app up and running?
    Thanks

    Reply
    1. Ans says:
      December 22, 2011 at 4:36 pm

      one option is you hire or outsource someone and pay one once to develop your application; Once it ready you can push it to blackberry store and can earn money when people download it or use in-App purchases;

      Reply
  17. recessionbearddc says:
    December 30, 2011 at 9:33 pm

    Hi Aasim,
    How do I remove a system menu item? lol, finally got the programs signed and running on my phone. There were some other tutorials that I also followed. Here is the link to the tutorials:

    http://www.blackberrycool.com/2009/07/16/how-to-write-a-blackberry-application-lesson-3-create-shortcuts-and-more/

    My question is: How do I remove a system-wide menu Item? I’m going to keep digging but figured if you knew maybe you could help me.
    Have a great New Years!
    RB

    Reply
  18. David says:
    May 5, 2012 at 5:41 pm

    Quiero ese programa para llamar grati

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Recent Posts

  • Economic impact of Eid-ul-Adha
    Economic impact of Eid-ul-Adha
    June 6, 2025 | Read Count: 283
  • Best PMP Study Resources for 2025 (Books, Courses, Tools & More)
    Best PMP Study Resources for 2025 (Books, Courses, Tools & More)
    May 23, 2025 | Read Count: 493
  • Agile vs Scrum: Finally Understanding the Difference
    Agile vs Scrum: Finally Understanding the Difference
    May 7, 2025 | Read Count: 463
  • When Not To Use Agile: 5 Signs You Need a Different Approach
    When Not To Use Agile: 5 Signs You Need a Different Approach
    April 25, 2025 | Read Count: 493
  • Quran on Peace and Kindness
    Quran on Peace and Kindness
    April 20, 2025 | Read Count: 452

Posts from Past

  • June 2025
  • May 2025
  • April 2025
  • January 2025
  • November 2024
  • April 2024
  • October 2022
  • August 2021
  • September 2020
  • May 2020
  • April 2019
  • January 2019
  • September 2018
  • July 2015
  • June 2015
  • November 2014
  • September 2014
  • April 2014
  • June 2013
  • May 2013
  • February 2013
  • January 2013
  • December 2012
  • September 2012
  • August 2012
  • July 2012
  • June 2012
  • March 2012
  • February 2012
  • January 2012
  • November 2011
  • October 2011
  • September 2011
  • August 2011
  • July 2011
  • June 2011
  • May 2011
  • April 2011
  • February 2011
  • January 2011
  • December 2010
  • November 2010
  • October 2010
  • September 2010
  • August 2010
  • July 2010
  • June 2010
  • May 2010
  • April 2010
  • March 2010
  • February 2010
  • January 2010
  • December 2009
  • November 2009
  • October 2009
  • September 2009
  • August 2009

Categories List

  • Agile & Frameworks
  • Amazon Kindle
  • Android
  • Aspect Oriented Programming
  • BlackBerry
  • Blog
  • Code Repositories
  • History
  • iOS
  • Islam
  • Java
  • JavaScript
  • Life Around Us
  • Linux
  • My Bookshelf
  • My Poetry
  • My Sketch Work
  • PMP Certification
  • Random Tips
  • Saunterer Soul

Recent Posts

  • Economic impact of Eid-ul-Adha
  • Best PMP Study Resources for 2025 (Books, Courses, Tools & More)
  • Agile vs Scrum: Finally Understanding the Difference
  • When Not To Use Agile: 5 Signs You Need a Different Approach
  • Quran on Peace and Kindness

Recent Comments

  1. Aasim Naseem on When Not To Use Agile: 5 Signs You Need a Different Approach
  2. Aasim Naseem on When Not To Use Agile: 5 Signs You Need a Different Approach
  3. Masjid Wazir Khan, Lahore Pakistan - Aasim's Web Corner on Everlasting Art of Badshahi Masjid Lahore Pakistan
  4. Rishi Kumar on When Not To Use Agile: 5 Signs You Need a Different Approach
  5. Best PMP Study Resources for 2025 (Books, Courses, Tools & More) - Aasim's Web Corner on PMP Exam Eligibility 2025: 3 Things You Need to Know
©2025 Aasim's Web Corner | WordPress Theme by SuperbThemes