getting the right android package name

Post your questions and help other users.

Moderator: Martin

Post Reply
User avatar
Micha
Posts: 46
Joined: 27 Dec 2017 23:04

getting the right android package name

Post by Micha » 03 Jan 2018 14:22

Hello,

I want to build my first widget with this (german) tutorial: http://automagic4android.com/de/hilfe/e ... -erstellen.

But the package names for the clock and the battery settings don't work here. I have Android 7.1 (LineageOS 14.1). What are the right names and how I can determine such names for my own without asking here?

Thanks,
Micha

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

Re: getting the right android package name

Post by Bingwu » 03 Jan 2018 15:25

(For the sake of simplicity in German.)

Hallo Micha!

Unter LineageOS 14.1 ist es für den Verlauf des Akkuverbrauchs:

Package Name: com.android.settings
Klassen Name: com.android.settings.fuelgauge.PowerUsageSummery

Die Uhr benutze ich persönlich nicht, "com.android.deskclock" gibt es aber und könnte es eventuell sein.

App Package-Namen herausfinden:
Ich persönlich nutze entweder nur den Trigger "App Task Gestartet" und schaue unter "Package Name" (drei Punkte auf der rechten Seite) oder mit diesem Trigger in Verbindung mit der Action "Benachrichtigung auf Bildschirm" und den Variablen {package_name} und/oder {app_name}. Dann die betreffende App/Package starten und die Daten werden auf dem Bildschirm angezeigt.

Es gibt aber bestimmt noch wesentlich elegantere und professionellere Methoden.

Gruß
Peter

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: getting the right android package name

Post by Desmanto » 03 Jan 2018 16:36

I also use the same method to find the package name
Alternatively you can use Windows recognizer flow to detect your current app package name and class.
The flow was built specifically for that purpose.

I have made a better way to log the package name of opened windows, but for mean time, the flow above is sufficient for most of the time.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

User avatar
Micha
Posts: 46
Joined: 27 Dec 2017 23:04

Re: getting the right android package name

Post by Micha » 03 Jan 2018 16:45

Bingwu wrote:Klassen Name: com.android.settings.fuelgauge.PowerUsageSummery
Hm, das funktioniert bei mir aber nicht. Gehört da nun ein Punkt oder ein Slash zwischen settings und fuelgauge? Ich erhalte den Fehler: Could not launch intent for package com.... (nicht weiter lesbar).

Die weiteren Tipps muss ich bei Gelegenheit mal testen.

Micha

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

Re: getting the right android package name

Post by Bingwu » 03 Jan 2018 17:24

Hier das "Original", welches übrigens nicht nur unter LineageOS funktioniert:

Edit: Einfach unter "Klassen Name" (...) auswählen wenn es so nicht funktioniert. Dort steht zum Beispiel fast ganz oben ".fuelgauge.PowerUsageSummary".
screenshot.png
screenshot.png (71.22 KiB) Viewed 15337 times

User avatar
Micha
Posts: 46
Joined: 27 Dec 2017 23:04

Re: getting the right android package name

Post by Micha » 03 Jan 2018 18:51

Ah, kaum macht man's richtig, schon funktioniert's!

Ganz herzlichen Dank!

Jetzt muss ich nur noch rausfinden, warum die Uhr-App seit dem letzten großen LineageOS-Update nicht mehr geht, aber das ist unabhängig von Automagic ein Problem. Ich dachte nur, ich könnte es damit umgehen.

Micha

Post Reply