Package com.unitech.api.location
Class LocationCtrl
- java.lang.Object
-
- com.unitech.api.location.LocationCtrl
-
public class LocationCtrl extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringBUNDLE_ERROR_CODEstatic java.lang.StringBUNDLE_ERROR_MSGstatic intRESULT_CODE_ERRORstatic intRESULT_CODE_SUCCESS
-
Constructor Summary
Constructors Constructor Description LocationCtrl(android.content.Context context)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description android.os.BundlesetLocationMode(int mode)Set Location Mode
-
-
-
Field Detail
-
BUNDLE_ERROR_CODE
public static final java.lang.String BUNDLE_ERROR_CODE
- See Also:
- Constant Field Values
-
BUNDLE_ERROR_MSG
public static final java.lang.String BUNDLE_ERROR_MSG
- See Also:
- Constant Field Values
-
RESULT_CODE_ERROR
public static final int RESULT_CODE_ERROR
- See Also:
- Constant Field Values
-
RESULT_CODE_SUCCESS
public static final int RESULT_CODE_SUCCESS
- See Also:
- Constant Field Values
-
-
Method Detail
-
setLocationMode
public android.os.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 erroeCode = bundle.getInt("errorCode"), (error:1, success=0)
String errorMsg = bundle.getString("errorMsg");
-
-