FORUMS
Remove All Ads from XDA

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

7 posts
Thanks Meter: 6
 
By mikefero, Junior Member on 5th March 2014, 07:27 PM
Post Reply Email Thread

Dismiss Alarm Tasker Plugin
DATP is an Xposed Module and Tasker plugin for handling dismissed alarms
originating from the KitKat Desk Clock (Alarm Clock) on Nexus 5 devices. DATP
uses the Xposed findAndHookMethod to intercept the
AlarmStateManager::setDismissState and creates an intent to initiate the Tasker
plugin event mechanism. The Tasker plugin portion of DATP allows you to set an
alarm label of interest to isolate named alarm events; blank (empty string)
alarm labels will result in all dismissed alarms events for that configuration.

Installation Requirements
[Xposed Framework] v2.4+ (FREE)
Home URL - [Will Post Links When Authorized]

Xposed is a framework for modules that can change the behavior of the
system and apps without touching any APKs. That's great because it means
that modules can work for different versions and even ROMs without any
changes (as long as the original code was not changed too much). It's also
easy to undo. As all changes are done in the memory, you just need to
deactivate the module and reboot to get your original system back. There
are many other advantages, but here is just one more: Multiple modules can
do changes to the same part of the system or app. With modified APKs, you
to decide for one. No way to combine them, unless the author builds
multiple APKs with different combinations.

[Tasker] v4.3b5+ (Purchase Required)
Home URL - [Will Post Links When Authorized]
Beta URL - [Will Post Links When Authorized]

Tasker is an application for Android which performs tasks (sets of
actions) based on contexts (application, time, date, location, event,
gesture) in user-defined profiles or in clickable or timer home screen
widgets.

This simple concept profoundly extends your control of your Android device
and it's capabilities, without the need for 'root' or a special home
screen.

NOTE: As of 2014/03/05 the current version available on the Google Play
Store is v4.2u3. The beta edition is required due to the addition
of support for developer event plugins.

Action - net.dinglisch.android.tasker.ACTION_EDIT_EVENT

See [Will Post Links When Authorized] for the
changelog in the upcoming version of Tasker.


Version/Change Log
1.0 - 2014/03/05 - Initial release

Source
Source URL - [Will Post Links When Authorized]
Hint: It's on GitHub and my GitHub repository is the same as my XDA member name

Build Requirement
[Locale API]
Home URL - [Will Post Links When Authorized]

The Locale Developer Platform exposes APIs for plug-in conditions and
settings. Interaction with Locale occurs via Intents which are
documented in the following sections, along with the
[Will Post Links When Authorized]

Thanks
rovo89 - Xposed Framework
Tungstwenty - Xposed Framework
Pent - Tasker
Two Forty Four AM - Locale API
Attached Thumbnails
Click image for larger version

Name:	configure_event.png
Views:	1841
Size:	142.0 KB
ID:	2616290   Click image for larger version

Name:	configured_event.png
Views:	1667
Size:	78.6 KB
ID:	2616291  
Attached Files
File Type: apk DismissAlarmTaskerPlugin-1.0.apk - [Click for QR Code] (369.0 KB, 291 views)
The Following 5 Users Say Thank You to mikefero For This Useful Post: [ View ] Gift mikefero Ad-Free
 
 
8th March 2014, 02:03 PM |#2  
Senior Member
Flag Berlin
Thanks Meter: 52
 
More
Also works on N4.
Would you consider to add actions to create, change and delete alarms by label?
9th March 2014, 07:04 PM |#3  
mikefero's Avatar
OP Junior Member
Thanks Meter: 6
 
More
Quote:
Originally Posted by cramu

Also works on N4.

Thanks for letting me know this works on Nexus 4 devices. Are you running KitKat v4.4+? The reason I am asking is I recently updated the title of this thread as I had a typo as to what version of android devices this is targeting. It's very well possible this would work on older android versions; however I targeted the build of the APK for SDK version 19 which is the KitKat release. When I get a moment I may go back into the AOSP repository and see if this will work on older Android Alarm Clock (Desk Clock) versions, but for now I am forcing KitKat requirement in the build.

