App Name + Package

Post your questions and help other users.

Moderator: Martin

Post Reply
User avatar
Bingwu
Posts: 114
Joined: 26 Feb 2016 10:26

App Name + Package

Post by Bingwu » 07 Mar 2017 12:50

Hello!

There is certainly a way to create a list (file, variable ...), whose contents are all apps installed on the device with the name of the app and the associated name of the package.

The output should be approximately as follows:

Automagic Premium;ch.gridvision.ppam.androidautomagic
FolderSync;dk.tacit.android.foldersync.full
Google Play Store;com.android.vending
Maps;com.google.android.apps.maps
Smart Alarm;jp.tanyu.SmartAlarm
VLC;org.videolan.vlc.betav7neon
.
.
.

The action Init Variable Package Info is known to me, but for a (sensible) further processing of the delivered variable, I lack the knowledge. :o
Can someone help me? Thanks!

greeting
Peter
----------------------------------------------------------------------------------------------------------------------------------------
Hallo!

Es existiert bestimmt eine Möglichkeit, eine Liste (Datei, Variable etc.) zu erstellen, deren Inhalt alle auf dem Gerät installierten Apps mit dem Namen der App und dem dazugehörigen Namen des Packages ist.

Die Ausgabe sollte in etwa in dieser Form erfolgen:

Automagic Premium;ch.gridvision.ppam.androidautomagic
FolderSync;dk.tacit.android.foldersync.full
Google Play Store;com.android.vending
Maps;com.google.android.apps.maps
Smart Alarm;jp.tanyu.SmartAlarm
VLC;org.videolan.vlc.betav7neon
.
.
.

Die Action Intitialisiere Variable Package Info ist mir bekannt, für eine (sinnvolle) Weiterverarbeitung der gelieferten Variable fehlen mir jedoch die Kenntnisse. :o
Kann mir jemand dabei behilflich sein?! Danke!

Gruß
Peter

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: App Name + Package

Post by Martin » 07 Mar 2017 21:20

Hi,

You could create the list with action Init Variable Package Info and then extract and format the desired information.
A script to create a list where each element consist of <Label>:<package> could look like this:

Code: Select all

list = newList();
for(p in getMapKeys(package_info))
{
  entry = package_info[p]["application_info"]["label"] + ":" + p;
  addElement(list, entry);
}
Regards,
Martin

User avatar
Bingwu
Posts: 114
Joined: 26 Feb 2016 10:26

Re: App Name + Package

Post by Bingwu » 08 Mar 2017 07:02

Grossartige Hilfe zu später Stunde! :-)
Ich danke dir Martin!

Gruss
Peter

Post Reply