com.stringsandints.inventium.khlrooster.services
Class NetworkService

java.lang.Object
  extended by Service
      extended by com.stringsandints.inventium.khlrooster.services.NetworkService

public class NetworkService
extends Service

This class is used to enable wifi when it is called


Field Summary
private  ConnectivityManager cm
           
private  int failToConnect
           
private  NetworkInfo info
           
private  WifiManager wifiManager
           
 
Constructor Summary
NetworkService()
           
 
Method Summary
private  void handleEvent()
          This method handles the event.
 IBinder onBind(Intent arg0)
           
 void onCreate()
          This method is called when the service is created.
 void onStart(Intent intent, int startId)
           
 int onStartCommand(Intent intent, int flags, int startId)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cm

private ConnectivityManager cm

info

private NetworkInfo info

failToConnect

private int failToConnect

wifiManager

private WifiManager wifiManager
Constructor Detail

NetworkService

public NetworkService()
Method Detail

onBind

public IBinder onBind(Intent arg0)

onCreate

public void onCreate()
This method is called when the service is created. It gets the wifi status from the device.


onStart

public void onStart(Intent intent,
                    int startId)

onStartCommand

public int onStartCommand(Intent intent,
                          int flags,
                          int startId)

handleEvent

private void handleEvent()
This method handles the event. It verifies if the wifi is enabled. When the wifi is not enabled, it enables the wifi. When finished it starts the SyncService.