Class LocationCtrl

java.lang.Object
com.unitech.api.location.LocationCtrl

public class LocationCtrl extends Object
  • Field Details

  • Constructor Details

    • LocationCtrl

      public LocationCtrl(Context context)
  • Method Details

    • setLocationMode

      public Bundle setLocationMode(int mode)
      Set Location Mode
      Parameters:
      mode - (int) 0:"off", 1:"device only", 2:"battery saving", 3:"high accuracy",
      Returns:
      A bundle contains the error code and message
      int errorCode = bundle.getInt("errorCode"), (error:1, success=0)
      String errorMsg = bundle.getString("errorMsg");
    • getGpsOpenStatus

      public Bundle getGpsOpenStatus()
      Returns:
      A bundle contains the error code and message
      int errorCode = bundle.getInt("errorCode"), (error:1, success=0)
      String errorMsg=bundle.getString("errorMsg");
      String getGpsOpenStatus=bundle.getString("getGpsOpenStatus");
    • getAltitude

      public Bundle getAltitude()
      Get Altitude
      Returns:
      A bundle contains the error code and message
      int errorCode = bundle.getInt("errorCode"), (error:1, success=0)
      String errorMsg=bundle.getString("errorMsg");
      String getAltitude=bundle.getString("getAltitude");
    • getAccuracy

      public Bundle getAccuracy()
      Get Accuracy
      Returns:
      A bundle contains the error code and message
      int errorCode = bundle.getInt("errorCode"), (error:1, success=0)
      String errorMsg=bundle.getString("errorMsg");
      String getAccuracy=bundle.getString("getAccuracy");
    • getLatitude

      public Bundle getLatitude()
      Get Latitude
      Returns:
      A bundle contains the error code and message
      int errorCode = bundle.getInt("errorCode"), (error:1, success=0)
      String errorMsg=bundle.getString("errorMsg");
      String getLatitude=bundle.getString("getLatitude");
    • getLongitude

      public Bundle getLongitude()
      Get Longitude
      Returns:
      A bundle contains the error code and message
      int errorCode = bundle.getInt("errorCode"), (error:1, success=0)
      String errorMsg=bundle.getString("errorMsg");
      String getLongitude=bundle.getString("getLongitude");
    • getProvider

      public Bundle getProvider()
      Get Provider
      Returns:
      A bundle contains the error code and message
      int errorCode = bundle.getInt("errorCode"), (error:1, success=0)
      String errorMsg=bundle.getString("errorMsg");
      String getProvider=bundle.getString("getProvider");
    • getSpeed

      public Bundle getSpeed()
      Get Speed
      Returns:
      A bundle contains the error code and message
      int errorCode = bundle.getInt("errorCode"), (error:1, success=0)
      String errorMsg=bundle.getString("errorMsg");
      String getSpeed=bundle.getString("getSpeed");
    • getUTCTime

      public Bundle getUTCTime()
      Get UTCTime(pattern:"yyyy-MM-dd'T'HH:mm:ssZ")
      Returns:
      A bundle contains the error code and message
      int errorCode = bundle.getInt("errorCode"), (error:1, success=0)
      String errorMsg=bundle.getString("errorMsg");
      String getUTCTime=bundle.getString("getUTCTime");
    • addGpsStatusListener

      public Bundle addGpsStatusListener()
      Request Location Update
      Returns:
      A bundle contains the error code and message
      int errorCode = bundle.getInt("errorCode"), (error:1, success=0)
      String errorMsg = bundle.getString("errorMsg");
    • getAllData

      public Bundle getAllData()
      Get AllData
      Returns:
      A bundle contains the error code and message
      int errorCode = bundle.getInt("errorCode"), (error:1, success=0)
      String errorMsg=bundle.getString("errorMsg");
      String getAltitude=bundle.getString("getAltitude");
      String getAccuracy=bundle.getString("getAccuracy");
      String getLatitude=bundle.getString("getLatitude");
      String getLongitude=bundle.getString("getLongitude");
      String getProvider=bundle.getString("getProvider");
      String getSpeed=bundle.getString("getSpeed");
      String getUTCTime=bundle.getString("getUTCTime");