GPS & accelerometer activity logging (in background thread)

Put problem concerning MapActivities, MapViews, Overlays and GPS in this forum.

GPS & accelerometer activity logging (in background thread)

Postby RynoRn » Mon Apr 04, 2011 9:30 pm

Hey all,

I'm kinda beginner in the Android development and I would like to ask you some questions maybe you have some idea for my problems.

I'm developing an Android app which main goals are the following:

Background thread:
    - Logging current GPS coordinates continuously (storing in database)
    - Logging accelerometer activities (X, Y, Z coordinates) (storing in db aswell maybe)
    - if there is an internet connection avalaible the stored coordinates (GPS and accelero) have to be uploaded to a web server with a web service

On the Layout (what the user see):
    - the current GPS coordinates should be preseneted
    - a few buttons to be able to make some actions onclick
    - users should be notified about the upload actions if they were success or not

I have already implemented the GPS and the "accelero" part of the app and I have no problem with UI part. I can also upload the data to a web server.
The UI part can be easily implemented in an Activity if I know it right that's what is an Activity is for.

My main problem is that where should I implement the GPS, the accelerometer and the uploading part to run on a background thread. I have heard about Services which are running in the background. Should I do something like that?

I implemented all these in one Activity which is very lame I know so I have to redesign my app and make it more faster and more professional for a mobile device.

I hope I was clear and you can help me. Any advice is welcomed! :)
Thank you for all your help,
RynoRn
RynoRn
Freshman
Freshman
 
Posts: 2
Joined: Mon Mar 28, 2011 1:15 pm

Top

Re: GPS & accelerometer activity logging (in background thre

Postby adidmafioso » Sat Apr 09, 2011 1:48 pm

The way i have implemented in my application is listening the same code after certain amount of time in background.

This may not seem a god idea as it takes a lot of battery and the idea too is not that appealing but give it a try.
adidmafioso
Developer
Developer
 
Posts: 33
Joined: Mon Sep 21, 2009 9:30 pm
Location: delhi

Re: GPS & accelerometer activity logging (in background thre

Postby RynoRn » Fri Apr 22, 2011 10:49 am

It could work. I'll try, thanks.
RynoRn
Freshman
Freshman
 
Posts: 2
Joined: Mon Mar 28, 2011 1:15 pm

Top

Return to Map Problems

Who is online

Users browsing this forum: No registered users and 4 guests