FORUMS

XDA Recap: This Week In Android (Apr 26 – May 2)

Here in the digital XDA newsroom, we spend our days pouring over an average of … more

Sunday Debate: Great Camera Hardware, or Software?

Join us in a fun Sunday Debate on phone cameras. Come with your opinions and feel … more

XDA Picks: Best Apps of the Week (Apr 25 – May 1)

Apps are at the front and center of any smartphone experience, and with over a … more

Lollipop Xposed Framework Alpha 4 Released

Good news to all Xposed Framework fans. XDA Senior Recognized … more
Post Reply Subscribe to Thread Email Thread

[MOD][XPOSED][TASKER][4.4+] - (2014/03/05) - Dismiss Alarm Tasker Plugin

20th April 2014, 06:39 PM |#11  
rgawenda's Avatar
Senior Member
Thanks Meter: 77
 
More
Should this work with CM11?

Sent from my Nexus 4 using XDA Premium 4 mobile app
 
 
21st April 2014, 09:31 PM |#12  
Senior Member
Flag Berlin
Thanks Meter: 48
 
More
Quote:
Originally Posted by mikefero

OK I think I understand what you are looking as far as additional actions for Tasker. When I get a chance I will look into adding the ability to change and delete alarms via two new Tasker actions. I will make it so that if the alarm label is matched then update the alarm with a new time or delete the alarm. If it makes sense I may package them into one Tasker action with a check box for delete actions; we'll see though what looks better.

Not sure when I am going to get to adding this functionality, but it should be within the next week or so.

Any progress with this feature?
2nd March 2015, 08:47 PM |#13  
vali_ics's Avatar
Senior Member
Flag Bucharest
Thanks Meter: 202
 
More
I tried but don't work on Note 4...it's a very useful plugin of it'll work.
3rd March 2015, 07:50 PM |#14  
XlAfbk's Avatar
Senior Member
Thanks Meter: 314
 
More
Doesn't work on Lollipop for me. Would be greatly appreciated if you could add support.
Logcats:
Alarm dismissed from alarm screen:
Code:
V/AlarmClock(21153): Setting dismissed state to instance 1
V/AlarmClock(21153): Clearing notifications for alarm instance: 1
V/AlarmClock(21153): Canceling instance 1 timers
I/AlarmClock(21153): Disabling parent alarm: 1
V/AlarmClock(21153): *** notifyChange() id: 1 url content://com.android.deskclock/alarms/1
V/AlarmClock(21153): AlarmService.onStartCommand() with intent: Intent { act=STOP_ALARM dat=content://com.android.deskclock/instances/1 cmp=com.android.deskclock/.alarms.AlarmService }
V/AlarmClock(21153): AlarmService.onDestroy() called
V/AlarmClock(21153): AlarmService.stop with instance: 1
V/AlarmClock(21153): AlarmKlaxon.stop()
V/AlarmClock/AlarmActivity(21153): Received broadcast: com.android.deskclock.ALARM_DONE
V/AlarmClock/AlarmActivity(21153): Ignored broadcast: com.android.deskclock.ALARM_DONE
Alarm snoozed:
Code:
V/AlarmClock(21153): Setting snoozed state to instance 1 for Tue 20:58
V/AlarmClock(21153): *** notifyChange() id: 1 url content://com.android.deskclock/instances/1
V/AlarmClock(21153): Displaying snoozed notification for alarm instance: 1
V/AlarmClock(21153): Scheduling state change 5 to instance 1 at Tue 20:58 (1425412680000)
V/AlarmClock(21153): AlarmService.onStartCommand() with intent: Intent { act=STOP_ALARM dat=content://com.android.deskclock/instances/1 cmp=com.android.deskclock/.alarms.AlarmService }
V/AlarmClock(21153): AlarmService.onDestroy() called
V/AlarmClock(21153): AlarmService.stop with instance: 1
V/AlarmClock(21153): AlarmKlaxon.stop()
V/AlarmClock/AlarmActivity(21153): Received broadcast: com.android.deskclock.ALARM_DONE
V/AlarmClock/AlarmActivity(21153): Ignored broadcast: com.android.deskclock.ALARM_DONE
Alarm dismissed from notification:
Code:
V/AlarmClock(21153): AlarmStateManager received intent Intent { act=change_state cat=[DISMISS_TAG] dat=content://com.android.deskclock/instances/1 flg=0x10000010 cmp=com.android.deskclock/.alarms.AlarmStateManager bnds=[97,208][756,280] (has extras) }
V/AlarmClock(21153): Setting dismissed state to instance 1
V/AlarmClock(21153): AlarmService.onStartCommand() with intent: Intent { act=STOP_ALARM dat=content://com.android.deskclock/instances/1 cmp=com.android.deskclock/.alarms.AlarmService }
V/AlarmClock(21153): AlarmService.onDestroy() called
V/AlarmClock(21153): There is no current alarm to stop
V/AlarmClock(21153): Clearing notifications for alarm instance: 1
V/AlarmClock(21153): Canceling instance 1 timers
W/AlarmManager( 5742): Clear alarm type=4,alarmSeconds=1425412680
I/AlarmClock(21153): Disabling parent alarm: 1
V/AlarmClock(21153): *** notifyChange() id: 1 url content://com.android.deskclock/alarms/1
9th March 2015, 01:48 PM |#15  
mikefero's Avatar
OP Junior Member
Thanks Meter: 4
 
More
Quote:
Originally Posted by XlAfbk

Doesn't work on Lollipop for me. Would be greatly appreciated if you could add support.

Thanks for the logs and the heads up.; I didn't even realize rovo89 updated Xposed to work with ART on Lollipop back in February. With that good news discovered and your test using the module I will dust off the code and look into adding support when I have some free time. Might be a few weeks so if you don't hear anything from me give me a ping.
3rd April 2015, 03:35 PM |#16  
XlAfbk's Avatar
Senior Member
Thanks Meter: 314
 
More
Quote:
Originally Posted by mikefero

Thanks for the logs and the heads up.; I didn't even realize rovo89 updated Xposed to work with ART on Lollipop back in February. With that good news discovered and your test using the module I will dust off the code and look into adding support when I have some free time. Might be a few weeks so if you don't hear anything from me give me a ping.

The fix for Lollipop is actually quite trivial:
\fero\xposed\dismissalarm\DismissAlarm.java, line51: com.google.android.deskclock -> com.android.deskclock
I'm not sure whether Google-provided roms still have google in the package name, but Cyanogenmod/AOSP don't. Maybe just look for either to be on the safe side?

Attached is a .apk patched to work with CM12 until there's an official update. Apk is signed with my own keys so you'll have to uninstall the old one first.

@mikefero: If you have a problem with this apk / updated yours then please ping me and I'll remove it.
Attached Files
File Type: apk DismissAlarmTaskerPlugin-1.0-CM12.apk - [Click for QR Code] (368.4 KB, 6 views)
6th April 2015, 08:50 PM |#17  
mikefero's Avatar
OP Junior Member
Thanks Meter: 4
 
More
Thumbs up
Quote:
Originally Posted by XlAfbk

If you have a problem with this apk / updated yours then please ping me and I'll remove it.

@XlAfbk Thanks for providing an updated APK; I have no problem with it. Would it be possible for you to provide a diff patch or create a fork and initiate a pull request so I can merge it in when I get my setup going?
6th April 2015, 10:16 PM |#18  
XlAfbk's Avatar
Senior Member
Thanks Meter: 314
 
More
Quote:
Originally Posted by mikefero

@XlAfbk Thanks for providing an updated APK; I have no problem with it. Would it be possible for you to provide a diff patch or create a fork and initiate a pull request so I can merge it in when I get my setup going?

I actually modded it in .smali as I was too lazy to set up the build environment properly.
Here's what I'm proposing as the change for the java code (quick and dirty):
Code:
--- DismissAlarm.java	2015-04-06 23:12:56.827140600 +0200
+++ DismissAlarm.java	2015-04-06 23:14:04.962882800 +0200
@@ -89,7 +89,7 @@
 		 * Ensure that we are only handling customizations for the alarm/desk
 		 * clock package
 		 */
-		if (loadPackageParam.packageName.equals(ALARM_CLOCK_PACKAGE_NAME)) {
+		if (loadPackageParam.packageName.equals("com.google.android.deskclock") || loadPackageParam.packageName.equals("com.android.deskclock")) {
 			//Find the AlarmStateManager and AlarmInstance classes
 			final Class<?> alarmStateManager = XposedHelpers.findClass(ALARM_STATE_MANAGER_CLASS_NAME, loadPackageParam.classLoader);
 			final Class<?> alarmInstance = XposedHelpers.findClass(ALARM_INSTANCE_CLASS_NAME, loadPackageParam.classLoader);
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes