java - Android app components - a word of advice needed -


I'm a whole newbie for Android development;

Actually, I'm going to write an application, which will allow the user to take a picture, which will be submitted for remote webservice (with a group of additional data).

So I'm guessing I'll need:

  1. Take a photo application (activity) which will collect all the additional data and put it in SQLite DB .
  2. A background service seeks DB in time intervals and sends data over the Internet, alternatively making web requests with the current GPS location (I am trying to keep in mind, sometimes Network will not be accessible)
  3. A receiver object that will run the service on boot, and optionally check that the service

has my concerns:

  1. I really need to monitor the service and care of anything that can kill it.
  2. Does the battery run for non-stop running at least 12 hours in Rvice, by doing some networking / GPS operations, let's say, 30 minute intervals. (G1 / Dream)
  3. What else should I be careful of?

Any ideas / suggestions will be appreciated.

a word of advice

.

Oh, wait. You're probably looking for some things related to Android, OK, move on.

A receiver object that will run the service on boot, and optionally check that the service needs to be restarted.

Yuck. Use the Alarm Manager and the behavior of your service / Windows is a scheduled task.

Do I really need to monitor the service and there is nothing bad that can kill it. >

If you use alarm manager and your service behaves like a cron job more.

Whether at least 12 hours with a non-stop running service, in some networking / GPS operations, we say, 30 minutes intervals. (G1 / Dream)

If you use alarm-manager and your service behaves like a cron job, then 30 minutes intervals Should be fine Just make sure that you turn off GPS radios when you complete it. Note that using GPS radios from cron job type work is a bit difficult, because it takes some time to make your first decision.

Should I be careful about what else?

And besides what I wrote above, you should be in the right shape. Note that the diver you are is not really "newbie" material.


Comments

Popular posts from this blog

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -