Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (495)
Games in Android Showcase (114)
games submitted by our members
Games in WIP (563)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Android Bluetooth issues  (Read 6694 times)
0 Members and 1 Guest are viewing this topic.
Offline Braddas

Junior Member


Medals: 1
Projects: 1



« Posted 2012-03-03 20:55:26 »

I'm currently developing a game for Android that features bluetooth multiplayer and I am coming across some tricky issues.

Firstly, it appears that some older phones have custom bluetooth implementations that don't play well with the bluetooth API. I've seen this for myself when testing with my HTC Desire (Android 2.2), which can host a bluetooth game but not connect as a client (other non-htc devices can connect without any problems). A common solution involved using java reflection to access non-public methods of the API, but not only is this a messy solution it didn't solve the problem for me anyway. Has any one else run into this problem or found a solution without rooting the device?

I've also noticed that after a while the bluetooth connection becomes unreliable, in order to fix it I either switch bluetooth off and on again, or in some cases, restart the phone. Is it possible I'm 'gunking up' the bluetooth adaptor, or is this expected behavior? Either way, is it possible to somehow do a flush/reset without turning things off?
Offline princec

JGO Kernel


Medals: 378
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #1 - Posted 2012-03-03 23:36:02 »

Bluetooth is basically shit.

Why not use the Wifi capabilities of the phones instead?

Cas Smiley

Offline Braddas

Junior Member


Medals: 1
Projects: 1



« Reply #2 - Posted 2012-03-04 07:24:54 »

I'm hoping to offer both bluetooth and wifi options. The main reason I'm including bluetooth is that people are generally pretty familiar with it and it can be used anywhere. When it works, it works pretty well - but if I can't get over these issues the user experience is going to be a little rough on some devices.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline princec

JGO Kernel


Medals: 378
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #3 - Posted 2012-03-04 10:06:53 »

Fair enough - though I can't help but thinking you might just want to default to WiFi and use Bluetooth if that fails.

Cas Smiley

Offline Braddas

Junior Member


Medals: 1
Projects: 1



« Reply #4 - Posted 2012-07-18 06:52:34 »

Sorry for digging up an older thread, but I wanted to post a follow up in case anyone comes across this looking for answers. My advice, is listen to Cas and forget Bluetooth for multiplayer games. The fact that I couldn't get two HTC phones to connect for love 'nor money was kind of a deal breaker. The experience was also extremely clunky for two unpaired devices. The process differs slightly depending on the OS version, but requires displaying the notification bar (which interferes with your awesome UI), hoping the notification actually goes though (it occasionally won't), or requesting the user to leave the application, go to Android Bluetooth settings and pair there. This would probably be fine for apps, but I think gamers have come to expect a slicker experience. To be fair, the Android people set it up this way for perfectly valid security reasons.

In the end I felt it brought the quality of the entire game down and I dropped Bluetooth multiplayer. I'm sure these issues could be solved by better men than me, and there are doubtless some cases where it would be fine, such as a bluetooth poker game or something like that.

With Wifi, the host clicks one button to start a game. The clients click one button to join. It's bloody marvelous.
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

Dwinin (28 views)
2014-09-12 09:08:26

Norakomi (57 views)
2014-09-10 13:57:51

TehJavaDev (74 views)
2014-09-10 06:39:09

Tekkerue (37 views)
2014-09-09 02:24:56

mitcheeb (57 views)
2014-09-08 06:06:29

BurntPizza (45 views)
2014-09-07 01:13:42

Longarmx (28 views)
2014-09-07 01:12:14

Longarmx (34 views)
2014-09-07 01:11:22

Longarmx (34 views)
2014-09-07 01:10:19

mitcheeb (40 views)
2014-09-04 23:08:59
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!