• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem using Timer class

 
Rishi Tyagi
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
I am facing some problem while using Timer class.
In fact what i want to do is while loding of the midlet i want to run an animation in starting for a definite time period say 2-3 seconds and after that i want to load the main screen.
But problem is when i use the Timer class for the same then the first animation never being shown.
Is there anybody who have faced the same problem if yes then could you please tell me where may be the problem.
Regards,
Rishi
 
Stefan Haustein
Author
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One problem may be that the Display is not available before the startApp() method was called by the application manager. So if you start the animation in the constuctor of your MIDlet, this may be the problem. Does the problem persist on all emulators/devices you tried? Did you include serviceRepaint()? Can you post the relevant part of your code?
Best,
Stefan
 
a sanjuan
Ranch Hand
Posts: 164
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
are you doing a splash screen? i use a timer to run it...if this is what you are doing, i can email you some code.
 
Rishi Tyagi
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Sanjuan,
Yes you are right i want to show something like a splash screen.
Actually I am making an application in starting of which i have to download the data from the net. because it takes some time to access data from the http link in that time i want to show some animation on the screen so that user will not get bored and also he will not feel the delay and actual working behind the screen.
If you have done something like this then please send the code.
with best regards,
Rishi
email: rishi_tyagi@phoneytunes.com
 
a sanjuan
Ranch Hand
Posts: 164
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i emailed the long thing to you...hope it helps. it works fine for me, so email me back if there are problems.
 
Rishi Tyagi
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot sanjuan,
I will try with this and will get back to you.
Regards,
Rishi
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic