From 4cef505a2c182e5e8b7023d874be266ae9769da5 Mon Sep 17 00:00:00 2001
From: Bananeweizen
Date: Fri, 10 May 2013 17:23:00 +0200
Subject: refactoring: make handler abstract
* needs overridden methods
* add documentation
---
main/src/cgeo/geocaching/utils/GeoDirHandler.java | 22 ++++++++++++++++------
1 file changed, 16 insertions(+), 6 deletions(-)
(limited to 'main/src')
diff --git a/main/src/cgeo/geocaching/utils/GeoDirHandler.java b/main/src/cgeo/geocaching/utils/GeoDirHandler.java
index 21b2562..78455c4 100644
--- a/main/src/cgeo/geocaching/utils/GeoDirHandler.java
+++ b/main/src/cgeo/geocaching/utils/GeoDirHandler.java
@@ -9,10 +9,19 @@ import android.os.Message;
/**
* GeoData and Direction handler. Manipulating geodata and direction information
- * through a GeoDirHandler ensures that all listeners are registered from a
- * {@link android.os.Looper} thread.
+ * through a GeoDirHandler ensures that all listeners are registered from a {@link android.os.Looper} thread.
+ *
+ * To use this class, override at least one of {@link #updateDirection(float)} or {@link #updateGeoData(IGeoData)}. You
+ * need to start the handler using one of
+ *
+ *
{@link #startDir()}
+ *
{@link #startGeo()}
+ *
{@link #startGeoAndDir()}
+ *
+ * A good place might be the {@code onResume} method of the Activity. Stop the Handler accordingly in {@code onPause}.
+ *
*/
-public class GeoDirHandler extends Handler implements IObserver