Friday, July 22, 2022

Home Screen Shortcuts for Google Chat (new Hangouts)

 In Google Hangouts for Android, it was possible to add shortcuts to your contacts, so you could tap an icon of their profile picture on your home screen and be taken straight to your conversation with them. I really enjoyed this. Sadly, the feature went away when Hangouts was replaced with Chat.

This is my workaround to get a similar feature back. It requires an Android phone, with Chat installed (obviously), and Tasker. There are likely alternatives besides Tasker, but it is the way I did this.

First, in the conversation you will be adding to your home screen, use the Forward to Inbox option on any message.

Second, find the email that this produced, and get the URL linked in the "Open message" button:

Screenshot showing the link with the URL needed for the next step. It is styled as a blue button with the text "Open message".

The URL should look something like https://chat.google.com/dm/s1oJMwAAAAA/yGKolF-7I7m, or https://chat.google.com/room/AAAAHBKaYiE/v--n0HPZ_lI for Spaces. Remove the last path section, from the last slash onwards, to produce the URL that should be able to take you to the conversation.

For example:

  • https://chat.google.com/dm/s1oJMwAAAAA/yGKolF-7I7m ➡ https://chat.google.com/dm/s1oJMwAAAAA
  • https://chat.google.com/room/AAAAHBKaYiE/v--n0HPZ_lI ➡ https://chat.google.com/room/AAAAHBKaYiE

You can test it by pasting the URL somewhere that will automatically make it into a link, such as most chat apps. Note that opening it by pasting directly in Chrome (or tapping the link inside certain apps with different settings) will take you to a download page for the Chat app, instead of opening the app in the conversation in question.

Now you need a way to tell Android to open the URL such that it will run the Chat app. I did this with Tasker.

You can create a Task with the "Browse URL" Action. Put in the URL you acquired above. Name the task whatever you want the icon to be labeled on your home screen.

At the bottom of the Task Edit screen, tap the icon in the middle of the bar, and select an appropriate replacement. You can use profile photos from your contacts, which is likely what you want. I saw no difference between using "Contact Photo" and "Contact Thumbnail" as the source, when prompted.

Screenshot of a Tasker task with one Action, Browse URL, and a profile photo set as the icon.

You can test the Task normally. Running the Task should open Chat to the correct conversation.

Finally, add it to your home screen. You can do this by backing out of Tasker, long-pressing on the Tasker icon, selecting Widgets, picking the "Task Shortcut" widget, and finally selecting the Task you just created. It should show up on your home screen, with the name and icon you chose.

I hope this is helpful!