Bug in "Init Variable Next Alarm"?

Post your questions and help other users.

Moderator: Martin

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

Bug in "Init Variable Next Alarm"?

Post by Bingwu » 18 Sep 2017 12:30

Hallo Martin!

Mir ist aufgefallen, daß die Action "Initialisiere Variable Nächster Alarm" nicht die selbe nächste Alarmzeit liefert wie meine Alarm-App (Smart Alarm = jp.tanyu.SmartAlarm).
Wenn ich die Action "Initialisiere Variable Systemeinstellung" (Kategrorie: System, Name: next_alarm_formatted) benutze, liefert diese das gleiche Ergebnis wie Smart-Alarm, also ein anderes als die Action "Initialisiere Variable Nächster Alarm".

Gruss
Peter
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Hello Martin!

I noticed that the action "Init Variable Next Alarm" does not provide the same next alarm time as my alarm-app (SmartAlarm = jp.tanyu.SmartAlarm).
If I use the action "Init Variable System Setting" (Categrory: System, Name: next_alarm_formatted), this provides the same result as Smart-Alarm, which is different from the action "Init Variable Next Alarm".

Regards
Peter

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

Re: Bug in "Init Variable Next Alarm"?

Post by Desmanto » 18 Sep 2017 14:28

At both my phones with a slight modified AOSP (Vision UI), both give nothing for init alarm. But at pure AOSP phone, init alarm gives the value properly. So it seems not automagic bug, but the OS skin's.

For those phones with init alarm not working properly, you should use just like you have used above, "Init Variable System Setting" (Categrory: System, Name: next_alarm_formatted). I also use this and it works flawlessly.
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
Bingwu
Posts: 114
Joined: 26 Feb 2016 10:26

Re: Bug in "Init Variable Next Alarm"?

Post by Bingwu » 18 Sep 2017 15:20

Ergänzende Informationen:

Action "Initialisiere Variable Nächster Alarm" funktionierte korrekt mit:
- Automagic 1.33 + Samsung Galaxy S7 edge, Android 7.0, Stock-ROM, nicht gerooted
- Automagic 1.33 + Asus Nexus 7 (2. Gen.), Android 7.1.2, LineageOS, gerooted
- Automagic 1.33 + LG Nexus 5, Android 7.1.2, LineageOS, gerooted

Action "Initialisiere Variable Nächster Alarm" funktioniert nicht korrekt mit:
- Automagic 1.34 + Samsung Galaxy S7 edge, Android 7.0, Stock-ROM, nicht gerooted
- Automagic 1.34 + Asus Nexus 7 (2. Gen.), Android 7.1.2, LineageOS, gerooted
- Automagic 1.34 + LG Nexus 5, Android 7.1.2, LineageOS, gerooted
----------------------------------------------------------------------------------
Additional information:

Action "Init Variable Next Alarm" worked correctly with:
- Automagic 1.33 + Samsung Galaxy S7 edge, Android 7.0, Stock-ROM, non rooted
- Automagic 1.33 + Asus Nexus 7 (2. Gen.), Android 7.1.2, LineageOS, rooted
- Automagic 1.33 + LG Nexus 5, Android 7.1.2, LineageOS, rooted

Action "Init Variable Next Alarm" does not work correctly with:
- Automagic 1.34 + Samsung Galaxy S7 edge, Android 7.0, Stock-ROM, non rooted
- Automagic 1.34 + Asus Nexus 7 (2. Gen.), Android 7.1.2, LineageOS, rooted
- Automagic 1.34 + LG Nexus 5, Android 7.1.2, LineageOS, rooted

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

Re: Bug in "Init Variable Next Alarm"?

Post by Desmanto » 18 Sep 2017 15:51

Oh, that now seem to be 1.34 bug. At mine, AOSP with Vision UI, both 1.33 and 1.34 doesn't work properly.
While at this pure AOSP LP 5.1, both 1.33 and 1.34 works properly.
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
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: Bug in "Init Variable Next Alarm"?

