Package com.unitech.api.general
Class ServiceCtrl
java.lang.Object
com.unitech.api.general.ServiceCtrl
The type Service ctrl.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionexecuteMethod(String packageName, String actionName, String className, String methodName, Object... params) Execute a method of a class in the packageexecuteServiceMethod(String serviceName, String methodName, Object... params) Execute a method in the Service Manager
-
Field Details
-
BUNDLE_ERROR_CODE
- See Also:
-
BUNDLE_ERROR_MSG
- See Also:
-
RESULT_CODE_ERROR
public static final int RESULT_CODE_ERROR- See Also:
-
RESULT_CODE_SUCCESS
public static final int RESULT_CODE_SUCCESS- See Also:
-
-
Constructor Details
-
ServiceCtrl
public ServiceCtrl(android.content.Context context)
-
-
Method Details
-
executeMethod
public Object executeMethod(String packageName, String actionName, String className, String methodName, Object... params) Execute a method of a class in the package- Parameters:
packageName- (String)actionName- (String)className- (String)methodName- (String)params- (List- Returns:
- A HashMap Object that contain result of this execution and return Object of execution method
int errorCode = retMap.get("errorCode"), (error:1, success=0)
String errorMsg = retMap.get("errorMsg");
Object retInvoke = retMap.get("retInvoke");
-
executeServiceMethod
Execute a method in the Service Manager- Parameters:
serviceName- (String)methodName- (String)params- (List- Returns:
- A HashMap Object that contain result of this execution and return Object of execution method
int errorCode = retMap.get("errorCode"), (error:1, success=0)
String errorMsg = retMap.get("errorMsg");
Object retInvoke = retMap.get("retInvoke");
-