Quote:
Originally Posted by cramu

Would you consider to add actions to create, change and delete alarms by label?

It is already possible to create alarms with alarm labels using Tasker; App->Set Alarm action. The Set Alarm App Action contains the following configuration elements:
  • Hours - Hour of day for alarm
  • Minutes - Minute of day for alarm
  • Message - Required on some devices [Not Nexus devices]
  • Confirm - If you want to confirm the creation of the alarm
  • If - Conditional expression that must be met to perform action
  • Label - Alarm label
The above would handle the creating of alarms with alarm labels. I use this App Action in Tasker to create an alarm Sunday - Thursday in a "Sleeping" task that is initiated from an NFC tag that I have on my nightstand. DATP was created so that I could perform my "End Sleeping" task when the alarm is dismissed and not snoozed as Tasker's event Alarm Done would get fired for any action of the Alarm Clock.

Could you elaborate on the enhancement request regarding "change and delete alarms by label?" I do not fully understand what you are looking for in this instance and once I have a better understanding I will look at adding this functionality.
9th March 2014, 11:55 PM |#4  
Senior Member
Flag Berlin
Thanks Meter: 52
 
More
Yes I'm running 4.4.2.

Just digging through my old profiles and you're right, I already managed to set an alarm with label through tasker.
The problem was, that tasker is not able to edit or delete alarms.
If you try to change an alarm that has been set before, Tasker will create a new alarm with the same label.
11th March 2014, 04:18 AM |#5  
mikefero's Avatar
OP Junior Member
Thanks Meter: 6
 
More
Quote:
Originally Posted by cramu

The problem was, that tasker is not able to edit or delete alarms.
If you try to change an alarm that has been set before, Tasker will create a new alarm with the same label.

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.
12th March 2014, 12:32 PM |#6  
Senior Member
Flag Berlin
Thanks Meter: 52
 
More
Thanks for investigation.
14th March 2014, 10:13 AM |#7  
vali_ics's Avatar
Senior Member
Flag Bucharest
Thanks Meter: 223
 
More
When i try to install the apk this is what appear : There was a problem while parsing the package...
I tried another xposed plugin and it work. Can someone upload it in another place?
14th March 2014, 03:47 PM |#8  
Pkt_Lnt's Avatar
Recognized Contributor
Flag SLO
Thanks Meter: 5,796
 
More
Quote:
Originally Posted by vali_ics

When i try to install the apk this is what appear : There was a problem while parsing the package...
I tried another xposed plugin and it work. Can someone upload it in another place?

It only installs on KitKat. You get that message if you try to install on anything less than 4.4 KitKat.
The Following User Says Thank You to Pkt_Lnt For This Useful Post: [ View ] Gift Pkt_Lnt Ad-Free
14th March 2014, 09:05 PM |#9  
vali_ics's Avatar
Senior Member
Flag Bucharest
Thanks Meter: 223
 
More
Will be this available for 4.3 ?

Sent from my GT-N7100 using Tapatalk
15th March 2014, 01:02 AM |#10  
mikefero's Avatar
OP Junior Member
Thanks Meter: 6
 
More
Quote:
Originally Posted by vali_ics

Will be this available for 4.3 ?

Sent from my GT-N7100 using Tapatalk

I will investigate at some point and see if the functionality is available for older versions of Android in the com.google.android.deskclock package. I targeted and tested only KitKat and that is why I forced that restriction on the installation. Feel free to download the source from github and make any modifications. If you do make any changes and want them committed just send me a patch and I will more than likely incorporate in a future release.

Source can be obtained here: github.com/mikefero/DismissAlarmTaskerPlugin

NOTE: I noticed a build issue when I recently checked out a clean copy of the source and have already updated the project locally; will commit sometime soon with some other fixes. The issue is with the pathing for the locale-api which I may just rip out this requirement at some point as well in order to make the building simpler with less setup on any other developers end.
20th April 2014, 06:39 PM |#11  
rgawenda's Avatar
Senior Member
Flag Allariz
Thanks Meter: 105
 
More
Should this work with CM11?

Sent from my Nexus 4 using XDA Premium 4 mobile app
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes