Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7437797
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T10:27:16+00:00 2026-05-29T10:27:16+00:00

I am developing a Blackberry Java application and I need an update count in

  • 0

I am developing a Blackberry Java application and I need an update count in the app such that the user will know how many notifications they have on the phone. The number of notifications show up on the home screen beside the icon. The way I am keeping track of the icon variable “iconCount” between different entry points is through a singleton. I need to have this count be present even after the user turns off their device on and off. So if there are 7 updates available for them 7 will show up until they check the application. It will not reset to 0 when the device is turned off.

As a test to see what would happen if I set the count to 7 and turned off the device through the simulator; I held down the power button until it stated “turning device off, press any key to abort” then the screen went black. I waited a few seconds and pressed the hangup button again and the simulator powered up to show 7 new notifications.

This is a bit strange to me, I though you would need persistent store to accomplish this? Was I turning off the device properly, or does a singleton in fact hold the variable even after the device is shut off?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T10:27:16+00:00Added an answer on May 29, 2026 at 10:27 am

    A static member (as the singleton) will be unique inside a given application. But because BlackBerry Java implementation is so “particular” (to say the least), for each alternate entry point, you’ll have a different “application instance”, so several instances of your singleton will be created.

    If you want to share an object at runtime between several applications, you have to publish it in the RuntimeStore. If you also need persistence, then use PersistentStore, or plain files, or sqlite databases in newer OSes.

    And now about the simulator: don’t trust the simulator. Once you close your app your variables will vanish. Even if you have a background process, when you turn off the device it won’t exist any more. Test on a real device.

    Remember: BlackBerry is not Java. You’ll see many violations of the Java Specification (like for instance, the fact that the Persistable interface is not inherited) so get used to it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am developing on BlackBerry 4.7 Storm device. Reminder: My application will allow user
I am developing an app that tracks the user's position. I do not know
I'm developing an application for Blackberry and i need to know what is the
I am developing BlackBerry application that connects to the web service. When I developed
I am developing one Blackberry application using Eclipse, I need to show images in
I am developing Blackberry application. Every time when i want to test my app
I'm developing a BlackBerry app in Java and I have an Options class where
I'm developing a Java app for blackberry, in this app I have a login
I am developing a BlackBerry application that should work on OS 4.5+. I have
i am developing and app for blackberry and i need to send a Http

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.