See the App Inventor Extensions document about how to use an App Inventor Extension.
For questions about this extension or bug reports please start a new thread in the
App Inventor community. Thank you.
For feature requests please contact me by email.
To be a sponsor of a new method already is possible starting from only 10 USD! With your contribution you will help the complete App Inventor community. Thank you.
Aug 24th, 2017: Version 1: initial version
Nov 22th, 2020: Version 2: bug fix: icon was not extracted for all packages; API 30 update: icons will now be stored in subdirectory /Packages of the the ASD - application specific directory, which is
/storage/emulated/0/Android/data/<packageName>/files/Packages
Aug 19th, 2022:
Version 3: permission QUERY_ALL_PACKAGES added, completeFileName updated, new parameter json for Process event, bug fix android.graphics.drawable.AdaptiveIconDrawable
Note: Version 3 is not compatible with Version 2!
Extension to get information about installed apps and to be able to launch an installed app using a package name.
Required permission: QUERY_ALL_PACKAGES
Return the default directory (READ ONLY), which is
/storage/emulated/0/Android/data/<packageName>/files/Packages
Return whether Warnings should be suppressed
Set whether Warnings should be suppressed.
Get Package informations.
Launch app.
Event indicating that package information have been received. The result is provided in JSON format.
Example:
[
{"package name":"com.google.android.youtube",
"app name":"YouTube",
"version name":"12.32.59",
"version code":1232593400,
"icon":"\/storage\/emulated\/0\/Android\/data\/YOUR PACKAGE NAME\/file\/Packages\/com.google.android.youtube.png"},
{"package name":"com.google.android.googlequicksearchbox",
"app name":"Google","version name":"7.8.22.21.arm64",
"version code":300745809,
"icon":"\/storage\/emulated\/0\/Android\/data\/YOUR PACKAGE NAME\/file\/Packages\/com.google.android.googlequicksearchbox.png"},
{"package name":"org.telegram.messenger",
"app name":"Telegram",
"version name":"4.2.2",
"version code":10593,
"icon":"\/storage\/emulated\/0\/Android\/data\/YOUR PACKAGE NAME\/file\/Packages\/org.telegram.messenger.png"}
...
]
Event indicating the progress of getting packages.
It helps to be familiar with working with lists of lists and the lookup in pairs block...
Q1: Due to the
Package visibility in Android 11, I can't get a list of all installed apps, not even directly querying with the package name..
A: See here:
The limited package visibility reduces the number of apps that appear to be installed on a device, from your app's perspective.
In version 3 of the extension I now added the permission QUERY_ALL_PACKAGES
Note: If you publish your app on Google Play, your app's use of this permission is subject to approval based on
this policy.
Developing and maintaining snippets, tutorials and extensions for App Inventor takes a lot of time.
I hope it saved some of your time. If yes, then you might consider to donate a small amount!
or donate some mBTC to Address:
1Jd8kXLHu2Vkuhi15TWHiQm4uE9AGPYxi8
Thank you! Taifun
Download TaifunPM extension (aix file)
Download Package Manager Test (aia file)
Back to top of page ...
This work by Pura Vida Apps
is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License
with attribution (name=Pura Vida Apps and link to the source site) required.