com.TwentyCodes.android.SkyHook
Class SkyHookService

java.lang.Object
  extended by Service
      extended by com.TwentyCodes.android.SkyHook.SkyHookService

public class SkyHookService
extends Service

this will be a service that will retrieve periodic updates on the users location

Author:
Ricky Barrette

Field Summary
static String PERIOD_BETWEEN_UPDATES
           
static String TAG
           
 
Constructor Summary
SkyHookService()
           
 
Method Summary
 Location convertLocation()
          converts skyhook's location object into android's location object
 IBinder onBind(Intent arg0)
          (non-Javadoc)
 void onCreate()
           
 void onDestroy()
          aborts location services (non-Javadoc)
 void onStart(Intent intent, int startId)
          To keep backwards compatibility we override onStart which is the equivalent of onStartCommand in pre android 2.x
 int onStartCommand(Intent intent, int flags, int startId)
          This method is called when startService is called.
static Runnable startService(Context context, long period)
          a convince method for starting the service.
static Runnable stopService(Context context)
          a convince method for stopping the service
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PERIOD_BETWEEN_UPDATES

public static final String PERIOD_BETWEEN_UPDATES
See Also:
Constant Field Values

TAG

public static final String TAG
See Also:
Constant Field Values
Constructor Detail

SkyHookService

public SkyHookService()
Method Detail

convertLocation

public Location convertLocation()
converts skyhook's location object into android's location object

Returns:
converted location

onBind

public IBinder onBind(Intent arg0)
(non-Javadoc)

Parameters:
arg0 -
Returns:
See Also:
Service

onCreate

public void onCreate()

onDestroy

public void onDestroy()
aborts location services (non-Javadoc)

See Also:
Service

onStart

public void onStart(Intent intent,
                    int startId)
To keep backwards compatibility we override onStart which is the equivalent of onStartCommand in pre android 2.x


onStartCommand

public int onStartCommand(Intent intent,
                          int flags,
                          int startId)
This method is called when startService is called. only used in 2.x android.


startService

public static Runnable startService(Context context,
                                    long period)
a convince method for starting the service. 1 minute = 60 000 milliseconds

Parameters:
context -
period - between updates in milliseconds
Returns:
a runnable that will start the service

stopService

public static Runnable stopService(Context context)
a convince method for stopping the service

Parameters:
context -
Returns:
a runnable that will stop the service