×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Regular Contributor
    Join Date
    Feb 2005
    Location
    Kista, Sweden
    Posts
    267

    How to flash the backlight in a M3G app?

    I know how to flash the backlight in a regular MIDP app. I tried the same approach on a M3G app, but it didn't work. The M3G app includes animations, which are executed with AnimationControllers and AnimationTracks. I have to start a separate thread to call the flashBacklight method. When I do this, the M3G animations do not start. So there is a conflict between this thread and the M3G thread started by the animations. How can I resolve this issue so I can flash the backlight? This is needed for the app "Astral 3d worlds" that my company is going to release:
    http://www.mobile-visuals.com/3dastral.php

    This is the code that I have used:

    ----
    public void run()
    {long loopEndTime,loopStartTime;

    {
    loopStartTime = System.currentTimeMillis();
    tick();
    loopEndTime = System.currentTimeMillis();
    loopTime = (int)(loopEndTime - loopStartTime);
    if( loopTime < loopDelay )
    {
    try
    {display.flashBacklight(loopDelay);
    Thread.sleep( loopDelay - loopTime );
    }
    catch( Exception e )
    {
    }

    }
    else

    { display.flashBacklight(loopTime);


    }

    }
    }

  2. #2
    Registered User
    Join Date
    Oct 2009
    Location
    Noida
    Posts
    941

    Re: How to flash the backlight in a M3G app?

    Try using Nokia UI.
    com.nokia.mid.ui.DeviceControl.flashLights(long duration)
    Thanks,
    Ekta

  3. #3
    Regular Contributor
    Join Date
    Feb 2005
    Location
    Kista, Sweden
    Posts
    267

    Re: How to flash the backlight in a M3G app?

    I got this to work now and I didn't have to use com.nokia.mid.ui.DeviceControl.flashLights. This is my code:

    static int flashtime= 100;
    -------
    new Thread(this).start();
    -------
    public void run() {


    {

    while (1 < 2) {
    try {
    display.flashBacklight(flashtime / 2);
    Thread.sleep(flashtime);

    } catch (InterruptedException ex) {
    ex.printStackTrace();
    }


    }

    }
    }

Similar Threads

  1. make c++ app send data to flash lite app
    By redfuse in forum Symbian
    Replies: 3
    Last Post: 2009-10-24, 09:43
  2. Flash Lite App
    By shankx in forum [Archived] Flash Lite on Nokia Devices
    Replies: 3
    Last Post: 2009-04-15, 16:44
  3. Browser embedded flash apps hang when the backlight turns off
    By andrerobot in forum [Archived] Flash Lite on Nokia Devices
    Replies: 0
    Last Post: 2009-02-18, 23:07
  4. Leave backlight control to operating system when app is in background
    By manupeco in forum Mobile Java Media (Graphics & Sounds)
    Replies: 2
    Last Post: 2007-03-18, 09:07
  5. M3G (JSR 184) Detail about External Reference in m3g file
    By amitian in forum Mobile Java Media (Graphics & Sounds)
    Replies: 1
    Last Post: 2004-12-28, 14:50

Posting Permissions

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