%app_apk_public_source_dirs() returned by the App Info action contains variable names and duplicates when Package/App Name is provided through a variable
App Info output variable %app_apk_public_source_dirs()
returns the paths to split APK files belonging to an app. When App Info receives the package name through a variable, for example when in the enter task of a profile triggered by event New Package or Package Updated which passes the package name in %evtprm2
, the output contains duplicates and variable names %app_apk_public_source_dirs[numbers up to 10].
For example, we install Simple Flashlight from the Play Store (so it consists of multiple APKs) and set Package/App Name in App Info to com.simplemobiletools.flashlight
. %app_apk_public_source_dirs()
returns:
/data/app/~~B7hw9LsIMvoKBAxtESVvqw==/com.simplemobiletools.flashlight-zfPGc_nUh-lfXyne8IYBXw==/split_config.en.apk,/data/app/~~B7hw9LsIMvoKBAxtESVvqw==/com.simplemobiletools.flashlight-zfPGc_nUh-lfXyne8IYBXw==/split_config.xxhdpi.apk
Next we first create a variable and assign it the value com.simplemobiletools.flashlight
, then set Package/App Name in App Info to the variable. %app_apk_public_source_dirs()
now returns:
/data/app/~~B7hw9LsIMvoKBAxtESVvqw==/com.simplemobiletools.flashlight-zfPGc_nUh-lfXyne8IYBXw==/split_config.en.apk,/data/app/~~B7hw9LsIMvoKBAxtESVvqw==/com.simplemobiletools.flashlight-zfPGc_nUh-lfXyne8IYBXw==/split_config.xxhdpi.apk,%app_apk_public_source_dirs4,%app_apk_public_source_dirs5,%app_apk_public_source_dirs6,%app_apk_public_source_dirs7,%app_apk_public_source_dirs8,%app_apk_public_source_dirs9,%app_apk_public_source_dirs10,/data/app/~~B7hw9LsIMvoKBAxtESVvqw==/com.simplemobiletools.flashlight-zfPGc_nUh-lfXyne8IYBXw==/split_config.en.apk,/data/app/~~B7hw9LsIMvoKBAxtESVvqw==/com.simplemobiletools.flashlight-zfPGc_nUh-lfXyne8IYBXw==/split_config.xxhdpi.apk