×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Jan 2013
    Posts
    21

    Ruuning The J2me App At Fixed Intervals

    hello, sir in my j2me App I want the Specific module to be running at fixed intervals like every 2 minutes throught the app even if i switch to the next form ....
    the same module should be running in the background at fixed intervals
    where should i place my code with timer so that it will get executed every 2 minutes in background.. of my app
    i am really nott getting this point
    please help asap!!


    thanks swati!!

  2. #2
    Nokia Developer Champion
    Join Date
    Mar 2003
    Location
    Finland
    Posts
    9,545

    Re: Ruuning The J2me App At Fixed Intervals

    Have you looked into the concept of threads?

  3. #3
    Registered User
    Join Date
    Jan 2013
    Posts
    21

    Re: Ruuning The J2me App At Fixed Intervals

    yaa i tried using threads tooo
    this is the code for it

    public class Running implements Runnable
    {

    Thread t = new Thread();
    public void run()
    {
    while(true)
    {
    distFrom(latitude,longitude,Double.parseDouble(serverlatitude) , Double.parseDouble(serverlong));

    }
    }

    public Running()
    {
    while(true)
    {
    distFrom( latitude, longitude, Double.parseDouble(serverlatitude) , Double.parseDouble(serverlong));
    }
    }




    }

    but i want this to be running every 2 miutes .... and something running in the backgroung by doing this ...

    how can i run this thread in backgroung every 2 minutes ...
    please help asap

    thanks
    swati!!

  4. #4
    Nokia Developer Champion
    Join Date
    Mar 2003
    Location
    Finland
    Posts
    9,545

    Re: Ruuning The J2me App At Fixed Intervals

    Look also into the concept of timers.

Similar Threads

  1. How to set fixed font size for LIST elements independent of devices in J2ME
    By syedvajidali in forum Mobile Java Networking & Messaging & Security
    Replies: 1
    Last Post: 2011-04-07, 19:43
  2. Clicking photo in fixed intervals
    By chandran.biju007 in forum Symbian C++
    Replies: 2
    Last Post: 2009-11-27, 09:41
  3. Replies: 2
    Last Post: 2006-11-03, 14:52
  4. updating main display at set intervals?
    By diago in forum Mobile Java General
    Replies: 1
    Last Post: 2003-02-20, 04:32
  5. Nokia sound API.... game freezes at variable intervals
    By shahzad73 in forum Mobile Java General
    Replies: 0
    Last Post: 1970-01-01, 02:00

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •