Favourite contacts

Post your questions and help other users.

Moderator: Martin

Post Reply
User avatar
Rafi4
Posts: 281
Joined: 01 Dec 2017 05:23

Favourite contacts

Post by Rafi4 » 19 Mar 2018 23:25

Hi
I want to make a flow to get my favourite contact list and make calls to my favourite list through device orientation trigger. Because i want to keep my home screen clean. I dont want to add one shortcut icon per one contact.

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

Re: Favourite contacts

Post by Desmanto » 20 Mar 2018 16:45

Why don't just put all those favourite contact shortcut into single folder at home screen?

Using device orientation trigger is good for specific use or for showoff. But it is not practical for everyday usage. You don't want to mis-trigger the flow and randomly call someone there.

If your home launcher doesn't support folder, and you want to use a single shortcut instead; you can still create it in Automagic. Use a map to list out the favourite contact and their numbers. Then use Input Dialog Single Choice Menu to select one of them. Pick one and it will use the mapped number, call the number. The flow use Shortcut trigger and put this shortcut to Home screen. But I still suggest you find out the way to put your contact into single folder, rather than creating a flow which does exactly the same. You only need to create a flow when you regular shortcut can't achieve what you need/want.
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.

wired4sound
Posts: 20
Joined: 23 Jan 2019 21:02

Re: Favourite contacts

Post by wired4sound » 03 Feb 2019 23:30

I was looking at your examples list for input dialog multiple single choice list for some examples and it linked to this page.

However, there really isn't an example here.

Could you provide an example? I too, am interested in multiple list, and based on selection, depends on which direction the flow goes. Was trying to use a condition, if its this selection, it does this direction of flow, or that selection does that direction...etc etc.

One example from me is sending an email...comes up with a list of different options, based on the options determines the subject and body information, whether it gathers data to input or just lets me do regular. I have the actions created for each different type of email I may want to send, just not sure how to say if option 1 then execute action 1, etc

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

Re: Favourite contacts

Post by Desmanto » 04 Feb 2019 06:42

My Automagic Backup flow is an example how I use Multiple parallel expression to split multiple triggers in single flow and also to split an input dialog - single choice menu into multiple branch. Just define the list in the script prior the input dialog / parallel expression. : viewtopic.php?f=3&t=7858

But if you want to do similar things, but only different parameter for each choice, you can simply define the parameter inside a map. This is similar to input dialog to choose app - packagename. Where the end action is the same, to launch the app. But the parameter for the packagename is different, based on the choice. Look at here : http://automagic4android.com/forum/view ... f=3&t=7230

In your case, you may have multiple parameter. You can store them into nested map - list.

Code: Select all

emaildb = newMapFromValues(
"Send alert", newList("emergency@alert.com", "Emergency", "this is manual generated emergency alert"),
"Send On The Way", newList("bob@gmail.com", "On The Way", "I am on the way from my office to your house"),
"Reply Driving", newList("hq@secretagent.com", "I am driving", "I am currently driving, can't reply. I will reply ASAP") );

choice = getMapKeys(emaildb);
Later after you pick one using the input dialog, example "Send Alert", use this access each value.

Code: Select all

emailaddr = emaildb[value][0];
subject = emaildb[value][1];
body = emaildb[value][[2];
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