Create your own quick setting tile on Lollipop

Share and discuss your flows and ideas with other users.

Moderator: Martin

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: Create your own quick setting tile on Lollipop

Post by Martin » 07 Nov 2016 20:55

Sure, I add it to the todo-list.

You could use action Init Variable Package Info to query the details of an app and then copy the icon_uri property that reads like android.resource://package.x.y.z/1234 to the file path of the CM QS tile trigger.

User avatar
heilong
Posts: 77
Joined: 18 Oct 2016 15:20

Re: Create your own quick setting tile on Lollipop

Post by heilong » 07 Nov 2016 22:15

Thanks! Oh, it is awesome! I didn't think I don't even have to extract the icon.

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: Create your own quick setting tile on Lollipop

Post by Martin » 08 Nov 2016 20:45

The next update will support selecting app icons. The path will look slightly different to ensure that the path can be shared on different devices: [url]app.icon://package.x.y.z[/url]

User avatar
heilong
Posts: 77
Joined: 18 Oct 2016 15:20

Re: Create your own quick setting tile on Lollipop

Post by heilong » 09 Nov 2016 00:14

Appreciate it, Martin!

User avatar
heilong
Posts: 77
Joined: 18 Oct 2016 15:20

Re: Create your own quick setting tile on Lollipop

Post by heilong » 09 Nov 2016 23:56

I'm back to the Resurrection Remix ROM, it's just so much more polished than Beanstalk.
I was able to add a QS tile similar to how you described in the first post.
RR has a bug in `settings` command - it can list secure settings which shows sysui_qs_tiles exist, but get/put for this property doesn't work.
But I could change the settings by carefully editing /data/system/users/0/settings_secure.xml` while rebooted to recovery (just in case).

So, this still works on MarshMallow.

User avatar
heilong
Posts: 77
Joined: 18 Oct 2016 15:20

Re: Create your own quick setting tile on Lollipop

Post by heilong » 10 Nov 2016 20:24

Update: I have since modified my ROM's settings command (modified SettingsCmd.java and recompiled settings.jar), so the `settings get/put secure sysui_qs_tiles` work for me now.

Here's an improved flow that adds a new tile. I have to use settings as root command, rather than Automagic's actions, because they don't work for me (I think they're trying to use sysui_qs_tiles from CMSettings while on my ROM the one from Settings should be used). The flow gets the current settings, and checks if the tile is already on the list. If it's not, it's added at the end of the current tiles.
It's still a work in progress - I should pass the tileID in as an argument to this flow, then it could be reused for each custom tile.
Attachments
flow_ShowTile_20161110_231940.xml
(7.6 KiB) Downloaded 977 times

User avatar
heilong
Posts: 77
Joined: 18 Oct 2016 15:20

Re: Create your own quick setting tile on Lollipop

Post by heilong » 10 Nov 2016 23:53

What other intent extras we can use to customize the Tile's behavior?
I was checking out the IntentTile source and looks like you've got all the properties covered. That leaves two questions:

- How to collapse panel on activating the tile?
- How to dismiss keyguard (prompting for PIN/Password if necessary) on activating the tile?

E.g. if my custom tile runs an app, I'd like it to dismiss the keyguard if it's active, and collapse the notifications panel, to show the launched app.
Should this be configured in the tile setup intent, or done by actions in the tile broadcast listener flow?

Post Reply