|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectService
com.TwentyCodes.android.location.LocationService
public class LocationService
this service class will be used broadcast the users location periodic
| Field Summary | |
|---|---|
static String |
PERIOD_BETWEEN_UPDATES
|
static String |
TAG
|
| Constructor Summary | |
|---|---|
LocationService()
|
|
| Method Summary | |
|---|---|
IBinder |
onBind(Intent arg0)
(non-Javadoc) |
void |
onCreate()
called when the service is created. |
void |
onDestroy()
called when the service is destroyed. |
void |
onLocationChanged(Location location)
(non-Javadoc) |
void |
onProviderDisabled(String arg0)
(non-Javadoc) |
void |
onProviderEnabled(String arg0)
(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. |
void |
onStatusChanged(String arg0,
int arg1,
Bundle arg2)
(non-Javadoc) |
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 |
|---|
public static final String TAG
public static final String PERIOD_BETWEEN_UPDATES
| Constructor Detail |
|---|
public LocationService()
| Method Detail |
|---|
public void onCreate()
Servicepublic void onDestroy()
Servicepublic void onLocationChanged(Location location)
location - LocationListenerpublic void onProviderDisabled(String arg0)
arg0 - LocationListenerpublic void onProviderEnabled(String arg0)
arg0 - LocationListener
public void onStart(Intent intent,
int startId)
public int onStartCommand(Intent intent,
int flags,
int startId)
public void onStatusChanged(String arg0,
int arg1,
Bundle arg2)
arg0 - arg1 - arg2 - LocationListenerpublic IBinder onBind(Intent arg0)
arg0 -
Service
public static Runnable startService(Context context,
long period)
context - period - between updates in milliseconds
public static Runnable stopService(Context context)
context -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||