App Inventor Extensions


Package Manager Extension

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

Now no permissions are required anymore.

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!

Description

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

Some Recommendations before using this Extension

Properties


Return the default directory (READ ONLY), which is

/storage/emulated/0/Android/data/<packageName>/files/Packages

In the GotPackages event the icons of all the installed apps will be stored in that directory.


Return whether Warnings should be suppressed


Set whether Warnings should be suppressed.

Methods


Get Package informations.


Launch app.

Events


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.

Example Use

It helps to be familiar with working with lists of lists and the lookup in pairs block...

Questions and Answers

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.

For questions about App Inventor,
please ask in the App Inventor community.Thank you.

Terms and Conditions

  • Have fun and use this extension in your App Inventor projects! Pura Vida!
  • THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  • This is is the only authorized place to download this extension. It is not allowed to host this extension somewhere else and offer it for others to download, be it on another website or market place or similar. The reason is, everybody should be able to have the opportunity to donate something in case you like my work. You are allowed to provide a link to this site, so others can download the extension here. You will find the most up to date version always here including documentation and usage examples. Thank you for your kind understanding.

Download


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!

Donation amount:

or donate some mBTC to Bitcoin Address:
1Jd8kXLHu2Vkuhi15TWHiQm4uE9AGPYxi8
Bitcoin

Thank you! Taifun
 

Download TaifunPM extension (aix file)
Download Package Manager Test (aia file)

Back to top of page ...

Creative Commons License
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.


Home | Snippets | Tutorials | Extensions | Links | Search | Privacy Policy | Contact