This week's book giveaway is in the Spring forum.
We're giving away four copies of Java Persistence with Spring Data and Hibernate and have Cătălin Tudose on-line!
See this thread for details.
Win a copy of Java Persistence with Spring Data and Hibernate this week in the Spring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Ron McLeod
  • Tim Cooke
  • Paul Clapham
  • Liutauras Vilda
  • Junilu Lacar
  • Rob Spoor
  • Jeanne Boyarsky
Saloon Keepers:
  • Stephan van Hulst
  • Carey Brown
  • Tim Holloway
  • Piet Souris

Bluetooth serversocket in background

Ranch Hand
Posts: 41
MySQL Database Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I have made a game where you navigate a map and have to find an object. It is a very simple sprite game and now I want to now make it so that two players will communicate with each other so they can effectively race against each other.

The idea is to make one of the phones the "Server" and the other devices (as may make it for 3-4 players to play against each other) will connect to it and then when they have got the "item" send the time it took to complete to the server.

This will then wait for the others to complete the game and the collect the times. My question is how do I best run the bluetooth server socket in the background of the "Server" phone which will want to play the game as well as being responsible for collecting all the data.

I have read that using a service would be a good idea but I have never made one so not sure how communication between and activity and service would work.

Many Thanks
I am going to test your electrical conductivity with this tiny ad:
The Low Tech Laboratory Movie Kickstarter is LIVE NOW!
    Bookmark Topic Watch Topic
  • New Topic