Using Android app, service, sockets + google maps API - What is the right way?

My android app needs communicate with server when it's (application) opened. For that I want to use socketIO Java client.

Do I need to use BoundService for sockets (it should run on background)? Activity and Service communication needs to be possible. For that, I can use broadcast intents.

And where socket connection needs to established? In MainActivity onCreate or in service onStartCommand method?

EDIT:
Request from my server (sockets) comes before google maps gets ready.. This means, i can't add markers to map etc. What is the best solution? Emiting to server something like "Google maps ready", and then emit from server to android?

Answer:1

I was poking around the rabbitmq documentation, and it seems that rabbitmq does not handle message redelivery count. If I were to manually ACK/NACK messages, I would need to either keep the retry ...

I'm not a Java guy but use Solr for searching, but after search about this issue I couldn't find out why it is happening. I have a 30-million-records-index with no sorting and the lightest setup I ...

The code identifies the integer that is closest to 0 in an array and if there are 2 or more values that meet this condition the return value should be null.The problem is that when I make the ...

I have recently been setting up mobile apps to work with my meteor server. As a part of this I have to pass the meteor web app data from android. Unfortunately I have been receiving a error that tells ...