package com.indexer.hellotaxi.app.Listener;

import android.location.Location;
import android.location.LocationListener;
import android.os.Bundle;
import android.util.Log;

/**
 * Created by yemonkyaw on 5/10/14.
 */

public class mlocationListener implements LocationListener {

  @Override
  public void onLocationChanged(Location location) {
    Log.e("Chage Location","Current"+location.getLatitude()+location.getLongitude());
  }

  @Override
  public void onStatusChanged(String s, int i, Bundle bundle) {

  }

  @Override
  public void onProviderEnabled(String s) {

  }

  @Override
  public void onProviderDisabled(String s) {

  }
}

@@ -57,118 +57,356 @@
 oid.
-location.Location;%0Aimport android.location.LocationListener;%0Aimport android.os.Bundle;%0Aimport android.util.Log
+app.AlertDialog;%0Aimport android.content.Context;%0Aimport android.content.DialogInterface;%0Aimport android.content.Intent;%0Aimport android.location.Location;%0Aimport android.location.LocationListener;%0Aimport android.location.LocationManager;%0Aimport android.os.Bundle;%0Aimport android.provider.Settings;%0Aimport android.util.Log;%0Aimport javax.inject.Inject
 ;%0A%0A/
@@ -511,16 +511,90 @@
 ener %7B%0A%0A
+  @Inject LocationManager locationManager;%0A  @Inject Context appContext;%0A%0A
   @Overr
@@ -677,16 +677,17 @@
 cation%22,
+ 
 %22Current
@@ -687,17 +687,19 @@
 Current%22
-+
+ + 
 location
@@ -712,17 +712,19 @@
 titude()
-+
+ + 
 location
@@ -893,34 +893,32 @@
   %7D%0A%0A  @Override
-%0A 
  public void onP
@@ -941,19 +941,1024 @@
 String s) %7B%0A
+    boolean gpsEnable;%0A    boolean networkEnable = false;%0A    //ToDo Check why this not work :'(%0A    gpsEnable = locationManager.isProviderEnabled(locationManager.GPS_PROVIDER);%0A    if (!gpsEnable && networkEnable) %7B%0A      AlertDialog.Builder dialog = new AlertDialog.Builder(appContext);%0A      dialog.setPositiveButton(%22Open Location Service%22, new DialogInterface.OnClickListener() %7B%0A%0A            @Override%0A            public void onClick(DialogInterface paramDialogInterface, int paramInt) %7B%0A              // TODO Auto-generated method stub%0A              Intent myIntent = new Intent(Settings.ACTION_SECURITY_SETTINGS);%0A              appContext.startActivity(myIntent);%0A              //get gps%0A            %7D%0A          %7D%0A      );%0A      dialog.setNegativeButton(%22Cancle%22, new DialogInterface.OnClickListener() %7B%0A%0A        @Override%0A        public void onClick(DialogInterface paramDialogInterface, int paramInt) %7B%0A          // TODO Auto-generated method stub%0A%0A        %7D%0A      %7D);%0A      dialog.show();%0A    %7D
 %0A  %7D%0A%7D%0A

check provider get or not