I'm developping an app for a company who wish to use android phones as persistent user location info. I've created a LocationListener, and requestLocationUpdates, generating a cached process, which saves the data to a file. BUT, it's usual for the system to kill those processes to make up space for other proceses, and I want to negate that.
In words, I want for those cache processes to me persistent, and resist to kill commands (or stop the kill commands from the system). Already tried activities to no avail (kept crashing the app)
Right now the system is somethin like this:
LocationListener listener = new LocationListener(){
onLocationChanged(){useData;/*congestion avoidance function*/}
onStatusChanged()
{
if(offline){requestLocationUpdate(/*with new time, to avoid congestion*/)}
}
}
It's a very rough draft, hope you can get along with it. inbetween there are some functions to avoid battery drain and memory congestion
The process works fine, and it is persistent, sometimes. But some other times phone usage kills that process, and I want to avoid that.
I'm relatively new to android programming, but have experience in other systems.
Thanks in advance