Go Back   Android Forums > Android Discussion > Android Applications > Tasker

New Forums: Nexus Player | Nexus 9
Like Tree1Likes
  • 1 Post By bberryhill0

test: Reply
 
LinkBack Thread Tools
Old October 7th, 2012, 07:41 AM   #1 (permalink)
New Member
Thread Author (OP)
 
Join Date: Aug 2012
Posts: 9
 
Device(s):
Carrier: Not Provided

Thanks: 1
Thanked 0 Times in 0 Posts
Default Bluetooth Countdown Alarm Widget with Tasker

I'm trying to do this:

When a bluetooth device connects I need a countdown timer to start for a preset time (e.g. 20 mins). The remaining time should be shown decreasing on a 1x1 widget (showing the seconds, as well as minutes remaining is preferable). When the countdown finishes I need an audible alarm with popup button to snooze or dismiss it.

If the bluetooth connection is dropped before the countdown ends, the countdown should be dismissed (until a bt connection is made again at which point it should begin a new countdown).

It would be even better if the preset time could be a random figure within a set range e.g. between 30 mins to 70 mins.

UPDATE: Here's a basic summary of how I did most of this:

Create a profile with state bluetooth connected. Then create a task (e.g. Let's call it "Bt Alarm")

For

Variable %mins Items 20:1

Set Widget Label
Name Alarm Widget Label %mins

Wait
Minutes 1

End For

Perform Task
Bt Alarm 2

You need to create a task widget on your homescreen with the name "Alarm Widget" which points to this task called "Bt Alarm". This sets up a loop which will run for 20 times, each time, reducing the variable %mins by 1, and by re-setting the label of the widget each loop, the widget label effectively becomes a countdown widget. When the countdown is up, it performs the task "Bt Alarm 2" which is:

Music Play
File:
Popup Task Buttons:
Bluetooth Snooze
Bluetooth Cancel


Bluetooth Snooze:
Music Stop
Set Widget Label Alarm Widget Label: Snooze
Wait Minutes 5
Perform Task: Bt Alarm 2

Bluetooth Cancel:
Music Stop
Stop Task: Bluetooth Snooze
Set Widget Label: Alarm Widget Label: Off.

To cancel when bluetooth disconnects before the alarm goes off:
Create a profile for bluetooth Not connected (i.e. Inverted Bluetooth connected). Then:
Stop Task: Bt Alarm 2
Stop Task: Bluetooth Snooze
Stop Task: Bt Alarm
Set Widget Label: Alarm Widget Label Off.

It might not be beautifully written but it works for me. Reply, if I haven't explained well enough.

Advertisements
james899 is offline  
Last edited by james899; November 4th, 2012 at 02:30 PM.
Reply With Quote
sponsored links
Old October 7th, 2012, 12:31 PM   #2 (permalink)
Senior Member
 
bberryhill0's Avatar
 
Join Date: Jan 2010
Location: Rhinelander, WI> Wayzata, MN>Sisters, OR
Posts: 2,471
 
Device(s): Q9c, Eris xtrROM 4.6.5, Droid Concepts 11, Incredible 2 EclipticSense
Carrier: Not Provided

Thanks: 860
Thanked 366 Times in 325 Posts
Default

Would this project be useful to any one else? A description of why you would use this would be helpful.
digit27 likes this.
__________________
My Eris apps
bberryhill0 is offline  
Reply With Quote
Old November 6th, 2012, 09:57 AM   #3 (permalink)
Member
 
Bearcats's Avatar
 
Join Date: Oct 2012
Location: USA
Posts: 259
 
Device(s): HTC Driod DNA
Carrier: Not Provided

Thanks: 25
Thanked 28 Times in 24 Posts
Default

It is to me. As I want to disable WiFi enable mobile data when BT connects because that means I am in my car.

I just found Tasker and its forums today and I think this functionality might just make me jump now to get my new phone versus waiting until after thanksgiving! LOL!
Bearcats is offline  
Reply With Quote
Old November 7th, 2012, 12:03 PM   #4 (permalink)
ROM Developer
 
SUroot's Avatar
 
Join Date: May 2010
Location: Riddlesden, West Yorkshire, UK
Posts: 23,926
 
Device(s): SGS3 (Current) HTC Desire (Retired)
Carrier: 3 UK

Thanks: 1,923
Thanked 5,326 Times in 3,995 Posts
Default

Wouldn't setting wifi off when not connected yo your home ssid do that?
SUroot is offline  
Reply With Quote
Reply


Go Back   Android Forums > Android Discussion > Android Applications > Tasker
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 07:24 PM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.