Help working with Twilight app

Post your questions and help other users.

Moderator: Martin

Post Reply
EternalLearner
Posts: 5
Joined: 28 Nov 2017 23:18

Help working with Twilight app

Post by EternalLearner » 10 Mar 2018 18:20

Hi!

I absolutely love Automagic and hope it becomes widely popular. It's so much better than the other alternatives, all of which I've tried.

I'm trying to send commands to the app Twilight which is a great blue filtering app. My goal is to us a shortcut (actually a Quick Settings Tile) to toggle between Twilight's "Auto" and "Always" settings.

I'm a noob at Android intents, etc. I looked up the Twilight documentation and found this with a list of extras:

https://twilight.urbandroid.org/?page_id=27

I don't see a way to change the desired setting, but it does allow changing the profile. I can achieve my purpose by creating an "On" profile which is always on, and my own preferred profile, named "Jon" and toggle between those. How would I do this?

Here's my current attempt. In a previous attempt I used the activity specified on Twilight's website (at the link above): com.urbandroid.lux.twilightservice, but Automagic complained with an error that it could not find that.

http://automagic4android.com/flow.php?i ... 150df085f2

Thanks for any help!

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

Re: Help working with Twilight app

Post by Desmanto » 11 Mar 2018 12:59

I hope so too. Haven't found any other automation app which is as powerful as Automagic.

Looking at the documentation, it stated to use service. So you should use Start Service instead. You should can find the service com.urbandroid.lux.TwilightService.
However I don't understand the extra needed. Usually it is using putString(). Probably this will work.

Code: Select all

putString("android.intent.extra.start", 1);
But I don't know, you should try first without any extra.

For Blue light filter, i don't use any external app anymore. I simply create a full widget as big as my screen resolution, change the background color to #80505000 (somewhat gray with half transparency). Then use Show widget to show overlay covering the screen. Create a flow to toggle the show/hide (I have combined it to one of my giant flow). Simply tap shortcut to toggle the mode. I can make it automatic, but I don't need it, as I rarely use it.
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.

Post Reply