addressalign-toparrow-leftarrow-rightbackbellblockcalendarcameraccwcheckchevron-downchevron-leftchevron-rightchevron-small-downchevron-small-leftchevron-small-rightchevron-small-upchevron-upcircle-with-checkcircle-with-crosscircle-with-pluscrossdots-three-verticaleditemptyheartexporteye-with-lineeyefacebookfolderfullheartglobegmailgooglegroupshelp-with-circleimageimagesinstagramFill 1linklocation-pinm-swarmSearchmailmessagesminusmoremuplabelShape 3 + Rectangle 1ShapeoutlookpersonJoin Group on CardStartprice-ribbonShapeShapeShapeShapeImported LayersImported LayersImported Layersshieldstartickettrashtriangle-downtriangle-uptwitteruserwarningyahoo

Architecture question

From: Gianluigi D.
Sent on: Wednesday, April 25, 2012 10:27 AM

Hi to all,
I'm new in android dev and I'm developing an Android game. My aim is to have a network server service that update the view 
with these components:

1) A blocking serversocket that wait for external data and push in a queue
2) An asyncronous polling service that fetch data from the queue and update the view (a Drawable view)

My questions are:
1) what should I use for the ServerSocket? A Service or a BroadcastReceiver or even simply a thread?
I'm asking why I see that there are different opinions about these components, i.e BroadcastReceiver hangs out after 10 secs!

2) the pooling service in which way should update the thread? 
I create a sequence of commands using a simple strategy pattern...and these commands
should inherent an AsyncTask or be a sequence of IntentServices or should I execute them directly in the UI thread ?

many thanks for any suggestion.

Our Sponsors

  • Veon

    Providing speaker, drinks & catering

  • Novoda

    Organising speakers, dates, attendees and advocating attendance.

  • SkillsMatter

    Offers use of their meeting areas and recording facilities

  • Microsoft

    Sponsoring the food, drinks & ping pong at the event on the 26th April

  • Google

    Offering Pizza & Beer to attendees at key events.

  • Badoo

    Sponsoring the food and drinks at the event on the 18th October

  • Monzo

    Pizza

  • Facebook

    Sponsoring & providing the speakers, venue & catering

People in this
Meetup are also in:

Sign up

Meetup members, Log in

By clicking "Sign up" or "Sign up using Facebook", you confirm that you accept our Terms of Service & Privacy Policy