Discussion Board

Results 1 to 6 of 6
  1. #1
    Regular Contributor buffon2009's Avatar
    Join Date
    Nov 2010
    Location
    Egypt,Mansoura
    Posts
    80
    i wanna set a variable that change every time i open the midlet

    for example, i wanna know how many times my midlet opened and bring it to the display
    Let The Impossible Happen!!!

  2. #2
    Nokia Developer Champion raj_J2ME's Avatar
    Join Date
    Mar 2008
    Location
    The Capital of INDIA
    Posts
    4,314
    Quote Originally Posted by buffon2009 View Post
    i wanna set a variable that change every time i open the midlet

    for example, i wanna know how many times my midlet opened and bring it to the display
    Take an integer variable and keep on increasing the same inside either the MIDlet's constructor or inside the startApp ().
    Thanks with Regards,

    R a j - The K e r n e l


    Join Delhi-NCR Nokia Developer's Community,

  3. #3
    Regular Contributor buffon2009's Avatar
    Join Date
    Nov 2010
    Location
    Egypt,Mansoura
    Posts
    80
    no i want the variable keep its value even if i exit my midlet

    when i open the Midlet again it increase and so on

    do u get it?
    Let The Impossible Happen!!!

  4. #4
    Regular Contributor nitinverma274's Avatar
    Join Date
    May 2010
    Posts
    94
    You have to use Persistant Storage.

  5. #5
    Nokia Developer Champion hartti's Avatar
    Join Date
    Apr 2003
    Location
    USA, CA
    Posts
    7,192
    And you could start by reading this page from FN Wiki about persistent data storage
    http://wiki.forum.nokia.com/index.ph...ata_in_Java_ME

    Hartti

  6. #6
    Nokia Developer Champion raj_J2ME's Avatar
    Join Date
    Mar 2008
    Location
    The Capital of INDIA
    Posts
    4,314
    Quote Originally Posted by buffon2009 View Post
    no i want the variable keep its value even if i exit my midlet

    when i open the Midlet again it increase and so on

    do u get it?
    Cool, no issues. for this, at the time you are exiting the app, write that variable inside the RMS and read the when the app gets invoked and thereafter you increase this value.
    Thanks with Regards,

    R a j - The K e r n e l


    Join Delhi-NCR Nokia Developer's Community,

Similar Threads

  1. Simple Question
    By malloc in forum Symbian C++
    Replies: 3
    Last Post: 2007-04-11, 16:27
  2. A simple question
    By fatalord in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 4
    Last Post: 2006-03-31, 15:15
  3. one simple question
    By shadow-2005 in forum Symbian C++
    Replies: 0
    Last Post: 2006-02-09, 09:06
  4. Simple Question
    By dreamix in forum Symbian Tools & SDKs
    Replies: 5
    Last Post: 2004-08-10, 12:38
  5. A simple question!
    By mastercarter in forum Mobile Web Site Development
    Replies: 1
    Last Post: 2003-02-05, 11:34

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