• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
  • Mikalai Zaikin

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
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
    Bookmark Topic Watch Topic
  • New Topic