1. Download our Official Android App: Forums for Android!

Apps Tablet thread help

Discussion in 'Android Development' started by XxAP0STLExX, Feb 26, 2011.

  1. XxAP0STLExX

    XxAP0STLExX Newbie
    Thread Starter
    Rank:
    None
    Points:
    16
    Posts:
    13
    Joined:
    Oct 9, 2010

    Oct 9, 2010
    13
    1
    16
    Hi. I'm developing a game and it works great on my phone, but on a friends motorola xoom, the thread is running a little slower, totally messing up the speed of game. Anybody have any ideas of how I can program it to be at the same speed on any device? Thanks for help ahead of time!
     

    Advertisement

  2. alostpacket

    alostpacket Over Macho Grande?
    Rank:
    None
    Points:
    513
    Posts:
    7,973
    Joined:
    Nov 29, 2009

    Nov 29, 2009
    7,973
    3,603
    513
    Android App Developer
    NY
    What does the thread do exactly?

    Java doesn't really "guarantee" anything can be run at any specific times, but there are numerous ways of looping through code and try to run things at specific times...

    The Handler.post methods are one, a Timer is another... while loops in threads with sleep() calls or System.currentTimeMilliseconds() calls etc...

    If you're updating the positioning of a bunch of objects or something, you could approach the problem by using logic that checks how much time has passed since the last update, and sets the positions accordingly.

    I dunno really though, these are all just wild guesses at what you're trying to accomplish without seeing your code.
     
    XxAP0STLExX likes this.
  3. XxAP0STLExX

    XxAP0STLExX Newbie
    Thread Starter
    Rank:
    None
    Points:
    16
    Posts:
    13
    Joined:
    Oct 9, 2010

    Oct 9, 2010
    13
    1
    16
    Hey alostpacket. I actually figured it out before your reply. Took a lot of thought. And the funny thing is that I did a lot of what you just suggested. Thanks for the reply!!
     
  4. alostpacket

    alostpacket Over Macho Grande?
    Rank:
    None
    Points:
    513
    Posts:
    7,973
    Joined:
    Nov 29, 2009

    Nov 29, 2009
    7,973
    3,603
    513
    Android App Developer
    NY
    heh no problem, always glad to hear things worked out :)
     

Share This Page

Loading...