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

  • Home
  • SEARCH
  • 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 6595291
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T17:55:17+00:00 2026-05-25T17:55:17+00:00

I make a alternate entry point that display a dialog Hello new week on

  • 0

I make a alternate entry point that display a dialog ” Hello new week ” on the first day of each week.

My code :

public static void main(String[] args)
    {
        if ( args != null && args.length > 0 && args[0].equals("autorun") ){

             MyApp theApp = new MyApp();
             theApp.pushThread.start();
             theApp.enterEventDispatcher(); 
       } 
        else {       
            MyApp theApp = new MyApp();
            theApp.pushScreen(new MyScreen());
            theApp.enterEventDispatcher();
       }        
    }


    Thread pushThread = new Thread(){
        public void run() {
            if(get_DayOfWeek().startsWith("Mon"))
            showMessage("Hello New Week ");

        }   
    };
    private void showMessage(String data) {
          UiEngine ui = Ui.getUiEngine();
          Screen screen = new Dialog(Dialog.D_OK, data, Dialog.OK,
            Bitmap.getPredefinedBitmap(Bitmap.EXCLAMATION),
            Manager.VERTICAL_SCROLL);
          ui.queueStatus(screen, 1, true);
        }

If today is Mon, it will display Dialog. But if today is Sunday, it will not display tomorrow. I want to always check the time but my code only check one time.
I repalce

public void run() {
                if(get_DayOfWeek().startsWith("Mon"))
                showMessage("Hello New Week ");

            }

by

public void run() {
                    while (get_DayOfWeek() != null){
                        if(get_DayOfWeek().startsWith("Sun"))
                            showMessage("Hello New Day ");
                        }

                }

but it said “Uncaught Exception, My notifacations is not responding, the process terminated ”
Can anyone help me get way to always check the time ?

  • 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-25T17:55:17+00:00Added an answer on May 25, 2026 at 5:55 pm

    It is quite simple.

    Implement RealtimeClockListener and use it in your application. In your implementation there will be method clockUpdated(). The BlackBerry Operating System will invoke this method every minute.

    Use System.currentTimeMillis() in this method to get the current time and use Calendar class to calculate current weekday.

    That’s it.

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

Sidebar

Related Questions

Make a new AS3 Document in Flash, paste in the following code and run
Background: I have an application with an alternate entry point. It listenes for SMS
To make a JavaScript class with a public method I'd do something like: function
I have some files that use alternate data stream and are not shown on
How do you make a Wordpress header image clickable so that it navigates to
First, I will outline my issue in case someone has an alternate fix. The
Imagine that I will make an async call in .NET, i.e. HttpWebRequest.BeginGetResponse, and the
I have created a Sub-Class of NSOutlineView and used the below code to make
Hi I have this following code with jquery , so it will alternate colors
The goal: Remote control of an Android device. I'm trying to make an alternate

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.