Go Back   Android Forums > Android Development > Application Development
Application Development Dev lounge for our application developers.

Get excited for the Samsung Galaxy S5! Find everything you need and discuss it in our Galaxy S5 Forum!

test: Reply
 
LinkBack Thread Tools
Old February 26th, 2011, 06:03 PM   #1 (permalink)
New Member
Thread Author (OP)
 
Join Date: Oct 2010
Posts: 13
 
Device(s):
Carrier: Not Provided

Thanks: 2
Thanked 1 Time in 1 Post
Default Tablet thread help

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!

XxAP0STLExX is offline  
Reply With Quote
sponsored links
Old February 27th, 2011, 12:15 PM   #2 (permalink)
Over Macho Grande?
 
alostpacket's Avatar
 
Join Date: Nov 2009
Location: NY
Posts: 7,873
 
Device(s): GlassXE, MotoX, N5, N4, N7'12, GNex, N1, SGT10.1, Revue, Xoom, Eris, OG Droid
Carrier: TMO

Thanks: 4,582
Thanked 3,563 Times in 1,522 Posts
Default

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.
alostpacket is offline  
Reply With Quote
The Following User Says Thank You to alostpacket For This Useful Post:
XxAP0STLExX (February 27th, 2011)
Old February 27th, 2011, 02:44 PM   #3 (permalink)
New Member
Thread Author (OP)
 
Join Date: Oct 2010
Posts: 13
 
Device(s):
Carrier: Not Provided

Thanks: 2
Thanked 1 Time in 1 Post
Default

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!!
XxAP0STLExX is offline  
Reply With Quote
Old February 27th, 2011, 03:03 PM   #4 (permalink)
Over Macho Grande?
 
alostpacket's Avatar
 
Join Date: Nov 2009
Location: NY
Posts: 7,873
 
Device(s): GlassXE, MotoX, N5, N4, N7'12, GNex, N1, SGT10.1, Revue, Xoom, Eris, OG Droid
Carrier: TMO

Thanks: 4,582
Thanked 3,563 Times in 1,522 Posts
Default

heh no problem, always glad to hear things worked out
alostpacket is offline  
Reply With Quote
Reply


Go Back   Android Forums > Android Development > Application Development
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 06:07 AM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.