Design advice in Android application -


i'm making application in android should detect, classify , map road surface anomalities (potholes, speedbumps, road rugosity/roughness, etc.) using mobile sensors (accelerometer, gps), , i'm in need of little advice on design choices since i'm quite new android development.

so far, have created background service (using asynctask) reads sensors , stores data in buffers. need use data provided service perform low level filters , computations must use pothole/speedbump/rugosity/mapping/etc. detection procedures.

i want somehow modularise/layer these procedures such lowest level filters provide data higher level procedures , i'd love suggestions/best practices on how achieve this.

i'd know how consume data provided background service (timer triggered event @ given interval, ...) ?

i no android expert, have been developing app similar structure yours. accomplish it, using actual long-running service top-level background proccessing , data management launchs different threads perform low-level computing , data acquisition.

for communication threads->service, registering broadcastreceiver in service , broadcasting information threads. communicate service->activities binding service activity described in "extending binder class" in android api guide.

so structure this: activity --(bound)--> service --(spawns multiple)--> thread

you can communication in top-down direction directly calling public methods in service , threads , down-top broadcasting messages , receiving them in activity , service.


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -