Discussion Board

Results 1 to 4 of 4
  1. #1
    I'm currently writing an app for my e71 which requires the Math.random function. However, I have found that each time I start up the app on the e71 it will produce the same sequence of random numbers. I have tried seeding it with Date().getTime() and Date().getSeconds(), and although it produces a different set of numbers, the sequence of numbers is still the same on startup.

    Has anyone had this issue before, and does anyone know how to resolve it?

  2. #2
    Nokia Developer Moderator isalento's Avatar
    Join Date
    Jun 2008
    Location
    Tampere
    Posts
    831
    Hello,

    Welcom to Forum Nokia dibo!

    Could you check the firmware version of the E71 (*#0000#)?

    I was able to reproduce the issue with N96 as well.
    Unfortunately the only workaround I can think of is implementing a custom pseudorandom function.

    Google returns a couple of Mersenne-Twister implementations in JS. Those could be worth of trying.

    Ilkka - FN

  3. #3
    Registered User mch0lic's Avatar
    Join Date
    Jun 2009
    Location
    Kuala Lumpur, Malaysia
    Posts
    13
    Same same with n82.

    mindo

  4. #4
    Nokia Developer Champion jappit's Avatar
    Join Date
    Nov 2007
    Location
    Rome, Italy
    Posts
    2,391
    Not a solution, but a possible workaround: you could try by multiplying the random generated number for the current Date milliseconds. This way the obtained numbers should be different each time the widget is executed.

    Pit

Similar Threads

  1. e71 carbide UI Menu Icons Skinning issue
    By swordfishy in forum Themes/Carbide.ui
    Replies: 2
    Last Post: 2009-07-21, 15:12
  2. Shift issue on E71 qwerty keyboard
    By olhed in forum Symbian User Interface
    Replies: 4
    Last Post: 2009-07-01, 15:33
  3. App runs on N82, N95 but not on E71
    By NevenS in forum Symbian C++
    Replies: 4
    Last Post: 2009-03-12, 20:13
  4. E71 hacking issue
    By firosejinna in forum Mobile Java Networking & Messaging & Security
    Replies: 0
    Last Post: 2008-10-18, 12:41
  5. RTSP video streaming issue on 6280
    By olivier_irac in forum General Development Questions
    Replies: 0
    Last Post: 2006-12-04, 15:11

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved