MCPcopy Create free account
hub / github.com/afkT/DevUtils / isInstalledApp

Method isInstalledApp

lib/DevApp/src/main/java/dev/utils/app/ADBUtils.java:159–164  ·  view source on GitHub ↗

判断是否安装应用 @param packageName 应用包名 @return true yes, false no

(final String packageName)

Source from the content-addressed store, hash-verified

157 * @return {@code true} yes, {@code false} no
158 */
159 public static boolean isInstalledApp(final String packageName) {
160 if (TextUtils.isEmpty(packageName)) return false;
161 return ShellUtils.execCmd(
162 "pm path " + packageName, false
163 ).isSuccessWithSuccessOutput();
164 }
165
166 /**
167 * 查看应用安装路径

Callers

nothing calls this directly

Calls 3

execCmdMethod · 0.95
isEmptyMethod · 0.45

Tested by

no test coverage detected