Page 1 of 1

Android clock/timer - Deactivate/Activate

Posted: 06 Aug 2018 07:04
by chrisonline
After the newest Android clock update it is now possible to play a Spotify playlist to wake up.
So again I am investigating if it is possible now to "activate/deactivate" the clock/alarm with Automagic?

I want to disable the clock/alarm on holidays or if it is a legal holiday.

Re: Android clock/timer - Deactivate/Activate

Posted: 06 Aug 2018 15:55
by Desmanto
I use Automagic too much that sometimes I create a simple alarm just in Automagic :lol: Later I add so many things and it became a flow already.

Automagic don't have the method yet to delete or enable/disable certain alarm. We need plugin to do that, and I think it is also no efficient.

- Why don't just create the alarm directly in Automagic. To set the alarm, just use Time, and set the work days as the trigger, set the time.
- Then use query content provider to check if today is holiday, probably such as in this thread : viewtopic.php?f=3&t=7210 or here with reverse logic : viewtopic.php?f=5&t=7172
- If the query says there is a holiday, then stop there. If not holiday, continue to main branch.
- The main branch is simply Open URL in browser, choose Spotify and use the link you copy from Spotify playlist (Copy URI). Or if it doesn't work, use Start Activity with the playlist as the URI.

Beware of using certain playlist or favourites songs as the alarm. Several weeks later, you will hate it. :evil: So to randomize the songs, it is also possible you create several playlist. Copy URI of all these playlist, put in a list type Glovar. Later you can use getRandomElement() to retrieve random list and use it as the alarm. You probably still will hate the playlist, but takes a very long time.

Re: Android clock/timer - Deactivate/Activate

Posted: 06 Aug 2018 21:47
by chrisonline
Thanks. Good idea with Alarm in Automagic. ;-)

Anyway I would prefer to use the Alarm Clock app from Google.
You talked about a plugin can do that. Can you tell me which one?

Re: Android clock/timer - Deactivate/Activate

Posted: 07 Aug 2018 16:36
by Desmanto
The plugin use its own alarm data, AFAIK it is not using the alarm clock from google. So same limitation. It is alarmpad, but can't find it anymore in playstore, probably in xda only.

Setting up the alarm takes some time, including choosing the spotify list. I would still prefer to do it automagic directly, more extra setup, but way much more customization can be done.

Re: Android clock/timer - Deactivate/Activate

Posted: 26 Sep 2019 03:04
by Annie_Yazbeck
Like to make your Android clock and timer? Spotify could be one of the best music sources that you can find favorite music to set as a clock.
So how to use Spotify music as an alarm? You can get the help of Google Clock or use Spotify playlist converter to convert Spotify music to MP3, FLAC, AAC and then transfer them to Android phone to make them as your Android clock with ease.