I am attempting to spawn a worker thread in a service to do the
service's work. But when i run the debugger, the system does not
appear to create the worker thread. however, the application is
listening for updates
private void startMainService() {
startThread();
}
private volatile Thread runner;
public synchronized void startThread(){
if(runner == null){
runner = new Thread();
runner.start();
lm = (LocationManager)
getSystemService(Context.LOCATION_SERVICE);
locationListener = new MyLocationListener();
lm.requestLocationUpdates(LocationManager.GPS_PROVIDER,
minTimeMillis,
minDistanceMeters,
locationListener);
initDatabase();
Log.i(TAG, "Worker thread spawned");
}
}
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en