I have a newbie question.
I have a custom service (pollStatusService) that calls HttpUtils every 20 seconds. The log looks like this:
Starting Job: pollStatus
** Service (httlutilsservice) Create **
** Service (httlutilsservice) Start**
** Service (httlutilsservice) Destroy **
** Service (pollstatusservice) Start**
Starting Job: pollStatus
** Service (httlutilsservice) Create **
** Service (httlutilsservice) Start**
** Service (httlutilsservice) Destroy **
** Service (pollstatusservice) Start**
....
Should I create and destroy my service each time or should I avoid creations and destructions?
I don't know which is best for memory management but I did run this for 16 hours continuous without issues and only used half the battery life. Normally, it will run for 9 hours.
I have a custom service (pollStatusService) that calls HttpUtils every 20 seconds. The log looks like this:
Starting Job: pollStatus
** Service (httlutilsservice) Create **
** Service (httlutilsservice) Start**
** Service (httlutilsservice) Destroy **
** Service (pollstatusservice) Start**
Starting Job: pollStatus
** Service (httlutilsservice) Create **
** Service (httlutilsservice) Start**
** Service (httlutilsservice) Destroy **
** Service (pollstatusservice) Start**
....
Should I create and destroy my service each time or should I avoid creations and destructions?
I don't know which is best for memory management but I did run this for 16 hours continuous without issues and only used half the battery life. Normally, it will run for 9 hours.