Post by Martin » 18 Sep 2017 18:54

Hi,

Action Init Variable Next Alarm uses an official feature of Android to read the value (starting with Android 5.0) and there was no direct change to this action in version 1.34. How's the value not correct on version 1.34? Do you get the wrong date/time or just no value at all? When you pull down the notification drawer and check the alarm date/time displayed next to the small , does it correspond to the value read by Automagic (assuming that the ROM displays the alarm date/time there at all)?

next_alarm_formatted is an unprotected value on most ROMs so each app with system setting access could modify the value to something that is does not reflect the actual next alarm.

Regards,
Martin

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

Re: Bug in "Init Variable Next Alarm"?

Post by Bingwu » 18 Sep 2017 19:34

Hallo Martin, danke für deine Antwort!

Ich bleibe mal bei Deutsch, sonst beschäftige ich mehr mit der Übersetzung als mit dem Inhalt.

Dein Hinweis auf die Benachrichtungsleiste war gut! Aua, ich werde richtig alt, auf die Idee bin ich erst gar nicht gekommmen! :shock:
Gut, beim Samsung Galaxy S7 edge wird dort nichts angezeigt, auch nicht auf dem Sperrbildschirm, aber bei den beiden anderen Geräten an beiden Stellen.

Es sieht so aus als läge es an der App (Smart Alarm), denn die Alarmzeit in der Benarchtigungsleiste und auf dem Sperrbildschirm sind identisch mit dem Wert aus "Initialisiere Variable Nächster Alarm".
Verstehe ich jetzt zwar nicht, aber das ist wohl Beweis genug! :(

Ich danke dir und wünsche noch einen angenehmen Abend!
Peter

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

Re: Bug in "Init Variable Next Alarm"?

Post by Martin » 18 Sep 2017 19:54

Super, vielen Dank für den Test.

Normalerweise registriert eine App den nächsten Wecker im System über eine offizielle API, wodurch der Wecker von Android trotz Stromsparmassnahmen (Doze-Modus) absolut pünktlich aufgerufen wird. Das System setzt automatisch auch next_alarm_formatted auf den entsprechenden Wert.
Ich könnte mir nun folgendes Szenario vorstellen (sehr spekulativ und womöglich gänzlich falsch ;-)): Wenn die Wecker-App ein spezielles System anbietet, um beispielsweise eine Viertelstunde vor dem effektiven Wecker bereits einen Sonnenaufgang oder dergleichen zu simulieren und so den Benutzer sanft zu wecken, müsste die Wecker-App den offiziellen Alarm eine Viertelstunde 'zu früh' registrieren (also z.B. effektiver Wecker 6:00, Sonnenaufgang ab 5:45) um auch pünktlich für den Sonnenaufgang von Android aktiviert zu werden. Der Entwickler könnte nun auf die Idee kommen, next_alarm_formatted selbst auf 6:00 zu setzen und den Systemwert von 5:45 zu überschreiben, damit die Sonnenaufgang-Phase in einigen Apps (oder ROMs) versteckt wird.
Bei älteren Android-Versionen hätte die App dieses Feature auch anders implementieren können, aber ab Android 6 mit dem Doze-Modus, bleiben leider oft nur komische Workarounds übrig.

Freundliche Grüsse
Martin

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

Re: Bug in "Init Variable Next Alarm"?

Post by Bingwu » 18 Sep 2017 20:01

Ich schreibe gerade eine E-Mail an den App-Entwickler Martin! (Ich und japanisch?! :D)
Mal sehen was das wird und ob er einen so super Service leistest wie Du!

Gruss
Peter

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

Bug in "Init Variable Next Alarm"? No! (SOLVED)

Post by Bingwu » 14 Oct 2017 06:52

Update ''SmartAlarm''.png
Update ''SmartAlarm''.png (79.11 KiB) Viewed 22716 times

Post Reply