-
public class Utils
-
-
Method Summary
Modifier and Type Method Description static booleanisInstalled(Context context, String packageName, String checkMarket)Return if an app given by packageName is installed or not. static booleanlaunchApp(Context context, String packageName)static booleanisEmpty(String str)static ObjectgetByPath(JSONObject json, String path)JSON 객체에서 경로 문자열로 값 가져오기예시: getByPath(jsonObject, "ret_list[0]. static StringgetErrorMessage(Context context, int erroCode)static StringurlEncode(String param)static voidshowDetailActivity(Activity activity, String adDetailUrl)static voidopenUrl(Context context, String advUrl)static voidshowLoginRequestedAlert(Activity activity, Runnable okCallback)static voidshowErrorAlert(Activity activity, int retCode)static voidshowErrorAlert(Activity activity, String message)-
-
Method Detail
-
isInstalled
static boolean isInstalled(Context context, String packageName, String checkMarket)
Return if an app given by packageName is installed or not.tag must be given as belows in AndroidManifest.xml file.
- Parameters:
context- Context 객체packageName- package of the app to be checkedcheckMarket- check if the app is installed through the given market
-
getByPath
static Object getByPath(JSONObject json, String path)
JSON 객체에서 경로 문자열로 값 가져오기예시: getByPath(jsonObject, "ret_list[0].adv_url")
-
getErrorMessage
static String getErrorMessage(Context context, int erroCode)
-
showDetailActivity
static void showDetailActivity(Activity activity, String adDetailUrl)
-
showLoginRequestedAlert
static void showLoginRequestedAlert(Activity activity, Runnable okCallback)
-
showErrorAlert
static void showErrorAlert(Activity activity, int retCode)
-
showErrorAlert
static void showErrorAlert(Activity activity, String message)
-
-
-
-